diff --git a/upload/admin/controller/payment/bitcoin.php b/upload/admin/controller/payment/bitcoin.php index 785ea5b..ce43a6e 100644 --- a/upload/admin/controller/payment/bitcoin.php +++ b/upload/admin/controller/payment/bitcoin.php @@ -43,6 +43,9 @@ private function validate() { if (!$this->request->post['bitcoin_prefix']) { $this->error['prefix'] = $this->language->get('error_prefix'); } + if (!$this->request->post['bitcoin_countdown_timer']) { + $this->error['countdown_timer'] = $this->language->get('error_countdown_timer'); + } if (!$this->error) { return TRUE; @@ -83,6 +86,7 @@ public function index() { $this->data['entry_prefix'] = $this->language->get('entry_prefix'); $this->data['entry_order_status'] = $this->language->get('entry_order_status'); $this->data['entry_show_btc'] = $this->language->get('entry_show_btc'); + $this->data['entry_countdown_timer'] = $this->language->get('entry_countdown_timer'); $this->data['entry_status'] = $this->language->get('entry_status'); $this->data['entry_sort_order'] = $this->language->get('entry_sort_order'); @@ -118,6 +122,11 @@ public function index() { } else { $this->data['error_prefix'] = ''; } + if (isset($this->error['countdown_timer'])) { + $this->data['error_countdown_timer'] = $this->error['countdown_timer']; + } else { + $this->data['error_countdown_timer'] = ''; + } $this->data['breadcrumbs'] = array(); @@ -175,6 +184,11 @@ public function index() { } else { $this->data[$this->payment_module_name.'_show_btc'] = $this->config->get($this->payment_module_name.'_show_btc'); } + if (isset($this->request->post[$this->payment_module_name.'_countdown_timer'])) { + $this->data[$this->payment_module_name.'_countdown_timer'] = $this->request->post[$this->payment_module_name.'_countdown_timer']; + } else { + $this->data[$this->payment_module_name.'_countdown_timer'] = $this->config->get($this->payment_module_name.'_countdown_timer'); + } if (isset($this->request->post[$this->payment_module_name.'_order_status_id'])) { $this->data[$this->payment_module_name.'_order_status_id'] = $this->request->post[$this->payment_module_name.'_order_status_id']; } else { diff --git a/upload/admin/language/english/payment/bitcoin.php b/upload/admin/language/english/payment/bitcoin.php index a2c3fc3..989b8e4 100644 --- a/upload/admin/language/english/payment/bitcoin.php +++ b/upload/admin/language/english/payment/bitcoin.php @@ -36,6 +36,7 @@ $_['entry_prefix'] = 'The prefix for the address labels:
The account will be in the form [prefix]_[order_id]'; $_['entry_order_status'] = 'Status of a new order:'; $_['entry_show_btc'] = 'Show BTC as a store currency:'; +$_['entry_countdown_timer'] = 'Time to complete order:
In seconds'; $_['entry_status'] = 'Status:'; $_['entry_sort_order'] = 'Sort Order:'; @@ -46,4 +47,5 @@ $_['error_password'] = 'Warning: Bitcoin RPC Password is required'; $_['error_port'] = 'Warning: Bitcoin RPC Port is required'; $_['error_prefix'] = 'Warning: Label prefix is required'; +$_['error_countdown_timer'] = 'Warning: Countdown timer is required'; ?> diff --git a/upload/admin/view/template/payment/bitcoin.tpl b/upload/admin/view/template/payment/bitcoin.tpl index d219970..a171b03 100644 --- a/upload/admin/view/template/payment/bitcoin.tpl +++ b/upload/admin/view/template/payment/bitcoin.tpl @@ -85,6 +85,13 @@ DEALINGS IN THE SOFTWARE. + + + * + + + + diff --git a/upload/catalog/controller/payment/bitcoin.php b/upload/catalog/controller/payment/bitcoin.php index 5876121..d5c63e5 100644 --- a/upload/catalog/controller/payment/bitcoin.php +++ b/upload/catalog/controller/payment/bitcoin.php @@ -32,10 +32,14 @@ protected function index() { $this->data['text_click_pay'] = $this->language->get('text_click_pay'); $this->data['text_uri_compatible'] = $this->language->get('text_uri_compatible'); $this->data['text_click_here'] = $this->language->get('text_click_here'); + $this->data['text_pre_timer'] = $this->language->get('text_pre_timer'); + $this->data['text_post_timer'] = $this->language->get('text_post_timer'); + $this->data['text_countdown_expired'] = $this->language->get('text_countdown_expired'); $this->data['text_if_not_redirect'] = $this->language->get('text_if_not_redirect'); $this->data['error_msg'] = $this->language->get('error_msg'); $this->data['error_confirm'] = $this->language->get('error_confirm'); $this->data['error_incomplete_pay'] = $this->language->get('error_incomplete_pay'); + $this->data['bitcoin_countdown_timer'] = $this->config->get('bitcoin_countdown_timer'); $this->checkUpdate(); diff --git a/upload/catalog/language/english/payment/bitcoin.php b/upload/catalog/language/english/payment/bitcoin.php index 78ed54f..920fd70 100644 --- a/upload/catalog/language/english/payment/bitcoin.php +++ b/upload/catalog/language/english/payment/bitcoin.php @@ -29,6 +29,9 @@ $_['text_click_pay'] = 'Click to pay'; $_['text_uri_compatible'] = '(URI-compatible wallets only)'; $_['text_click_here'] = 'Click here'; +$_['text_pre_timer'] = 'You have '; +$_['text_post_timer'] = ' remaining to complete your transaction.'; +$_['text_countdown_expired'] = 'Your time to complete this transaction has expired. Please refresh the page and attempt to checkout again.'; $_['text_if_not_redirect'] = 'if you are not redirected automatically a few seconds after payment.'; $_['error_msg'] = 'Error communicating with payment provider. Please contact the store for assistance.'; $_['error_confirm'] = 'That didn\\\'t quite work. Please try again. If you receive this message multiple times, please contact us so we can help finalize your order.'; diff --git a/upload/catalog/view/theme/default/template/payment/bitcoin.tpl b/upload/catalog/view/theme/default/template/payment/bitcoin.tpl index ea64dff..9e7dcde 100644 --- a/upload/catalog/view/theme/default/template/payment/bitcoin.tpl +++ b/upload/catalog/view/theme/default/template/payment/bitcoin.tpl @@ -21,14 +21,13 @@ DEALINGS IN THE SOFTWARE. --> - -
-
-
+
+
+
-
- -
+
+ +