"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:
The situation in all aspects is not very good thi...
Under the epidemic, traffic has shifted online an...
01What ’s Changing and What’s Not Changing in Mar...
Tips for increasing followers/selling products/mo...
If it weren’t for the limited-time promotion of W...
Improve your speaking ability, 10 minutes a day e...
Now many e-commerce platforms, including short vi...
Introduction to C++ grammar and basic algorithm r...
June is really a month that makes operations copy...
When developing products or doing operations , yo...
[[169846]] (I) Build the basic environment (neces...
Short video platforms are the most popular traffi...
Since it is the beginning of 2021, today I want t...
The course introduces in detail the commonly used...
Double Eleven is here, and it’s time to shop. How...