Cannot add payment to existing order/invoice

I want to add a payment to an existing order via API

$this->app->invoices('xml')->addManualPayment(801, 12.34, '2019-07-24', 'PayPal', '', true);

and I get this error:

Uncaught fXmlRpc\Exception\FaultException: No method matching arguments: java.lang.String, java.lang.Integer, java.lang.Double, java.lang.String, java.lang.String, java.lang.String, java.lang.Boolean in /var/www/ipnprocessor/vendor/lstrojny/fxmlrpc/src/fXmlRpc/Exception/FaultException.php:32
Stack trace:
#0 /var/www/ipnprocessor/vendor/lstrojny/fxmlrpc/src/fXmlRpc/Parser/XmlReaderParser.php(373): fXmlRpc\Exception\FaultException::fault(Array)
#1 /var/www/ipnprocessor/vendor/lstrojny/fxmlrpc/src/fXmlRpc/Client.php(156): fXmlRpc\Parser\XmlReaderParser->parse(’<?xml version="…’)
#2 /var/www/ipnprocessor/vendor/infusionsoft/php-sdk/src/Infusionsoft/Http/InfusionsoftSerializer.php(28): fXmlRpc\Client->call(‘InvoiceService…’, Array)
#3 /var/www/ipnprocessor/vendor/infusionsoft/php-sdk/src/Infusionsoft/Infusionsoft.php(456): Infusionsoft\Http\InfusionsoftSerializer->request(‘InvoiceService…’, ‘https://api.inf…’, Array, Object(fXmlRpc\Client))
#4 /var/www/ipnprocessor/vendor/infusionsoft/php-sdk/src/Infusio in /var/www/ipnprocessor/vendor/infusionsoft/php-sdk/src/Infusionsoft/Http/InfusionsoftSerializer.php on line 34

Please help!

Thanks

That exception indicates that your call has a mismatch in parameters. I’m not PHP-focused, but I would verify that your call has the excepted types of method parameters for the SDK: https://github.com/infusionsoft/infusionsoft-php

1 Like

Thanks, this was the cause. The documentation mentions a string for the date, while with a date object everything is fine.