Commit 7ca44c2a by Yvon

relax recurring payment filtering condition in PayementStatusExtension and try…

relax recurring payment filtering condition in PayementStatusExtension and try to show success flash msg on payement done
parent 10dcf00f
......@@ -227,7 +227,6 @@ class PaymentController extends AbstractController
$gateway->execute(new Notify($token));
} else {
$this->payum->getHttpRequestVerifier()->invalidate($token);
return $this->redirectToRoute('index');
}
// Set flash message according to payment status
......
......@@ -78,24 +78,15 @@ class PaymentStatusExtension implements ExtensionInterface
return;
}
if ($payment->getIsRecurrent()) {
//Do not handle recurring payments here as it causes lot of weird duplicates.
//Recurring payment are handled manually by direct call to core handler from
//payment controller, without calling event
return;
}
// Get current & new status
$context->getGateway()->execute($status = new GetHumanStatus($payment));
$current_payment_status = $payment->getStatus();
$current_payment_is_recurrent = $payment->getIsRecurrent();
$new_status = $status->getValue();
if (
GetHumanStatus::STATUS_CAPTURED !== $current_payment_status
&& GetHumanStatus::STATUS_AUTHORIZED != $current_payment_status
|| $current_payment_is_recurrent
) {
if (
GetHumanStatus::STATUS_CAPTURED == $new_status
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment