20,359
社区成员
发帖
与我相关
我的任务
分享
1url: https://api.ebay.com/buy/order/v1/purchase_order/153134950870-1761150714005
1response: '{"errors": [{
"errorId": 2003,
"domain": "ACCESS",
"category": "APPLICATION",
"message": "Internal error",
"longMessage": "There was a problem with an eBay internal system or process. Contact eBay developer support for assistance",
"parameters": [{
"name": "reason",
"value": "Failed to transform underlying error response, see logs."
}]
}]}'
1data_order: array (
'errors' =>
array (
0 =>
array (
'errorId' => 2003,
'domain' => 'ACCESS',
'category' => 'APPLICATION',
'message' => 'Internal error',
'longMessage' => 'There was a problem with an eBay internal system or process. Contact eBay developer support for assistance',
'parameters' =>
array (
0 =>
array (
'name' => 'reason',
'value' => 'Failed to transform underlying error response, see logs.',
),
),
),
),
)
$url = 'https://api.ebay.com/buy/order/v1/purchase_order/' . $orderid;
$header = array(
'Authorization: ...',
// 'Accept:application/json',
'Accept: text/html',
'Content-Type:application/json',
'X-EBAY-C-MARKETPLACE-ID:EBAY-US',
// 'X-EBAY-C-ENDUSERCTX:deviceId=<riskCorrelationId>'
);
$response = get($url, $header);
function http_curl($url){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
$data = curl_exec($curl);
curl_close($curl);
return $data;
}