From f385778e19799cf1947f1404e8adb9d032b83419 Mon Sep 17 00:00:00 2001 From: Rich Morgan Date: Mon, 10 Feb 2014 11:35:41 -0500 Subject: [PATCH] Send new order email after invoice paid --- app/code/community/Bitpay/Bitcoins/Model/PaymentMethod.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/code/community/Bitpay/Bitcoins/Model/PaymentMethod.php b/app/code/community/Bitpay/Bitcoins/Model/PaymentMethod.php index fd4155b..1c7ec81 100644 --- a/app/code/community/Bitpay/Bitcoins/Model/PaymentMethod.php +++ b/app/code/community/Bitpay/Bitcoins/Model/PaymentMethod.php @@ -156,6 +156,11 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst $transactionSave->save(); $order->addStatusToHistory(Mage_Sales_Model_Order::STATE_COMPLETE); + try { + $order->sendNewOrderEmail(); + } catch (Exception $e) { + Mage::logException($e); + } } else { Mage::log('Count of InvoiceCollection was zero! Order not invoiced.', null, 'bitpay.log'); }