sebastian-mollie / SyliusMolliePlugin-DO-NOT-USE-

OLD Sylius Mollie payment gateway integration. Please use the newest version. I will be closing this repo by the end of the year.
https://github.com/mollie/Sylius/releases/tag/v5.0.0
MIT License
1 stars 4 forks source link

Fetching available methods for orders with an orderTotal of less than 1 doesn't work #258

Closed JoppeDC closed 11 months ago

JoppeDC commented 2 years ago

If the order total is less than 1, the total is formatted wrongly.

Eg.

The total is €0,35. The value stored is "35".

The plugin formats this value to a string, for the mollie API. The formatted value is ".35" instead of "0.35".

This causes the mollie api to return an exception, which is caught in the MolliePaymentsMethodResolver, and we get no available mollie methods.

The problem is in the parseTotalToString of the MollieAllowedMethodsResolver, as you can see here: https://sandbox.onlinephpfunctions.com/c/01ecc

API error:

field: "amount.value"
message: "(400: Bad Request): The amount contains an invalid value.
JoppeDC commented 11 months ago

Closed as this repo is no longer maintained.