- Issue created by @onfire84
When checking out an order, we got an WSOD. The watchdog log shows us:
Drupal\commerce_payment\Exception\PaymentGatewayException: [403] Client error: `POST https://api.klarna.com/ordermanagement/v1/orders/ORDER_ID/captures` resulted in a `403 Forbidden` response: {"error_code":"CAPTURE_NOT_ALLOWED","error_messages":["Captured amount is higher than the remaining authorized amount. C (truncated...) in Drupal\commerce_klarna_payments\Plugin\Commerce\PaymentGateway\Klarna->capturePayment() (Zeile 363 in /var/www/html/web/modules/contrib/commerce_klarna_payments/src/Plugin/Commerce/PaymentGateway/Klarna.php).
Drupal should show a meaningful error message, that the payment was not possible instead of an WSOD.
Active
3.0
Code