#arnotixe_affirm-testing-redirect
1 messages Β· Page 1 of 1 (latest)
π Welcome to your new thread!
β²οΈ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
β±οΈ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
π This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1277743670958882887
π Have more to share? Add more details, code, screenshots, videos, etc. below.
(support mail was sent by Tonii to arno@)
Hi π
What Stripe product are you using in your front-end?
this is my setup:
- using Elements (React = Next, really)
"@stripe/react-stripe-js": "^2.6.2",
"@stripe/stripe-js": "^1.46.0",
- creating a paymentintent + clientsecret with the user's name, email and
payment_method_types: [ 'affirm', 'card' ], - user chooses affirm, and we send the user off to a page that uses the clientsecret:
const affirmRedirect = await stripe.confirmAffirmPayment(clientsecret, {
payment_method: {
// Billing information is optional but recommended to pass in.
billing_details: {
...shipAndBill,
email,
},
},
// Shipping information is optional but recommended to pass in.
shipping: { ...shipAndBill },
// Return URL where the customer should be redirected after the authorization.
// return_url: `${me}/${slug}`,
// pass link to handler, and pass to the handler
// 1) thankyou url
// 2) retry (original container) url
return_url: url.href,
});
the return_url is my form, having some logic to it checking the stripe paymentid's captured amount.
NOTE: This works well in production, it's just we have no way to reliably test it in STAGING.
What is the error you receive in staging? I've been able to redirect to the Affirm testing page just fine.
well, when that above stripe.confirmAffirmPayment executes, the browser is sent on to affirm.com and we get this:
according to weekend's support mail, we should not use Affirm sandbox? So that's a little confusing.
(screenshot of mail)
I am able to proceed by using a known, actual US number (I use 480-896-0747), a dummy PIN 123456
Hmmm... We do document that you should authenticat on the redirect page in our docs
https://docs.stripe.com/payments/affirm/accept-a-payment?payment-ui=direct-api#web-test-integration
but then it halts on the last page, after choosing a payment option
But, to be fair, Affirm's sandbox is pretty garbage IMO
oh yes.
It actually worked once upon a time, but at some point that Verify your Identity started showing up and we are stuck with only failed payments in staging mode
have a testing link if interesting, https://mmden-staging-3946eb6e18df.herokuapp.com/orderframe/mba14k where any name/email (ficticious, don't matter) will work
well, works up to that point where the Identity check comes in.
From there it's 3-4 failed SSN attempts and the payment intent fails.
I just kept entering random 4 digit numbters until it worked
heheh
I've tried 0000 1111 1234 3456 9999 etc but maybe you struck gold! Remember what digits? π΅βπ«
Unfortunately this dumpster fire is Affirm's to fix. But I can raise the issue with our team to push on them
Yea would be great
I think that email is talking about some other kind of flow?
Or it could just be that Affirm messed up and they actually DID add a SSN last4 check at some point. This used to work in staging like 4 months(?) π€ ago and we could choose between
- complete the purchase (succeeded in stripe)
- close the process with the X top left (failed in stripe)
The language in the rest of the email is directly from our doc
You can test the successful payment case by authenticating the payment on the redirect page.
Yes I recall also completing the flow with much less friction
Someone's been copying that Get Started page yea
Entering phone is bearable, since we have that in our testing docs. But that social security is a tough one to smoke out
Would appreciate it if you can raise a bug and convince someone in Affirm it's actually broken.
Can use that test link https://mmden-staging-3946eb6e18df.herokuapp.com/orderframe/mba14k as much as you want, it's pointing to sandbox permanently
Like I mentioned, this "works now" but we're a little nervous about making changes to the code when it can't really be tested π± and the products cost 15k+
Yes that is understandable.
We also have a 250k productβ¦ not rolling at the moment π
I have submitted this feedback along with a request for some buttons that would automate the success or failure (insert some dummy test data and validate or fail).
Sounds like a great idea! Just "Yay" and "Nay" buttons hosted on affirm.com would really cut it π
There's another case too - the user could have entered an invalid address on the form, then is sent to affirm.com and it just fails Hard Stop
I would suggest a way to edit their address on affirm.com in such case, but right now the process just dies π
We're trying to handle that pre-click-purchase, but found out the hard way when someone entered a wrong zip code and it hung (after being sent to affirm)
But let's not overwhelm Affirm guys π
Yeah. well I've raised this issue with the team handling our Affirm integration so π€ we get some traction.
thanks! Say hi to Moomin
Cheers!