VivaPayments / API

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

Simple Checkout payment returning 500 (Internal Server Error) #1820

Closed vassilismon85 closed 4 years ago

vassilismon85 commented 4 years ago

We have integrated Simple Checkout method in a custom eshop of ours. I am trying both in production and demo environment to make a payment but after the 3d secure verification, I am getting the attached errors. StoXeri Response

It seems that the https://demo.vivapayments.com/web/checkout/getpaymenttoken & https://www.vivapayments.com/web/checkout/getpaymenttoken url is not working.

matthewrgourd commented 4 years ago

Hi @vassilismon85, sorry to hear you're experiencing issues. Can you share with me the HTML you're using for the button with your public key blurred out?

vassilismon85 commented 4 years ago

0-02-05-65282ec7f8ca2f8189c8c01d1c10170c37c918b5829e2484f50f6a1159cc1575_de3d1bae

vassilismon85 commented 4 years ago

Just to keep in mind, I have this issue the last week, while I have the simple checkout integrated in my software over the past 2 years, and it was working great. The screenshot is from the demo environment, but I have the same problem in the production too

matthewrgourd commented 4 years ago

Hi @vassilismon85 I've raised with our development team. I'll get back to you once I've a reply. Thanks.

matthewrgourd commented 4 years ago

Hi @vassilismon85 my colleagues have looked into this and the reason for the issue is due to a Chrome update that affects cookie handling. We should be able to make the necessary changes to the code in the coming weeks. Unfortunately there is no quick fix as the Chrome update will mean a fundamental revision of the code. In the meantime, you should find it still works in Microsoft Edge and other browsers so please advise your customers of the same if at all possible. Alternatively, we have our Native solution which doesn't involve a button but an embedded payment form instead. Hope this helps and apologies for any inconvenience caused!

genesispro commented 4 years ago

Is there any progress fixing that issue? Advising customers to not use Google Chrome browser is not an option since we are referring to retail customers and not an in-house employees. Other than that native apps that use chromium web browser to browse url pages have no choice other than skipping the native app and moving to a non-chrome browser where in that case customers are not even aware of the page url that is loaded from the native app.

matthewrgourd commented 4 years ago

Hi @genesispro not yet, but I'm chasing for an update today.

matthewrgourd commented 4 years ago

Hi @vassilismon85, @genesispro, I'm advised that a fix was applied last week. Please close this issue if problem is now solved.

genesispro commented 4 years ago

I just tried it on the developer server and I still have the same problem

matthewrgourd commented 4 years ago

Hi @vassilismon85 is the issue resolved for you? Asking you as the original poster. @genesispro your issue may be different. Please let me have your demo merchant ID as I may need to enable the API for you.

vassilismon85 commented 4 years ago

@matthewrgourd I still have the same problem. I just tried to pay online via firefox browser and it worked ok, which means that the API is enabled. With the same demo merchant id, via google chrome, followin the same steps, I have the same problem as mentioned above.

matthewrgourd commented 4 years ago

Hi @genesispro @vassilismon85 seems to be working fine in Chrome on production but not demo. I'm checking with the developers about the latter. Are you sure you've tested on live? Here's the code I'm using in JSBin:

<!DOCTYPE html>
<html>
    <head>
        <title>Simple Checkout</title>
    </head>
    <body>
      <form id="myform" action="/checkout" method="post">
        <button type="button"
          data-vp-publickey="[my simple checkout key]"
          data-vp-baseurl="https://www.vivapayments.com"
          data-vp-lang="en"
          data-vp-amount="1000"
          data-vp-description="My product">
        </button>
      </form>

      <script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
      <script src="https://www.vivapayments.com/web/checkout/js"></script>
    </body>
</html>
matthewrgourd commented 4 years ago

Hi guys, apparently there's going to be a release tomorrow for both demo and live to be fixed. Apologies for the wait.

matthewrgourd commented 4 years ago

Hi @genesispro, @vassilismon85, I'm advised by our dev team that the fix for production is now live. Regarding the demo environment, this should be available in the next hour. Thanks.

matthewrgourd commented 4 years ago

FYI, both environments were updated yesterday evening.

vassilismon85 commented 4 years ago

@matthewrgourd I just tried it with the demo account, and I still get the same error with Chrome

matthewrgourd commented 4 years ago

Sorry to hear this. So that I can test, can I please have the code you're using in plain text, with your public key blurred out? Thanks!

