Skip to content

Commit

Permalink
BP-420 Magento 1 - Redirect to checkout/cart instead of success page
Browse files Browse the repository at this point in the history
  • Loading branch information
vladislav-padalka-hys committed Aug 28, 2020
1 parent b5915fa commit 6101162
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ protected function _processPush()

public function returnAction()
{
Mage::helper('buckaroo3extended')->devLog(__METHOD__, 1);

if (!$this->validatePostData()) {
return false;
}
Expand Down Expand Up @@ -341,6 +343,17 @@ public function returnAction()

$this->_order = Mage::getModel('sales/order')->loadByIncrementId($orderId);

Mage::helper('buckaroo3extended')->devLog(
__METHOD__, 2, [$orderId, $this->_order->getQuoteId(), $this->_order->getEntityId()]
);

$checkoutSingleton = Mage::getModel('checkout/type_onepage');
$session = $checkoutSingleton->getCheckout();
$session->setLastSuccessQuoteId($this->_order->getQuoteId());
$session->setLastQuoteId($this->_order->getQuoteId());
$session->setLastOrderId($this->_order->getEntityId());
$session->setLastRealOrderId($orderId);

$this->_paymentCode = $this->_order->getPayment()->getMethod();

$debugEmail = 'Payment code: ' . $this->_paymentCode . "\n\n";
Expand Down

0 comments on commit 6101162

Please sign in to comment.