Skip to content

Latest commit

 

History

History
49 lines (38 loc) · 4.63 KB

apple-pay.md

File metadata and controls

49 lines (38 loc) · 4.63 KB

Apple Pay integrating

To use Apple Pay as a payment method, you must create a Merchant ID and the corresponding certificate. And upload the certificate to the portal. In this section we will show you how to create a Merchent ID and how to get the certificate. If you do not want to use Apple pay you can ignore this section.

Create Merchant ID and signed certificate

  1. open xCode and click on your project and go to tab Signing & Capabilities Signing & Capabilities
  2. on this tab click to + Capability and write Apple Pay into search bar Add capability
  3. after confirming the dialogue a new section will be added New section capability
  4. Click on plus icon and create you new Merchant ID. Create Merchant ID
  5. Once your Merchant ID is created, it will be sent to the certificate on developer.apple.com. Open your identifiers you can use filter Merchant IDs in right top corner. add capability
  6. Click on the Merchant ID you created. At this page you need to create Apple Pay Payment Processing Certificate in this section click on Create Certificate add capability
  7. You will be ask for additional information. When you answer you can click on Continue button certificate detail
  8. Now you have to create and upload Certificate Signing Request. Open Keychain Access on you Mac and go to top bar menu Keychain Access => Certificate Assistant => Request a Certificate From a Certificate Authority... Keychain Access
  9. Now you have to fill basic information about certificate request and select Saved to disk and also check Let me specify key pair information and click on Continue Certificate request basic info
  10. In next window you have to specify type of certificate request you have to select Algorithm: ECC and Key Size: 256 bits then you can click on Continue and save your certificate request to disk Certificate type
  11. Now you have to upload saved certificate request to apple developer page and click on Continue Upload certificate request 12.Your certificate was successfully created. You can download it. Next step will be uploading this certification to Portal. Certificate type

Extract private key from KeyChain

  1. Open KeyChain => Login => Keys Private key
  2. Right click at your private key and select option Export YOUR CERTIFICATE NAME Private key extraction
  3. You have to save this private key as Personal Information Exchange (.p12) format. Private key p12
  4. After saving this certificate you will be asked to create a password. Keep the password field empty! And continue by pressing OK Private key password
  5. Next step is just confirm action with your personal password and after conformation you will get .p12 certificate. This certificate has to be uploaded to Portal

Upload certificate to Portal

  1. Open Portal => Space => Select Relevant Space => Settings
  2. On the top menu select Payment => ApplePay ApplePay Settings
  3. Make sure ApplePay is enabled
  4. Click Payment Processing Certificate ApplePay Certificate Menu
  5. Fill in the Merchant Identifier and attach Private Key File and Payment Processing Certificate File in the following window: ApplePay Certificate Upload

Set up Merchant ID in Mobile SDK configuration

The final step is setting up the Merchant ID in SDK configuration. To do so, please call the configureApplePay(merchantId: "merchant.your.id") method with the relevant Merchant ID. This method can be called for example after SDK initialization.

        paymentSdk = WalleePaymentSdk(eventObserver: self)
        guard let paymentSdk = paymentSdk else { return }
        paymentSdk.configureApplePay(merchantId: "merchant.your.id")