Changeset 1392594
- Timestamp:
- 04/12/2016 01:03:51 AM (10 years ago)
- Location:
- bitcoin-payments-for-woocommerce/trunk
- Files:
-
- 6 edited
-
bitcoinway-woocommerce.php (modified) (2 diffs)
-
bwwc-bitcoin-gateway.php (modified) (1 diff)
-
bwwc-include-all.php (modified) (1 diff)
-
bwwc-render-settings.php (modified) (1 diff)
-
bwwc-utils.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bitcoin-payments-for-woocommerce/trunk/bitcoinway-woocommerce.php
r1364947 r1392594 6 6 Plugin URI: http://www.bitcoinway.com/ 7 7 Description: 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.0 78 Version: 4.08 9 9 Author: BitcoinWay 10 10 Author URI: http://www.bitcoinway.com/ … … 124 124 'BWWC__render_general_settings_page', // Function 125 125 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__)) 127 128 ); 128 129 -
bitcoin-payments-for-woocommerce/trunk/bwwc-bitcoin-gateway.php
r1364947 r1392594 472 472 'requested_by_ip' => @$_SERVER['REMOTE_ADDR'], 473 473 'requested_by_ua' => @$_SERVER['HTTP_USER_AGENT'], 474 'requested_by_srv' => base64_encode(serialize($_SERVER)),474 'requested_by_srv' => BWWC__base64_encode(serialize($_SERVER)), 475 475 ); 476 476 -
bitcoin-payments-for-woocommerce/trunk/bwwc-include-all.php
r1364947 r1392594 9 9 if (!defined('BWWC_PLUGIN_NAME')) 10 10 { 11 define('BWWC_VERSION', '4.0 7');11 define('BWWC_VERSION', '4.08'); 12 12 13 13 //----------------------------------------------- -
bitcoin-payments-for-woocommerce/trunk/bwwc-render-settings.php
r1364947 r1392594 302 302 TTT; 303 303 echo $html_out; 304 //{{{/P HP_ENCODE}}} ?> ///+{EDITION==Pro}///304 //{{{/PLACEHOLDER}}} ?> ///+{EDITION==Pro}/// 305 305 306 306 <?php -
bitcoin-payments-for-woocommerce/trunk/bwwc-utils.php
r1344918 r1392594 867 867 { 868 868 $safetied = serialize($safetied); 869 $safetied = $p . str_replace('=', '_', base64_encode($safetied));869 $safetied = $p . str_replace('=', '_', BWWC__base64_encode($safetied)); 870 870 $new_post_data[$k] = $safetied; 871 871 } … … 1168 1168 } 1169 1169 //=========================================================================== 1170 1171 1172 //=========================================================================== 1173 // Some hosting services disables base64_encode/decode. 1174 // this is equivalent replacement to fix errors. 1175 function 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 1210 function 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 1241 function charCodeAt($data, $char) { 1242 return ord(substr($data, $char, 1)); 1243 } 1244 1245 function charAt($data, $char) { 1246 return substr($data, $char, 1); 1247 } 1248 //=========================================================================== -
bitcoin-payments-for-woocommerce/trunk/readme.txt
r1364947 r1392594 83 83 84 84 == Changelog == 85 86 = 4.08 = 87 * Fixed: Added custom replacement for base64_decode/encode to compensate for missing function at certain hosting servers. 85 88 86 89 = 4.07 =
Note: See TracChangeset
for help on using the changeset viewer.