@@ -545,7 +545,7 @@ function process_payment($order_id)
545
545
$ load_coins = $ this ->load_coins ();
546
546
547
547
$ 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 );
549
549
550
550
$ crypto_total = BlockBee \Helper::get_conversion ($ currency , $ selected , $ total , $ this ->disable_conversion );
551
551
@@ -573,7 +573,7 @@ function process_payment($order_id)
573
573
$ order ->add_meta_data ('blockbee_php_version ' , PHP_VERSION );
574
574
$ order ->add_meta_data ('blockbee_nonce ' , $ nonce );
575
575
$ 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 ));
577
577
$ order ->add_meta_data ('blockbee_total_fiat ' , $ total );
578
578
$ order ->add_meta_data ('blockbee_currency ' , $ selected );
579
579
$ 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)
800
800
801
801
$ saved_coin = $ order ->get_meta ('blockbee_currency ' );
802
802
803
- $ paid = ( float ) $ data ['value_coin ' ];
803
+ $ paid = $ data ['value_coin ' ];
804
804
805
805
$ min_tx = (float )$ order ->get_meta ('blockbee_min ' );
806
806
@@ -831,7 +831,7 @@ function process_callback_data($data, $order, $validation = false)
831
831
832
832
$ history [$ data ['uuid ' ]] = [
833
833
'timestamp ' => time (),
834
- 'value_paid ' => BlockBee \Helper::sig_fig ($ paid , 6 ),
834
+ 'value_paid ' => BlockBee \Helper::sig_fig ($ paid , 8 ),
835
835
'value_paid_fiat ' => $ conversion [strtoupper ($ order ->get_currency ())],
836
836
'pending ' => $ data ['pending ' ]
837
837
];
@@ -1311,14 +1311,14 @@ function calc_order($history, $total, $total_fiat)
1311
1311
if (!empty ($ history )) {
1312
1312
foreach ($ history as $ uuid => $ item ) {
1313
1313
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 );
1315
1315
}
1316
1316
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 );
1319
1319
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 );
1322
1322
}
1323
1323
}
1324
1324
@@ -1580,7 +1580,7 @@ function refresh_value($order)
1580
1580
$ blockbee_coin = $ order ->get_meta ('blockbee_currency ' );
1581
1581
1582
1582
$ 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 );
1584
1584
$ order ->update_meta_data ('blockbee_total ' , $ crypto_total );
1585
1585
1586
1586
$ calc_cron = $ this ->calc_order ($ history , $ crypto_total , $ order_total );
0 commit comments