I've hit a similar brick wall once.
After digging in the code I found that you cannot use payment methods that required a redirect to the payment gateway in multishipping checkout. I may be wrong here, but here is the reasons of my conclusion.
In the onepage checkout, when saving the order Mage_Checkout_OnepageController::saveOrderAction
there is this code:
$redirectUrl = $this->getOnepage()->getCheckout()->getRedirectUrl();
.....
if (isset($redirectUrl)) {
$result['redirect'] = $redirectUrl;
}
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
and in opcheckout.js
in the review
class there is this:
if (response.redirect) {
this.isSuccess = true;
location.href = response.redirect;
return;
}
So if there is a redirect url specified you will get redirected to that url.
There is something similar in the savePaymentAction
.
I found no trace of something like that in the MultishippingController
. take a look at what overviewPostAction
does. (that's where the payment is processed).
After saving a few details about the credit card type (if applicable) this is called.
$this->_getCheckout()->createOrders();
The main attraction in the createOrders
method is
foreach ($orders as $order) {
$order->place();
$order->save();
if ($order->getCanSendNewEmailFlag()){
$order->sendNewOrderEmail();
}
$orderIds[$order->getId()] = $order->getIncrementId();
}
So nothing about any redirect.
An other thing that made me reach this conclusion is that most of the online payment methods that Magento has by default are not allowed in the multishipping checkout.
Look in the code for the variable $_canUseForMultishipping
. It is set to false
for most of the online payment methods.
I guess the safest solution would be to disable your method for multishipping.
You can do that by adding
protected $_canUseForMultishipping = false;
to the model that handles the payment method.
I ended up doing the same in my case.