Skip to content

Commit 511ec87

Browse files
committed
AC-9030::Fedex API Upgrade - Fix for the Shipment Cancelation
1 parent 852c1bf commit 511ec87

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/code/Magento/Fedex/Model/Carrier.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,11 @@ protected function sendRequest($endpoint, $request, $accessToken = null) : array
994994
$url = $this->_getUrl($endpoint);
995995
try {
996996
$curlClient->setHeaders($headers);
997-
$curlClient->setOptions([CURLOPT_ENCODING => 'gzip,deflate,sdch']);
997+
if($endpoint == self::SHIPMENT_CANCEL_END_POINT){
998+
$curlClient->setOptions([CURLOPT_ENCODING => 'gzip,deflate,sdch', CURLOPT_CUSTOMREQUEST => 'PUT']);
999+
}else {
1000+
$curlClient->setOptions([CURLOPT_ENCODING => 'gzip,deflate,sdch']);
1001+
}
9981002
$curlClient->post($url, $request);
9991003
$response = $curlClient->getBody();
10001004
$debugData = ['curl_response' => $response];

0 commit comments

Comments
 (0)