#development - PaymentSheet

1 messages · Page 1 of 1 (latest)

pliant havenBOT
twin elk
#

👋 happy to help

#

any more context to share please?

chrome smelt
#

i didint get strpe bottom sheet when i passed apple pay true

#

@twin elk

twin elk
#

ok would you mind sharing your code?

chrome smelt
#

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),
);

twin elk
#

Google Pay and Apple Pay unavailable for merchants and customers in India on Stripe Checkout and Stripe Elements.

chrome smelt
#

i know

#

but stipre payment sheet not opened

twin elk
#

what is the error on the mobile side?

chrome smelt
#

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

twin elk
#

this means that you are calling presentPaymentSheet before initPaymentSheet

chrome smelt
#

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

twin elk
#

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

chrome smelt
#

in andriod its wokring fine

#

@twin elk

twin elk
#

this could be a race condition that is not causing issues in android

#

you really need to debug this

chrome smelt
#

ohk

chilly temple
#

development - PaymentSheet