I am trying to develop an e-commerce website. To manage multi-currency, I would like to use webservice for automatic conversions. so I tried this webservice: http://www.webservicex.com/CurrencyConvertor.asmx?WSDL with this code :
try
{
$wsdl="http://www.webservicex.com/CurrencyConvertor.asmx?WSDL";
$webservice = new \SoapClient( $wsdl );
$country=array();
// Set the country variable to the country codes.
$country['FromCurrency']= 'USD';
$country['ToCurrency'] = 'EUR';
$webservice->ConversionRate($country);
echo $response->ConversionRateResult;*/
}catch(Exception $oException)
{
printf(
'<h4 style="color: Red">Exception</h4>
<p>%s</p>',
$oException->getMessage()
);
} `
Unfortunately, the service returns me - 1 is there a problem with my code or it's the service that no longer works!!
you know another web service that is stable? thank you very much