#machn-le_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/1384767529301446739
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello! just want to acknowledge the question - looking into it now
Could you show me the GooglePay/ApplePay modal you're referring to?
Okay, so I'm assuming you're building your own checkout form to collect customer details, and you want to be able to dismiss this modal if your customer clicked Express Checkout Button too early without completing the checkout form. Is this correct?
yep that's correct
That's not possible. I suggest adding validation into your page to show the Express Checkout payment buttons only after the customer has completed required fields
Hmm wait
Could you maybe try this: https://docs.stripe.com/js/elements_object/express_checkout_element_confirm_event#express_checkout_element_on_confirm-handler-paymentFailed
expressCheckoutElement.on('confirm', async (event) => {
console.log("handle error");
event.paymentFailed({error: "testing 123"});
Are you using confirmation tokens though? The above will not work with confirmation tokens
We have been able to "dismiss" this modal after processing the customer's press on "Pay now" on the above screenshot. However, we haven't been able to show the error messages after when "dismissing". I say "dismissing" because we are effectively resetting the checkout instead of dismissing just the modal
looking into paymentFailed
Just implemented the above. It shows an error on the Google Pay modal, but the customer would still have to close that modal to see the checkout page error message.
We've actually been able to implement our desired validation with our previous Apple/Google Pay implementation using StripePaymentElement. But I believe because the main payment processing implementation for StripeExpressCheckout is in the onConfirm, the implementation to dismiss and show error messages is different somehow.
It shows an error on the Google Pay modal, but the customer would still have to close that modal to see the checkout page error message.
But the customer do have to see the error returned from their payment attempt first right?
Could you share with me how it was implemented for Stripe Payment Element ?