bitpay / bitpay-checkout-magento2

BitPay Integration for Magento 2
15 stars 20 forks source link

Unable to place order #52

Closed jorgb90 closed 1 year ago

jorgb90 commented 1 year ago

With the newest version we are getting the following error in our checkout:

"WE ARE UNABLE TO PLACE YOUR ORDER AT THIS TIME"

Magento 2.4.5 and PHP 8.1.

p-maguire commented 1 year ago

@jorgb90 We've tested the latest version against a clean installation of Magento 2.4.5 (Open Source) running PHP 8.1 and have not been able to reproduce this issue. Could you please provide some additional context around this issue including logged errors, module configuration, and detailed steps to replicate so that we can look further into your issue?

jorgb90 commented 1 year ago

@p-maguire I can give you access to our dev environment? I couldn't find anything in the logs. Tried to do a test transaction. Its happening both with redirect and modal.

p-maguire commented 1 year ago

@jorgb90 We've released a new version (7.1.0) that includes the addition of logging on the Create Invoice function where you're experiencing the issue. If you install the latest version and are still experiencing the issue you should get a stack trace that may help us diagnose the issue.

jorgb90 commented 1 year ago

@p-maguire Now we have indeed a bitpay.log with:

[2022-09-28T12:47:13.813758+00:00] bitpayLogger.ERROR: Warning: Undefined property: stdClass::$data in /home/xxx/public_html/vendor/bitpay/module-bpcheckout/Observer/BPRedirect.php on line 99 [] []

p-maguire commented 1 year ago

@jorgb90 Thanks for the additional information. I'm opening internal ticket (SP-240) to investigate the reported issue.

p-maguire commented 1 year ago

@jorgb90 That error is indicative of an issue with the response from the create invoice call. We added some additional logging in 7.2.0 that should log the exact error that comes back from the invoice call. The most common error we've seen is due to an invalid token, but we'd need to see the output to determine what you're experiencing. Installing 7.2.0 and attempting another Checkout should return the information we'd need.

jorgb90 commented 1 year ago

@p-maguire Indeed its now saying:

[2022-09-28T21:07:42.348866+00:00] bitpayLogger.ERROR: Invalid token [] []

p-maguire commented 1 year ago

@jorgb90 That error response is generated when your token is invalid. Typically, we'd see this in either of the following circumstances:

Updating your token should correct this error, I've attached the docs that include information about Test vs Prod tokens. https://bitpay.com/api/#rest-api-concepts-environments

jorgb90 commented 1 year ago

@p-maguire That was it! Didn't know we needed to register on a separate environment for test. So this can be closed, thanks :)