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 Quote
0 Tyson Posted August 29, 2014 Report Posted August 29, 2014 $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. Quote
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.