I’m submitting an order form using xmlrpc api in php in which I want to create blank order invoice to which one of the argument is to add orderdate but I’m getting error of datetime type that is it has to be of type datetime. https://developer.infusionsoft.com/docs/xml-rpc/#invoice-create-an-invoice
I’ve used the following code to set type to datetime but it fails.
$params = date(“Ymd\TH:i:s”, time());
xmlrpc_set_type($params, ‘datetime’);
Probably need to see your entire payload or at least some of the php. There are other params required and if you aren’t sending them or they are out of order you could get this error.
Here is the complete code that I used for it
$params = date(“Ymd\TH:i:s”, time());
xmlrpc_set_type($params, ‘datetime’);
$ordername = “Card Order”;
$leadAffiliateID = 0;
$saleAffiliateID = 0;
Yes I tried your code and I got the infusionDate value as 20200929T13:13:260
I checked by printing $call4 variable and it shows that infusionDate goes as ‘string’ type in array instead of ‘datetime’ type which is required one.
and got the error as
[errstr] => No method matching arguments: java.lang.String, java.lang.Integer, java.lang.String, java.lang.String, java.lang.Integer, java.lang.Integer