Merge conflict resolved

This commit is contained in:
Joshua Estes 2014-07-23 11:12:54 -04:00
commit ea8e340a53
7 changed files with 295 additions and 98 deletions

View File

@ -107,8 +107,8 @@ class Bitpay_Bitcoins_Block_Iframe extends Mage_Checkout_Block_Onepage_Payment
if (array_key_exists('error', $invoice))
{
Mage::log('Error creating bitpay invoice', null, 'bitpay.log');
Mage::log($invoice['error'], null, 'bitpay.log');
Mage::log('Error creating bitpay invoice', null, Mage::helper('bitpay')->getLogFile());
Mage::log($invoice['error'], null, Mage::helper('bitpay')->getLogFile());
Mage::throwException("Error creating bit-pay invoice. Please try again or use another payment option.");
return false;

View File

@ -0,0 +1,70 @@
<?php
/**
* The MIT License (MIT)
*
* Copyright (c) 2011-2014 BitPay LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
class Bitpay_Bitcoins_Helper_Data extends Mage_Core_Helper_Abstract
{
/**
* File that is used to put all logging information in.
*
* @var string
*/
const LOG_FILE = 'bitpay.log';
/**
* Returns the file used for logging
*
* @return string
*/
public function getLogFile()
{
return self::LOG_FILE;
}
/**
* Returns true if the merchant has set their api key
*
* @return boolean
*/
public function hasApiKey()
{
$key = Mage::getStoreConfig('payment/Bitcoins/api_key');
return !empty($key);
}
/**
* Returns true if Transaction Speed has been configured
*
* @return boolean
*/
public function hasTransactionSpeed()
{
$speed = Mage::getStoreConfig('payment/Bitcoins/speed');
return !empty($speed);
}
}

View File

