Another one is when the user cancels the 3DS Challenge form.
verifyBuyer throws an error with the message below instead of returning a CANCELED status
VerifyBuyerError: An issue occurred while verifying the buyer
The verification was not successful: verf:CA4SECNHDjrgGFj79g8oUulUcH8gACgC
at square.js:3:385709
at Generator.throw (<anonymous>)
at Jf (square.js:3:383360)
at s (square.js:3:383601)
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
However the link provided is just to manually verify the payment in the transactions dashboard.
The next step on that link is to Add Strong Customer Authentication, which is what I need. And it says to use verifyBuyer. Is there any other document that does not require the use verifyBuyer.
We need to simulate a scenario where the user enters an invalid OTP (not 12346) or the user cancels the 3DS form. Is it available in the sandbox?
Regarding the wrong OTP test, you will get a CARD_DECLINED_VERIFICATION_REQUIRED error when you try to take the payment (using the create payment API) in your backend (by typing 999999 for example).
The frontend is unaware of the validity of the OTP code, so you have to try to take the payment in order to get this information.
However I do see in the network tabs some calls to the following Square API https://pci-connect.squareupsandbox.com/v2/analytics/verifications/ which sends back the following response in case of an invalid OTP is entered.
It would be good to have access to this data within the object returned by the tokenize() function so we can abort the payment flow early before hitting the backend.
Just a heads up we will be deprecating verifyBuyer(). We don’t recommend building any new integration to that function. We recommend using the tokenize() flow with the verification details passed in.