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

Inconsistency in statuses #2497

Closed
viderspan opened this issue Mar 12, 2024 · 2 comments
Closed

Inconsistency in statuses #2497

viderspan opened this issue Mar 12, 2024 · 2 comments

Comments

@viderspan
Copy link

Dear Support,

I would like to inquire about a case.

It happens that we receive several Webhook notifications in a row that the given transaction is unsuccessful.

This can be seen in the Webhook URL (URL parameter: method=failed) and in the response to the transaction status query (statusId=E).
After a while, another Webhook arrives indicating the success of the transaction (URL parameter: method=success). The status of the queried transaction also changes (statusId=F).

This is a problem because we treated the transaction as unsuccessful in our system, but it later became successful.

My questions:

How can this happen?
How can we be sure that a transaction has permanently failed?
Which of the statusId values specified in the documentation can be considered final? (https://developer.vivawallet.com/integration-reference/response-codes/#statusid-parameter)
How is it recommended to handle such cases?
How can I cause this in a test environment?

Transaction logs:

2024-02-29 11:09:34
Webhook URL: /VivaWalletNotify?method=failed&merchantId=a724dbb1-c856-4c91-908c-977b65ce4e66

2024-02-29 11:09:34.531
Retrieve transaction response: Array
(
[email] => billing@...
[bankId] => NET_MASTER
[amount] => 880
[switching] =>
[orderCode] => 4680529664810383
[statusId] => E
[fullName] => COSTACHE IOANA BIANCA
[insDate] => 2024-02-29T12:09:33.327+02:00
[cardNumber] => 527176XXXXXX1295
[currencyCode] => 946
[customerTrns] => Plata rezervării #13027302
[merchantTrns] => 7382559828184b8fc7977bca02ccf422
[transactionTypeId] => 5
[recurringSupport] =>
[totalInstallments] => 0
[cardCountryCode] => RO
[cardIssuingBank] => Pluxee Romania Srl
[currentInstallment] => 0
[cardUniqueReference] => 5CEC8521C320C4C9F6456E34FE20B861538243F3
[cardTypeId] => 1
[digitalWalletId] =>
)

2024-02-29 11:10:21
Webhook URL: /VivaWalletNotify?method=failed&merchantId=a724dbb1-c856-4c91-908c-977b65ce4e66

2024-02-29 11:10:21.593
Retrieve transaction response: Array
(
[email] => billing@...
[bankId] => NET_MASTER
[amount] => 880
[switching] =>
[orderCode] => 4680529664810383
[statusId] => E
[fullName] => COSTACHE IOANA BIANCA
[insDate] => 2024-02-29T12:10:20.673+02:00
[cardNumber] => 527176XXXXXX1295
[currencyCode] => 946
[customerTrns] => Plata rezervării #13027302
[merchantTrns] => 7382559828184b8fc7977bca02ccf422
[transactionTypeId] => 5
[recurringSupport] =>
[totalInstallments] => 0
[cardCountryCode] => RO
[cardIssuingBank] => Pluxee Romania Srl
[currentInstallment] => 0
[cardUniqueReference] => 5CEC8521C320C4C9F6456E34FE20B861538243F3
[cardTypeId] => 1
[digitalWalletId] =>
)

2024-02-29 11:16:43
Webhook URL: /VivaWalletNotify?method=success&merchantId=a724dbb1-c856-4c91-908c-977b65ce4e66

2024-02-29 11:16:43.850
Retrieve transaction response: Array
(
[email] => billing@...
[bankId] => NET_MASTER
[amount] => 880
[switching] =>
[orderCode] => 4680529664810383
[statusId] => F
[fullName] => Costache Ioana Bianca
[insDate] => 2024-02-29T12:16:42.433+02:00
[cardNumber] => 527176XXXXXX1295
[currencyCode] => 946
[customerTrns] => Plata rezervării #13027302
[merchantTrns] => 7382559828184b8fc7977bca02ccf422
[transactionTypeId] => 5
[recurringSupport] =>
[totalInstallments] => 0
[cardCountryCode] => RO
[cardIssuingBank] => Pluxee Romania Srl
[currentInstallment] => 0
[cardUniqueReference] => 5CEC8521C320C4C9F6456E34FE20B861538243F3
[cardTypeId] => 1
[digitalWalletId] =>
)

Thank you.

@VivaWalletCustomerSupport
Copy link
Collaborator

Hello @viderspan

Each order code remains active for half an hour, allowing your customers multiple attempts if the payment fails due to various reasons. In your case, your customer made two unsuccessful attempts followed by one successful transaction, all within the same order code. This resulted in two failed webhook notifications and one indicating the success of the transaction.

When you receive a webhook notification, before updating a transaction’s status on your system, you should always retrieve its details from Viva. Please use the transactionId in the payload and make a call to the [Retrieve Transaction] (https://developer.vivawallet.com/apis-for-payments/payment-api/#tag/Transactions-(Deprecated)/paths/~1api~1transactions~1{transaction_id}/get) API. Validate the orderCode, statusId and amount you received in the Retrieve Transaction API response and update your system accordingly

Thank you for your message.

Kind regards,
Viva Wallet E-commerce Support Team

@VivaWalletCustomerSupport
Copy link
Collaborator

Hello @viderspan,

This ticket will close for now. Please don't hesitate to raise a new ticket if you need further assistance.

Kind regards,
Viva Wallet E-commerce Support Team

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

2 participants