#Nadiya-successful-payment
1 messages · Page 1 of 1 (latest)
i'm trying to make the button loading when we click it, and like to make it stop loading once finished the process
but confirmPayment seems to redirect to the specified url,
we would like to return to the same url with a success message if there is no thank you page attached to the payment page
since i'm using a vuex store to manage the loading state, even if redirecting to the same url, the button state is still loading
so, i would like to know if it possible to do some changes in code right before redirecting
confirmPayment will always make a full-page redirect because some of the payment methods that it supports require the customer to be directed to an external site and then back. There isn't a way to override this.
You might be able to pass query params in the return URL to change the behavior of the page that you're already on when you're redirected.
I need to step away so I’m going to archive this thread. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact
Find help and support for Stripe. Our support center 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.
@native blade I was just made aware of some functionality that might be exactly what you're looking for. When you're confirming the payment, there is a redirect parameter that you can set to if_required in which case the flow will only perform a full page redirect if the payment method used requires one.
https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-redirect
understood, thank you