One environment configuration requires developer account
Developer Center Https://developer.apple.com/membercenter/index.action
- Add an app IDs
Two Configuring the Merchant IDs business ID
The following is a appids and business ID binding
Then, in return to Appids, look at the Apple Pay in the ID and find it becomes available.
The next step is to generate a certificate for the business ID.
Click Merchant IDs
Click ID. Click Edit.
There will be a hint message. Are you prompted to allow Apple Pay outside of the United States? Of course you have to choose Yes. Otherwise, how do you use it in China?
Then the next step
Request a CSR file using a keychain.
Request a certificate from a certification authority using a keychain, store to disk
Select the file you just generated. Upload
Download certificate after success
Double-click Install after download is complete
If this occurs after installation, the intermediate certificate of the system is expired. Need to update the root certificate of the system
https://www.apple.com/certificateauthority/Certificate Download update address
Two certificates are required here and installed after download. It's done.
All right. Certificate Configuration Series complete, next to Xcode inside continue to configure
First Open Apple Pay
Then select the business ID. If it doesn't come out, your developer account may not be logged on to Xcode,
OK, all of the above configurations are complete. Here is the code. Demo example.
iOS Apple Pay certificate configuration