flutter-stripe / flutter_stripe

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

Apple pay not showing a payment sheet on production mode #262

Closed maziarit closed 2 years ago

maziarit commented 3 years ago

Describe the bug My application fully work when on debug mode on the IOS simulator but when upload the IOS app on App Store connect payment sheet not showing

My code

await Stripe.instance.presentApplePay( ApplePayPresentParams( cartItems: [ ApplePayCartSummaryItem( label: allTranslations.text(selectedPlan["planType"]["name"]), amount: (paymentIntent["amount"] / 100).toString(), ), ], country: 'gb', currency: 'gbp', ), ); await Stripe.instance .confirmApplePayPayment(paymentIntent["client_secret"]);

Smartphone

jamesblasco commented 3 years ago

Please, confirm that you have implemented the following steps needed to enable Apple Pay on production:

https://developer.apple.com/documentation/passkit/apple_pay/setting_up_apple_pay

hai199580 commented 3 years ago

@jamesblasco

Please, confirm that you have implemented the following steps needed to enable Apple Pay on production:

https://developer.apple.com/documentation/passkit/apple_pay/setting_up_apple_pay

Same issue, i implemented that, but when run presentApplePay method, it throw exception

PlatformException(Failed, Payment not completed, null, null)

try {
      await Stripe.instance.presentApplePay(
        ApplePayPresentParams(
          cartItems: [
            ApplePayCartSummaryItem(
              label:  "1000P",
              amount: "1000Y",
            ),
          ],
          country: 'jp',
          currency: 'jpy',
        ),
      );

      await Stripe.instance.confirmApplePayPayment(paymentIntent.clientSecret ?? '');

      ......
    } catch (e) {
      // Exception
    }
olivergibson commented 3 years ago

Hi, i have the same issue, recently uploaded my app for appstore review and it got rejected, i've completed all steps for apple pay including merchant id, payment processing certificate and apple pay capability in xcode, everything works fine in test environment but for production or testflight it doesn't shows the payment sheet.

ymerdrengene commented 3 years ago

Any news on this issue?

hai199580 commented 3 years ago

@ymerdrengene try to add the card to Wallets app before. Check the value of :

Stripe.instance.isApplePaySupported

If you have not added card, this value will be false, and the payment sheet cannot show.

Sorry for my bad English, hope it help

ymerdrengene commented 2 years ago

Hello @hai199580 I have tried that too, but it still doesn't show the paymentsheet. @maziarit did you manage to fix this?

remonh87 commented 2 years ago

Three attention points for going to production:

https://github.com/flutter-stripe/flutter_stripe/blob/d91eda2a6b86899791903b6cee834eec54d43bdd/packages/stripe/lib/src/stripe.dart#L77

I successfully went to production with the paymentsheet and Apple Pay with this library.

yrming commented 2 years ago

Hi, i have the same issue, recently uploaded my app for appstore review and it got rejected, i've completed all steps for apple pay including merchant id, payment processing certificate and apple pay capability in xcode, everything works fine in test environment but for production or testflight it doesn't shows the payment sheet.

@olivergibson Hi, I have the same problem, did you solve it?

MomenA7med commented 1 year ago

@jamesblasco

Please, confirm that you have implemented the following steps needed to enable Apple Pay on production: https://developer.apple.com/documentation/passkit/apple_pay/setting_up_apple_pay

Same issue, i implemented that, but when run presentApplePay method, it throw exception

PlatformException(Failed, Payment not completed, null, null)

try {
      await Stripe.instance.presentApplePay(
        ApplePayPresentParams(
          cartItems: [
            ApplePayCartSummaryItem(
              label:  "1000P",
              amount: "1000Y",
            ),
          ],
          country: 'jp',
          currency: 'jpy',
        ),
      );

      await Stripe.instance.confirmApplePayPayment(paymentIntent.clientSecret ?? '');

      ......
    } catch (e) {
      // Exception
    }

@hai199580 Did you find a solution ?