#john-paul-larkin_code
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/1352327645156606052
π Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello π
If a card is saved at all, the Setup Intent is consumed. In that case you will need to fetch a new Setup Intent if you want to save another payment method.
The card is saved.
As in, if i quit the app without confirming a default, then reopen, the card will be there.
If a card is saved at all, the Setup Intent is consumed.
I see, However I do not have control over the CustomerSheet. How can I know if the user has consumed the SetupIntent?
I am using the functional approach.
const { error, paymentOption, paymentMethod } =
await CustomerSheet.present();
However, this does not resolve when the user clicks "Save", when adding a card.
It only resolves in the following step (select deault payment method), when the user clicks "confirm"
Hi there! I'll be taking over for my colleague here
Could you clarify a bit what you're referring to? by differentiating between clicking on "save" and "confirm"? I generally think that the SetupIntent shouldn't be confirmed until the customer clicks on "confirm". Some screenshots might help here
Certainly.
image1 is entering the card deatails.
After I click save, the setupIntent is consumed and the sheet then cahnges to image0.
At this point , if i click + Add, the form to enter another card appears.
Once I enter the new card details and click save, I get the error
"You cannot confirm this setupIntent because it has already succeeded"
As seen in image3
If i click the confirm button, I can manully create a new setupintent.
I hope this is clear?
thanks for providing this - looking
so it seems like you would need to create a new SetupIntent between image1 and image0, but your question is 'how do I know this has happened', right?
It seems like you're essentially trying to handle the case where a customer adds two payment methods in a row
well... kind of.
Im not if there is an error in my implementation.
If I have some way to know the setupintent has been consumed.
Gotcha; I'm working on testing this and I'll loop in a teammate if I'm not able to get it going in a reasonable amount of time.
Great. Thanks.
If you need any more info please let me know.
Question - did you log out the onResult callback? Does it fire/do you get a PaymentMethod when entering card details and pressing "save" the first time?
I am using the functional sheet.
There is no onResult callback.
The code from line 4 runs when the user clicks the confirm button, not when they click save.
Hello, my colleague has to step out but I am looking into this. Still looking into what exactly may be happening here
Thanks. Let me know if you need any clarification.
Do you have the ID of a setup intent that seems to have been confirmed by clicking "save" on that sheet?
This is the setupIntent id for the first card I add
seti_1R4oIHCmALlWSXaoA5GzObAU_secret_Rylpiy2f8WRH5h9EShZdyXJTl8CvExT
Thank you!
It looks like our RN SDK currently doesn't support multiple payment methods on the customer sheet. In our other SDKs there is a setupIntentClientSecretProvider parameter where you provide a call that can grab a new secret every time the sheet needs one, but the RN SDK only takes a pre-made client secret at the moment and doesn't have a way to replace it.
I am a bit unclear on what the reccommendation for you here is and am still looking. I am not sure if you should close the sheet automatically or something.
hm.... I cant close the client sheet.
9 time out of 10 the user will click confirm.
However, this bug appeared in a real life demo with a user.
Gotcha, I am kind of surprised at the state of this and am seeing if there is something that I am missing that can make this better. If another card can't be saved, I'm suprised that we allow that button to be clicked.
Great thanks. My head was a bit melted with this. I thought I was doing something wrong....
Apologies but I am still not finding guidance on this. I will reach out to my colleagues on this, if they can't find anything I think it would make the most sense to move this to a ticket so I can ask the team that works on the SDK. Can also just move to a ticket if you need to go at any point
No problem. I am online anyway, so whatever works best for you.
Sounds good, I just asked my colleagues. Will get back with what we can find and we can create a case if we can't find anything
It looks like there isn't a workaround for this in the RN SDK currently. I will escalate this to the team that works on the SDK. Unfortunately I don't immediately know of an ETA on if or when this will get addressed.
OK thanks. Can i get looped in on the ticket please?
Hello @delicate topaz, we have sent you a direct message, please check it at https://discord.com/channels/@me/1352370497203077246
- πThe message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
Absolutely, can you fill out the thing from the above and let me know when you are done. I can grab that and ask someone to update you when there are updates
I followed the link, but there is no form to fill out?
I see a case was created and grabbed it. Apologies for my confusion there, I did think there was a form.
but we are good now, I'll follow up through email when I've filed the feature request
Thanks very much for your help