#arnotixe_affirm-testing-redirect

1 messages Β· Page 1 of 1 (latest)

lucid glacierBOT
#

πŸ‘‹ 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.

jagged geode
#

(support mail was sent by Tonii to arno@)

sudden dagger
#

Hi πŸ‘‹

What Stripe product are you using in your front-end?

jagged geode
#

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.

sudden dagger
#

What is the error you receive in staging? I've been able to redirect to the Affirm testing page just fine.

jagged geode
#

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

sudden dagger
jagged geode
#

but then it halts on the last page, after choosing a payment option

sudden dagger
#

But, to be fair, Affirm's sandbox is pretty garbage IMO

jagged geode
#

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

#

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.

sudden dagger
#

I just kept entering random 4 digit numbters until it worked

jagged geode
#

heheh

#

I've tried 0000 1111 1234 3456 9999 etc but maybe you struck gold! Remember what digits? πŸ˜΅β€πŸ’«

sudden dagger
#

Unfortunately this dumpster fire is Affirm's to fix. But I can raise the issue with our team to push on them

jagged geode
#

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)
sudden dagger
#

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

jagged geode
#

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.

#

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+

sudden dagger
#

Yes that is understandable.

jagged geode
#

We also have a 250k product… not rolling at the moment πŸ˜‡

sudden dagger
#

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).

jagged geode
#

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 πŸ˜…

sudden dagger
#

Yeah. well I've raised this issue with the team handling our Affirm integration so 🀞 we get some traction.

jagged geode
#

thanks! Say hi to Moomin

sudden dagger
#

Cheers!