Created
September 5, 2013 16:09
-
-
Save borriglione/6452305 to your computer and use it in GitHub Desktop.
Hotfix - Multistore Redirect Payment Methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/code/community/Netresearch/OPS/controllers/ApiController.php b/app/code/community/Netresearch/OPS/controllers/ApiController.php | |
index 61f5154..e14f995 100644 | |
--- a/app/code/community/Netresearch/OPS/controllers/ApiController.php | |
+++ b/app/code/community/Netresearch/OPS/controllers/ApiController.php | |
@@ -32,6 +32,24 @@ class Netresearch_OPS_ApiController extends Netresearch_OPS_Controller_Abstract | |
public function postBackAction() | |
{ | |
$params = $this->getRequest()->getParams(); | |
+ /** | |
+ * Hotfix | |
+ * | |
+ * If the current storeID != the storeID of the order redirect to the postback-URL of the order store | |
+ */ | |
+ if (Mage::app()->getStore()->getId() != $this->_getOrder()->getStoreId()) { | |
+ $redirectRoute = Mage::getUrl( | |
+ 'ops/api/postBack', | |
+ array( | |
+ '_store' => $this->_getOrder()->getStoreId(), | |
+ '_nosid' => true, | |
+ '_query' => $params | |
+ ) | |
+ ); | |
+ $this->_redirectUrl($redirectRoute); | |
+ return; | |
+ } | |
+ | |
try { | |
$status = $this->getPaymentHelper()->applyStateForOrder( | |
$this->_getOrder(), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment