#DMFist
1 messages ยท Page 1 of 1 (latest)
hey there, which parameters are you expecting to find?
Are you referring to eg the session id? or something else?
The docs seem to suggest payment_intent_id and payment_intent_client_id will be in the query params
This is what I'm looking at
I guess I can put those in the return URL myself, but trying to understand how this is going to work in test vs prod environments
OK, and you're not seeing these parameters on the redirect after going through the afterpay flow?
Correct
Let me try myself to see what i see
Clarification: are you using Stripe's Checkout, or is this your own custom checkout UI?
Custom checkout, i think
It's a react app that we dropped a stripe payment element into
This is where i get redirected to after confirming payment intent if it helps
OK I confirmed using a payment element integration and authorizing the test payment i do get the payment intent ID and client secret params
Are you sure you're not redirecting the page that lands on and possibly dropping parameters?
ie, if you set your return_url to https://example.com/testafterpay/success (something that will work but not redirect), what do you find there?
Let me give it a try
Same deal
It worked when you got redirected back from the afterpay test page?
Yep - I got sent to my url with the query params attached
Do you have a test page I can access to try?
Hmmm not really, this is all running locally in a dev environment
Not really accessible off my machine
Ok, conversely, can you try my test page:
A cool thing made with Glitch
you should get redirected back to the same page with the params
Haha apocalypse supplies inc
๐
One thing i noticed that differs - on your example page, there are inputs for email, etc under afterpay in the stripe element, but our checkout is using custom inputs outside of the stripe payment element
Don't see how that would result in the issue I'm having but grasping for anything at this point
For reference
I don't think that should matter either
do you get the param on that test page, though?
I do
I also tried on my app adding a query param ?test=something to the return url and that worked
So that makes me think nothing is stripping out query params
Does it matter that I'm calling confirmPayment instead of confirm AfterpayClearpayPayment to confirm the payment intent
๐ stepping in as synthrider needs to step away
Yeah you should only be using confirmPayment with Payment Element. Sounds like you are using the Direct Afterpay integration here, correct?
Err wait or are you using Payment Element?
Hello! I am using the payment element
Ah okay, then confirmPayment is correct
Can you share your confirmPayment code though and an example PaymentIntent you are testing with?
Curious if I can reproduce what you are seeing
Sure let me put that together
Thanks
okay sorry for the delay, had a short meeting - here's the calling code
const confirmResult = await stripe.confirmPayment({
elements,
confirmParams,
redirect: 'if_required',
});
payment intent ID: pi_3LhyO0Bd6DPxEwPs0bSGx8Hh
and confirmParams:
{
"return_url": "https://www.example.com",
"payment_method_data": {
"billing_details": {
"name": "firstname lastname",
"email": "email@email.com",
"phone": "17249807748",
"address": {
"line1": "123 Test st",
"line2": "",
"city": "Pittsburgh",
"state": "PA",
"country": "US",
"postal_code": "15146"
}
}
},
"shipping": {
"name": "firstname lastname",
"phone": "17249807748",
"address": {
"line1": "123 Test st",
"line2": "",
"city": "Pittsburgh",
"state": "PA",
"country": "US",
"postal_code": "15146"
}
}
}
Interestingly, I just tested this on firefox and it did work
previously I have been testing on chrome
no worries!
Hmm still can't repro on my end
possibly a chrome issue then
do you foresee any issue if I manually set the query params in the return URL
no change in incognito
Huh yeah I'm pretty stumped. Can you try a different device?
My coworker tried and it worked for them
I think this is something specific to my chrome installation or device like you suggested
I realized think I have a workaround for getting the payment intent after the redirect in the case that it is not in the url params anyways
This is prob not worth digging into any further.
Thanks for all the help!