VivaPayments / API

Index of Viva Wallet open source projects on GitHub.
139 stars 162 forks source link

nativecheckout/v2/transactions using preauth fails with 502 #1240

Closed Stratubas closed 4 years ago

Stratubas commented 4 years ago

Hello!

In the "demo" environment using Postman, nativecheckout/v2/transactions works (returns an object containing a "transactionId") only if "preauth" is set to "false" in the request.

Setting "preauth" to "true" returns the following:

{
    "status": 502,
    "message": "Transaction failed",
    "eventId": "10051"
}

In the documentation (https://developer.vivawallet.com/online-checkouts/native-checkout-v2/#create-transaction) there are no explicit instructions on requesting a pre-auth. I assumed the only difference is setting "preauth" to "true". Is that wrong? Or is a problem from your side? If so, can we expect it to be fixed soon?

Thanks in advance

Stratubas commented 4 years ago

I was using these instructions (https://developer.vivawallet.com/api-reference-guide/payment-api/card-tokenization/#step-1-generate-charge-token-using-card-details) to create charge tokens.

After following these instructions instead (https://developer.vivawallet.com/online-checkouts/native-checkout-v2/#create-a-charge-token) and requesting a "preauth", the "SALES TRANSACTIONS" page in the demo environment dashboard crashes:

broken-viva.pdf

matthewrgourd commented 4 years ago

Unfortunately there are known issues with the demo environment that occur intermittently. Please try again from the beginning of the process and let me know if the problem recurrs.

Stratubas commented 4 years ago

@matthewrgourd The steps seem to be working. However, the v2 charge token generation requires a specified "amount". What is that amount? Is it somehow related to preauth? The nativecheckout/v2/transactions request works even if its "amount" is greater than that specified during charge token generation. With https://demo.vivapayments.com/selfcare/el/sales/mysales crashing it's not easy to see what really happens.

ParisZX commented 4 years ago

I have the exact same issue with preauth in the demo environment, everything works fine when I set it to false, but when it's set to true, I get the error @Stratubas mentions above.

{ "status": 502, "message": "Transaction failed", "eventId": "10051" }

Are there any news regarding its fix? Thanks for your time.