aiswarya Posted August 29, 2014 Report Share 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 Link to comment Share on other sites More sharing options...
0 Tyson Posted August 29, 2014 Report Share 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 Link to comment Share on other sites More sharing options...
0 Cody Posted September 1, 2014 Report Share Posted September 1, 2014 Could be related to CORE-1232. Quote Link to comment Share on other sites More sharing options...
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
Link to comment
Share on other sites
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.