mirror of
https://git.wownero.com/wownero/wownerowp.git
synced 2024-08-15 01:03:16 +00:00
Add support for SGD
Add support for converting Singapore Dollar (SGD) to Monero (XMR)
This commit is contained in:
parent
10996fe71d
commit
460f4f6c75
1 changed files with 5 additions and 3 deletions
|
@ -544,7 +544,7 @@ class Monero_Gateway extends WC_Payment_Gateway
|
|||
|
||||
public function retriveprice($currency)
|
||||
{
|
||||
$xmr_price = file_get_contents('https://min-api.cryptocompare.com/data/price?fsym=XMR&tsyms=BTC,USD,EUR,CAD,INR,GBP,COP&extraParams=monero_woocommerce');
|
||||
$xmr_price = file_get_contents('https://min-api.cryptocompare.com/data/price?fsym=XMR&tsyms=BTC,USD,EUR,CAD,INR,GBP,COP,SGD&extraParams=monero_woocommerce');
|
||||
$price = json_decode($xmr_price, TRUE);
|
||||
if (!isset($price)) {
|
||||
$this->log->add('Monero_Gateway', '[ERROR] Unable to get the price of Monero');
|
||||
|
@ -560,8 +560,10 @@ class Monero_Gateway extends WC_Payment_Gateway
|
|||
return $price['GBP'];
|
||||
case 'INR':
|
||||
return $price['INR'];
|
||||
case 'COP':
|
||||
return $price['COP'];
|
||||
case 'COP':
|
||||
return $price['COP'];
|
||||
case 'SGD':
|
||||
return $price['SGD'];
|
||||
case 'XMR':
|
||||
$price = '1';
|
||||
return $price;
|
||||
|
|
Loading…
Reference in a new issue