flutter-stripe / flutter_stripe

Flutter SDK for Stripe.
https://pub.dev/packages/flutter_stripe
961 stars 530 forks source link

Apple Pay not working on real device even when card is added. #566

Closed charlesarchibong closed 2 years ago

charlesarchibong commented 2 years ago

Describe the bug Apple Pay it not working on physical iPhone

final support = await Stripe.instance.checkApplePaySupport()

support is always = false

To Reproduce Steps to reproduce the behavior:

  1. Initial stripe and called the Stripe.instance.checkApplePaySupport().

Expected behavior Stripe.instance.checkApplePaySupport() should returns true is card is added to my Apple Pay

Smartphone

Additional context Every part of the integration works and even Apple Pay works on simulator.

remonh87 commented 2 years ago

Did you follow the instructions stated here: https://developer.apple.com/documentation/passkit/apple_pay/setting_up_apple_pay ?

Simulators work a bit different because they use some sandbox environment

charlesarchibong commented 2 years ago

Did you follow the instructions stated here: https://developer.apple.com/documentation/passkit/apple_pay/setting_up_apple_pay ?

Simulators work a bit different because they use some sandbox environment

Yes

aytunch commented 2 years ago

@jamesblasco apple pay works in our dev environment but not in release too. If there is any info I can give please tell and I will attach them.

SebghatYusuf commented 2 years ago

Same issue, I've done the apple instructions step by step, but still, I get the PlatformException(Failed, Payment not completed, null, null) error. and the value of Stripe.instance.isApplePaySupported is always false. Any suggestions?

remonh87 commented 2 years ago

For me Apple Pay works in production environment . Normally the fact that something works in dev and not production can be related to the following:

SebghatYusuf commented 2 years ago

@remonh87 Thanks, I'm using Stripe test keys both on the client and server. also, I'm settings the merchant id like this Stripe.merchantIdentifier = 'my merchant id'; in initState before calling Stripe.instance.applySettings(). I'm not using the pay library I'm just using the in package ApplePayButton and GooglePayButton widgets. apple pay is working on Simulator but not working on real device.

remonh87 commented 2 years ago

ok and you run the app on a real phone ? Also the Apple Pay capability is added in the app ?

SebghatYusuf commented 2 years ago

Yes I ran the app on a real device, and I've added the apply pay capability in xcode.

SebghatYusuf commented 2 years ago

Any updates here??

ahmedatTakalam commented 2 years ago

I ran into the same issue that apple pay on a real device is not working however its works on a simulator @remonh87

liamsammut97 commented 2 years ago

Make sure your bundle id matches the merchant name, i had the same issue. When i changed my merchant id to match my bundle id all is good. Example: merchant.(your bundle id). Apple pay certificate has to much also