Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction Failed - "RedirectCheckoutChargeValidationFailed" (400) #2566

Open
AvishkaSen opened this issue Dec 23, 2024 · 0 comments
Open

Comments

@AvishkaSen
Copy link

Hello,

I am using Viva Wallet Smart Checkout to handle payments from Belgium and France on a client's site.
Developing this on Laravel 11.

I tested everything on a demo account and it was alright, and then I moved the site to production keys and links once going live.

But occasionally, the payments on the gateway fails with the 400 error "RedirectCheckoutChargeValidationFailed: Invalid order StateId".
The event's ID is 100701.

Sometimes the payment works, sometimes it doesn't. This has happened to about 5 users of the site now. And just one worked fine.

I moved back to the demo account keys and tested it locally with the usage of expose.dev, even then, sometimes it works, sometimes it doesn't. After the card details are entered and pay is pressed on the payment gateway.

I looked all around the documentation and I wasn't able to find a solution.
I'm stumped.

Screenshot attached.

Screenshot 2024-12-23 at 6 17 40 PM

Here is a sample data that I sent in a POST request to create the payment order:
This is from a PHP dump.

array:14 [▼
  "amount" => 3797
  "customerTrns" => "Votre commande XXX #44"
  "merchantTrns" => "Order #44"
  "customer" => array:4 [▼
    "fullName" => "Chaney"
    "email" => "[email protected]"
    "phone" => "+1 (354) 752-5927"
    "countryCode" => "FR"
  ]
  "currencyCode" => "978"
  "paymentTimeout" => 30
  "preauth" => false
  "allowRecurring" => false
  "maxInstallments" => 0
  "paymentNotification" => false
  "tipAmount" => 0
  "disableCash" => true
  "sourceCode" => "5983"
  "isCardVerification" => false
]

Sending this same dataset creates the payment order on VIva Wallet and redirects me correctly.

What am I doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant