#ximi

1 messages · Page 1 of 1 (latest)

ivory stoneBOT
ripe hound
#

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?

flat sequoia
#

i want to edit the jump url

ripe hound
#

Which payment method are you referring to? Can you share which integration type (Checkout Session, Payment Element... etc) you use?

flat sequoia
#

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

ripe hound
#

Where does it go to after closing the modal?

flat sequoia
#

@ripe hound it gone to a page that is i don't want

#

can i config the jump url ?

ripe hound
#

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',
    }
})    
flat sequoia
#

But I haven't confirmed the payment

#

the code is about payment for successed

ripe hound
#

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?

flat sequoia
#

yes, isn't, the return_url is redirected to a pay successed page

ripe hound
#

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?

flat sequoia
#

it's redirect to my own page

ripe hound
#

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.

flat sequoia
#

yes, front end code doesn't handle it,it also maybe backend's problem,

#

i find my backend again

ripe hound
#

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

flat sequoia
#

well, very thank you for help me,i 'll try to find our's backend

ripe hound
#

No problem! Happy to help 😄