@ -103,12 +103,20 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
//protected $_infoBlockType = 'bitcoins/info';
/**
* @param string $currencyCode
* Check method for processing with base currency
* @see Mage_Payment_Model_Method_Abstract::canUseForCurrency()
*
* @param string $currencyCode
* @return boolean
*/
public function canUseForCurrency($currencyCode)
{
Mage::log(
sprintf('Checking if can use currency "%s"', $currencyCode),
Zend_Log::DEBUG,
Mage::helper('bitpay')->getLogFile()
);
$currencies = Mage::getStoreConfig('payment/Bitcoins/currencies');
$currencies = array_map('trim', explode(',', $currencies));
@ -116,20 +124,33 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
}
/**
* @return boolean
* Can be used in regular checkout
* @see Mage_Payment_Model_Method_Abstract::canUseCheckout()
*
* @return bool
*/
public function canUseCheckout()
{
if (!$this->isApiKeyConfigured())
$helper = Mage::helper('bitpay');
if (!$helper->hasApiKey())
{
Mage::log('Bitpay/Bitcoins: API key not entered', Zend_Log::ERR, 'bitpay.log');
Mage::log(
'Bitpay/Bitcoins: API key not entered',
Zend_Log::ERR,
Mage::helper('bitpay')->getLogFile()
);
return false;
}
if (!$this->isTransactionSpeedConfigured())
if (!$helper->hasTransactionSpeed())
{
Mage::log('Bitpay/Bitcoins: Transaction Speed invalid', Zend_Log::ERR, 'bitpay.log');
Mage::log(
'Bitpay/Bitcoins: Transaction Speed has not been set',
Zend_Log::ERR,
Mage::helper('bitpay')->getLogFile()
);
return false;
}
@ -137,30 +158,6 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
return $this->_canUseCheckout;
}
/**
* Returns true if the merchant has set their api key
*
* @return boolean
*/
public function isApiKeyConfigured()
{
$key = Mage::getStoreConfig('payment/Bitcoins/api_key');
return !empty($key);
}
/**
* Returns true if Transaction Speed has been configured
*
* @return boolean
*/
public function isTransactionSpeedConfigured()
{
$speed = Mage::getStoreConfig('payment/Bitcoins/speed');
return !empty($speed);
}
/**
* Authorize payment method
*
@ -171,6 +168,12 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
*/
public function authorize(Varien_Object $payment, $amount)
{
Mage::log(
sprintf('Authorizing payment'),
Zend_Log::DEBUG,
Mage::helper('bitpay')->getLogFile()
);
if (!Mage::getStoreConfig('payment/Bitcoins/fullscreen'))
{
return $this->CheckForPayment($payment);
@ -188,6 +191,12 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
*/
public function CheckForPayment($payment)
{
Mage::log(
sprintf('Checking for payment'),
Zend_Log::DEBUG,
Mage::helper('bitpay')->getLogFile()
);
$quoteId = $payment->getOrder()->getQuoteId();
$ipn = Mage::getModel('Bitcoins/ipn');
@ -195,7 +204,7 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
{
// This is the error that is displayed to the customer during checkout.
Mage::throwException("Order not paid for. Please pay first and then Place your Order.");
Mage::log('Order not paid for. Please pay first and then Place Your Order.', Zend_Log::CRIT, 'bitpay.log');
Mage::log('Order not paid for. Please pay first and then Place Your Order.', Zend_Log::CRIT, Mage::helper('bitpay')->getLogFile());
}
else if (!$ipn->GetQuoteComplete($quoteId))
{
@ -213,6 +222,12 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
*/
public function invoiceOrder($order)
{
Mage::log(
sprintf('Invoicing order'),
Zend_Log::DEBUG,
Mage::helper('bitpay')->getLogFile()
);
try
{
if (!$order->canInvoice())
@ -234,7 +249,7 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
}
catch (Exception $e)
{
Mage::log($e->getMessage(), Zend_Log::EMERG, 'bitpay.log');
Mage::log($e->getMessage(), Zend_Log::EMERG, Mage::helper('bitpay')->getLogFile());
Mage::logException($e);
}
}
@ -244,6 +259,12 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
*/
public function MarkOrderPaid($order)
{
Mage::log(
sprintf('Marking order paid'),
Zend_Log::DEBUG,
Mage::helper('bitpay')->getLogFile()
);
$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true)->save();
if ($order->getTotalDue() > 0)
@ -255,7 +276,7 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
}
else
{
Mage::log('MarkOrderPaid called but order '. $order->getId() .' does not have a balance due.', Zend_Log::WARN, 'bitpay.log');
Mage::log('MarkOrderPaid called but order '. $order->getId() .' does not have a balance due.', Zend_Log::WARN, Mage::helper('bitpay')->getLogFile());
}
}
@ -264,6 +285,12 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
*/
public function MarkOrderComplete($order)
{
Mage::log(
sprintf('Marking order paid'),
Zend_Log::DEBUG,
Mage::helper('bitpay')->getLogFile()
);
if ($order->getTotalDue() >= 0 && $order->canInvoice())
{
if ($order->hasInvoices())
@ -277,7 +304,7 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
}
catch (Exception $e)
{
Mage::log($e->getMessage(), Zend_Log::EMERG, 'bitpay.log');
Mage::log($e->getMessage(), Zend_Log::EMERG, Mage::helper('bitpay')->getLogFile());
Mage::logException($e);
}
}
@ -304,7 +331,7 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
}
catch (Exception $e)
{
Mage::log('Error creating shipment for order '. $order->getId() .'.', Zend_Log::ERR, 'bitpay.log');
Mage::log('Error creating shipment for order '. $order->getId() .'.', Zend_Log::ERR, Mage::helper('bitpay')->getLogFile());
Mage::logException($e);
}
}
@ -329,7 +356,7 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
}
catch (Exception $e)
{
Mage::log($e->getMessage(), Zend_Log::EMERG, 'bitpay.log');
Mage::log($e->getMessage(), Zend_Log::EMERG, Mage::helper('bitpay')->getLogFile());
Mage::logException($e);
}
@ -340,13 +367,19 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
*/
public function MarkOrderCancelled($order)
{
Mage::log(
sprintf('Marking order cancelled'),
Zend_Log::DEBUG,
Mage::helper('bitpay')->getLogFile()
);
try
{
$order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true)->save();
}
catch (Exception $e)
{
Mage::log('Could not cancel order '. $order->getId() .'.', null, 'bitpay.log');
Mage::log('Could not cancel order '. $order->getId() .'.', null, Mage::helper('bitpay')->getLogFile());
Mage::logException($e);
}
}
@ -360,6 +393,12 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
*/
public function ExtractAddress($address)
{
Mage::log(
sprintf('Extracting addess'),
Zend_Log::DEBUG,
Mage::helper('bitpay')->getLogFile()
);
$options = array();
$options['buyerName'] = $address->getName();
@ -396,6 +435,12 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
*/
public function CreateInvoiceAndRedirect($payment, $amount)
{
Mage::log(
sprintf('Creating invoice and redirecting'),
Zend_Log::DEBUG,
Mage::helper('bitpay')->getLogFile()
);
include Mage::getBaseDir('lib').'/bitpay/bp_lib.php';
$apiKey = Mage::getStoreConfig('payment/Bitcoins/api_key');
@ -418,8 +463,8 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
if (array_key_exists('error', $invoice))
{
Mage::log('Error creating bitpay invoice', Zend_Log::CRIT, 'bitpay.log');
Mage::log($invoice['error'], Zend_Log::CRIT, 'bitpay.log');
Mage::log('Error creating bitpay invoice', Zend_Log::CRIT, Mage::helper('bitpay')->getLogFile());
Mage::log($invoice['error'], Zend_Log::CRIT, Mage::helper('bitpay')->getLogFile());
Mage::throwException("Error creating BitPay invoice. Please try again or use another payment option.");
}
else
@ -436,6 +481,12 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
*/
public function getOrderPlaceRedirectUrl()
{
Mage::log(
sprintf('Getting order place redirect url'),
Zend_Log::DEBUG,
Mage::helper('bitpay')->getLogFile()
);
if (Mage::getStoreConfig('payment/Bitcoins/fullscreen'))
{
return Mage::getSingleton('customer/session')->getRedirectUrl();
@ -455,10 +506,16 @@ class Bitpay_Bitcoins_Model_PaymentMethod extends Mage_Payment_Model_Method_Abst
*/
public function getQuoteHash($quoteId)
{
Mage::log(
sprintf('Getting the quote hash'),
Zend_Log::DEBUG,
Mage::helper('bitpay')->getLogFile()
);
$quote = Mage::getModel('sales/quote')->load($quoteId, 'entity_id');
if (!$quote)
{
Mage::log('getQuoteTimestamp: quote not found', Zend_Log::ERR, 'bitpay.log');
Mage::log('getQuoteTimestamp: quote not found', Zend_Log::ERR, Mage::helper('bitpay')->getLogFile());
return false;
}

View File

@ -43,13 +43,19 @@ class Bitpay_Bitcoins_IndexController extends Mage_Core_Controller_Front_Action
* bitpay's IPN lands here
*/
public function indexAction() {
Mage::log(
sprintf('Incoming IPN from bitpay'),
Zend_Log::DEBUG,
Mage::helper('bitpay')->getLogFile()
);
require Mage::getBaseDir('lib').'/bitpay/bp_lib.php';
$apiKey = Mage::getStoreConfig('payment/Bitcoins/api_key');
$invoice = bpVerifyNotification($apiKey);
if (is_string($invoice))
{
Mage::log("bitpay callback error: $invoice", Zend_Log::ERR, 'bitpay.log');
Mage::log("bitpay callback error: $invoice", Zend_Log::ERR, Mage::helper('bitpay')->getLogFile());
throw new Exception('Bitpay callback error:' . $invoice);
}
@ -66,7 +72,7 @@ class Bitpay_Bitcoins_IndexController extends Mage_Core_Controller_Front_Action
}
else
{
Mage::log('Invalid posData, does not contain quoteId or orderId.', Zend_Log::ERR, 'bitpay.log');
Mage::log('Invalid posData, does not contain quoteId or orderId.', Zend_Log::ERR, Mage::helper('bitpay')->getLogFile());
throw new Exception('Invalid Bitpay IPN received.');
}
@ -75,14 +81,14 @@ class Bitpay_Bitcoins_IndexController extends Mage_Core_Controller_Front_Action
if (!$order->getId())
{
Mage::log('Order object does not contain an ID', Zend_Log::ERR, 'bitpay.log');
Mage::log('Order object does not contain an ID', Zend_Log::ERR, Mage::helper('bitpay')->getLogFile());
throw new Exception('Order object does not contain an ID');
}
// update the order if it exists already
// BitPay Statuses
// new, paid, confirmed, complete, expired, invalid
Mage::log('Received IPN with "' . $invoice['status'] . '" status', Zend_Log::DEBUG, 'bitpay.log');
Mage::log('Received IPN with "' . $invoice['status'] . '" status', Zend_Log::DEBUG, Mage::helper('bitpay')->getLogFile());
switch($invoice['status'])
{
@ -99,7 +105,7 @@ class Bitpay_Bitcoins_IndexController extends Mage_Core_Controller_Front_Action
// Mark confirmed/complete if the order has been paid
$method = Mage::getModel('Bitcoins/paymentMethod');
$method->MarkOrderComplete($order);
//Mage::log('Received a ' . $invoice['status'] . ' notification from BitPay but this order is not paid yet. Possible internal error with Magento. Check order status to confirm.', Zend_Log::ERR, 'bitpay.log');
//Mage::log('Received a ' . $invoice['status'] . ' notification from BitPay but this order is not paid yet. Possible internal error with Magento. Check order status to confirm.', Zend_Log::ERR, Mage::helper('bitpay')->getLogFile());
break;
// Map to Magento State Closed

View File

@ -58,44 +58,50 @@
</bitcoins>
</blocks>
<models>
<Bitcoins>
<class>Bitpay_Bitcoins_Model</class>
<resourceModel>Bitcoins_resource</resourceModel>
</Bitcoins>
<Bitcoins_resource>
<class>Bitpay_Bitcoins_Model_Resource</class>
<entities>
<ipn>
<table>bitpay_ipns</table>
</ipn>
</entities>
</Bitcoins_resource>
</models>
<resources>
<Bitcoins_setup> <!-- keep this uppercase or you'll get duplicate errors -->
<setup>
<!-- which module to look for install/upgrade files in -->
<module>Bitpay_Bitcoins</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</Bitcoins_setup>
<Bitcoins_write>
<connection>
<use>core_write</use>
</connection>
</Bitcoins_write>
<Bitcoins_read>
<connection>
<use>core_read</use>
</connection>
</Bitcoins_read>
</resources>
</global>
<helpers>
<bitpay>
<class>Bitpay_Bitcoins_Helper</class>
</bitpay>
</helpers>
<models>
<Bitcoins>
<class>Bitpay_Bitcoins_Model</class>
<resourceModel>Bitcoins_resource</resourceModel>
</Bitcoins>
<Bitcoins_resource>
<class>Bitpay_Bitcoins_Model_Resource</class>
<entities>
<ipn>
<table>bitpay_ipns</table>
</ipn>
</entities>
</Bitcoins_resource>
</models>
<resources>
<Bitcoins_setup> <!-- keep this uppercase or you'll get duplicate errors -->
<setup>
<!-- which module to look for install/upgrade files in -->
<module>Bitpay_Bitcoins</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</Bitcoins_setup>
<Bitcoins_write>
<connection>
<use>core_write</use>
</connection>
</Bitcoins_write>
<Bitcoins_read>
<connection>
<use>core_read</use>
</connection>
</Bitcoins_read>
</resources>
</global>
<crontab>
<jobs>
<bitpay_bitcoins>
@ -116,18 +122,18 @@
</bitpay_bitcoins>
</jobs>
</crontab>
<default>
<payment>
<Bitcoins>
<active>1</active>
<model>Bitcoins/paymentMethod</model>
<title>Bitcoins</title>
<speed>low</speed>
<fullscreen>0</fullscreen>
<currencies>BTC, USD, EUR, GBP, JPY, CAD, AUD, CNY, CHF, SEK, NZD, KRW, AED, AFN, ALL, AMD, ANG, AOA, ARS, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYR, BZD, CDF, CLF, CLP, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EEK, EGP, ETB, FJD, FKP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, ISK, JEP, JMD, JOD, KES, KGS, KHR, KMF, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LVL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SGD, SHP, SLL, SOS, SRD, STD, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, UYU, UZS, VEF, VND, VUV, WST, XAF, XAG, XAU, XCD, XOF, XPF, YER, ZAR, ZMW, ZWL</currencies>
<payment_action>authorize</payment_action>
</Bitcoins>
</payment>
</default>
<default>
<payment>
<Bitcoins>
<active>1</active>
<model>Bitcoins/paymentMethod</model>
<title>Bitcoins</title>
<speed>low</speed>
<fullscreen>0</fullscreen>
<currencies>BTC, USD, EUR, GBP, JPY, CAD, AUD, CNY, CHF, SEK, NZD, KRW, AED, AFN, ALL, AMD, ANG, AOA, ARS, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYR, BZD, CDF, CLF, CLP, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EEK, EGP, ETB, FJD, FKP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, ISK, JEP, JMD, JOD, KES, KGS, KHR, KMF, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LVL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SGD, SHP, SLL, SOS, SRD, STD, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, UYU, UZS, VEF, VND, VUV, WST, XAF, XAG, XAU, XCD, XOF, XPF, YER, ZAR, ZMW, ZWL</currencies>
<payment_action>authorize</payment_action>
</Bitcoins>
</payment>
</default>
</config>

View File

@ -0,0 +1,57 @@
<?php
/**
* The MIT License (MIT)
*
* Copyright (c) 2011-2014 BitPay
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
class Bitpay_Bitcoins_Helper_DataTest extends PHPUnit_Framework_TestCase
{
public function testHasApiKeyFalse()
{
Mage::app()->getStore()->setConfig('payment/Bitcoins/api_key', null);
$this->assertFalse(Mage::helper('bitpay')->hasApiKey());
}
public function testHasApiKeyTrue()
{
Mage::app()->getStore()->setConfig('payment/Bitcoins/api_key', 'ThisIsMyApiKey');
$this->assertTrue(Mage::helper('bitpay')->hasApiKey());
}
public function testHasTransactionSpeedFalse()
{
Mage::app()->getStore()->setConfig('payment/Bitcoins/speed', null);
$this->assertFalse(Mage::helper('bitpay')->hasTransactionSpeed());
}
public function testHasTransactionSpeedTrue()
{
Mage::app()->getStore()->setConfig('payment/Bitcoins/speed', 'low');
$this->assertTrue(Mage::helper('bitpay')->hasTransactionSpeed());
}
}

View File

@ -26,6 +26,7 @@
if ($mage = realpath(__DIR__ . '/../build/magento/app/Mage.php')) {
require_once $mage;
//Mage::setIsDeveloperMode(true);
Mage::app();
} else {
exit('Could not find Mage.php');