#jdommel_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1471446401429799065
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- jdommel_api, 18 hours ago, 39 messages
Hi, you can see my issue in this thread https://discord.com/channels/841573134531821608/1471127272495911092
I tried the suggested solution but I doesn't change anything
I still think there can be an issue whith the a 3DS flow because I see in logs that my app is backgrounded
but can you summarize your question here, that would be simpler than reading a long thread with back and forth.
I use @stripe/stripe-react-native (just upgrade to 0.58 to try to solve my issue) and have an issue on Android. When I call the method confirmPaymentSheetPayment I see that it never resolves. The payment succeeds but I cannot perfom error or success action because the of this. And the only thing I see in the logs, is that the app seems to be backgrounded
thanks for the summary! having a look.
which documentation are you following? this one? https://docs.stripe.com/payments/mobile/accept-payment?platform=react-native&type=payment&integration=paymentsheet-flowcontroller
It's an old implementation, with customFlow, and the bug is recent (maybe after upgrading to 0.57 version) but it ressembles this implementation, just added the confirmation handler (which I see triggered)
And can I also add that the flow works ok with Paypal, it seems to happen only with card
can you share the code you are using?
Here is the initPaymentSheet
const { error, paymentOption } = await initPaymentSheet({
customerId,
customerEphemeralKeySecret: ephemeralKey,
/** needed to complete payment in multiple steps - confirmation will be needed later */
customFlow: true,
merchantDisplayName: 'Toasty',
style: 'alwaysLight',
// Stripe expects a URL it can intercept on return from 3DS/bank redirects.
returnURL: 'toasty://stripe-redirect',
intentConfiguration: {
mode: {
amount,
currencyCode: 'EUR',
},
confirmHandler,
},
});
const confirmHandler: NonNullable<IntentConfiguration['confirmHandler']> = (
_paymentMethod,
_shouldSavePaymentMethod,
intentCreationCallback
) => {
void (async () => {
try {
// We create the PaymentIntent during init (fetchPaymentSheetParams).
// If for any reason the client secret is missing, recreate a PI as a fallback.
const existingClientSecret = dataRef.current.userClientSecret;
if (existingClientSecret) {
intentCreationCallback({ clientSecret: existingClientSecret });
return;
}
const result = await fetchPaymentSheetParams.current({ shouldRecreatePayment: true });
const clientSecret = result && 'clientSecret' in result ? result.clientSecret : undefined;
if (clientSecret) {
intentCreationCallback({ clientSecret });
return;
}
intentCreationCallback({
error: {
code: 'Failed',
message: 'Missing PaymentIntent client secret.',
localizedMessage: 'Une erreur est survenue pendant le paiement.',
},
});
} catch (e) {
intentCreationCallback({
error: {
code: 'Failed',
message: e instanceof Error ? e.message : 'Unable to create PaymentIntent.',
localizedMessage: 'Une erreur est survenue pendant le paiement.',
},
});
}
})();
};
And to confirm I just call
const response = await confirmPaymentSheetPayment();
and the confirmHandler is never called for card payments on Andorid? but it is called for iOS or other payment methods?
I see it called if I add a log in the if (clienSecret) condition
But the confirmPaymentSheetPayment still doesn't resolve
I don't see any errors though
Hey! Taking over for my colleague. Let me catch up.
Have you had the chance to test our official react native app ?
https://github.com/stripe/stripe-react-native/tree/master/example
Could you try it now and see if you manage to reproduce the issue on it ? If so could you please share with me the reproduction steps ?
It's a completely different implementation, I don't use the same hooks, so I cannot reproduce
Don't you have any similar issues like mine and this one https://github.com/stripe/stripe-react-native/issues/2233 ?
I think this didn't happen before version 0.57
What is the difference sorry, not able to understand
What is the difference between your integration and this screen ?
https://github.com/stripe/stripe-react-native/blob/master/example/src/screens/PaymentsUICompleteScreen.tsx#L38
The example doesn't use confirmPaymentSheetPayment method, the one that is problematic
I tried to use confirmPayment but it's a different implementation then
Let me do some checks...
It should be the "Prebuilt UI (multi-step)"
I just tried it and every thing seems working fine.
Could you please run it locally and try to reproduce the issue you are facing ?
I'm having trouble to build the app, but I'm trying