VivaPayments / API

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

Viva error page 500 #1394

Closed skaisaris closed 4 years ago

skaisaris commented 4 years ago

Viva payments page throughs an error 500 when processing payments coming from e-shop iKing.gr. Also the site does not redirect back to the e-shop to read payment transaction result.

Viva-Error
matthewrgourd commented 4 years ago

Hi @skaisaris sorry to hear this. How are you integrating with our payment gateway? Sounds like you're attempting to use one of our e-commerce plugins. Is that correct?

skaisaris commented 4 years ago

Hi @matthewrgourd no we do not use any of the available plugins because the site is a custom .NET e-shop. When the order is saved in our database we perform a HTTP POST call to your service endpoint: /api/orders with the order data.

matthewrgourd commented 4 years ago

Hi @skaisaris ok, did you write the code yourselves for the integration with our gateway?

skaisaris commented 4 years ago

Yes I wrote the code few years ago. Here are the exact steps after performing a test order few minutes ago:

  1. Perform HTTP POST at endpoint: https://www.vivapayments.com/api/orders Input JSON: {"Amount":19900,"CustomerTrns":"iKing Order 2005600001","Email":"spkaisaris@gmail.com","FullName":"Spyros Kaisaris","MerchantTrns":"2005600001","PaymentTimeOut":900,"Phone":null,"RequestLang":"el-GR"}

  2. The service responds with JSON: {"OrderCode":2994616969472605,"ErrorCode":0,"ErrorText":null,"TimeStamp":"2020-02-25T14:54:54.6169694+02:00","CorrelationId":null,"EventId":0,"Success":true}

  3. Using the "OrderCode" field of the response we redirect the user from our e-shop to VivaPayments page. In this example the redirect URL is: https://www.vivapayments.com/web/checkout?ref=2994616969472605

The problem is that if the user inputs correct payment information or wrong, the VivaPayments page does not returns back to our landing pages in order to receive the outcome of this transaction.

matthewrgourd commented 4 years ago

Hi @skaisaris error 500 means 'service unavailable' but I'm not sure why that's the case as our APIs are up and running. You mentioned about writing the code a few years ago. When exactly did it stop working?

skaisaris commented 4 years ago

Currently I am unable to tell you when this issue started because I need to get more feedback from my client, who discovered this behaviour and informed me few days ago. For the time being what I would like from your part is to tell me if you have any kind of error / trace logs at your web application, because the error 500 is a Viva error page coming from your domain not the e-shop’s. Thank you.

On 26 February 2020 at 14:00:16, matthewrgourd (notifications@github.com) wrote:

Hi @skaisaris https://github.com/skaisaris error 500 means 'service unavailable' but I'm not sure why that's the case as our APIs are up and running. You mentioned about writing the code a few years ago. When exactly did it stop working?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/VivaPayments/API/issues/1394?email_source=notifications&email_token=AOTGYYQATXWSX4JPMHIY2ODREZKU7A5CNFSM4KXZ3I4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM76QRY#issuecomment-591390791, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOTGYYUVTKKT74VTUB47U6LREZKU7ANCNFSM4KXZ3I4A .

matthewrgourd commented 4 years ago

HI @skaisaris I've just tested what you sent through and it works fine. The redirect URLs are defined when you set up the payment source in the Viva Wallet banking app. I believe you need to log in to your client's acccount and edit the default payment source's settings described in Create a payment source on our developer portal.