#snke-plenigo_best-practices
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/1290742805102199015
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Mostly you can't, because PRB/ECE require real cards set up via the respective wallets
In what way is this not working? Do you have an example payment intent ID I can look at?
that 3rd to last character looks invalid, should that be an i?
Ok yes I see it now
It looks like you're confirming via Stripe.js and it requires action
pi_3PxT5JBt3uYWFA031YVjKiq7
So what happens client side?
hope this is better
nothing, it submits the form
for me its hard to debug, because we only have it in production environment and all of our customers removed payment buttons from their checkout
Can you share your code for the prb complete event handler?
then(function (confirmResult) {
if (confirmResult.error) {
ev.complete('fail');
sendMessage("stripeButtonsError", confirmResult);
} else {
ev.complete('success');
if (confirmResult.paymentIntent.status === 'requires_action') {
// Let Stripe.js handle the rest of the payment flow.
stripe.confirmCardPayment(owner.clientSecret).then(function (result) {
if (result.error) {
sendMessage("stripeButtonsError", result);
} else {
sendMessage("stripeButtonsSuccess", result);
}
});
} else {
sendMessage("stripeButtonsSuccess", confirmResult);
}
}
});
i just copied your docs
and it worked
i'll be afk for 5 minutes
Hello
I'm taking over from synthrider, let me know if there's anything else we can help with
What part though? You seem to be handling it correctly by calling confirmCardPayment on the PaymentIntent.
okay, this should open the dialoque to the customer?
does the dialog needs anything in js or html?
okay, got it
so we are here in this part
stripe.confirmCardPayment(owner.clientSecret).then(function (result) {
if (result.error) {
sendMessage("stripeButtonsError", result);
} else {
sendMessage("stripeButtonsSuccess", result);
}
});
and I can't accidentally submit in this case?
sendMessage will submit the form
and I can't accidentally submit in this case?
what do you mean by that?
Can you share the complete code?
to clarify, you also need to pass handleActions param on the initial confirmation call as shown in the docs: https://docs.stripe.com/stripe-js/elements/payment-request-button?client=html#complete-payment
i'll have a look
thats the script
I mostly copied anything from documentation to have it clear in case of errors
Gotcha thanks