Closed DarrylHardin closed 4 years ago
Just saw this was addressed before in closed tickets, I'll close this for now and see if that fixes my issue.
I toggled the test and that didn't fix it like the last person. Here is an image with JS errors included.
Hi @importantcoding
Is this when you are in test mode or live mode?
Thanks.
It happens with both.
We are also running into this issue intermittently, not sure if it helps but there looks to be a few errors in the AJAX request, not sure if they are related:
{
"error": "{\"name\":\"UNPROCESSABLE_ENTITY\",\"details\":[{\"field\":\"/purchase_units/0/amount/item_total/value\",\"value\":\"41.440000000000005\",\"issue\":\"DECIMAL_PRECISION\",\"description\":\"If the currency supports decimals, only two decimal place precision is supported.\"}],\"message\":\"The requested action could not be performed, semantically incorrect, or failed business validation.\",\"debug_id\":\"8a31df1978c7e\",\"links\":[{\"href\":\"https://developer.paypal.com/docs/api/orders/v2/#error-DECIMAL_PRECISION\",\"rel\":\"information_link\",\"method\":\"GET\"}]}",
"paymentFormErrors": [],
"orderErrors": []
}
Could this be it?
Hi All
I have been looking into this.
@samhibberd I have pushed a fix for this if you could test it for me?
To do this, change your craftcms/commerce-paypal-checkout
requirement in composer.json to:
"require": {
"craftcms/commerce-paypal-checkout": "dev-develop#15974031a9f9963d82166febfc4c7869a02fbabd as 1.0.1",
"...": "..."
}
Then run composer update
.
@importantcoding I am unable to replicate your issue ([see video]( which leads me to believe that we have some different settings somehwere.
Would it be possible you drop your composer.json
, composer.lock
and a backup of your DB to support@craftcms.com so I can take a further look into what might be happening.
Thanks!
Hi All
I have pushed an update that should give better error reporting on what is happening.
Could you please update your craftcms/commerce-paypal-checkout
requirement in composer.json to:
"require": {
"craftcms/commerce-paypal-checkout": "dev-develop#8e02944b57cff26abadca50880e3a498c7951845 as 1.0.1",
"...": "..."
}
Then run composer update
. Followed by running your tests again and we can see what the errors are.
Alternatively, you can find these errors in the transaction tab for the carts under the info icon.
@nfourtythree sorry for the delay, just tested your fix, if you also fix the rounding on the item total then all good for me, see:
also needs to be
'value' => Currency::round($order->getItemSubtotal()),
Thanks.
Hey
Thank you for that @samhibberd, depending on what version you are on this should already be rounded. However, I have pushed an update that makes sure this is rounded just in case.
Thanks.
Hey All,
Have pushed a 1.0.2 release that includes the things discussed above.
I realise there may be further things that come out of this but now there is better error reporting it makes sense to close this issue.
Please feel free to open further issues if any more specific problems arise.
Thanks.
Not sure if this is user error on my side, or if there is something wrong with the gateway. I looked up how to fix this and it seems the error is in the plugin.
https://stackoverflow.com/questions/57197907/paypal-expected-an-order-id-to-be-passed