matthewrgourd commented 4 years ago

Hi @vassilismon85 I'm opening the below in Chrome for Mac v85 and the process works fine.

<html>
    <head>
        <title>Simple Checkout</title>
    </head>
    <body>
      <form id="myform" action="/checkout" method="post">
        <button type="button"
          data-vp-publickey="F3nrgfiPzz/nTH/O/LFu7q8iaBAf9VStbVfypQde9d4="
          data-vp-baseurl="https://demo.vivapayments.com"
          data-vp-lang="en"
          data-vp-amount="1000"
          data-vp-sourcecode="Default"
          data-vp-description="My product">
        </button>
      </form>

      <script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
      <script src="https://demo.vivapayments.com/web/checkout/js"></script>
    </body>
</html>
genesispro commented 4 years ago

The difference that I can spot between yours and mine is data-vp-sourcecode="Default" and the fact that my js is loaded above the button whereas yours is at the bottom. Would data-vp-sourcecode="Default" make any difference? And would loading at the bottom help it? In the meantime I will give it a try with these 2 options and let you know

<button id="vivaButton" type="button" data-vp-publickey="blahblahblahblahblahblahblahblahblahblah" data-vp-baseurl="https://demo.vivapayments.com" data-vp-lang="el" data-vp-amount="1530" data-vp-description="Παραγγελία στο OnlineFood" data-vp-disablewallet="true" data-vp-expandcard="true">

genesispro commented 4 years ago

image still the same

matthewrgourd commented 4 years ago

Hi @genesispro, please send me your entire page of code as plain text. I will then test in my browser.

genesispro commented 4 years ago

Hi @genesispro, please send me your entire page of code as plain text. I will then test in my browser.

