我正在尝试集成 Infusionsoft API,但在检索订单时遇到了一些问题。我需要收到昨天的所有订单,到目前为止,这就是我所做的。
require_once("src/isdk.php");
$app = new iSDK;
if ($app->cfgCon("connectionName")) {
echo "connected<br/>";
echo "app connected<br/>";
$qry = array('DateCreated' => $app->infuDate('10/30/2014'));
$rets = array('Id', 'JobTitle', 'ContactId', 'StartDate', 'DueDate', 'JobNotes', 'ProductId', 'JobRecurringId', 'JobStatus', 'DateCreated', 'OrderType', 'OrderStatus', 'ShipFirstName', 'ShipMiddleName', 'ShipLastName', 'ShipCompany', 'ShipPhone', 'ShipStreet1', 'ShipStreet2', 'ShipCity', 'ShipState', 'ShipZip', 'ShipCountry');
$cards = $app->dsQueryOrderBy("Job", 100, 0, $qry, $rets, 'DateCreated', false);
echo "<pre>";
print_r($cards);
echo "</pre>";
} else {
echo "Connection Failed";
}
连接和一切正常,我可以使用 ID 等其他字段检索订单。但由于某种原因,搜索日期不起作用。我没有收到以下任何错误是我得到的响应。
xmlrpcresp Object
(
[val] => yes
[valtyp] => phpvals
[errno] => 0
[errstr] =>
[payload] =>
[hdrs] => Array
(
[server] => Apache-Coyote/1.1
[pragma] => no-cache
[cache-control] => no-cache, no-store
[expires] => Sat, 01 Nov 2014 00:19:59 GMT
[content-type] => text/xml;charset=UTF-8
[content-length] => 121
[date] => Fri, 31 Oct 2014 12:19:59 GMT
[set-cookie] => app-lb=3238199306.20480.0000; path=/
)
[_cookies] => Array
(
[app-lb] => Array
(
[value] => 3238199306.20480.0000
[path] => /
)
)
[content_type] => text/xml
[raw_data] => HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Pragma: no-cache
Cache-Control: no-cache, no-store
Expires: Sat, 01 Nov 2014 00:19:59 GMT
Content-Type: text/xml;charset=UTF-8
Content-Length: 121
Date: Fri, 31 Oct 2014 12:19:59 GMT
Set-Cookie: app-lb=3238199306.20480.0000; path=/
<?xml version="1.0" encoding="UTF-8"?><methodResponse><params><param><value>yes</value></param></params></methodResponse>
)
日期的格式如下。
20141030T00:00:00
谁能帮我解决这个问题?
我也遇到过类似的问题,但没有找到解决方案。
提前感谢您的帮助。