From 1d3cc1c1b481c304cedbc05b217beae33fa42fa5 Mon Sep 17 00:00:00 2001 From: Joshua Estes Date: Tue, 1 Jul 2014 17:01:18 -0400 Subject: [PATCH] This might take care of the issue of double paying --- 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 23c4822..9122026 100644 --- a/app/code/community/Bitpay/Bitcoins/Model/PaymentMethod.php +++ b/app/code/community/Bitpay/Bitcoins/Model/PaymentMethod.php @@ -175,6 +175,10 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst } public function MarkOrderComplete($order) { + /** + * The order has already been invoiced and has already been paid, this + * code leads to having payments applied multiple times. + * if ($order->getTotalDue() <= 0) { if ($order->hasInvoices()) { foreach ($order->getInvoiceCollection() as $_eachInvoice) { @@ -190,6 +194,7 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst } else { Mage::log('MarkOrderComplete called but order '. $order->getId() .' has an outstanding balance that has not been paid.', Zend_Log::WARN, 'bitpay.log'); } + */ // If the $_bpCreateShipment option is set to true above, this code will // programmatically create a shipment for you. By design, this will mark