VivaPayments / API

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

Cloud Terminal API problem #2511

Closed hpeykov closed 3 months ago

hpeykov commented 5 months ago

Hello,

I am developing a new program for my company to integrate a physical POS terminals from VIVA Wallet in our systems. I have configured demo account, physical POS device (Ciontek CS50 if that matters) connected to this account. Using the APIs from https://developer.vivawallet.com/apis-for-point-of-sale/card-terminals-devices/rest-api/eft-pos-api-documentation/ I can succesfully do all the things - request tokens, search for terminals, initiate sales (both payments and preauths), make refunds. We need to work with preauthorizations, I have requested and have needed access for that.

Unfortunately when I try to use https://demo-api.vivapayments.com/ecr/v1/transactions:preauth-completion API I receive error 404. Exactly the same happens if I send wrong entry (like transactions:preauth-completionXXX). Is it possible that the URL in documentation is wrong ? Or perhaps there is something else I am doing wrong ?

Thank you in advance for your answer.

P.S. I have asked the same question via online chat from the real account, sorry if this doubles it.

VivaWalletCustomerSupport commented 5 months ago

Hello @hpeykov,

Thank you for your message. Can you please share the Merchant ID of the demo account?

Kind regards, Viva E-commerce Support Team

hpeykov commented 5 months ago

Hello,

Sure - it is a9e535ff-c942-4d34-8675-ade70fbc2d32.

VivaWalletCustomerSupport commented 5 months ago

Hello @hpeykov,

Thank you for your swift response. We made some changes to your demo account. Can you please try again? If issue persists, we will need you to share the API call and response you are getting (full code).

Kind regards, Viva E-commerce Support Team

hpeykov commented 5 months ago

Hello,

Thank you for your support. I tried just now,but it is the same. Here is the request body

{ "sessionId": "c9d069bd-dd54-44c0-9a66-98bacfa9b624", "parentSessionId": "25b60a42-b635-4881-9b88-2298e3b3b36e", "terminalId": "16004772", "cashRegisterId": "1", "amount": 156466, "currencyCode": "975", "merchantReference": "rs## ra#651416007#", "customerTrns": "RA#651416007\r\nTEST CAPTURE API", "showTransactionResult": true, "showReceipt": true }

The server response code is 404. Response headers are:

x-process-time: 0.00034928321838378906 x-viva-correlationid: 24-117-F23505FEC358 x-azure-ref: 20240426T094243Z-15ff4544644c95mphmza5um8bc00000004wg0000000173hu Date: Fri, 26 Apr 2024 09:42:43 GMT Connection: close

And response body is:

{ "detail": "Not Found" }

VivaWalletCustomerSupport commented 5 months ago

Hello @hpeykov,

Thank you for your prompt response. Can you also share the Initiate a Sales Request API for the above transaction?

Kind regards, Viva E-commerce Support Team

hpeykov commented 5 months ago

Sure. This was the request:

{ "sessionId": "25b60a42-b635-4881-9b88-2298e3b3b36e", "terminalId": "16004772", "cashRegisterId": "1", "amount": 195583, "currencyCode": "975", "merchantReference": "rs## ra#651416007#", "customerTrns": "RA#651416007\r\nTEST ", "preauth": true, "tipAmount": 0, "showTransactionResult": true, "showReceipt": true }

And after some pooling the session info is as follows:

{ "sessionId": "25b60a42-b635-4881-9b88-2298e3b3b36e", "terminalId": "16004772", "cashRegisterId": "1", "amount": 195583, "currencyCode": "975", "merchantReference": "rs## ra#651416007#", "customerTrns": "RA#651416007\r\nTEST ", "showReceipt": null, "showTransactionResult": null, "tipAmount": 0, "success": true, "eventId": 0, "authorizationId": "037933", "transactionId": "1c2787b2-9afa-47e5-826c-139b49d89960", "transactionTypeId": 1, "retrievalReferenceNumber": 411709037933, "panEntryMode": "07", "applicationLabel": "Visa Debit", "aid": "A0000000031010", "primaryAccountNumberMasked": "474503**4237", "transactionDateTime": "2024-04-26T09:41:55.303000Z", "abortOperation": false, "abortAckTime": null, "abortSuccess": false, "loyaltyInfo": null, "verificationMethod": "CONTACTLESS - ONLINE PIN", "tid": "16004772", "shortOrderCode": "4117124435", "installments": 0, "message": "Transaction successful", "preauth": true, "referenceNumber": 37933, "orderCode": "4117124435004772", "aadeTransactionId": "" }

VivaWalletCustomerSupport commented 5 months ago

Hello @hpeykov,

Thank you for the additional information, apologies for the late response. We will investigate your query further and let you know as soon as we have any updates.

Kind regards, Viva Wallet E-commerce Support Team

hpeykov commented 5 months ago

Hello @hpeykov,

Thank you for your swift response. We made some changes to your demo account. Can you please try again? If issue persists, we will need you to share the API call and response you are getting (full code).

Kind regards, Viva E-commerce Support Team

Hello again,

Perhaps the changes to my demo account needed some time to apply, but today the situation is different. Now when I call https://demo-api.vivapayments.com/ecr/v1/transactions:preauth-completion I receive error code 200, as it should be, but unfortunately there is another problem - nothing happens on POS terminal device although I keep it with screen on. If I pool the session like https://demo-api.vivapayments.com/ecr/v1/sessions/dbe48a78-ff50-47ee-88d1-a86af925d16e it returns code 202 and following payload { "detail": "The session is being processed" }.

This continues more than three hours and still returns the same. I have installed webhooks, but they also are not called for this session.

I should also note, that if I do the procedure of capture (or cancel) preauthorization directly from the POS terminal it works as expected.

Thank you in advance for your help. Best regards, Hristo Peykov

hpeykov commented 4 months ago

Hello again,

Just to remind you, I am still waiting for resolution about this problem. If you need more info I will provide.

VivaWalletCustomerSupport commented 3 months ago

Hello @hpeykov,

Thank you for your message and apologies for the late response. To provide additional support regarding this issue please contact us via the Live Chat option (which can be found at the bottom-right of the Developer Portal and main Viva.com site, or in your Production Viva.com self-care account)

Kind regards, Viva E-commerce Support Team