Changeset 2145243
- Timestamp:
- 08/26/2019 12:39:04 AM (7 years ago)
- Location:
- nomiddleman-crypto-payments-for-woocommerce/trunk
- Files:
-
- 2 added
- 5 edited
-
README.txt (modified) (3 diffs)
-
assets/img/tmp_qrcode.png (added)
-
assets/img/usdc_logo_small.png (added)
-
nomiddleman-crypto-woocommerce.php (modified) (3 diffs)
-
src/NMM_Blockchain.php (modified) (2 diffs)
-
src/NMM_Cryptocurrencies.php (modified) (3 diffs)
-
src/NMM_Payment.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
nomiddleman-crypto-payments-for-woocommerce/trunk/README.txt
r2144969 r2145243 1 1 === Nomiddleman Bitcoin and Crypto Payments for WooCommerce === 2 2 Contributors: nomiddleman 3 Donate link: https://nomiddlemancrypto.io/donate/ 3 4 Tags: bitcoin, cryptocurrency, woocommerce, bitcoin payment, crypto, btc, payments, ethereum, ether, ethereum token, token, gas, e-commerce, ecommerce, monero, dogecoin, pay with crypto, pay with bitcoin, bitcoin payments, bitcoin payment gateway, crypto woo, accept, dash, litecoin, cash, gateway, payment gateway, woocommerce gateway, wordpress, electrum, mpk, master public key, hd wallet, address, zcash, bitcore, bitcoin cash, bitcoin gold, blackcoin, dash, deeponion, ethereum classic, ripple, vericoin, eos, bitcoin sv, vechain, tron, stellar, rep, bch, btg, blk, dash, onion, doge, eth, etc, ltc, xmr, xrp, vrc, zec, eos, bsv, vet, trx, xlm, no fees, no middleman, freedom, nomiddleman, no fees, free, for free, free crypto plugin, plugin, plug-in, no middleman, binance coin, bnb, iota, miota, maker, mkr, nem, xem, waves, ontology, ont, omisego, omg, holo, hot, chainlink, link, decred, dcr, basic attention token, bat, 0x, zrx, lisk, lsk, bytecoin, bcn, bitcoin diamond, bcd, digibyte, dgb, gemini dollar, gusd, potcoin, pot, risk, high-risk, coin, mineable, erc20 token, erc20, KYC, No KYC, No registration, No login, processing, processor, groestlcoin, bitcore 4 5 Requires at least: 3.0.1 … … 6 7 Requires PHP: 5.2.4 7 8 License: GPL v3 8 Stable Tag: 2.4. 59 Stable Tag: 2.4.6 9 10 10 11 Absolutely the easiest setup in the industry. No registration. No API keys. No middleman. Accept bitcoin, ethereum, litecoin, and more. … … 106 107 107 108 = 2.4.5 = 109 * Added USDC Classic/Autopay 110 * Added DGB Autopay 111 112 = 2.4.5 = 108 113 * Updated Autopay endpoints for BTC and LTC 109 114 -
nomiddleman-crypto-payments-for-woocommerce/trunk/nomiddleman-crypto-woocommerce.php
r2144969 r2145243 2 2 /* 3 3 WC requires at least: 3.0.0 4 WC tested up to: 3. 6.54 WC tested up to: 3.7.0 5 5 Plugin Name: Nomiddleman Bitcoin and Crypto Payments for WooCommerce 6 6 Plugin URI: https://wordpress.org/plugins/nomiddleman-crypto-payments-for-woocommerce/ … … 9 9 Author URI: https://nomiddlemancrypto.io 10 10 11 Version: 2.4. 511 Version: 2.4.6 12 12 Copyright: © 2019 Nomiddleman Crypto (email : support@nomiddlemancrypto.io) 13 13 License: GNU General Public License v3.0 … … 42 42 43 43 define('NMM_CRON_JOB_URL', plugins_url('', __FILE__) . '/src/NMM_Cron.php'); 44 define('NMM_VERSION', '2.4. 5');44 define('NMM_VERSION', '2.4.6'); 45 45 46 46 define('NMM_REDUX_SLUG', 'nmmpro_options'); -
nomiddleman-crypto-payments-for-woocommerce/trunk/src/NMM_Blockchain.php
r2144969 r2145243 838 838 } 839 839 840 public static function get_dgb_address_transactions($address) { 841 $args = array('timeout' => 25); 842 $request = 'https://explorer-1.us.digibyteservers.io/api/txs/?address=' . $address; 843 844 $response = wp_remote_get($request, $args); 845 846 if (is_wp_error($response) || $response['response']['code'] !== 200) { 847 NMM_Util::log(__FILE__, __LINE__, 'FAILED API CALL ( ' . $request . ' ): ' . print_r($response, true)); 848 849 //TODO: https://digiexplorer.info/ 850 $result = array( 851 'result' => 'error', 852 'total_received' => '', 853 ); 854 855 return $result; 856 } 857 858 $body = json_decode($response['body']); 859 860 $rawTransactions = $body->txs; 861 if (!is_array($rawTransactions)) { 862 $result = array( 863 'result' => 'error', 864 'message' => 'No transactions found', 865 ); 866 867 return $result; 868 } 869 $transactions = array(); 870 foreach ($rawTransactions as $rawTransaction) { 871 foreach ($rawTransaction->vout as $vout) { 872 if ($vout->scriptPubKey->addresses[0] === $address) { 873 $transactions[] = new NMM_Transaction($vout->value * 100000000, 874 $rawTransaction->confirmations, 875 $rawTransaction->time, 876 $rawTransaction->txid); 877 } 878 } 879 880 881 } 882 883 $result = array ( 884 'result' => 'success', 885 'transactions' => $transactions, 886 ); 887 888 return $result; 889 } 890 840 891 public static function get_eos_address_transactions($address) { 841 892 … … 1034 1085 return $result; 1035 1086 } 1036 1037 //https://groestlsight.groestlcoin.org/api/txs?address=1038 //32QrhXp8cTmKj4VUDPe334Eq7uFcsR2rYz1039 //FYoKoGrSXGpTavNFVbvW18UYxo6JVbUDDa1040 // /grs11041 1087 1042 1088 public static function get_lsk_address_transactions($address) { -
nomiddleman-crypto-payments-for-woocommerce/trunk/src/NMM_Cryptocurrencies.php
r2144969 r2145243 19 19 // auto-pay coins 20 20 'ETH' => new NMM_Cryptocurrency('ETH', 'Ethereum', 18, 'ethereum_logo_small.png', 60, 'Ξ', false, true, true, ''), 21 'DGB' => new NMM_Cryptocurrency('DGB', 'Digibyte', 8, 'digibyte_logo_small.png', 60, '', false, false, true, ''),21 'DGB' => new NMM_Cryptocurrency('DGB', 'Digibyte', 8, 'digibyte_logo_small.png', 60, '', false, true, true, ''), 22 22 'ZEC' => new NMM_Cryptocurrency('ZEC', 'Zcash', 8, 'zcash_logo_small.png', 60, 'ⓩ', false, true, true, ''), 23 23 'DCR' => new NMM_Cryptocurrency('DCR', 'Decred', 8, 'decred_logo_small.png', 60, '', false, true, true, ''), … … 49 49 'MLN' => new NMM_Cryptocurrency('MLN', 'Melon', 18, 'melon_logo_small.png', 60, '', false, true, true, '0xbeb9ef514a379b997e0798fdcc901ee474b6d9a1'), 50 50 'ZRX' => new NMM_Cryptocurrency('ZRX', '0x', 18, '0x_logo_small.png', 60, '', false, true, true, '0xe41d2489571d322189246dafa5ebde1f4699f498'), 51 51 'USDC' => new NMM_Cryptocurrency('USDC', 'USDC', 6, 'usdc_logo_small.png', 60, '', false, true, true, '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'), 52 52 53 53 // no support … … 323 323 return preg_match('/^APL-[a-zA-Z0-9-]{8,42}/', $address); 324 324 } 325 if ($cryptoId === 'USDC') { 326 return preg_match('/^0x[a-fA-F0-9]{40,42}/', $address); 327 } 325 328 326 329 NMM_Util::log(__FILE__, __LINE__, 'Invalid cryptoId, contact plug-in developer.'); -
nomiddleman-crypto-payments-for-woocommerce/trunk/src/NMM_Payment.php
r2144969 r2145243 230 230 $result = NMM_Blockchain::get_grs_address_transactions($address); 231 231 } 232 if ($cryptoId === 'DGB') { 233 $result = NMM_Blockchain::get_dgb_address_transactions($address); 234 } 235 if ($cryptoId === 'USDC') { 236 $result = NMM_Blockchain::get_erc20_address_transactions('USDC', $address); 237 } 232 238 233 239 if ($result['result'] === 'error') {
Note: See TracChangeset
for help on using the changeset viewer.