Skip to content

Commit

Permalink
allows any default currency
Browse files Browse the repository at this point in the history
  • Loading branch information
btcgear committed May 8, 2013
1 parent 7f66ade commit c05ecd0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions upload/catalog/controller/payment/bitcoin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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').'/');
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c05ecd0

Please sign in to comment.