4

I am using the payment gateway InnovatePayments which is working fine for single checkout & redirected me to Payment Gateway page after clicking place order button where i entered credit card info but for Checkout with Multiple Addresses (Even with same address but in multiple checkout option) magento is not able to redirected me to gateway page after clicking on place order below message is shown with order number.

"Thank you for your purchase!

We are processing your order and you will soon receive an email with details of the order. Once the order has shipped you will receive another email with a link to track its progress."

Thanks

5

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.

  • thanks Marius thats mean payment gateway which required redirection to there will not be use in Multi shipping address – user3409089 Mar 12 '14 at 8:38
  • @user3409089. Yep. That is the conclusion I reached after some research. But like I said in the answer, I may be wrong. I think the best idea on this is to ask the extension developer if they support (or at least tested) their extension with multishipping. If the answer is 'NO' the you should not allow this method for multishipping. – Marius Mar 12 '14 at 8:40
  • I never used multishipping. But this means, paypal is not possible too? Wow. Now I'm impressed... magentocommerce.com/boards/viewthread/51972 seems so. – Fabian Blechschmidt Mar 12 '14 at 9:05
  • Has anyone come up with a solution to this? Can't find a work around or an extension that will make it work. – jeremy.bass Oct 30 '15 at 16:42
  • Does anyone have solution for this? – Vinay Sikarwar Mar 10 '17 at 3:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.