#brandontrytn
1 messages · Page 1 of 1 (latest)
sure, here's the bulk of it:
const model = toPaymentConfirmedRedirectRequest();
const returnUrl = `${settings.domain}/${window.globalSettings.culture}/${window.globalSettings.shop.shopUrl}/Pay/PaymentConfirmedRedirect?${JSON.stringify(model)}`;
stripe.confirmPayment({
elements: elements,
confirmParams: {
payment_method_data: {
billing_details: {
address: {
country: settings.fields.$country.val()
}
}
},
return_url: returnUrl
},
redirect: 'if_required'
}).then(wasPaymentConfirmed);
and then what generates the model:
export function toPaymentConfirmedRedirectRequest() {
return {
BillTo: {
Country: window.trytnJQuery('#BillTo_Country').val()
},
CartId: window.trytnJQuery('#CartId').val(),
Culture: window.trytnJQuery('#Culture').val(),
MarketingOptIn: window.trytnJQuery('#MarketingOptIn').is(':checked'),
PaymentToken: window.trytnJQuery('#PaymentToken').val()
};
}
according to my logs when the PaymentConfirmedRedirect endpoint is hit on my side everything is blank, but logging just before that call I do see everything exists on the firm
Can you console.log returnUrl just prior to calling stripe.confirmPayment?
in my logs I log the returnurl and it is as I would expect, so sending off to stripe it has the data, but when stripe calls the endpoint it does not
Can you share an example payment intent id?
sure, this one hit stripe but came back without the params: pi_3NQxZVEkLiDpEb6j0YjFevXL
Yeah we received a bunch of params with that PI. Do you have a test site I can reproduce this on?
https://trytn-webapp-booking-scus-staging.azurewebsites.net/stripeshop
this is in test mode in stripe so test cards work on it
SWH 1048 staging api. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce volutpat viverra eros, et cursus diam bibendum ut.
the issue is because it doesn't redirect back to us with the params the customer gets a charge in stripe but no record is created on our end
are you able to share the url that you hit on that request so I can look to see if anything is amiss that I can see on the url?
meaning the redirect url that was called
Yes give me a minute
ty
What's the easiest way to checkout
you can pick any product, add to cart, the "no questions" or "tour ticket" products are probably fastest
it's a test account so any duymmy data and test card will work
oh and can you confirm you're making a GET request to the redirect url? or is it a POST?
and the return url that was called when you placed that test booking?
Is this not it? #1126878247301435492 message
That's where I was redirected after paying
no, we only redirect if required, so we'd need a test where it requires the redirect to take place from stripe
should look something like /pay/paymentconfirmedredirect?{params}
on a side note, are you able to provide a test card number that requires the redirect?
No redirect based payment methods are showing for me
AFAIK there's not a test card that redirects
You'd need to use a redirect based payment method then
which require redirects?
perhaps I can activate one in our test account
if they are the "bank redirect" payment methods we have all but 2 turned on (24 and sofort)
correct
That can also determine which pm's show up
If you use direct charges, then the pm's of the connect accounts will show. Not those on the platform
we have to use connect accounts given our platform
for the pi_ I sent over earlier, are you able to send me the redirect url that you called?
Here's a link to the request. It'll show in the request body: https://dashboard.stripe.com/logs/req_C8IxEYJ9966hid
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Although it is a connect request, so you may not have access
I can send the link directly as long as you're ok with it. I have no idea if any of the params are sensitive
don't see anything wrong with what was sent over. super strange. going to play with some things on my end and may be back if I find more strange things
Sure thing