Closed rvdsteege closed 1 year ago
When placing a WooCommerce order with free shipping and using the Klarna payment method, the following error occurred and I was unable to pay for my order:
Payment line VAT rate is required.
This occurs because there is an order item for shipping, but as $rates is empty the percentage stays null in https://github.com/pronamic/wp-pronamic-pay-woocommerce/blob/2ae572d430d558f1ee6e0468b0f73c31fe515777/src/Gateway.php#L742-L766
$rates
null
When transforming the payment lines to Mollie lines for an order request, the error is triggered.
https://github.com/pronamic/wp-pronamic-pay-mollie/blob/cd2cbadfeab5ec377e78a96ddef6beffb3a1aba7/src/Gateway.php#L823-L830
https://github.com/pronamic/wp-pronamic-pay-mollie/blob/88abf0be0ca4dfbbccb62b2ef265a5f3fe5d656e/src/LinesTransformer.php#L56-L60
Fixed in https://github.com/pronamic/wp-pronamic-pay-woocommerce/commit/61fe876bf2d2d9d70435148cb027eb3a6c485cee.
When placing a WooCommerce order with free shipping and using the Klarna payment method, the following error occurred and I was unable to pay for my order:
This occurs because there is an order item for shipping, but as
$rates
is empty the percentage staysnull
in https://github.com/pronamic/wp-pronamic-pay-woocommerce/blob/2ae572d430d558f1ee6e0468b0f73c31fe515777/src/Gateway.php#L742-L766When transforming the payment lines to Mollie lines for an order request, the error is triggered.
https://github.com/pronamic/wp-pronamic-pay-mollie/blob/cd2cbadfeab5ec377e78a96ddef6beffb3a1aba7/src/Gateway.php#L823-L830
https://github.com/pronamic/wp-pronamic-pay-mollie/blob/88abf0be0ca4dfbbccb62b2ef265a5f3fe5d656e/src/LinesTransformer.php#L56-L60