#ximi
1 messages · Page 1 of 1 (latest)
This channel is for technical integration questions with Stripe product. Is your question Stripe related?
@flat sequoia Let's continue the disussion here
Can you share what your problem is?
i use pay method of stripe's cash on PC, when the stripe open a modal view, it's about qrCode modal,i click the close button at the right corner, then, it is gone to another page
i want to edit the jump url
Which payment method are you referring to? Can you share which integration type (Checkout Session, Payment Element... etc) you use?
const paymentElementOptions = {
layout: {
type: 'tabs',
defaultCollapsed: false,
radios: true,
spacedAccordionItems: false
},
paymentMethodOrder: ['apple_pay', 'google_pay', 'card', 'klarna']
};
const paymentElement = elements.create("payment", paymentElementOptions);
paymentElement.mount("#payment-element");
var form_payment_stripe = document.getElementById('payment-form')
form_payment_stripe.addEventListener("submit", function (event) {
$.loading.show();
stripe.confirmPayment({
elements,
confirmParams: {
return_url: 'https://{{full_domain}}/{{get_shop_id}}/checkouts/{{$order.OrderToken}}/thank_you',
}
}).then(function(result) {
$.loading.hide();
if (result.error) {
alert(result.error.message)
}
});
})
it's my code
i look up some stripe document, but i could'nt find it
Where does it go to after closing the modal?
Stripe will redirect to the page that you define in return_url when you confirm the payment at stripe.confirmPayment
The code specifically:
stripe.confirmPayment({
elements,
confirmParams: {
return_url: 'https://%7B%7Bfull_domain%7D%7D/%7B%7Bget_shop_id%7D%7D/checkouts/%7B%7B$order.OrderToken%7D%7D/thank_you',
}
})
stripe.confirmPayment is used to show QR code or perform any necessary action or complete the payment
Isn't the customer redirected to return_url after closing the modal?
yes, isn't, the return_url is redirected to a pay successed page
Where does the customer be redirected to after closing the modal then? Per my own testing, customer will remain at the same page after closing the modal or it depends on how your code handles the result after stripe.confirmPayment
Can you share the screenshot that the customer is redirected to after closing the modal? Is it a Stripe owned or your own page?
it's redirect to my own page
How did you handle the result of stripe.confirmPayment? From your code, your system doesn't handle its result and customer will remain in the same page.
yes, front end code doesn't handle it,it also maybe backend's problem,
i find my backend again
stripe.confirmPayment is the method to display QR code or further action if needed. When the modal is closed, the result will be returned as the response of stripe.confirmPayment. I'd recommend checking how your system handles the redirection after stripe.confirmPayment
well, very thank you for help me,i 'll try to find our's backend
No problem! Happy to help 😄