#DMFist

1 messages ยท Page 1 of 1 (latest)

lean fulcrumBOT
atomic wave
#

hey there, which parameters are you expecting to find?

#

Are you referring to eg the session id? or something else?

deep folio
#

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

atomic wave
#

OK, and you're not seeing these parameters on the redirect after going through the afterpay flow?

deep folio
#

Correct

atomic wave
#

Let me try myself to see what i see

#

Clarification: are you using Stripe's Checkout, or is this your own custom checkout UI?

deep folio
#

Custom checkout, i think

#

It's a react app that we dropped a stripe payment element into

atomic wave
#

Ok so you're not redirecting to our hosted Checkout page

#

Thanks!

deep folio
#

This is where i get redirected to after confirming payment intent if it helps

atomic wave
#

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?

deep folio
#

Let me give it a try

#

Same deal

#

It worked when you got redirected back from the afterpay test page?

atomic wave
#

Yep - I got sent to my url with the query params attached

#

Do you have a test page I can access to try?

deep folio
#

Hmmm not really, this is all running locally in a dev environment

#

Not really accessible off my machine

atomic wave
#

Ok, conversely, can you try my test page:

#

you should get redirected back to the same page with the params

deep folio
#

Haha apocalypse supplies inc

atomic wave
#

๐Ÿ˜„

deep folio
#

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

atomic wave
#

I don't think that should matter either

#

do you get the param on that test page, though?

deep folio
#

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

atomic wave
#

ok fair

#

Hmm

deep folio
#

Does it matter that I'm calling confirmPayment instead of confirm AfterpayClearpayPayment to confirm the payment intent

vagrant orchid
#

๐Ÿ‘‹ 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?

deep folio
#

Hello! I am using the payment element

vagrant orchid
#

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

deep folio
#

Sure let me put that together

vagrant orchid
#

Thanks

deep folio
#

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"
}
}
}

vagrant orchid
#

Thanks

#

Give me a minute to test a bit on my end

deep folio
#

Interestingly, I just tested this on firefox and it did work

#

previously I have been testing on chrome

vagrant orchid
#

Hmm that is interesting.

#

Sorry, server got super busy

deep folio
#

no worries!

vagrant orchid
#

Hmm still can't repro on my end

deep folio
#

possibly a chrome issue then

#

do you foresee any issue if I manually set the query params in the return URL

vagrant orchid
#

Well you definitely shouldn't have to do that

#

Have you tried in incognito?

deep folio
#

no change in incognito

vagrant orchid
#

Huh yeah I'm pretty stumped. Can you try a different device?

deep folio
#

My coworker tried and it worked for them

vagrant orchid
#

Okay that's good

#

Super weird... but good overall

deep folio
#

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!