getExchangeRate API Errors
Problem reported by Andy Gambles 10 years ago
I raised a ticket but not getting much of a response. This is making Clearbooks unusable for us and it needs looking at ASAP
Using the PHP Soap Library
$request = new \Clearbooks_Soap_1_0_ExchangeRateRequest(); $request->baseCurrency = 'GBP'; // default $request->targetCurrency = 'USD'; $request->date = date( 'Y-m-d' , time() - 60 60 24); $usdrate = $client->getExchangeRate( $request );
Results in the error
PHP Fatal error: Uncaught SoapFault exception: [Receiver] No exchange rate info for 'GBP'' on '2014-11-25' in \src\Clearbooks\Soap\1\0.php:388
Stack trace:
0 \src\Clearbooks\Soap\1\0.php(388): SoapClient->__soapCall('getExchangeRate', Array, Array)
1 \src\Clearbooks\Soap\1\0.php(205): Clearbooks_Soap_1_0->_call('getExchangeRate', Object(Clearbooks_Soap_1_0_ExchangeRateRequest))
2 \exchange_rate.php(9): Clearbooks_Soap_1_0->getExchangeRate(Object(Clearbooks_Soap_1_0_ExchangeRateRequest))
3 {main}
thrown in \src\Clearbooks\Soap\1\0.php on line 388