"iOS8.1 already has this feature, but it was not as popular as it is now. The current trend is that it will become popular, so many e-commerce platforms B2B, P2P, C2C, and X2X may need this payment function. Let's do a simple study here." The first step is to change the target to iOS 8.1. Of course, to support China, you need 9.2 or above and iPhone 6 or above. Then set Apple Pay to on in the project Capabilities. This will automatically import the required library files, then add a permissions file and set it, and finally modify or create your App ID. As the image above shows, you may notice that there is no valid Merchant ID. We need to create one. Visit the Identifiers > Merchant ID page in the Apple iOS Developer Center. Then follow the instructions to create a Merchant ID and register it. This is similar to other certificates and I won't go into more detail here. The image below is a reference image that has already been created. Download and install, then refresh the interface of the project just now, select the check mark, and you can see the following figure Here is a brief description of the code: In the .h file
.m file
During this process you may encounter the following problems: 1. I don’t know how to check countryCode. I wrote this as China’s countryCode query website. 2. I don’t know how to check currencyCode. So far, I still don’t understand it. There are a lot of prompts in the error message, just pick one at random. 3. I am one of those who don’t have an iPhone 6… For other properties that I think are more important, please see the Demo for details: The above pictures are all simulators |
<<: 【Special Topic】The 5th Global Mobile Game Conference GMGC2016
>>: Media comments on the main function of Apple Pay:
For the first time, a drone successfully defeated...
Tu Shou'e, an expert in rocket design, is one...
The average cost of downloading and activating a ...
On the afternoon of June 28, Jia Yueting, the fou...
How much is the production price of Dali Bargaini...
The China Earthquake Networks Center officially d...
How to choose a children's electric toothbrus...
This article summarizes the five most frequently ...
Low-cost cases can bring huge returns because of ...
Having been engaged in mobile advertising commerc...
The significance of the Chinese market to the int...
Summer vacation is coming to an end, and many par...
Nanjing tea drinking and takeaway private studio ...
A few days ago, I accidentally saw on the Interne...
A correct marketing promotion process Marketing pr...