aiswarya Posted August 29, 2014 Report Posted August 29, 2014 Hi, when i try to convert currency using following code, $response= $api->put("currencies", "convert", array("amount" => $_POST['amount'], "from_currency" => $_POST['from_currency'], "to_currency" => $_POST['to_currency'], "company_id" => 1)); i get the following error Internal error: Failed to retrieve the default values stdClass Object( [error] => stdClass Object ( [message] => An unexpected error occured. [response] => Internal error: Failed to retrieve the default value )) also tried with another code, $data = array( 'vars' => array( 'amount' => $_POST['amount'], 'from_currency' => $_POST['from_currency'], 'to_currency' => $_POST['to_currency'], 'company_id' => 1 ) ); $response = $api->put("currencies", "convert", $data); this also results the same error. please help me
0 Tyson Posted August 29, 2014 Report Posted August 29, 2014 On 8/29/2014 at 7:12 AM, aiswarya said: $response= $api->put("currencies", "convert", array("amount" => $_POST['amount'], "from_currency" => $_POST['from_currency'], "to_currency" => $_POST['to_currency'], "company_id" => 1) I believe you want to call get, not put.
Question
aiswarya
Hi,
when i try to convert currency using following code,
$response= $api->put("currencies", "convert", array("amount" => $_POST['amount'], "from_currency" => $_POST['from_currency'], "to_currency" => $_POST['to_currency'], "company_id" => 1));
i get the following error
also tried with another code,
$data = array(
'vars' => array(
'amount' => $_POST['amount'],
'from_currency' => $_POST['from_currency'],
'to_currency' => $_POST['to_currency'],
'company_id' => 1
)
);
$response = $api->put("currencies", "convert", $data);
this also results the same error.
please help me
2 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now