Invoice_GetPdf Error

Forum for .PHP developers using the E-conomic API.
Exchange your ideas, tip and tricks using the API.
Best Practices

Invoice_GetPdf Error

Postby alydersen » Sun Jan 01, 2012 9:08 pm

Hi,

I'm having some difficulties with getting the PDF for an existing invoice via the API. My code is like this:

$myInvoice = $client->Invoice_FindByNumber(array('number' => '30034'))->Invoice_FindByNumberResult;
$pdf = $client->Invoice_GetPdf(array('InvoiceHandle' => $myInvoice))->Invoice_GetPdfResult;

The error is like this:
Api.Exceptions.ServerException(E00000): An internal error has occurred. {id=2103131007}

Any ideas?

Thanks,
Andreas
-
alydersen
 
Posts: 3
Joined: Fri Jun 17, 2011 11:23 am

Re: Invoice_GetPdf Error

Postby Christian Estrup » Mon Jan 02, 2012 12:32 pm

Hi,

This is some PHP-SOAP syntax error - from the error ID you're supplying, I can see in our logs that you aren't actually sending the invoice handle along with your Invoice_GetPdf request.

Any PHP expert takers? :-)


Best regards,
Christian Estrup
Chief Architect

Image
Online accounting
User avatar
Christian Estrup
 
Posts: 245
Joined: Tue Jun 09, 2009 6:37 pm

Re: Invoice_GetPdf Error

Postby MicMac » Tue Jan 03, 2012 12:25 pm

It's simply a typing error.

InvoiceHandle in second line should be invoiceHandle (lower case i)

/Michael
-
MicMac
 
Posts: 8
Joined: Mon Jul 04, 2011 12:24 pm

Re: Invoice_GetPdf Error

Postby alydersen » Thu Jan 05, 2012 2:27 pm

Thanks!

Andreas
-
alydersen
 
Posts: 3
Joined: Fri Jun 17, 2011 11:23 am


Return to PHP



cron