Changeset 692447
- Timestamp:
- 04/05/2013 09:08:03 PM (13 years ago)
- Location:
- bitcoin-payments-for-woocommerce/trunk
- Files:
-
- 4 edited
-
bitcoinway-woocommerce.php (modified) (1 diff)
-
bwwc-include-all.php (modified) (1 diff)
-
bwwc-utils.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bitcoin-payments-for-woocommerce/trunk/bitcoinway-woocommerce.php
r688550 r692447 12 12 Plugin URI: http://www.bitcoinway.com/ 13 13 Description: Bitcoin Payments for WooCommerce plugin allows you to accept payments in bitcoins for physical and digital products at your WooCommerce-powered online store. 14 Version: 1.2 614 Version: 1.27 15 15 Author: BitcoinWay 16 16 Author URI: http://www.bitcoinway.com/ -
bitcoin-payments-for-woocommerce/trunk/bwwc-include-all.php
r688550 r692447 9 9 if (!defined('BWWC_PLUGIN_NAME')) 10 10 { 11 define('BWWC_VERSION', '1.2 6');11 define('BWWC_VERSION', '1.27'); 12 12 13 13 //----------------------------------------------- -
bitcoin-payments-for-woocommerce/trunk/bwwc-utils.php
r686643 r692447 114 114 $avg = $vwap = $sell = 0; 115 115 116 $main_url = "https://mtgox.com/api/1/BTC{$currency_code}/ticker"; 117 $backup_url = "http://blockchain.info/ticker"; 118 119 $result = @BWWC__file_get_contents ($main_url); 116 $mtgox_url = "https://mtgox.com/api/1/BTC{$currency_code}/ticker"; 117 $blockchain_url = "http://blockchain.info/ticker"; 118 119 # Getting rate from blockchain.info first as MtGox response is very slow from some locations. 120 $result = @BWWC__file_get_contents ($blockchain_url); 120 121 if ($result) 121 122 { … … 123 124 if (is_object($json_obj)) 124 125 { 125 if ($json_obj->result == 'success') 126 { 127 $avg = @$json_obj->return->avg->value; 128 $vwap = @$json_obj->return->vwap->value; 129 $sell = @$json_obj->return->sell->value; 130 } 126 $key = "15m"; 127 $avg = $vwap = $sell = @$json_obj->$currency_code->$key; 131 128 } 132 129 } … … 134 131 if (!$avg || !$vwap || !$sell) 135 132 { 136 BWWC__log_event (__FILE__, __LINE__, "WARNING: Cannot retrieve bitcoin exchange rates from {$main_url}. SSL/server issues? Will try backup URL ..."); 137 // Fallback to backup URL 138 $result = @BWWC__file_get_contents ($backup_url); 133 $result = @BWWC__file_get_contents ($mtgox_url); 139 134 if ($result) 140 135 { … … 142 137 if (is_object($json_obj)) 143 138 { 144 $key = "15m"; 145 $avg = $vwap = $sell = @$json_obj->$currency_code->$key; 139 if ($json_obj->result == 'success') 140 { 141 $avg = @$json_obj->return->avg->value; 142 $vwap = @$json_obj->return->vwap->value; 143 $sell = @$json_obj->return->sell->value; 144 } 146 145 } 147 146 } -
bitcoin-payments-for-woocommerce/trunk/readme.txt
r688550 r692447 47 47 == Changelog == 48 48 49 = 1.27 = 50 * Fixed: very slow loading due to MtGox exchange rate API issues. 51 49 52 = 1.26 = 50 53 * Fixed PHP warnings for repeated 'define's within bwwc-include-all.php
Note: See TracChangeset
for help on using the changeset viewer.