How to create the Invoice

Hello Team,

I got Some Error When I create the Blank Order. Below is My Code.

$contactID=5536;
$name=“Product”;
$orderDate=date(“Y-m-d\TH:i:s”);
$leadAffiliateID=0;
$saleAffiliateID=0;
$infusionsoft->invoices()->createBlankOrder($contactID, $name, $orderDate, $leadAffiliateID, $saleAffiliateID);

Error:

Fatal error: Uncaught fXmlRpc\Exception\FaultException: No method matching arguments: java.lang.String, java.lang.Integer, java.lang.String, java.lang.String, java.lang.Integer, java.lang.Integer in /home/yupitio/public_html/webapi/Admin/IS/vendor/lstrojny/fxmlrpc/src/fXmlRpc/Exception/FaultException.php:32 Stack trace: #0 /home/yupitio/public_html/webapi/Admin/IS/vendor/lstrojny/fxmlrpc/src/fXmlRpc/Parser/XmlReaderParser.php(373): fXmlRpc\Exception\FaultException::fault(Array) #1 /home/yupitio/public_html/webapi/Admin/IS/vendor/lstrojny/fxmlrpc/src/fXmlRpc/Client.php(156): fXmlRpc\Parser\XmlReaderParser->parse(’<?xml version="…’) #2 /home/yupitio/public_html/webapi/Admin/IS/vendor/infusionsoft/php-sdk/src/Infusionsoft/Http/InfusionsoftSerializer.php(28): fXmlRpc\Client->call(‘InvoiceService…’, Array) #3 /home/yupitio/public_html/webapi/Admin/IS/vendor/infusionsoft/php-sdk/src/Infusionsoft/Infusionsoft.php(451): Infusionsoft\Http\InfusionsoftSerializer->request(‘InvoiceService…’, ‘https://api.inf…’, Array, Objec in /home/yupitio/public_html/webapi/Admin/IS/vendor/infusionsoft/php-sdk/src/Infusionsoft/Http/InfusionsoftSerializer.php on line 34

Hi @Sunny_Gajjar, I believe you’re seeing an issue with mismatched types for what the XML-RPC method is expecting. Try using a DateTime object; you can find an example here.

Thank You So much @Nicholas_Trecina