this is a bit too big to send it over... you could try to visit our dev server (https://dev.onlinefood.gr/elink/eshop/en) use **** to login ... add something to the basket and go to the basket to see the html source... you can then try to process the order using the option Mastercard/Visa and see yourself the error

matthewrgourd commented 4 years ago

Hi @genesispro, I've made a note of the login info supplied and will test this afternoon. In the meantime I will delete from your post for security reasons.

matthewrgourd commented 4 years ago

Hi @genesispro, I managed to recreate the issue. I've raised with the development team. I'll let you know when there's an update.

matthewrgourd commented 4 years ago

Hi @genesispro latest update is that the production version of Simple Checkout is fine in Chrome now but we're waiting for an update in the sandbox environment. Can you confirm you're having no further issues using Simple Checkout when using the base url?

matthewrgourd commented 4 years ago

Hi @genesispro apologies for the extended delay, Simple Checkout is now fixed on demo. Please test again via https://dev.onlinefood.gr/elink/eshop/en. Thanks!

tbatzakas commented 4 years ago

Is this fix still current? Suddenly we experience the same issue in our own implementation of simplecheckout on a site that has been working just fine. The weird thing is that some payments go through, but many others don't, so there isn't a 100% failure. I personally tried with my own card from Eurobank and after confirmation from 3dsecure and Eurobank (OTP or App) I experience the same error as of this issue and the same red X button dialog on vivawallet's form.

matthewrgourd commented 4 years ago

Hi @tbatzakas this issue related to Chrome browsers only. Are the failures occurring in relation to customers use a Chrome browser? If that's not the case, then there may be a valid reason for the failures. However, in that case, I would need to research more. Can you give me approximate time and date of 3 examples and I'll check your account. I will also have to take a note of your website address and trading name if you don't mind? Thanks.

tbatzakas commented 4 years ago

@matthewrgourd yes the issue is caused on Chrome (I tested on mac OS Catalina). I will try some new transactions and get back to you asap. The website in question is tutors.gr

tbatzakas commented 4 years ago

@matthewrgourd I tried again today at 20:55 with a viva card and got the same result. HTTP500 for the getpaymenttoken endpoint. The payment gets as far as 2FA confirmation for the card and then I get presented with a red button with a X on the center like the error above.

matthewrgourd commented 4 years ago

Hi @tbatzakas, so that I can investigate further, please share with me the full HTML code you are using, with your public key obscured.

tbatzakas commented 4 years ago

Hello

This is integrated on custom nodes in Drupal 7 integration. You need the button html or the full page html? In case you need the full page I have to send you 2 php files (2 drupal custom nodes) for you to check. And ofcourse, this is confidential.

On 22 Sep 2020, at 11:27 AM, matthewrgourd notifications@github.com wrote:

Hi @tbatzakas https://github.com/tbatzakas, so that I can investigate further, please share with me the full HTML code you are using, with your public key obscured.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/VivaPayments/API/issues/1820#issuecomment-696580835, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEF4ROSIKGKA3SVJPXRQXKTSHBNV3ANCNFSM4QDFVMVA.

matthewrgourd commented 4 years ago

Hi @tbatzakas just the button HTML, please. Thanks!

tbatzakas commented 4 years ago

<button type="button" class='comple_order_with_viva' data-vp-publickey="XXXXXXXXXXXXXX" data-vp-baseurl="https://www.vivapayments.com" data-vp-lang="el" data-vp-amount="<?=$_POST['total_cost']?>" data-vp-description="<?=$buy_description?>"> </button>

matthewrgourd commented 4 years ago

Hi @tbatzakas can I also have your website address for testing? Thanks...

tbatzakas commented 4 years ago

hello, it’s on my previous message, it’s tutors.gr http://tutors.gr/ You will need to register for a new account and then after validating your email create dummy profile. After that you will need to go through choosing a plan and make a payment.

On 22 Sep 2020, at 12:34 PM, matthewrgourd notifications@github.com wrote:

Hi @tbatzakas https://github.com/tbatzakas can I also have your website address for testing? Thanks...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/VivaPayments/API/issues/1820#issuecomment-696612591, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEF4ROWZ6JC6KR6B7V5QSA3SHBVRNANCNFSM4QDFVMVA.

matthewrgourd commented 4 years ago

@tbatzakas sorry, one more thing, I need the company name, registration or VAT number so I can find on our database.

tbatzakas commented 4 years ago

ok but i need your private email address in order to continue on this one

On 22 Sep 2020, at 12:50 PM, matthewrgourd notifications@github.com wrote:

@tbatzakas https://github.com/tbatzakas sorry, one more thing, I need the company name, registration or VAT number so I can find on our database.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/VivaPayments/API/issues/1820#issuecomment-696619834, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEF4ROVEQA2WVS5JBP5GIW3SHBXN5ANCNFSM4QDFVMVA.

matthewrgourd commented 4 years ago

mgourd@vivawallet.com but please reference this issue (#1820) for tracking purposes. Thanks.

matthewrgourd commented 4 years ago

Hi @tbatzakas I can see that you've had transactions over the past few days so I don't think there's an issue with Simple Checkout. There may be another reason for the payment failure you mentioned from yesterday. We previously had an issue with Chrome but now that's fixed. You had a successful transaction yesterday from one customer so that is yet more evidence that our payment system is working.

tbatzakas commented 4 years ago

@matthewrgourd fair point, but since there is an http 500 error on viva server, how can we troubleshoot? My own cards never pass btw. Is there a possibility you can see if there is anything more in your side in your logfiles on the aforementioned datetime of my errorneous transaction?

matthewrgourd commented 4 years ago

Hi @tbatzakas, unfortunately I can't work out how to purchase anything. I can see how to contact a tutor, but how do you buy a course? Apologies, but I don't understand Greek and Google Translate is fiddly to use on your site.

tbatzakas commented 4 years ago

Hello, you register as a tutor and create a profile to choose a plan. This is the paid service, tou dont buy courses

Στάλθηκε από το iPhone μου

22 Σεπ 2020, 5:04 μμ, ο χρήστης «matthewrgourd notifications@github.com» έγραψε:

 Hi @tbatzakas, unfortunately I can't work out how to purchase anything. I can see how to contact a tutor, but how do you buy a course? Apologies, but I don't understand Greek and Google Translate is fiddly to use on your site.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

matthewrgourd commented 4 years ago

Hi @tbatzakas, thanks. I just tested (with a card with no funds) and there was no API error returned. I'm fairly confident the checkout is working correctly. Can I just check if you're referring to a card payment or a payment through Viva Wallet? (first option, available in Greece only)

tbatzakas commented 4 years ago

Στάλθηκε από το iPhone μου

22 Σεπ 2020, 6:34 μμ, ο χρήστης «matthewrgourd notifications@github.com» έγραψε:

 Hi @tbatzakas, thanks. I just tested (with a card with no funds) and there was no API error returned. I'm fairly confident the checkout is working correctly. Can I just check if you're referring to a card payment or a payment through Viva Wallet? (first option, available in Greece only)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.