Skip to content

Commit 618016f

Browse files
committed
v1.2.3
- Minor bugfixes
1 parent b1613d1 commit 618016f

File tree

5 files changed

+19
-13
lines changed

5 files changed

+19
-13
lines changed

BlockBee.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: BlockBee Cryptocurrency Payment Gateway
44
Plugin URI: https://blockbee.io/resources/woocommerce/
55
Description: Accept cryptocurrency payments on your WooCommerce website
6-
Version: 1.2.2
6+
Version: 1.2.3
77
Requires at least: 5.8
88
Tested up to: 6.6.2
99
WC requires at least: 5.8

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,7 @@ The easiest and fastest way is via our live chat on our [website](https://blockb
251251
#### 1.2.2
252252
* Minor fixes
253253

254+
#### 1.2.3
255+
* Minor fixes
256+
254257
### Upgrade Notice

controllers/BlockBee.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ function process_payment($order_id)
545545
$load_coins = $this->load_coins();
546546

547547
$info = BlockBee\Helper::get_info($selected);
548-
$min_tx = BlockBee\Helper::sig_fig($info->minimum_transaction_coin, 6);
548+
$min_tx = BlockBee\Helper::sig_fig($info->minimum_transaction_coin, 8);
549549

550550
$crypto_total = BlockBee\Helper::get_conversion($currency, $selected, $total, $this->disable_conversion);
551551

@@ -573,7 +573,7 @@ function process_payment($order_id)
573573
$order->add_meta_data('blockbee_php_version', PHP_VERSION);
574574
$order->add_meta_data('blockbee_nonce', $nonce);
575575
$order->add_meta_data('blockbee_address', $addr_in);
576-
$order->add_meta_data('blockbee_total', BlockBee\Helper::sig_fig($crypto_total, 6));
576+
$order->add_meta_data('blockbee_total', BlockBee\Helper::sig_fig($crypto_total, 8));
577577
$order->add_meta_data('blockbee_total_fiat', $total);
578578
$order->add_meta_data('blockbee_currency', $selected);
579579
$order->add_meta_data('blockbee_qr_code_value', $qr_code_data_value['qr_code']);
@@ -800,7 +800,7 @@ function process_callback_data($data, $order, $validation = false)
800800

801801
$saved_coin = $order->get_meta('blockbee_currency');
802802

803-
$paid = (float)$data['value_coin'];
803+
$paid = $data['value_coin'];
804804

805805
$min_tx = (float)$order->get_meta('blockbee_min');
806806

@@ -831,7 +831,7 @@ function process_callback_data($data, $order, $validation = false)
831831

832832
$history[$data['uuid']] = [
833833
'timestamp' => time(),
834-
'value_paid' => BlockBee\Helper::sig_fig($paid, 6),
834+
'value_paid' => BlockBee\Helper::sig_fig($paid, 8),
835835
'value_paid_fiat' => $conversion[strtoupper($order->get_currency())],
836836
'pending' => $data['pending']
837837
];
@@ -1311,14 +1311,14 @@ function calc_order($history, $total, $total_fiat)
13111311
if (!empty($history)) {
13121312
foreach ($history as $uuid => $item) {
13131313
if ((int)$item['pending'] === 0) {
1314-
$remaining = bcsub(BlockBee\Helper::sig_fig($remaining, 6), $item['value_paid'], 8);
1314+
$remaining = bcsub(BlockBee\Helper::sig_fig($remaining, 8), $item['value_paid'], 8);
13151315
}
13161316

1317-
$remaining_pending = bcsub(BlockBee\Helper::sig_fig($remaining_pending, 6), $item['value_paid'], 8);
1318-
$remaining_fiat = bcsub(BlockBee\Helper::sig_fig($remaining_fiat, 6), $item['value_paid_fiat'], 8);
1317+
$remaining_pending = bcsub(BlockBee\Helper::sig_fig($remaining_pending, 8), $item['value_paid'], 8);
1318+
$remaining_fiat = bcsub(BlockBee\Helper::sig_fig($remaining_fiat, 8), $item['value_paid_fiat'], 8);
13191319

1320-
$already_paid = bcadd(BlockBee\Helper::sig_fig($already_paid, 6), $item['value_paid'], 8);
1321-
$already_paid_fiat = bcadd(BlockBee\Helper::sig_fig($already_paid_fiat, 6), $item['value_paid_fiat'], 8);
1320+
$already_paid = bcadd(BlockBee\Helper::sig_fig($already_paid, 8), $item['value_paid'], 8);
1321+
$already_paid_fiat = bcadd(BlockBee\Helper::sig_fig($already_paid_fiat, 8), $item['value_paid_fiat'], 8);
13221322
}
13231323
}
13241324

@@ -1580,7 +1580,7 @@ function refresh_value($order)
15801580
$blockbee_coin = $order->get_meta('blockbee_currency');
15811581

15821582
$crypto_conversion = (float)BlockBee\Helper::get_conversion($woocommerce_currency, $blockbee_coin, $order_total, $this->disable_conversion);
1583-
$crypto_total = BlockBee\Helper::sig_fig($crypto_conversion, 6);
1583+
$crypto_total = BlockBee\Helper::sig_fig($crypto_conversion, 8);
15841584
$order->update_meta_data('blockbee_total', $crypto_total);
15851585

15861586
$calc_cron = $this->calc_order($history, $crypto_total, $order_total);

define.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22

3-
define('BLOCKBEE_PLUGIN_VERSION', '1.2.2');
3+
define('BLOCKBEE_PLUGIN_VERSION', '1.2.3');
44
define('BLOCKBEE_PLUGIN_PATH', plugin_dir_path(__FILE__));
55
define('BLOCKBEE_PLUGIN_URL', plugin_dir_url(__FILE__));

readme.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: blockbee
33
Tags: crypto payments, payment gateway, cryptocurrencies, payments,
44
Requires at least: 5.8
55
Tested up to: 6.6.2
6-
Stable tag: 1.2.2
6+
Stable tag: 1.2.3
77
Requires PHP: 7.2
88
WC requires at least: 5.8
99
WC tested up to: 9.3.3
@@ -263,4 +263,7 @@ The easiest and fastest way is via our live chat on our [website](https://blockb
263263
= 1.2.2 =
264264
* Minor fixes.
265265

266+
= 1.2.3 =
267+
* Minor fixes.
268+
266269
== Upgrade Notice ==

0 commit comments

Comments
 (0)