Open mminhlequang opened 1 year ago
Can you give us more information? Which method are you calling from our sdk, reproduction code, which flutter version, version of our sdk etc.
Hi i using latest version flutter_stripe_web: ^4.2.0
my method: WebStripe.instance.confirmPaymentElement WebStripe.instance.confirmPayment
await WebStripe.instance.confirmPayment(
payOrderResult!.stripeClientSecret!,
const PaymentMethodParams.card(
paymentMethodData: PaymentMethodData(),
),
);
appDebugPrint('[Payment debug] done');
} on StripeException catch (e) {
appDebugPrint('[Payment debug] StripeException: ${e.error}');
} on StripeError catch (e) {
appDebugPrint('[Payment debug] StripeError: ${e.code}');
} catch (e) {
appDebugPrint(
'[Payment debug] error: ${e.runtimeType}\n${stringify(e)}');
//Always here }
and it always go last catch
@jamesblasco can you check this? I think we should still provide similar error objects from the JS library correct?
any update @jamesblasco ?
@mminhlequang did you every find a way to handle errors?
https://stripe.com/docs/testing?testing-method=card-numbers#declined-payments I try catch error code and follow this docs to show clean message for user but can't get it from flutter web app, it was throw js object. Someone can help? Thanks!