Greetings,
I'm hoping that someone is kind enough to share an example of a php API integration. It's always much faster to get started on standing on the shoulders of giants.
Cheers
Pete
Greetings,
I'm hoping that someone is kind enough to share an example of a php API integration. It's always much faster to get started on standing on the shoulders of giants.
Cheers
Pete
No more slow paying clients >>www.getting-paid.com
I figured out I'd have to just battle it out myself.
So here is my first attempt at retrieving an invoice.
It's connecting fine but doesn't authenticate me? I've done the obvious and rechecked the username and password combo.PHP Code:<?php
//this is test-kf.php
$client = new SOAPClient("https://secure.kashflow.co.uk/api/service.asmx?WSDL");
$invoice = $client->__soapCall('GetInvoice',array('Username'=>'xxxx','Password'=>'xxx','InvoiceNumber'=>'1'));
print_r($invoice);
?>
Here is the error message
stdClass Object ( [GetInvoiceResult] => stdClass Object ( [InvoiceDBID] => 0 [InvoiceNumber] => 0 [InvoiceDate] => 0001-01-01T00:00:00 [DueDate] => 0001-01-01T00:00:00 [CustomerID] => 0 [Paid] => 0 [Lines] => stdClass Object ( ) [NetAmount] => 0 [VATAmount] => 0 [AmountPaid] => 0 ) [Status] => NO [StatusDetail] => An exception occured whilst trying to authenticate you. String reference not set to an instance of a String. Parameter name: s )
I've tried all the combinations of UserName and InvoiceNumber vs InvNumber as shown in the manual and the example code with no luck.
Any ideas?
Cheers
Pete
No more slow paying clients >>www.getting-paid.com
Hi Pete,
For show stopping erros like this you should contact us on support AT or api AT kashflow.co.uk.
Tomorrow I'll be able to edit the API to give more detail with that error, then when you get the error again you'll have more detail to send us which should allow us to fix it.
KashFlow Founder & CEO
Note: For a fast response to support queries, click the 'Help' tab in your KashFlow account.
These forums are not intended for dealing with support queries.
Thanks Duane,
I'll do that next time. Waint - hopefully there won't be a next time.
Cheers
Pete
No more slow paying clients >>www.getting-paid.com
So that we don't have two threads on the same problem, I'm locking this one.
Thread continued at integrating with php
KashFlow Founder & CEO
Note: For a fast response to support queries, click the 'Help' tab in your KashFlow account.
These forums are not intended for dealing with support queries.