Changeset 3487182
- Timestamp:
- 03/20/2026 12:26:13 PM (2 weeks ago)
- Location:
- coinsnap-for-woocommerce
- Files:
-
- 97 added
- 3 edited
-
tags/1.7.5 (added)
-
tags/1.7.5/assets (added)
-
tags/1.7.5/assets/css (added)
-
tags/1.7.5/assets/css/coinsnap-backend-style.css (added)
-
tags/1.7.5/assets/css/coinsnap-woocommerce-checkout.css (added)
-
tags/1.7.5/assets/css/index.php (added)
-
tags/1.7.5/assets/images (added)
-
tags/1.7.5/assets/images/bitcoin-lightning-logos.png (added)
-
tags/1.7.5/assets/images/bitcoin-lightning-logos.svg (added)
-
tags/1.7.5/assets/images/coinsnap-logo.jpg (added)
-
tags/1.7.5/assets/images/coinsnap-logo.png (added)
-
tags/1.7.5/assets/images/index.php (added)
-
tags/1.7.5/assets/index.php (added)
-
tags/1.7.5/assets/js (added)
-
tags/1.7.5/assets/js/adminFields.js (added)
-
tags/1.7.5/assets/js/blocks.asset.php (added)
-
tags/1.7.5/assets/js/blocks.js (added)
-
tags/1.7.5/assets/js/coinsnap-woocommerce-checkout.js (added)
-
tags/1.7.5/assets/js/connectionCheck.js (added)
-
tags/1.7.5/assets/js/gatewayIconMedia.js (added)
-
tags/1.7.5/assets/js/index.php (added)
-
tags/1.7.5/coinsnap-for-woocommerce.php (added)
-
tags/1.7.5/includes (added)
-
tags/1.7.5/includes/Admin (added)
-
tags/1.7.5/includes/Admin/GlobalSettings.php (added)
-
tags/1.7.5/includes/Admin/Notice.php (added)
-
tags/1.7.5/includes/Admin/index.php (added)
-
tags/1.7.5/includes/Blocks (added)
-
tags/1.7.5/includes/Blocks/DefaultGatewayBlocks.php (added)
-
tags/1.7.5/includes/Blocks/index.php (added)
-
tags/1.7.5/includes/Gateway (added)
-
tags/1.7.5/includes/Gateway/AbstractGateway.php (added)
-
tags/1.7.5/includes/Gateway/DefaultGateway.php (added)
-
tags/1.7.5/includes/Gateway/SeparateGateways.php (added)
-
tags/1.7.5/includes/Gateway/index.php (added)
-
tags/1.7.5/includes/Helper (added)
-
tags/1.7.5/includes/Helper/BTCPayApiAuthorization.php (added)
-
tags/1.7.5/includes/Helper/CoinsnapApiHelper.php (added)
-
tags/1.7.5/includes/Helper/CoinsnapApiWebhook.php (added)
-
tags/1.7.5/includes/Helper/Logger.php (added)
-
tags/1.7.5/includes/Helper/OrderStates.php (added)
-
tags/1.7.5/includes/Helper/SatsMode.php (added)
-
tags/1.7.5/includes/Helper/SettingsHelper.php (added)
-
tags/1.7.5/includes/Helper/UpdateManager.php (added)
-
tags/1.7.5/includes/Helper/index.php (added)
-
tags/1.7.5/includes/index.php (added)
-
tags/1.7.5/index.php (added)
-
tags/1.7.5/languages (added)
-
tags/1.7.5/languages/index.php (added)
-
tags/1.7.5/library (added)
-
tags/1.7.5/library/Client (added)
-
tags/1.7.5/library/Client/AbstractClient.php (added)
-
tags/1.7.5/library/Client/BTCPayApiAuthorization.php (added)
-
tags/1.7.5/library/Client/BTCPayApiKey.php (added)
-
tags/1.7.5/library/Client/Invoice.php (added)
-
tags/1.7.5/library/Client/InvoiceCheckoutOptions.php (added)
-
tags/1.7.5/library/Client/Server.php (added)
-
tags/1.7.5/library/Client/Store.php (added)
-
tags/1.7.5/library/Client/User.php (added)
-
tags/1.7.5/library/Client/Webhook.php (added)
-
tags/1.7.5/library/Client/index.php (added)
-
tags/1.7.5/library/Exception (added)
-
tags/1.7.5/library/Exception/BadRequestException.php (added)
-
tags/1.7.5/library/Exception/CSException.php (added)
-
tags/1.7.5/library/Exception/ConnectException.php (added)
-
tags/1.7.5/library/Exception/ForbiddenException.php (added)
-
tags/1.7.5/library/Exception/RequestException.php (added)
-
tags/1.7.5/library/Exception/index.php (added)
-
tags/1.7.5/library/Http (added)
-
tags/1.7.5/library/Http/ClientInterface.php (added)
-
tags/1.7.5/library/Http/Response.php (added)
-
tags/1.7.5/library/Http/ResponseInterface.php (added)
-
tags/1.7.5/library/Http/WPRemoteClient.php (added)
-
tags/1.7.5/library/Http/index.php (added)
-
tags/1.7.5/library/Result (added)
-
tags/1.7.5/library/Result/AbstractResult.php (added)
-
tags/1.7.5/library/Result/ApiKey.php (added)
-
tags/1.7.5/library/Result/Invoice.php (added)
-
tags/1.7.5/library/Result/InvoiceCheckoutHTML.php (added)
-
tags/1.7.5/library/Result/InvoiceList.php (added)
-
tags/1.7.5/library/Result/InvoicePayment.php (added)
-
tags/1.7.5/library/Result/InvoicePaymentMethod.php (added)
-
tags/1.7.5/library/Result/ServerInfo.php (added)
-
tags/1.7.5/library/Result/Store.php (added)
-
tags/1.7.5/library/Result/User.php (added)
-
tags/1.7.5/library/Result/Webhook.php (added)
-
tags/1.7.5/library/Result/WebhookAuthorizedEvents.php (added)
-
tags/1.7.5/library/Result/WebhookCreated.php (added)
-
tags/1.7.5/library/Result/index.php (added)
-
tags/1.7.5/library/Util (added)
-
tags/1.7.5/library/Util/Notice.php (added)
-
tags/1.7.5/library/Util/PreciseNumber.php (added)
-
tags/1.7.5/library/Util/index.php (added)
-
tags/1.7.5/library/index.php (added)
-
tags/1.7.5/library/loader.php (added)
-
tags/1.7.5/license.txt (added)
-
tags/1.7.5/readme.txt (added)
-
trunk/coinsnap-for-woocommerce.php (modified) (4 diffs)
-
trunk/library/Client/Invoice.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
coinsnap-for-woocommerce/trunk/coinsnap-for-woocommerce.php
r3476661 r3487182 8 8 * Text Domain: coinsnap-for-woocommerce 9 9 * Domain Path: /languages 10 * Version: 1.7. 410 * Version: 1.7.5 11 11 * Requires PHP: 7.4 12 12 * Tested up to: 6.9 … … 14 14 * Requires Plugins: woocommerce 15 15 * WC requires at least: 6.0 16 * WC tested up to: 10. 5.316 * WC tested up to: 10.6.1 17 17 * License: GPL2 18 18 * License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 31 31 defined( 'ABSPATH' ) || exit(); 32 32 if(!defined('COINSNAP_WC_PHP_VERSION')){define( 'COINSNAP_WC_PHP_VERSION', '7.4' );} 33 if(!defined('COINSNAP_WC_VERSION')){define( 'COINSNAP_WC_VERSION', '1.7. 4' );}33 if(!defined('COINSNAP_WC_VERSION')){define( 'COINSNAP_WC_VERSION', '1.7.5' );} 34 34 if(!defined('COINSNAP_VERSION_KEY')){define( 'COINSNAP_VERSION_KEY', 'coinsnap_version' );} 35 35 if(!defined('COINSNAP_PLUGIN_FILE_PATH')){define( 'COINSNAP_PLUGIN_FILE_PATH', plugin_dir_path( __FILE__ ) );} … … 49 49 $this->includes(); 50 50 add_action('woocommerce_thankyou_coinsnap', [$this, 'orderStatusThankYouPage'], 10, 1); 51 52 51 53 52 // Run the updates. -
coinsnap-for-woocommerce/trunk/library/Client/Invoice.php
r3454623 r3487182 30 30 public function loadExchangeRates(): array { 31 31 $url = 'https://api.coingecko.com/api/v3/exchange_rates'; 32 $headers = []; 32 $headers = [ 33 'Host' => 'api.coingecko.com', 34 'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:148.0) Gecko/20100101 Firefox/148.0', 35 'Accept:' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 36 'Accept-Language' => 'en-US,en;q=0.9', 37 'Accept-Encoding' => 'gzip, deflate, br, zstd', 38 'Connection' => 'keep-alive', 39 'Priority' => 'u=0, i', 40 ]; 33 41 $method = 'GET'; 34 $response = $this->getHttpClient()->request($method, $url, $headers); 35 36 if ($response->getStatus() === 200) { 37 $body = json_decode($response->getBody(), true, 512, JSON_THROW_ON_ERROR); 38 } 42 $code = 1000; 43 44 while($code > 399){ 45 if($code !== 1000){ sleep(2); } 46 $response = $this->getHttpClient()->request($method, $url, $headers); 47 $code = (int)$response->getStatus(); 48 } 49 50 $body = json_decode($response->getBody(), true, 512, JSON_THROW_ON_ERROR); 51 /* 52 if ((int)$response->getStatus() < 400) {} 39 53 else { 40 return array('result' => false, 'error' => 'ratesLoadingError ');41 } 54 return array('result' => false, 'error' => 'ratesLoadingError ('.(int)$response->getStatus().')'); 55 }*/ 42 56 43 57 if (count($body)<1 || !isset($body['rates'])){ … … 50 64 public function checkPaymentData($amount,$currency,$provider = 'coinsnap',$mode = 'invoice'): array { 51 65 52 $btcPayCurrencies = $this->loadExchangeRates(); 66 if(defined('COINSNAP_CURRENCY_RATES')){ 67 $btcPayCurrencies = COINSNAP_CURRENCY_RATES; 68 } 69 else { 70 $btcPayCurrencies = $this->loadExchangeRates(); 71 define('COINSNAP_CURRENCY_RATES',$btcPayCurrencies); 72 } 53 73 54 74 if(!$btcPayCurrencies['result']){ … … 147 167 'walletMessage' => $walletMessage, 148 168 'checkout' => [ 169 'redirectUrl' => $redirectUrl, 149 170 'redirectAutomatically' => $redirectAutomatically, 150 171 'redirectUrl' => $redirectUrl, -
coinsnap-for-woocommerce/trunk/readme.txt
r3476661 r3487182 3 3 Tags: Lightning, SATS, bitcoin, WooCommerce, payment gateway 4 4 Tested up to: 6.9 5 Stable tag: 1.7. 45 Stable tag: 1.7.5 6 6 License: GPLv2 7 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 404 404 = 1.7.4 :: 2026-03-06 = 405 405 * Compatibility with WooCommerce 10.5.0 - 10.5.3 is tested. 406 407 = 1.7.6 :: 2026-03-20 = 408 * Updated currency rates loading functionality. 409 * Compatibility with WooCommerce 10.6.1 is tested.
Note: See TracChangeset
for help on using the changeset viewer.