diff --git a/resources/lang/en/Debug.properties b/resources/lang/en/Debug.properties index 0e1e73cca..9ddd1f0d8 100644 --- a/resources/lang/en/Debug.properties +++ b/resources/lang/en/Debug.properties @@ -32,6 +32,7 @@ CheckoutController_emptyBasket = "Basket is empty. Redirect to homepage." ; CheckoutService CheckoutService_paymentPrepared = "Payment prepared." CheckoutService_preparePaymentFailed = "Error while preparing payment." +CheckoutService_paymentNotValid = "Payment method is not valid anymore." ; ConfirmationController ConfirmationController_cannotFindOrder = "Cannot find order." diff --git a/src/Services/CheckoutService.php b/src/Services/CheckoutService.php index bd6f482c4..2f4868f74 100644 --- a/src/Services/CheckoutService.php +++ b/src/Services/CheckoutService.php @@ -422,6 +422,16 @@ public function getMethodOfPaymentId() if ($methodOfPaymentID === null || !$methodOfPaymentValid) { $methodOfPayment = array_shift($methodOfPaymentList); + + $this->getLogger(self::class)->info( + "IO::Debug.CheckoutService_paymentNotValid", + [ + "methodOfPaymentID" => $methodOfPaymentID, + "newPaymentMethod" => $methodOfPayment, + "methodOfPaymentList" => $methodOfPaymentList + ] + ); + if (!is_null($methodOfPayment)) { $methodOfPaymentID = $methodOfPayment->id; }