Jump to content

aiswarya

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by aiswarya

  1. 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

  2. hi

     i tried with different values like,

    $vars = array(
            'client_id' => 1,
            'date_billed' => date('2014-08-16 11:04:03'),
            'date_due' => date('2014-08-120 11:04:03'),
            'currency' => "USDD",
            'lines' => array(
                array(
                    'description' => "Line item #1",
                    'amount' => "5.99"
                ),
                array(
                    'description' => "Line item #2",
                    'amount' => "3.75",
                    'qty' => 2
                )
            ),
            'delivery' => array("email")
        
    );

    $response = $api->post("invoices", "add", $vars);

     

     

    and

     

     $vars = array( "client_id" => 2, "date_billed" => '20070101', "date_due" => '20070115', "date_closed" => '20070115',
                        "date_autodebit" => '20070101', "status" => 'active',"currency" => 'USD', "note_public" => 'hiiih', "note_private" => 'helooo'
                    );

    $response = $api->post("invoices", "add", $vars);

     

    like this

  3. Hi,

    When Iam trying to create a new invoice using API It always shows errors

    i use  

         $response = $api->post("invoices", "add", $vars);

    code to create new invoice

    But it shows following error

    internal error: Failed to retrieve the default valuestdClass Object ( [error] => stdClass Object ( [message] => An unexpected error occured. [response] => Internal error: Failed to retrieve the default value ) )

    Please any one can help me

×
×
  • Create New...