2
votes

We tried to add credit, debit card details into Apple Pay from within our app.

The below are the things from apple doc.

Important Adding payment passes requires a special entitlement issued by Apple. Your app must include this entitlement before this class can be instantiated. For more information on requesting this entitlement, see the Card Issuers section at developer.apple.com/apple-pay/. In sandbox environment we tried entitlement key , but we can't load payment card details.

We can add payment card iTunes manually. But can possible to add payment card in apple pay wallet programmatically.

Is't possible to mock the Testcard (payment card) like pkpass file? No documentation available to mock the payment card in sandbox environment.

https://developer.apple.com/reference/passkit/pkaddpaymentpassviewcontroller?language=objc

Thanks in advance.

2

2 Answers

2
votes

If I understand you correctly, you have the entitlement key in place (and I assume you have acquired the special permission from Apple). I am also assuming that you are using the PKAddPaymentPassViewController for the provisioning process. If all of this is correct then there are a few more things you need to keep in mind. First of all, you cannot test this using mock data or even test environments. You must use production data with real payment cards which can be confirmed by Apple Pay with the card issuer. Also, the app must be distributed with TestFlight in order for it to work, so you cannot run from Xcode directly.

0
votes
Enabling In-App Provisioning of Payment Cards

Use this entitlement to enable the in-app provisioning of payment cards. This entitlement allows you to initialize and present a PKAddPaymentPassViewController object.

In the entitlement’s file, add the com.apple.developer.payment-pass-provisioning key with a Boolean value of YES. You need special permission from Apple to submit apps with this key enabled. For more information, contact [email protected].

https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/EntitlementKeyReference/ApplePayandPassKitEntitlements/ApplePayandPassKitEntitlements.html