diff --git a/upload/catalog/controller/payment/bitcoin.php b/upload/catalog/controller/payment/bitcoin.php index 0cdf39d..0ce61f3 100644 --- a/upload/catalog/controller/payment/bitcoin.php +++ b/upload/catalog/controller/payment/bitcoin.php @@ -93,7 +93,11 @@ public function confirm_sent() { $this->data['error'] = true; } - $received_amount = $bitcoin->getreceivedbyaccount($this->config->get('bitcoin_prefix').'_'.$order_id,0); + try { + $received_amount = $bitcoin->getreceivedbyaccount($this->config->get('bitcoin_prefix').'_'.$order_id,0); + } catch (Exception $e) { + echo false; + } if(round((float)$received_amount,4) >= round((float)$bitcoin_total,4)) { $order = $this->model_checkout_order->getOrder($order_id); $this->model_checkout_order->confirm($order_id, $this->config->get('bitcoin_order_status_id')); diff --git a/upload/catalog/view/theme/default/template/payment/bitcoin.tpl b/upload/catalog/view/theme/default/template/payment/bitcoin.tpl index d378477..ea64dff 100644 --- a/upload/catalog/view/theme/default/template/payment/bitcoin.tpl +++ b/upload/catalog/view/theme/default/template/payment/bitcoin.tpl @@ -44,6 +44,7 @@ if (typeof colorbox == 'undefined') { document.getElementsByTagName("head")[0].appendChild(e); } $('#button-pay').on('click', function() { + var checker = 0; html = '