Send new order email after invoice paid

This commit is contained in:
Rich Morgan 2014-02-10 11:35:41 -05:00
parent e547cbd6b2
commit f385778e19
1 changed files with 5 additions and 0 deletions

View File

@ -156,6 +156,11 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
$transactionSave->save(); $transactionSave->save();
$order->addStatusToHistory(Mage_Sales_Model_Order::STATE_COMPLETE); $order->addStatusToHistory(Mage_Sales_Model_Order::STATE_COMPLETE);
try {
$order->sendNewOrderEmail();
} catch (Exception $e) {
Mage::logException($e);
}
} else { } else {
Mage::log('Count of InvoiceCollection was zero! Order not invoiced.', null, 'bitpay.log'); Mage::log('Count of InvoiceCollection was zero! Order not invoiced.', null, 'bitpay.log');
} }