"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:
Course Contents: 1. The background and trend of D...
The first time I heard the word "tonality&qu...
2020 was supposed to be the year of recovery for ...
Personal IP refers to an individual’s right to ow...
The deep and dark universe seems to hide many sec...
Wenchang Tower is a kind of mascot, and its abili...
We can't help but ask (pao) and (xiao) , why ...
Screen: operate: Sound Effects: Plot: Experience:...
Review expert: Wang Guoyi, Postdoctoral Fellow in...
Nowadays, the country’s control over drunk drivin...
Writing copy is the most common thing done by new...
In Tik Tok, you often see those popular video adv...
According to foreign media reports, mobile spam is...
On the afternoon of September 2, Getui Big Data r...
We often say that operating short videos requires ...