This might take care of the issue of double paying

This commit is contained in:
Joshua Estes 2014-07-01 17:01:18 -04:00
parent d1d369c411
commit 1d3cc1c1b4
1 changed files with 5 additions and 0 deletions

View File

@ -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