#usm-seong_unexpected
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/1276560115197284353
๐ 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.
- usm-seong_unexpected, 1 day ago, 25 messages
- usm-seong_unexpected, 1 day ago, 20 messages
- usm-seong_code, 2 days ago, 63 messages
- usm_googlepay-3ds, 2 days ago, 15 messages
- usm-seong_unexpected, 2 days ago, 12 messages
- usm-seong_code, 3 days ago, 13 messages
and 1 more
this is my code
and this is what I get from console. you can observe confirmPaymentSheetPayment threw an error
this is one of the credit cards from Stripe website
Hi, are you able to share the setup intent creation request id with me? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
seti_1PqzFFFbFOzNrsPEDYff8MIp
Looking..
Let me grab someone on my team who have more expertise with RN, hang tight
sure thank you
Hello, still looking in to this. Is there a specific doc of yours that you were following when building this? Nothing is immediately jumping out at me from your code but we have a lot of flows that are very subtlely different ways and I am wondering if our SDK expects something to be called in a slightly different way here
hello i'm not sure cuz this is not what I built.. i'm just debugging this
the person who built this is not available
UI-wise does it look like the sheet is actually dismissing before this error happens?
yeah the sheet (bottom pop up modal) is dismissed
or after/before
not sure the exact timing but it is dismissed
What do you mean by "after/before" there?
i'm not sure exact timing
but when the error happens
it is dismissed
here's the recording
it seems the sheet is dissmissed even before the error
Interesting, and what is happening with the dispatch event between your present and confirm calls?
sorry not sure what you mean
From your code:
await fetchPI();
const { error: presentError } = await presentPaymentSheet();
if (presentError) {
console.log('presentError = ', presentError);
if (presentError.code === PaymentSheetError.Canceled) {
return;
}
dispatch(
setAddCreditCardNetwork({
status: ERROR,
error: `Something went wrong with Present. Error code: ${presentError?.code || 'default'}`,
}),
);
return;
}
dispatch(setAddCreditCardNetwork({ status: LOADING, error: null }));
const { error: confirmError } = await confirmPaymentSheetPayment();
console.log('confirmPaymentSheetPayment confirmError = ', confirmError);
if (confirmError) {
dispatch(
setAddCreditCardNetwork({
status: ERROR,
error: `Something went wrong with Confirm. Error code: ${confirmError?.code || 'default'}`,
}),
);
return;
}
this issue persists even after i remove that dispatch event
And I see that that openPaymentSheet method is returned by your useOpenStripePaymentSheet hook. Can you show me the snippet of code where you are actually calling openPaymentSheet?
const { openPaymentSheet, isAddCCLoading } = useOpenStripePaymentSheet();
<Button
disabled={isAddCCLoading}
style={{ marginTop: 20, width: '100%' }}
title="Add a new card"
onPress={openPaymentSheet}
/>
again, it just works fine with other credit cards. it's just this 3ds card
that I shared
Correct, that is what we are trying to debug
๐
I think the best way to debug at this point would be to simplify your app to just a button that calls that function and see if it still sees this issue for 3DS cards. If it does work, slowly add things back until the issue shows up again. If it is still not working, if you can send your simplified project to us through a support ticket, we can try running it on our side and reproducing/diagnosing this on our side https://support.stripe.com/?contact=true
Find help and support for Stripe. Our support site 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.
will do. it will take some time but i have another question in the meantime. currently when I click the button it opens the modal right. but when I click the button twice, the modal opens up and another one opens up on top of the existing one. and when I try to close the modal, it closes the first but but the second one remains forever. no way to close it unless I close the app entirely and come back.
Interesting. That feels like it may be related because the error you are running in to is supposed to detect and prevent exactly that. That being said I think it would still be helpfyl to disable the button sooner so that present isn't called when there is already a sheet. It looks like your code disables that button based on isAddCCLoading which is defined in your useOpenStripePaymentSheet code as
isAddCCLoading: addCreditCardNetwork.status === LOADING,
But your code doesn't set that status to loading until after the presentPaymentSheet returns, so the button would in theory be able to call your openPaymentSheet method that whole time.
gotcha let me try
how do I listen to when the modal is dismissed?
because when I set a flag whether a sheet is opened,
i should set that to false when the modal is closed
if a user closes the modal before submit
The presentPaymentSheet promise resolving should indicate that the sheet is closed
So your code is fine to show the loading spinner and whatnot there. I think it is more that the button was still enabled that whole time
gotcha thank you