Skip to content

Commit cf9470e

Browse files
Merge pull request #1043 from buckaroo-it/BP-3729-Additional-change-iDEAL-fast-checkout-redirect
Bp 3729 additional change i deal fast checkout redirect
2 parents 9f3f339 + fa27534 commit cf9470e

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

Controller/Redirect/Process.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,9 @@ protected function redirectFailure()
668668
{
669669
$store = $this->order->getStore();
670670
$this->logger->addDebug('start redirectFailure');
671+
if ($this->hasPostData('add_service_action_from_magento', 'payfastcheckout')) {
672+
return $this->handleProcessedResponse('checkout/cart');
673+
}
671674
if ($this->accountConfig->getFailureRedirectToCheckout($store)) {
672675
$this->logger->addDebug('getFailureRedirectToCheckout');
673676
if (!$this->customerSession->isLoggedIn() && ($this->order->getCustomerId() > 0)) {
@@ -676,7 +679,6 @@ protected function redirectFailure()
676679
try {
677680
$customer = $this->customerRepository->getById($this->order->getCustomerId());
678681
$this->customerSession->setCustomerDataAsLoggedIn($customer);
679-
680682
if (!$this->checkoutSession->getLastRealOrderId() && $this->order->getIncrementId()) {
681683
$this->checkoutSession->setLastRealOrderId($this->order->getIncrementId());
682684
$this->logger->addDebug(__METHOD__ . '|setLastRealOrderId|');
@@ -693,15 +695,7 @@ protected function redirectFailure()
693695
$this->logger->addDebug('ready for redirect');
694696
return $this->handleProcessedResponse('checkout', ['_fragment' => 'payment', '_query' => ['bk_e' => 1]]);
695697
}
696-
697-
/**
698-
* @noinspection PhpUndefinedMethodInspection
699-
*/
700-
if($this->hasPostData('add_service_action_from_magento', 'payfastcheckout')) {
701-
$url = 'checkout/cart';
702-
} else {
703-
$url = $this->accountConfig->getFailureRedirect($store);
704-
}
698+
$url = $this->accountConfig->getFailureRedirect($store);
705699
return $this->handleProcessedResponse($url);
706700
}
707701

0 commit comments

Comments
 (0)