diff --git a/payment_commerce.module b/payment_commerce.module index 7bf4e5f..94d84b0 100644 --- a/payment_commerce.module +++ b/payment_commerce.module @@ -96,7 +96,14 @@ function payment_commerce_payment_status_change(Payment $payment, PaymentStatusI // A status change from new to pending is caused by Payment and as it // is built-in we should not respond to it. if (!(payment_status_is_or_has_ancestor($previous_status_item->status, PAYMENT_STATUS_NEW) && payment_status_is_or_has_ancestor($payment->getStatus()->status, PAYMENT_STATUS_PENDING))) { - payment_commerce_redirect_pane($payment); + // We should also not respond to a non-change from pending to pending + // for certain payment methods. + // NOTE: payment name is NOT generic; specific hack for this website. + if (!($previous_status_item->status == PAYMENT_STATUS_PENDING + && $payment->getStatus()->status == PAYMENT_STATUS_PENDING + && $payment->method->name === 'ideal')) { + payment_commerce_redirect_pane($payment); + } } } }