From c05ecd0820d452e3b84e1c0c8c7269594de30f41 Mon Sep 17 00:00:00 2001 From: John Atkinson Date: Tue, 7 May 2013 20:26:56 -0700 Subject: [PATCH] allows any default currency --- upload/catalog/controller/payment/bitcoin.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/upload/catalog/controller/payment/bitcoin.php b/upload/catalog/controller/payment/bitcoin.php index f20ee76..554b0b6 100644 --- a/upload/catalog/controller/payment/bitcoin.php +++ b/upload/catalog/controller/payment/bitcoin.php @@ -43,7 +43,7 @@ protected function index() { $order_id = $this->session->data['order_id']; $order = $this->model_checkout_order->getOrder($order_id); - $current_default_currency = "USD"; + $current_default_currency = $this->config->get('config_currency'); $this->data['bitcoin_total'] = round($this->currency->convert($order['total'], $current_default_currency, "BTC"),4); @@ -82,7 +82,7 @@ public function confirm_sent() { $this->load->model('checkout/order'); $order_id = $this->session->data['order_id']; $order = $this->model_checkout_order->getOrder($order_id); - $current_default_currency = "USD"; + $current_default_currency = $this->config->get('config_currency'); $bitcoin_total = round($this->currency->convert($order['total'], $current_default_currency, "BTC"),4); require_once('jsonRPCClient.php'); $bitcoin = new jsonRPCClient('http://'.$this->config->get('bitcoin_rpc_username').':'.$this->config->get('bitcoin_rpc_password').'@'.$this->config->get('bitcoin_rpc_address').':'.$this->config->get('bitcoin_rpc_port').'/'); @@ -142,7 +142,8 @@ public function checkUpdate() { } public function runUpdate() { - $path = "1/BTCUSD/ticker"; + $default_currency_code = $this->config->get('config_currency'); + $path = "1/BTC". $default_currency_code . "/ticker"; $req = array(); // API settings