Plugin Directory

Changeset 2905747


Ignore:
Timestamp:
04/28/2023 02:43:50 PM (3 years ago)
Author:
cryptapi
Message:

v4.7.7 - minor fixes

Location:
cryptapi-payment-gateway-for-woocommerce
Files:
6 edited
8 copied

Legend:

Unmodified
Added
Removed
  • cryptapi-payment-gateway-for-woocommerce/tags/4.7.7/CryptAPI.php

    r2879320 r2905747  
    44Plugin URI: https://github.com/cryptapi/woocommerce-cryptapi
    55Description: Accept cryptocurrency payments on your WooCommerce website
    6 Version: 4.7.6
     6Version: 4.7.7
    77Requires at least: 5
    8 Tested up to: 6.1.1
     8Tested up to: 6.2
    99WC requires at least: 5.8
    10 WC tested up to: 7.4.1
     10WC tested up to: 7.6.1
    1111Requires PHP: 7.2
    1212Author: cryptapi
  • cryptapi-payment-gateway-for-woocommerce/tags/4.7.7/README.md

    r2879320 r2905747  
    2121The CryptAPI plugin extends WooCommerce, allowing you to get paid in crypto directly on your store, with a simple setup and no sign-ups required.
    2222
    23 ####Accepted cryptocurrencies & tokens include:
     23#### Accepted cryptocurrencies & tokens include:
    2424
    2525* (BTC) Bitcoin
     
    4444* (EUR) Euro
    4545* (GBP) Great Britain Pound
     46* (CAD) Canadian Dollar
    4647* (JPY) Japanese Yen
     48* (AED) UAE Dollar
     49* (MYR) Malaysian Ringgit
     50* (IDR) Indonesian Rupiah
     51* (THB) Thai Baht
     52* (CHF) Swiss Franc
     53* (COP) Colombian Peso
     54* (SGD) Singapore Dollar
     55* (RUB) Russian Ruble
     56* (ZAR) South African Rand
     57* (TRY) Turkish Lira
     58* (LKR) Sri Lankan Rupee
     59* (XAF) CFA Franc
     60* (RON) Romanian Leu
     61* (BGN) Bulgarian Lev
     62* (HUF) Hungarian Forint
     63* (CZK) Czech Koruna
     64* (PHP) Philippine Peso
     65* (PLN) Poland Zloti
     66* (UGX) Uganda Shillings
     67* (MXN) Mexican Peso
     68* (INR) Indian Rupee
     69* (HKD) Hong Kong Dollar
    4770* (CNY) Chinese Yuan
    48 * (INR) Indian Rupee
    49 * (CAD) Canadian Dollar
    50 * (HKD) Hong Kong Dollar
    5171* (BRL) Brazilian Real
    5272* (DKK) Danish Krone
    53 * (MXN) Mexican Peso
    54 * (AED) United Arab Emirates Dirham
    5573
    5674If your WooCommerce's currency is none of the above, the exchange rates will default to USD.
     
    326344* Minor fixes
    327345
     346#### 4.7.7
     347* Minor fixes
     348
    328349### Upgrade Notice
    329350#### 4.3
  • cryptapi-payment-gateway-for-woocommerce/tags/4.7.7/controllers/CryptAPI.php

    r2879320 r2905747  
    33use Cryptapi\Helper;
    44
     5#[AllowDynamicProperties]
    56class WC_CryptAPI_Gateway extends WC_Payment_Gateway
    67{
     
    365366                    'type' => 'text',
    366367                    'default' => '',
    367                     'description' => sprintf(esc_attr(__('Insert here your BlockBee API Key. You can get one here: %1$s', 'cryptapi')), '<a href="https://dash.blockbee.io/" target="_blank">https://dash.blockbee.io/</a>')
     368                    'description' => sprintf(esc_attr(__('(Optional) Insert here your BlockBee API Key. You can get one here: %1$s', 'cryptapi')), '<a href="https://dash.blockbee.io/" target="_blank">https://dash.blockbee.io/</a>')
    368369                ),
    369370            );
     
    741742                'timestamp' => time(),
    742743                'value_paid' => CryptAPI\Helper::sig_fig($paid, 6),
    743                 'value_paid_fiat' => $conversion[get_woocommerce_currency()],
     744                'value_paid_fiat' => $conversion[strtoupper($order->get_currency())],
    744745                'pending' => $data['pending']
    745746            ];
  • cryptapi-payment-gateway-for-woocommerce/tags/4.7.7/define.php

    r2879320 r2905747  
    11<?php
    22
    3 define('CRYPTAPI_PLUGIN_VERSION', '4.7.6');
     3define('CRYPTAPI_PLUGIN_VERSION', '4.7.7');
    44define('CRYPTAPI_PLUGIN_PATH', plugin_dir_path(__FILE__));
    55define('CRYPTAPI_PLUGIN_URL', plugin_dir_url(__FILE__));
  • cryptapi-payment-gateway-for-woocommerce/tags/4.7.7/readme.txt

    r2879320 r2905747  
    33Tags: crypto payments, woocommerce, payment gateway, crypto, payment, pay with crypto, payment request, bitcoin, bnb, usdt, ethereum, monero, litecoin, bitcoin cash, shib, doge
    44Requires at least: 5
    5 Tested up to: 6.1.1
    6 Stable tag: 4.7.6
     5Tested up to: 6.2
     6Stable tag: 4.7.7
    77Requires PHP: 7.2
    88WC requires at least: 5.8
    9 WC tested up to: 7.4.1
     9WC tested up to: 7.6.1
    1010License: MIT
    1111
     
    3535* (MATIC) Matic
    3636
    37 
    3837among many others, for a full list of the supported cryptocurrencies and tokens, check [this page](https://cryptapi.io/pricing/).
    3938
     
    4645Supported currencies for automatic exchange rates are:
    4746
     47* (USD) United States Dollar
     48* (EUR) Euro
     49* (GBP) Great Britain Pound
     50* (CAD) Canadian Dollar
     51* (JPY) Japanese Yen
     52* (AED) UAE Dollar
     53* (MYR) Malaysian Ringgit
     54* (IDR) Indonesian Rupiah
     55* (THB) Thai Baht
     56* (CHF) Swiss Franc
     57* (COP) Colombian Peso
     58* (SGD) Singapore Dollar
     59* (RUB) Russian Ruble
     60* (ZAR) South African Rand
     61* (TRY) Turkish Lira
     62* (LKR) Sri Lankan Rupee
    4863* (XAF) CFA Franc
    4964* (RON) Romanian Leu
     
    6075* (BRL) Brazilian Real
    6176* (DKK) Danish Krone
    62 * (AED) UAE Dirham
    63 * (JPY) Japanese Yen
    64 * (CAD) Canadian Dollar
    65 * (GBP) GB Pound
    66 * (EUR) Euro
    67 * (USD) US Dollar
    6877
    6978If your WooCommerce's currency is none of the above, the exchange rates will default to USD.
     
    331340* Minor fixes
    332341
     342= 4.7.6 =
     343* Performance improvements
     344* Minor fixes
     345
     346= 4.7.7 =
     347* Minor fixes
     348
    333349== Upgrade Notice ==
    334350
  • cryptapi-payment-gateway-for-woocommerce/tags/4.7.7/utils/helper.php

    r2879320 r2905747  
    253253    public static function sig_fig($value, $digits)
    254254    {
    255         if (strpos((string) $value, '.') !== false) {
     255        $value = (string) $value;
     256        if (strpos($value, '.') !== false) {
    256257            if ($value[0] != '-') {
    257258                return bcadd($value, '0.' . str_repeat('0', $digits) . '5', $digits);
     
    290291                $response = json_decode(wp_remote_retrieve_body(wp_remote_get($url)), $assoc);
    291292
    292                 if ($response && $response->status == 'success' || !empty($response['btc'])) {
     293                if ($assoc && !empty($response['btc'])) {
     294                    return $response;
     295                }
     296
     297                if ($response && $response->status === 'success') {
    293298                    return $response;
    294299                }
  • cryptapi-payment-gateway-for-woocommerce/trunk/CryptAPI.php

    r2879320 r2905747  
    44Plugin URI: https://github.com/cryptapi/woocommerce-cryptapi
    55Description: Accept cryptocurrency payments on your WooCommerce website
    6 Version: 4.7.6
     6Version: 4.7.7
    77Requires at least: 5
    8 Tested up to: 6.1.1
     8Tested up to: 6.2
    99WC requires at least: 5.8
    10 WC tested up to: 7.4.1
     10WC tested up to: 7.6.1
    1111Requires PHP: 7.2
    1212Author: cryptapi
  • cryptapi-payment-gateway-for-woocommerce/trunk/README.md

    r2879320 r2905747  
    2121The CryptAPI plugin extends WooCommerce, allowing you to get paid in crypto directly on your store, with a simple setup and no sign-ups required.
    2222
    23 ####Accepted cryptocurrencies & tokens include:
     23#### Accepted cryptocurrencies & tokens include:
    2424
    2525* (BTC) Bitcoin
     
    4444* (EUR) Euro
    4545* (GBP) Great Britain Pound
     46* (CAD) Canadian Dollar
    4647* (JPY) Japanese Yen
     48* (AED) UAE Dollar
     49* (MYR) Malaysian Ringgit
     50* (IDR) Indonesian Rupiah
     51* (THB) Thai Baht
     52* (CHF) Swiss Franc
     53* (COP) Colombian Peso
     54* (SGD) Singapore Dollar
     55* (RUB) Russian Ruble
     56* (ZAR) South African Rand
     57* (TRY) Turkish Lira
     58* (LKR) Sri Lankan Rupee
     59* (XAF) CFA Franc
     60* (RON) Romanian Leu
     61* (BGN) Bulgarian Lev
     62* (HUF) Hungarian Forint
     63* (CZK) Czech Koruna
     64* (PHP) Philippine Peso
     65* (PLN) Poland Zloti
     66* (UGX) Uganda Shillings
     67* (MXN) Mexican Peso
     68* (INR) Indian Rupee
     69* (HKD) Hong Kong Dollar
    4770* (CNY) Chinese Yuan
    48 * (INR) Indian Rupee
    49 * (CAD) Canadian Dollar
    50 * (HKD) Hong Kong Dollar
    5171* (BRL) Brazilian Real
    5272* (DKK) Danish Krone
    53 * (MXN) Mexican Peso
    54 * (AED) United Arab Emirates Dirham
    5573
    5674If your WooCommerce's currency is none of the above, the exchange rates will default to USD.
     
    326344* Minor fixes
    327345
     346#### 4.7.7
     347* Minor fixes
     348
    328349### Upgrade Notice
    329350#### 4.3
  • cryptapi-payment-gateway-for-woocommerce/trunk/controllers/CryptAPI.php

    r2879320 r2905747  
    33use Cryptapi\Helper;
    44
     5#[AllowDynamicProperties]
    56class WC_CryptAPI_Gateway extends WC_Payment_Gateway
    67{
     
    365366                    'type' => 'text',
    366367                    'default' => '',
    367                     'description' => sprintf(esc_attr(__('Insert here your BlockBee API Key. You can get one here: %1$s', 'cryptapi')), '<a href="https://dash.blockbee.io/" target="_blank">https://dash.blockbee.io/</a>')
     368                    'description' => sprintf(esc_attr(__('(Optional) Insert here your BlockBee API Key. You can get one here: %1$s', 'cryptapi')), '<a href="https://dash.blockbee.io/" target="_blank">https://dash.blockbee.io/</a>')
    368369                ),
    369370            );
     
    741742                'timestamp' => time(),
    742743                'value_paid' => CryptAPI\Helper::sig_fig($paid, 6),
    743                 'value_paid_fiat' => $conversion[get_woocommerce_currency()],
     744                'value_paid_fiat' => $conversion[strtoupper($order->get_currency())],
    744745                'pending' => $data['pending']
    745746            ];
  • cryptapi-payment-gateway-for-woocommerce/trunk/define.php

    r2879320 r2905747  
    11<?php
    22
    3 define('CRYPTAPI_PLUGIN_VERSION', '4.7.6');
     3define('CRYPTAPI_PLUGIN_VERSION', '4.7.7');
    44define('CRYPTAPI_PLUGIN_PATH', plugin_dir_path(__FILE__));
    55define('CRYPTAPI_PLUGIN_URL', plugin_dir_url(__FILE__));
  • cryptapi-payment-gateway-for-woocommerce/trunk/readme.txt

    r2879320 r2905747  
    33Tags: crypto payments, woocommerce, payment gateway, crypto, payment, pay with crypto, payment request, bitcoin, bnb, usdt, ethereum, monero, litecoin, bitcoin cash, shib, doge
    44Requires at least: 5
    5 Tested up to: 6.1.1
    6 Stable tag: 4.7.6
     5Tested up to: 6.2
     6Stable tag: 4.7.7
    77Requires PHP: 7.2
    88WC requires at least: 5.8
    9 WC tested up to: 7.4.1
     9WC tested up to: 7.6.1
    1010License: MIT
    1111
     
    3535* (MATIC) Matic
    3636
    37 
    3837among many others, for a full list of the supported cryptocurrencies and tokens, check [this page](https://cryptapi.io/pricing/).
    3938
     
    4645Supported currencies for automatic exchange rates are:
    4746
     47* (USD) United States Dollar
     48* (EUR) Euro
     49* (GBP) Great Britain Pound
     50* (CAD) Canadian Dollar
     51* (JPY) Japanese Yen
     52* (AED) UAE Dollar
     53* (MYR) Malaysian Ringgit
     54* (IDR) Indonesian Rupiah
     55* (THB) Thai Baht
     56* (CHF) Swiss Franc
     57* (COP) Colombian Peso
     58* (SGD) Singapore Dollar
     59* (RUB) Russian Ruble
     60* (ZAR) South African Rand
     61* (TRY) Turkish Lira
     62* (LKR) Sri Lankan Rupee
    4863* (XAF) CFA Franc
    4964* (RON) Romanian Leu
     
    6075* (BRL) Brazilian Real
    6176* (DKK) Danish Krone
    62 * (AED) UAE Dirham
    63 * (JPY) Japanese Yen
    64 * (CAD) Canadian Dollar
    65 * (GBP) GB Pound
    66 * (EUR) Euro
    67 * (USD) US Dollar
    6877
    6978If your WooCommerce's currency is none of the above, the exchange rates will default to USD.
     
    331340* Minor fixes
    332341
     342= 4.7.6 =
     343* Performance improvements
     344* Minor fixes
     345
     346= 4.7.7 =
     347* Minor fixes
     348
    333349== Upgrade Notice ==
    334350
  • cryptapi-payment-gateway-for-woocommerce/trunk/utils/helper.php

    r2879320 r2905747  
    253253    public static function sig_fig($value, $digits)
    254254    {
    255         if (strpos((string) $value, '.') !== false) {
     255        $value = (string) $value;
     256        if (strpos($value, '.') !== false) {
    256257            if ($value[0] != '-') {
    257258                return bcadd($value, '0.' . str_repeat('0', $digits) . '5', $digits);
     
    290291                $response = json_decode(wp_remote_retrieve_body(wp_remote_get($url)), $assoc);
    291292
    292                 if ($response && $response->status == 'success' || !empty($response['btc'])) {
     293                if ($assoc && !empty($response['btc'])) {
     294                    return $response;
     295                }
     296
     297                if ($response && $response->status === 'success') {
    293298                    return $response;
    294299                }
Note: See TracChangeset for help on using the changeset viewer.