#development - PaymentSheet
1 messages · Page 1 of 1 (latest)
ok would you mind sharing your code?
await Stripe.instance.initPaymentSheet(
paymentSheetParameters: SetupPaymentSheetParameters(
//client_secret
paymentIntentClientSecret: paymentIntentData!['client_secret'],
merchantDisplayName: UserDetails.userName == ''
? bookingUserName
: UserDetails.userName,
customerId: paymentIntentData!['customer'],
customerEphemeralKeySecret: paymentIntentData!['ephemeralKey'],
customFlow: true,
style: ThemeMode.light,
testEnv: true,
applePay: true,
googlePay: true),
);
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Google Pay and Apple Pay unavailable for merchants and customers in India on Stripe Checkout and Stripe Elements.
what is the error on the mobile side?
LocalizedErrorMessage(code: FailureCode.Failed, localizedMessage: No payment sheet has been initialized yet, message: No payment sheet has been initialized yet, stripeErrorCode: null, declineCode: null, type: null)
in andriod if the gpay is not supported but still payment sheet is arrived but in ios its not happens
this means that you are calling presentPaymentSheet before initPaymentSheet
no
await Stripe.instance.initPaymentSheet(
paymentSheetParameters: SetupPaymentSheetParameters(
//client_secret
paymentIntentClientSecret: paymentIntentData!['client_secret'],
merchantDisplayName: UserDetails.userName == ''
? bookingUserName
: UserDetails.userName,
customerId: paymentIntentData!['customer'],
customerEphemeralKeySecret: paymentIntentData!['ephemeralKey'],
customFlow: true,
style: ThemeMode.light,
testEnv: true,
applePay: true,
googlePay: true),
);
await Stripe.instance.presentPaymentSheet();
await Stripe.instance.confirmPaymentSheetPayment();
i used like this order
you need to debug your code to see what's really happening
but the error code you shared comes usually when the presentPaymentSheet is called before initPaymentSheet
this could be a race condition that is not causing issues in android
you really need to debug this
ohk
development - PaymentSheet