- Issue created by @mathiasgmeiner
If a customer clicks on the payment page of Mollie on the "back to the site" button in the bottom left corner the status of the payment is "open" and Mollie interprets it in MollieRedirectEventSubscriper.php on line 58 as a successfull payment because the payment is not null or false:
if (!$payment) {
$route_name = 'commerce_payment.checkout.cancel';
}
else
....
As already
stated in this issue →
it should check the status of the payment as well.
Something like:
$canceled_statuses = [
PaymentStatus::STATUS_CANCELED,
PaymentStatus::STATUS_EXPIRED,
PaymentStatus::STATUS_FAILED,
PaymentStatus::STATUS_OPEN,
];
if (!$payment || in_array($payment->getStatus(), $canceled_statuses, TRUE)) {
Active
2.2
Code