Jump to content
  • 0

Problem With Creating New Invoice


Question

Posted

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

3 answers to this question

Recommended Posts

  • 0
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...