diff --git a/php/paypal_game_cost.php b/php/paypal_game_cost.php index f4ec0ef..6f03cf7 100644 --- a/php/paypal_game_cost.php +++ b/php/paypal_game_cost.php @@ -14,12 +14,12 @@ $paypal_cost->setExchangeCurrency('USD'); $paypal_cost->setExchangeRates(array( - 'EUR' => 1.36725, - 'GBP' => 1.63536, - 'AUD' => 0.89107, - 'NOK' => 0.16259, - 'PLN' => 0.32975, - 'BRL' => 0.42415 + 'EUR' => json_decode(file_get_contents("http://rate-exchange.appspot.com/currency?from="+$paypal_cost->ExchangeCurrency+"&to=EUR"))['rate'], + 'GBP' => json_decode(file_get_contents("http://rate-exchange.appspot.com/currency?from="+$paypal_cost->ExchangeCurrency+"&to=GBP"))['rate'], + 'AUD' => json_decode(file_get_contents("http://rate-exchange.appspot.com/currency?from="+$paypal_cost->ExchangeCurrency+"&to=AUD"))['rate'], + 'NOK' => json_decode(file_get_contents("http://rate-exchange.appspot.com/currency?from="+$paypal_cost->ExchangeCurrency+"&to=NOK"))['rate'], + 'PLN' => json_decode(file_get_contents("http://rate-exchange.appspot.com/currency?from="+$paypal_cost->ExchangeCurrency+"&to=PLN"))['rate'], + 'BRL' => json_decode(file_get_contents("http://rate-exchange.appspot.com/currency?from="+$paypal_cost->ExchangeCurrency+"&to=BRL"))['rate'] )); $paypal_cost->parseData();