Infusionsoft / Keap getting Method Matching error for chargeInvoice request (Solved!)


The Problem

Receiving this error:

[critical] Uncaught PHP Exception Infusionsoft\Http\HttpException: "No method matching arguments: java.lang.String, java.lang.Integer, java.lang.Boolean, java.lang.String, java.lang.String, java.lang.Boolean" at .../vendor/infusionsoft/php-sdk/src/Infusionsoft/Http/InfusionsoftSerializer.php ..."

The Infusionsoft XML-RCP documentation says the notes parameter should be a string ( but in fact it is expecting a boolean value.



The Solution

Instead of sending a string, I changed it to a boolean value of ‘true’, as the error hints that i should. I don’t know yet what that indicates and what it would do if I set it to false, but I know that it works with true in it.


This ran without an error. And look what it shows in the order page in Infusionsoft.


They messed up somewhere. But to make it work, I just left it with a TRUE in the notes value.

Final PHP Code

$notes = true;
$invoicePaid = $infusionsoft->invoices()->chargeInvoice($invoiceID, $notes, $creditCardID, $merchantAccountID, $bypassComissions);

No Comments »

No comments yet.

Leave a comment