Visa payments not succesfull - Customer Topic

Hello, I am developer of “Square Payment” addon for Modern Events Calendar plugin.

My customer talk to you about visa issue and you replied:

> I can help the developers of the addon.

> if you are the devs for the addon, I can help debug the code.


Developer Success Engineer | Square, Inc.

How can I talk with Lance?

Happy to help. What questions do you have about the application? :slightly_smiling_face:

HI @Ali,

Either I or Bryan can help you. You can also reply or get added into an ongoing email thread we have going on with your team.

As Bryan asked, we could use some more details on what issue. And the application id you’re having issues with.

Hello again,

We have developed a plugin for WordPress that allows users to manage their payments from square

But one of the users reported a problem to us with this text:

The message it shows is:
Different request parameters used for the same idempotency-key TBE18430
and then on the 2nd attempt
Authorization error:

The first case is probably pressing the payment button twice and this error appeared, but in the case of Authorization error, when we test, we do not see any error.

My request has 2 parts:
1- How can I set up my developer account to see this error?

2- How should this be fixed? Of course, by reading the documents, I can understand almost what needs to be done. Most of the first case is intended so that I can see this error in the API that I am creating.

Is your integration calling verifyBuyer with 3DS? If no then you’ll need to make sure it’s calling verifyBuyer to pass the verification_token to the CreatePayment request. :slightly_smiling_face:

1 Like

Thank you. Verification token is just unique code? or it should has specific parameters?

The verification token is generated by the Web Payments SDK. You’ll want to checkout this documentation, and follow the steps to generate a verification token.

Thank you. We used PHP to send request. Do you have any docs about that?

curl_setopt($curl_handle,CURLOPT_URL, '');
$headers = array(
        "Content-Type: application/json",
        "Authorization: Bearer " . $access_token
curl_setopt($curl_handle, CURLOPT_HTTPHEADER, $headers);

$data = '{
    "amount_money": {
        "currency": "' . $currency . '",
        "amount": ' . $amount . '
     "idempotency_key": "'. $transaction_id .'",
     "source_id": "'. $square_token .'",

curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $data);

The verification_token is generated on the client side like the source_id. You’ll first create the source_id from the Web Payments SDK then create the verification_token all on the client side. Then when you have both values you’ll pass them to your backend to make the above server side request. :slightly_smiling_face: