Apple Pay In-App Provisioning Card
Asked Answered
B

2

2

I am developing an App that allows a user to Add Cards a payment pass in the Wallet via the App. In order to do this, you must be request Apple to add the following entitlement

I'm also using "com.apple.developer.payment-pass-provisioning" these entitlements in my app Apple granted this entitlement for my team ID modified my provisioning profile with this entitlement enabled.

Trying to invoke the Add card screen in the Wallet app from My application using the below code

PKAddPaymentPassRequestConfiguration *request;
request.cardholderName  = @"xxxxxxxx";
request.primaryAccountSuffix = @"xxxx";
request.localizedDescription = @"This will add the card to Apple Pay";
request.primaryAccountIdentifier = @"test";
request.paymentNetwork = @"Test";

PKPassLibrary *libra;
[libra openPaymentSetup];

PKAddPaymentPassViewController *vc = [[PKAddPaymentPassViewController alloc] initWithRequestConfiguration:request delegate:self];
vc.delegate = self;
[self presentViewController:vc animated:YES completion:nil];

App is getting crash. with the error passing Nil value to the viewcontoller.

Bozuwa answered 4/5, 2018 at 11:29 Comment(6)
Your libra variable is nil because you need to initialise it with an instance of PKPassLibraryGourd
Thanks, Paul it's working for me...Bozuwa
Now i'm able to invoke Card scan page and passing card details and using PKAddPaymentPassRequestConfiguration its not prepopulating. Can you please tell me where i'm missing.....Bozuwa
Do you aware how to Add Card-on-file from iTunes @GourdBozuwa
@Gourd how to know my bank card is added or not in Apple Wallet.Bozuwa
Can someone tell me how to get the documentation for adding a card to wallet app from within my app?Supernatural
B
1

Have to Initialise the PKPassLibrary & PKPaymentPassRequestConfiguration replaced PKPassLibrary *libra; with PKPassLibrary *libra = [[PKPassLibrary alloc] init];

Bozuwa answered 23/5, 2018 at 7:1 Comment(11)
hii. I want to display apple wallet to save the card details of the user when the user clicks the add cards button in ios app. How to do it. could please give some idea about itRigveda
r you trying to add a card from your App? Then you have to use the above code with the initialization of PKAddPaymentPassRequestConfiguration.Bozuwa
yaa. can i implement it same as in swift. I am using swiftRigveda
ya, you can but I implement in objective CBozuwa
I have another doubt that is when user clicks the button is it open the apple wallet or the user details are stored in wallet?Rigveda
Can someone please tell me how to get the docs for adding card to wallet from my iOS app? Is this any private document ?Supernatural
Yes, those are confidential Apple guys only send after requesting with the proper requirement.Bozuwa
When the user clicks the add cards button is it redirects to apple wallet or can we display the cards fields to the user? is there any URL to launch the apple wallet when the user clicks the add cards buttonRigveda
https://mcmap.net/q/2037241/-pkaddpasspaymentrequest-not-able-to-send-a-request go through this answer. @RigvedaBozuwa
Hii Balu. For adding the card details of user from my ios app can we need to get the permission from apple or it is not required? We are not card issuers. Only we can processing the payments. do you know any idea about it? Please give some idea.Rigveda
Hi vijju. It you want to use this In App-Provisioning feature you need to request Apple to enable the Payment pass provisioning entitlement. Otherwise you cannot able to proceed.Bozuwa
A
2

First create PKAddPaymentPassRequestConfiguration using an encryption scheme. Then create PKAddPaymentPassViewController using this config. Update all required details in the config variable.

PKAddPaymentPassRequestConfiguration *config =[[PKAddPaymentPassRequestConfiguration alloc] initWithEncryptionScheme:PKEncryptionSchemeECC_V2];

Assimilate answered 22/5, 2018 at 19:54 Comment(1)
Hii. I want to call the apple wallet from ios app when the user wants to store the card details into apple wallet. so i got the nil value in addPaymentPassVC .let addPaymentPassVC = PKAddPaymentPassViewController.init(requestConfiguration: config!, delegate: self). So i got the Fatal error: Unexpectedly found nil while unwrapping an Optional value. do you have any idea about itRigveda
B
1

Have to Initialise the PKPassLibrary & PKPaymentPassRequestConfiguration replaced PKPassLibrary *libra; with PKPassLibrary *libra = [[PKPassLibrary alloc] init];

Bozuwa answered 23/5, 2018 at 7:1 Comment(11)
hii. I want to display apple wallet to save the card details of the user when the user clicks the add cards button in ios app. How to do it. could please give some idea about itRigveda
r you trying to add a card from your App? Then you have to use the above code with the initialization of PKAddPaymentPassRequestConfiguration.Bozuwa
yaa. can i implement it same as in swift. I am using swiftRigveda
ya, you can but I implement in objective CBozuwa
I have another doubt that is when user clicks the button is it open the apple wallet or the user details are stored in wallet?Rigveda
Can someone please tell me how to get the docs for adding card to wallet from my iOS app? Is this any private document ?Supernatural
Yes, those are confidential Apple guys only send after requesting with the proper requirement.Bozuwa
When the user clicks the add cards button is it redirects to apple wallet or can we display the cards fields to the user? is there any URL to launch the apple wallet when the user clicks the add cards buttonRigveda
https://mcmap.net/q/2037241/-pkaddpasspaymentrequest-not-able-to-send-a-request go through this answer. @RigvedaBozuwa
Hii Balu. For adding the card details of user from my ios app can we need to get the permission from apple or it is not required? We are not card issuers. Only we can processing the payments. do you know any idea about it? Please give some idea.Rigveda
Hi vijju. It you want to use this In App-Provisioning feature you need to request Apple to enable the Payment pass provisioning entitlement. Otherwise you cannot able to proceed.Bozuwa

© 2022 - 2024 — McMap. All rights reserved.