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

canMakeNativePayPayments return false in production #155

Open
JTorrus opened this issue May 19, 2020 · 5 comments
Open

canMakeNativePayPayments return false in production #155

JTorrus opened this issue May 19, 2020 · 5 comments

Comments

@JTorrus
Copy link

JTorrus commented May 19, 2020

I've got this piece of code in my app

final deviceSupportsNativePay = (await StripePayment.deviceSupportsNativePay()) 
&& 
(await StripePayment.canMakeNativePayPayments(<String>["american_express", "discover", "master_card", "visa"]));

It works in Sandbox mode but returns false in production despite having supported cards in my Apple Wallet.

I'm currently using version 1.0.7 of this package.

Output of flutter doctor -v

[√] Flutter (Channel stable, v1.17.1, on Microsoft Windows [Version 10.0.18363.836], locale en-US)
    • Flutter version 1.17.1 at D:\workspace\devkits\flutter
    • Framework revision f7a6a7906b (7 days ago), 2020-05-12 18:39:00 -0700
    • Engine revision 6bc433c6b6
    • Dart version 2.8.2
@jonasbark
Copy link
Owner

Feel free to open the project in Xcode and debug this line:
https://github.com/jonasbark/flutter_stripe_payment/blob/master/ios/Classes/TPSStripeManager.m#L327

@JTorrus JTorrus changed the title canMakeNativePayments return false in production canMakeNativePayPayments return false in production May 21, 2020
@EArminjon
Copy link

EArminjon commented May 29, 2020

I test print(await StripePayment.canMakeNativePayPayments([]));

Display always false, despite of the fact that I can pay with google pay with this device with my app :). In which valid use case device could return "deviceSupportsNativePay: true" and "canMakeNativePayPayments: false" ?

I didn't known how debug it with android studio...

@jonasbark

@vahurh
Copy link

vahurh commented Nov 29, 2020

For others out there: I added "mastercard" to the list of networks in addition to "master_card" and it works fine now. Not sure whether master_card is worth keeping.

Noticed it in this issue: #179.

I assume canMakeNativePayPayments was returning false because I only had mastercard cards in my Apple Wallet. Hope it helps :)

@mclark4386
Copy link

I'm having this issue as well, but not really sure why it's happening. Here is the "networks" I'm using:
const kPaymentNetworks = ["american_express", "visa","discover", "mastercard"];
I loaded it into xcode and basically everything looked good until it went into the resolve(@([PKPaymentAuthorizationViewController canMakePaymentsUsingNetworks:networks])); but get a false out the other side... not really sure where to go from there... Would love any feedback.

It was working fine before, but we needed to upgrade from ^1.0.8 to ^1.1.0 to get it working in modern flutter (with a bit of help from over in #284 ).

@mclark4386
Copy link

Ooook, so follow up in case it helps anyone else. The issue for us was the "Apple Pay Entitlement". We had set it up before but had to re-create the iOS project in the aforementioned updates and in so doing that entitlement did NOT get re-set... added it and the merchant id and BOOM works again!

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

5 participants