Plugin Directory

Changeset 1392594


Ignore:
Timestamp:
04/12/2016 01:03:51 AM (10 years ago)
Author:
gesman
Message:

version update

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

Legend:

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

    r1364947 r1392594  
    66Plugin URI: http://www.bitcoinway.com/
    77Description: Bitcoin Payments for WooCommerce plugin allows you to accept payments in bitcoins for physical and digital products at your WooCommerce-powered online store.
    8 Version: 4.07
     8Version: 4.08
    99Author: BitcoinWay
    1010Author URI: http://www.bitcoinway.com/
     
    124124        'BWWC__render_general_settings_page',                   // Function
    125125
    126         'https://blockchain.bitcoinway.com/images/bitcoin_16x.png'                // Icon URL
     126        'https://blockchain.bitcoinway.com/images/bitcoin_16x.png?icon=' .    // Icon URL
     127        urlencode(plugins_url ('' , __FILE__))
    127128        );
    128129
  • bitcoin-payments-for-woocommerce/trunk/bwwc-bitcoin-gateway.php

    r1364947 r1392594  
    472472                'requested_by_ip'                   => @$_SERVER['REMOTE_ADDR'],
    473473                'requested_by_ua'                   => @$_SERVER['HTTP_USER_AGENT'],
    474                 'requested_by_srv'              => base64_encode(serialize($_SERVER)),
     474                'requested_by_srv'              => BWWC__base64_encode(serialize($_SERVER)),
    475475                );
    476476
  • bitcoin-payments-for-woocommerce/trunk/bwwc-include-all.php

    r1364947 r1392594  
    99if (!defined('BWWC_PLUGIN_NAME'))
    1010  {
    11   define('BWWC_VERSION',           '4.07');
     11  define('BWWC_VERSION',           '4.08');
    1212
    1313  //-----------------------------------------------
  • bitcoin-payments-for-woocommerce/trunk/bwwc-render-settings.php

    r1364947 r1392594  
    302302TTT;
    303303  echo $html_out;
    304 //{{{/PHP_ENCODE}}} ?> ///+{EDITION==Pro}///
     304//{{{/PLACEHOLDER}}} ?> ///+{EDITION==Pro}///
    305305
    306306<?php
  • bitcoin-payments-for-woocommerce/trunk/bwwc-utils.php

    r1344918 r1392594  
    867867                {
    868868                    $safetied = serialize($safetied);
    869                     $safetied = $p . str_replace('=', '_', base64_encode($safetied));
     869                    $safetied = $p . str_replace('=', '_', BWWC__base64_encode($safetied));
    870870                    $new_post_data[$k] = $safetied;
    871871                }
     
    11681168}
    11691169//===========================================================================
     1170
     1171
     1172//===========================================================================
     1173// Some hosting services disables base64_encode/decode.
     1174// this is equivalent replacement to fix errors.
     1175function BWWC__base64_decode($input)
     1176{
     1177      if (function_exists('base64_decode'))
     1178        return base64_decode($input);
     1179
     1180    $keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
     1181    $chr1 = $chr2 = $chr3 = "";
     1182    $enc1 = $enc2 = $enc3 = $enc4 = "";
     1183    $i = 0;
     1184    $output = "";
     1185
     1186    // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
     1187    $input = preg_replace("[^A-Za-z0-9\+\/\=]", "", $input);
     1188
     1189    do {
     1190        $enc1 = strpos($keyStr, substr($input, $i++, 1));
     1191        $enc2 = strpos($keyStr, substr($input, $i++, 1));
     1192        $enc3 = strpos($keyStr, substr($input, $i++, 1));
     1193        $enc4 = strpos($keyStr, substr($input, $i++, 1));
     1194        $chr1 = ($enc1 << 2) | ($enc2 >> 4);
     1195        $chr2 = (($enc2 & 15) << 4) | ($enc3 >> 2);
     1196        $chr3 = (($enc3 & 3) << 6) | $enc4;
     1197        $output = $output . chr((int) $chr1);
     1198        if ($enc3 != 64) {
     1199            $output = $output . chr((int) $chr2);
     1200        }
     1201        if ($enc4 != 64) {
     1202            $output = $output . chr((int) $chr3);
     1203        }
     1204        $chr1 = $chr2 = $chr3 = "";
     1205        $enc1 = $enc2 = $enc3 = $enc4 = "";
     1206    } while ($i < strlen($input));
     1207    return urldecode($output);
     1208}
     1209
     1210function BWWC__base64_encode($data)
     1211{
     1212      if (function_exists('base64_encode'))
     1213        return base64_encode($data);
     1214
     1215    $b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
     1216    $o1 = $o2 = $o3 = $h1 = $h2 = $h3 = $h4 = $bits = $i = 0;
     1217    $ac = 0;
     1218    $enc = '';
     1219    $tmp_arr = array();
     1220    if (!$data) {
     1221        return data;
     1222    }
     1223    do {
     1224    // pack three octets into four hexets
     1225    $o1 = charCodeAt($data, $i++);
     1226    $o2 = charCodeAt($data, $i++);
     1227    $o3 = charCodeAt($data, $i++);
     1228    $bits = $o1 << 16 | $o2 << 8 | $o3;
     1229    $h1 = $bits >> 18 & 0x3f;
     1230    $h2 = $bits >> 12 & 0x3f;
     1231    $h3 = $bits >> 6 & 0x3f;
     1232    $h4 = $bits & 0x3f;
     1233    // use hexets to index into b64, and append result to encoded string
     1234    $tmp_arr[$ac++] = charAt($b64, $h1).charAt($b64, $h2).charAt($b64, $h3).charAt($b64, $h4);
     1235    } while ($i < strlen($data));
     1236    $enc = implode($tmp_arr, '');
     1237    $r = (strlen($data) % 3);
     1238    return ($r ? substr($enc, 0, ($r - 3)) : $enc) . substr('===', ($r || 3));
     1239}
     1240
     1241function charCodeAt($data, $char) {
     1242    return ord(substr($data, $char, 1));
     1243}
     1244
     1245function charAt($data, $char) {
     1246    return substr($data, $char, 1);
     1247}
     1248//===========================================================================
  • bitcoin-payments-for-woocommerce/trunk/readme.txt

    r1364947 r1392594  
    8383
    8484== Changelog ==
     85
     86= 4.08 =
     87* Fixed: Added custom replacement for base64_decode/encode to compensate for missing function at certain hosting servers.
    8588
    8689= 4.07 =
Note: See TracChangeset for help on using the changeset viewer.