Plugin Directory

Changeset 692447


Ignore:
Timestamp:
04/05/2013 09:08:03 PM (13 years ago)
Author:
gesman
Message:

1.27 version update

Location:
bitcoin-payments-for-woocommerce/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • bitcoin-payments-for-woocommerce/trunk/bitcoinway-woocommerce.php

    r688550 r692447  
    1212Plugin URI: http://www.bitcoinway.com/
    1313Description: 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.26
     14Version: 1.27
    1515Author: BitcoinWay
    1616Author URI: http://www.bitcoinway.com/
  • bitcoin-payments-for-woocommerce/trunk/bwwc-include-all.php

    r688550 r692447  
    99if (!defined('BWWC_PLUGIN_NAME'))
    1010  {
    11   define('BWWC_VERSION',           '1.26');
     11  define('BWWC_VERSION',           '1.27');
    1212
    1313  //-----------------------------------------------
  • bitcoin-payments-for-woocommerce/trunk/bwwc-utils.php

    r686643 r692447  
    114114   $avg = $vwap = $sell = 0;
    115115
    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);
    120121   if ($result)
    121122   {
     
    123124      if (is_object($json_obj))
    124125      {
    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;
    131128      }
    132129   }
     
    134131   if (!$avg || !$vwap || !$sell)
    135132   {
    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);
    139134      if ($result)
    140135      {
     
    142137         if (is_object($json_obj))
    143138         {
    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            }
    146145         }
    147146      }
  • bitcoin-payments-for-woocommerce/trunk/readme.txt

    r688550 r692447  
    4747== Changelog ==
    4848
     49= 1.27 =
     50* Fixed: very slow loading due to MtGox exchange rate API issues.
     51
    4952= 1.26 =
    5053* Fixed PHP warnings for repeated 'define's within bwwc-include-all.php
Note: See TracChangeset for help on using the changeset viewer.