我正在尝试使用 CURL i PHP 发布到沃尔玛卖家 API 以确认订单。
https://developer.walmartapis.com/#acknowledgeing-purchase-orders
由于某种原因,它不会接受我的方法或返回“错误请求”。
有这方面经验的人吗?
$apiheaders = array(
'WM_SVC.NAME: Walmart Marketplace',
'WM_QOS.CORRELATION_ID: 1466113345',
'WM_SEC.TIMESTAMP:1466113345447',
'WM_SEC.AUTH_SIGNATURE: XXXXXXXXXXX'
'WM_CONSUMER.ID: XXXXXXXXXXX',
'Content-Type: application/xml',
'Accept: application/xml',
);
$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPHEADER, $apiheaders);
curl_setopt($curl, CURLOPT_URL,$return_api_host);
curl_setopt($curl, CURLOPT_VERBOSE, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
$response = curl_exec($curl);
curl_close($curl);