# SCA flow not being bypassed with any test card

**URL:** <https://developer.squareup.com/forums/t/sca-flow-not-being-bypassed-with-any-test-card/1813>\
**Category:** Questions\
**Tags:** payments-api, payment-form, sandbox\
**Created:** [February 8, 2021, 5:11pm UTC](https://developer.squareup.com/forums/t/sca-flow-not-being-bypassed-with-any-test-card/1813 "2021-02-08T17:11:27Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![andyc](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/andyc/32/360_2.png) [@andyc](https://developer.squareup.com/forums/u/andyc)\
**Post date:** [February 8, 2021, 5:11pm UTC](https://developer.squareup.com/forums/t/sca-flow-not-being-bypassed-with-any-test-card/1813/1 "2021-02-08T17:11:27Z")

</div>

Hi there, I hope you’re well

I’ve followed this guide to enable SCA cards [https://developer.squareup.com/docs/payment-form/cookbook/verify-buyer-on-card-charge](https://developer.squareup.com/docs/payment-form/cookbook/verify-buyer-on-card-charge) . This works, and if I use a SCA test nonce, it triggers the SCA popup and the verification token & nonce from the JS code is POSTed to my server. Happy days!

Except for cards that _don’t require_ SCA, the `paymentForm.verifyBuyer(...)` callback is never run, so I never get a POST to the server - it either works with SCA cards only, or only works for non-SCA cards - is there an introspection method, i.e. `paymentForm.buyerNeedsVerifcation()` for instance. I get a card nonce & card data for these test cards, but that `verifyBuyer` callback is never made on your side.

So…

- Can I trigger different behaviour based on the payment flow requirements? All of my server callback & events occur inside `verifyBuyer` at the moment, as I must support SCA for all cards in the UK.
- Will this code ‘just work’ in production? As in, for a card from the USA that doesn’t need SCA, will the `verifyBuyer` callback happen with a happy verification token like it does when it passes verification?

I’m worried as I can’t test either of these scenarios in sandbox

Many thanks in advance  
Andy.

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [February 9, 2021, 12:16am UTC](https://developer.squareup.com/forums/t/sca-flow-not-being-bypassed-with-any-test-card/1813/2 "2021-02-09T00:16:32Z")

</div>

Hi @andyc welcome to the forums!

I’m currently unable to replicate this. If I input “4310 0000 0020 1019” (the EU test card), I get the buyer verification popup, all good. If I input “4111 1111 1111 1111”, I do not see the popup, but I get a valid verification token in the callback that I can use. So it sounds like something is going wrong with your implementation that is not working correctly…are you seeing any errors in the browser console? What exactly happens…it just waits for callback forever?

Feel free to supply your application id as well, and I can test locally on mine with your sandbox to ensure it’s not application-specific.

---

<div class="post-metadata">

**Author:** ![andyc](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/andyc/32/360_2.png) [@andyc](https://developer.squareup.com/forums/u/andyc)\
**Post date:** [February 9, 2021, 11:32am UTC](https://developer.squareup.com/forums/t/sca-flow-not-being-bypassed-with-any-test-card/1813/3 "2021-02-09T11:32:52Z")

</div>

Hey Stephen - thanks for getting back to me

So I tried both of those card numbers, and neither work with my implementation -

My application ID is `sandbox-sq0idb-xGakbt6FvRg3FRRDTDH-2Q`.

My rough implementation is this:

```
const verificationDetails = {
  intent: 'CHARGE',
  amount: self.priceWithoutSymbol,
  currencyCode: self.currencyCode,
  billingContact: {
    givenName: self.name
  }
};

paymentForm = new SqPaymentForm({
  applicationId: info.square_application_id,
  locationId: info.square_location_id,
  inputClass: "sq-input",
  autoBuild: false,
  inputStyles: [...],
  cardNumber: { ... },
  cvv: { ... },
  expirationDate: { ... },
  postalCode: { ... },

  callbacks: {
    cardNonceResponseReceived: function (errors, nonce, cardData) {
      console.log('nonce', nonce)

      paymentForm.verifyBuyer(
        nonce,
        verificationDetails,
        function(err, verificationResult) {
          console.log('err', err)
          console.log('verificationResult', verificationResult)
          if (err == null) {
            if (errors) {
              const error = errors[0]
              self.$emit('got-payment-error', error.message)
            }

            let params = {}
            params['square_payment_nonce'] = nonce
            params['square_verification_token'] = verificationResult.token
            params['card_data'] = cardData

            self.$emit('got-payment-params', params)
          } else {
            self.$emit('got-payment-error', err.message)
          }
        }
      )
      self.$store.commit('setLoading', false)
    },
  },
})

paymentForm.build();

```

The call to `paymentForm.requestCardNonce()` is happening in an method for purchase.

The console logs for nonce is being reached & outputted, but I never see the console log for `verificationResult` - so for the EU card or the non-EU card, neither is causing the callback from `paymentForm.verifyBuyer` to be run?

Many thanks  
Andy.

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [February 9, 2021, 7:45pm UTC](https://developer.squareup.com/forums/t/sca-flow-not-being-bypassed-with-any-test-card/1813/4 "2021-02-09T19:45:51Z")

</div>

Thanks for that information. I was able to test with your application id, as well as your code within the `cardNonceResponseReceived` callback, and the above card (4111…) worked successfully (I received a verification token). Do you happen to have a public page where I could see this live? If not, would you be willing to privately share your project so I can test it locally (feel free to message it to me directly)?

---

<div class="post-metadata">

**Author:** ![andyc](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/andyc/32/360_2.png) [@andyc](https://developer.squareup.com/forums/u/andyc)\
**Post date:** [February 15, 2021, 3:17pm UTC](https://developer.squareup.com/forums/t/sca-flow-not-being-bypassed-with-any-test-card/1813/5 "2021-02-15T15:17:37Z")

</div>

Hi there Stephen

I’ve managed to figure it out now - this was only happening locally, but when I staged it it works fine. Both EU & non-EU cards proceed fine as I thought should be happening

Thank you for your help

Andy

---

<div class="post-metadata">

**Author:** ![rpenn](https://avatars.discourse-cdn.com/v4/letter/r/c2a13f/32.png) [@rpenn](https://developer.squareup.com/forums/u/rpenn)\
**Post date:** [March 10, 2021, 3:45pm UTC](https://developer.squareup.com/forums/t/sca-flow-not-being-bypassed-with-any-test-card/1813/6 "2021-03-10T15:45:31Z")

</div>

Hi there,

I am having a similar issue where paymentForm.verifyBuyer stalls locally but works fine in Dev and Production on my cloud server. I am using the C# sdk and this used to work locally (.Net Env). Was something new introduced or any idea why the paymentForm.verifyBuyer would have an issue locally?

Rick

---

<div class="post-metadata">

**Author:** ![andyc](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/andyc/32/360_2.png) [@andyc](https://developer.squareup.com/forums/u/andyc)\
**Post date:** [March 10, 2021, 5:48pm UTC](https://developer.squareup.com/forums/t/sca-flow-not-being-bypassed-with-any-test-card/1813/7 "2021-03-10T17:48:32Z")

</div>

Hi Rick,

Yeah I didn’t find a solution to this- I’m still seeing paymentForm.verifyBuyer not working locally as well - staging & production work fine, it’s very frustrating to have to always test the Square checkout code in staging each time!

Andy.

---

<div class="post-metadata">

**Author:** ![rpenn](https://avatars.discourse-cdn.com/v4/letter/r/c2a13f/32.png) [@rpenn](https://developer.squareup.com/forums/u/rpenn)\
**Post date:** [March 10, 2021, 8:08pm UTC](https://developer.squareup.com/forums/t/sca-flow-not-being-bypassed-with-any-test-card/1813/8 "2021-03-10T20:08:18Z")

</div>

Hi Andy,

Yeah - this is going to become a big problem. You need to be able to step through your backend code for testing purposes. Are you using c# .net as your backend server code?

Seems like this is not code-related and an issue like cashing or a trusted cert…

Rick

---

<div class="post-metadata">

**Author:** ![rpenn](https://avatars.discourse-cdn.com/v4/letter/r/c2a13f/32.png) [@rpenn](https://developer.squareup.com/forums/u/rpenn)\
**Post date:** [March 10, 2021, 8:27pm UTC](https://developer.squareup.com/forums/t/sca-flow-not-being-bypassed-with-any-test-card/1813/9 "2021-03-10T20:27:47Z")

</div>

Hi Andy,

I did get the paymentForm.verifyBuyer to work through IE locally. I was using Chrome before through my dev environment. Maybe some setting in Chrome from a localhost standpoint…

Rick

---

<div class="post-metadata">

**Author:** ![andyc](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/andyc/32/360_2.png) [@andyc](https://developer.squareup.com/forums/u/andyc)\
**Post date:** [March 10, 2021, 8:30pm UTC](https://developer.squareup.com/forums/t/sca-flow-not-being-bypassed-with-any-test-card/1813/10 "2021-03-10T20:30:07Z")

</div>

Hey Rick

No I’m using Ruby for mine , but this is happening within the JS payment form for me

---

<div class="post-metadata">

**Author:** ![rpenn](https://avatars.discourse-cdn.com/v4/letter/r/c2a13f/32.png) [@rpenn](https://developer.squareup.com/forums/u/rpenn)\
**Post date:** [April 12, 2021, 8:51pm UTC](https://developer.squareup.com/forums/t/sca-flow-not-being-bypassed-with-any-test-card/1813/11 "2021-04-12T20:51:21Z")

</div>

Hi Andy,

Not sure if you got things resolved, but I found that I had the DuckDuckGo extension in Chrome running locally that was affecting the paymentForm.verifyBuyer call. Once I disabled DuckDuckGo the call worked without an issue.

Rick

---

<div class="post-metadata">

**Author:** ![andyc](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/andyc/32/360_2.png) [@andyc](https://developer.squareup.com/forums/u/andyc)\
**Post date:** [April 12, 2021, 9:15pm UTC](https://developer.squareup.com/forums/t/sca-flow-not-being-bypassed-with-any-test-card/1813/12 "2021-04-12T21:15:49Z")

</div>

Hey Rick,

Yes I think I have the same extension on Firefox, but not on other browsers which makes sense -

Thanks for replying,

Andy
