Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin doesn't recognized cards in ApplePay Wallet #14

Closed
nexus1892 opened this issue Jun 29, 2017 · 3 comments
Closed

Plugin doesn't recognized cards in ApplePay Wallet #14

nexus1892 opened this issue Jun 29, 2017 · 3 comments

Comments

@nexus1892
Copy link

Hi, I have added a credit card to my applepay wallet, however when I use the plugin to verify a purchase can be made it returns the following, "This device can make payments but has no supported cards". I am on iOS 10.3.2 and Cordova 7.0.1. Any help tracking down the issue would be very helpful! Thanks.

@samkelleher
Copy link
Owner

Hello @nexus1892 - the plugin is just wrapping the call to canMakePayments() which is documented here > https://developer.apple.com/documentation/passkit/pkpaymentauthorizationviewcontroller/1616192-canmakepayments

I can't comment on your specific setup since I don't know if you've setup your Apple Pay correctly, the card is valid and its limitations, location and if you've setup your app correctly.

I the top of the CDVApplePay.m file, there are some hard coded requirments:

- (void)pluginInitialize
{

    // Set these to the payment cards accepted.
    // They will nearly always be the same.
    supportedPaymentNetworks = @[PKPaymentNetworkVisa, PKPaymentNetworkMasterCard, PKPaymentNetworkAmex];

    // Set the capabilities that your merchant supports
    // Adyen for example, only supports the 3DS one.
    merchantCapabilities = PKMerchantCapability3DS;// PKMerchantCapabilityEMV;


}

These are the most common settings and I've never enounctered a user with settings different this but maybe you're the first! Basically requries 3DS merchant with Visa, Amex, or MasterCard.

Check your card meets these requirements and if Apple Pay works in some other apps.

Thanks for stopping by, make another comment if you need more info.

@nexus1892
Copy link
Author

Thank you for the reply. Unfortunately the problem persists. I added a second credit card to my wallet and confirmed that both cards are setup for ApplePay(mastercard and visa). I have not changed the hardcoded settings above. The only thing I have done in my code is make a call to ApplePay.canMakePayments with the same code provided in the tutorial. I added this code to the onDeviceReady after Cordova is initialized. Please advise for anything else I can try.

@nexus1892
Copy link
Author

This was happening because Apple Pay wasn't enabled under Capabilities in the target settings in Xcode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants