Implement Apple pay in swift 5

Updated 28 February 2020

Save

During the presentation on the 9th of September 2014, Apple introduced Apple Pay — its own system of mobile payments.

Apple pay allows iPhone 6 and iPhone 6+ users, as well as those who have new versions of Apple Watch easily shop online now, and benefit from apple pay app integration as well as make payments with the help of NFC (Near Field Communication) Technology. Touch ID or Face ID technologies are used for payment authorization.

How to Set Up Apple Pay in The App

To set up your environment to implement Apple Pay in your apps, you must complete these steps:

  1. Create a Merchant ID
  2. Configure Apple Pay capabilities in Xcode for your project
  3. Create a sandbox user in iTunes Connect
  4. Add a test card
  5. Create a payment request in your project
  6. Handle the result

Step 1: Create a Merchant ID from your Apple Developer Account.

Steps 2: Configure Apple Pay capabilities in Xcode for your project

Steps 3: Create a sandbox user in iTunes Connect

Login this sandbox account in the device or simulator.

Steps 4: Add a test card in the account

Please click here for demo card details.

Steps 5:  Create a payment request for the project.
First, create UI For apple pay.

Import the PassKit Library in ViewController

Create a Payment Request in the ViewController

Handle the Apple Pay button action and make payment request

Steps 6: Handle the result

Confirm the PKPaymentAuthorizationViewControllerDelegate in the View Controller

Now run your app.

In this way, you can integrate Apple pay in your app. I hope you understand the whole process. If you have any queries or suggestions please comment below.

Thank you

 

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


16 comments

  • Anand
    • Debabrata Roy (Moderator)
  • aksa
    • Debabrata Roy (Moderator)
  • Ankit Kumar Gupta
  • Ankit
    • Debabrata Roy (Moderator)
  • HM
    • Debabrata Roy (Moderator)
  • Rafat
    • Debabrata Roy (Moderator)
  • Deepak
    • Debabrata Roy (Moderator)
  • Adarsha
  • SureshKannan
    • jitendra kumar (Moderator)
  • Start a Project


      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home