Skip to main content

Integration Of ApplePay With Your iOS App: Step By Step Guidance

 ApplePay With Your iOS App:


The best form of payment in an iOS app is possibly Apple Pay - easy and efficient for both the developer and the user. Using ApplePay now users can quickly make transactions and app should support the services.

Now, we will have a look at a step by step guide on how to integrate ApplePay with the iOS app



First of all, you need to do is download the starter project in the ViewController.swift file, here the shoe struct for the same is also available:

To populate our picker view we will use this along with the array of Shoes and retrieve the price later.

The second thing required to start with ApplePay is to create a merchant ID in the developer portal. The benefit is that it will allow Apple to identify your app as a ‘merchant’ for purchases.

For creating merchant id, first we need a unique bundle identifier for an app and in the app, settings go to identity and the user can put a self bundle identifier - only if a user is making their own app like for example - (com.username.app-name.)
The second step is to jump into the development member center and from the menu select ‘’Identifiers, Profiles and Certificates.’’

From the left menu select ‘Merchant IDs’ tap ‘+(plus)’ on the top right corner. The description window gets open, all you need to do is enter the app name than in the identifier type ‘merchant.’ Add your bundle identifier. Tap Continue and then Register.

After this, we need CSR - Certificate Signing Request and for these open up keychain access, from the top menu select ‘Certificate Assistance’ in that ‘Request a Certificate from a Certificate Authority.’

In the ‘User Email Address’ field add an email address, select the ‘save to disk’ option for your request.

We need to create a payment processing certificate that will be used for securing transaction data. Go to the member center and select ‘’ All Certificates’’ from the side menu. Click on the ‘+’ button on the top right corner and create a new certificate. 

Under ‘’Production’’, you need to select the ‘Apple Pay Payment Processing Certificate.’ select the earlier created ‘Merchant ID’ than under the apple pay payment processing certificate tap on to ‘Create Certificate.’

As you click Apple will ask ‘Will payments associated with this Merchant ID be processed exclusively in China?’ go with Yes and continue through the process and upload your CSR that is saved earlier from Keychain access.

Yay! Certificated created successfully. Download and save it with your project and double click on it and it gets processed in Keychain Access. 

Now, back to Xcode and enable Apple Pay there and under ‘Capabilities’ turn on Apple Pay and select the correct Merchant ID.
First of all, you need to do is download the starter project in the ViewController.swift file, here the shoe struct for the same is also available:

To populate our picker view we will use this along with the array of Shoes and retrieve the price later.

The second thing required to start with ApplePay is to create a merchant ID in the developer portal. The benefit is that it will allow Apple to identify your app as a ‘merchant’ for purchases.

For creating merchant id, first we need a unique bundle identifier for an app and in the app, settings go to identity and the user can put a self bundle identifier - only if a user is making their own app like for example - (com.username.app-name.)
The second step is to jump into the development member center and from the menu select ‘’Identifiers, Profiles and Certificates.’’

From the left menu select ‘Merchant IDs’ tap ‘+(plus)’ on the top right corner. The description window gets open, all you need to do is enter the app name than in the identifier type ‘merchant.’ Add your bundle identifier. Tap Continue and then Register.

After this, we need CSR - Certificate Signing Request and for these open up keychain access, from the top menu select ‘Certificate Assistance’ in that ‘Request a Certificate from a Certificate Authority.’

In the ‘User Email Address’ field add an email address, select the ‘save to disk’ option for your request.


ApplePay


We need to create a payment processing certificate that will be used for securing transaction data. Go to the member center and select ‘’ All Certificates’’ from the side menu. Click on the ‘+’ button on the top right corner and create a new certificate. 

Under ‘’Production’’, you need to select the ‘Apple Pay Payment Processing Certificate.’ select the earlier created ‘Merchant ID’ than under the apple pay payment processing certificate tap on to ‘Create Certificate.’

As you click Apple will ask ‘Will payments associated with this Merchant ID be processed exclusively in China?’ go with Yes and continue through the process and upload your CSR that is saved earlier from Keychain access.

Yay! Certificated created successfully. Download and save it with your project and double click on it and it gets processed in Keychain Access. 

Now, back to Xcode and enable Apple Pay there and under ‘Capabilities’ turn on Apple Pay and select the correct Merchant ID.

Let’s Start Coding:

Open file ViewController.swift and add the following function inside the class.

This will be used to display information to the user as they go through the ApplePay process.


Next, you need to do is to connect IBAction with your ViewController.swift. And for using Apple Pay effectively just insert the following line into ViewController:

Import PassKit

Now, Configure the payment request in purchaseItem():



Now, Deal with the output and add the following line to purchaseItem(): that makes the


described extension.



Time to test…!!!

All you need to do is make a successful payment by continuing with the payment request by selecting a payment method such as Visa, Stripe, MasterCard, etc.

To complete the payment just insert following line in the didAuthorizePayment method:


Wrap Up:

hire iOS app developer

It’s done this is how you can integrate ApplePay with your iOS app. Or still, you have any doud or problem then we also provide the facility to hire iOS developers integrate Apple Pay. Not just this, you can also hire iOS app developer at Concetto Labs to build your dream application that helps to grow your business.






















Comments

Popular posts from this blog

How to Hire a Full Stack Developer for Frontend Web Development?

People are often heard nowadays talking about back end and front end or sometimes the server side and the client side. The proper presentation of the data to the users is included in the frontends. The users mainly access the web through the normal browser. So, to target the end users, various technologies like JavaScript, CSS, and HTML are used. The  full stack web developer  and full stack programmer is mainly involved in the overall task of development, and so, it may be considered as the proper answer to the question, “What is full stack developer?” The backend generally, on the other hand, is much more concerned with the data aspect of a web application and also with the business logic. The 3-tier architecture For web development, there is mainly three-tier architecture which proves very much useful. Common client-server software architecture is implemented in this particular approach. Due to its huge demand, it is imperative to learn full stack web develo...

5 Features while Developing On-Demand ‘Mover n Packers’ App like Uber Movers

Peeping into a few years back, though there were mobiles trending, mobile apps were more limited towards messaging and gaming, but a year or two year back scenario depicts a different story in all. On-demand applications that can be for Food or say Cab Booking or for Salon or for the  Guard booking app  for the event, anything, and everything can be covered in the app itself. UBER is considered more of as a BRAND instead of just an app to book the cab. It has widespread its scope beyond the app in various fields across the globe. Along with the services of moving human from one destination to another, not just limiting to that, Uber is even into Movers and Packers, namely Uber Movers. According to the report, “UberMovers provides free and professional moving services for up to ½ an hour for students in Atlanta between 9 a.m. to 2 p.m. on Saturdays only”. Similar moving services, it provides in Nashville even. Eventually, it is spreading its wings further too. Are you the...

Top excellent Photo Editing Apps for iPhone and Android

 The photograph is always looking to capture picture-perfect images with creating memories. Using smartphones cameras offers great optics with high-resolution and sharp results. Today photographers are increasing as they click high-quality images with excellent resolution. If you’re a beginner and want to click masterpiece, the best we could recommend is to go for the best photo editing app for iPhone and Android to create a great visual strategy. One can also choose a product photography course to include photographic techniques and explain the best photo editing apps they should use. After you pick the best photo editing app, make sure it offers a comprehensive set of tools that make your photos shine. What are the best photo editing apps? After testing dozens of famous applications, we have listed below the best photo editing apps for iPhone and Android . We know that not everyone can shoot a photo with just an Android or iPhone smartphone. Therefore, here come the photo editi...