Magento with Desjardins payment gateway.
I have noticed that my sales order email is sending well with other payment method but with Desjardins payment gateway its not.
I worried bit and checked the extension code, there is no problem at all. then I checked core files. and I noticed code in
Mage_Checkout_Model_Type_Onepage
saveOrder()
function where I changed the code
this to
if (!$redirectUrl && $order->getCanSendNewEmailFlag()) {
try {
$order->sendNewOrderEmail();
} catch (Exception $e) {
Mage::logException($e);
}
}
this
if ($order->getCanSendNewEmailFlag()) {
try {
$order->sendNewOrderEmail();
} catch (Exception $e) {
Mage::logException($e);
}
}
Now its working fine.
I understood that $redirectUrl contains url to redirect customer page to payment gateway page but it seems when we have $redirectUrl magento will not send order email?
Desjardins gateway is redirect to third party web page for payment and other payment methods are not.
as I saw the first if conditions its state the $redirectUrl is set then email order sending code line is not executing.
I did't get this. Can any one tell me what's going on here?