mollie/Magento

Klarna Pay Later with status failed if the quantity is not an integer

barznet opened this issue · 3 comments

CMS: Magento 1.9.4.2
Payment: Klarna Pay Later
Release: 5.7.0

LOG:

Canceled because an error occurred while redirecting the customer to Mollie:
Error executing API call (422: Unprocessable Entity): Order line 5 is invalid. Total amount is off. Expected total amount to be €7.40 (1 × €7.40), got €3.70. Field: lines.5.totalAmount. Documentation: https://docs.mollie.com/overview/handling-errors"

#131217 : Bestellungen : Verkäufe : Magento Administration 2022-08-14 14-30-42

Hi @barznet ,

Thank you for opening this issue! As the quantity needs to be int within the Mollie API, it’s not accepting fractional quantity. A workaround could be to put the unit to the item. So instead of 0.5 x 1 meter of fabric, you have 1 x 0.5 meter of fabric. 

As Magento 1 is EOL for quite some time now, we decided to not implement a workaround within the plugin for this so we will close this issue for now.

@Frank-Magmodules
Thank you for your reply. Can you tell me, why in this case the payment by card and paypal works without problems?

#131221 : Bestellungen : Verkäufe : Magento Administration 2022-08-16 15-55-56

image

Hi @barznet ,

Because this method uses the Payment API and only sends the complete amount to be captured. Some payment methods require order details (and therefore the Orders API) to function, such as Klarna Pay now, Klarna Pay later and Klarna Slice it.

See: https://docs.mollie.com/reference/v2/orders-api/overview