Closed codercodercodercoder closed 2 years ago
I'm also facing the same issue.
I am also getting below error.. [HighestSeverity] => ERROR [Notifications] => Array ( [0] => FedEx\ShipService\ComplexType\Notification Object ( [name:protected] => Notification [values:protected] => Array ( [Severity] => ERROR [Source] => ship [Code] => 6065 [Message] => Commodities are required [LocalizedMessage] => Commodities are required )
)
)
Any solutions found? I am struck with the same problem
Thank you for helping out @codercodercodercoder
But still not right,I get a new error that 'SOAP-ERROR: Encoding: object has no 'Weight' property'.
Can you help me out? Thank you very much!
You might need to provide the Weight Class in the requestedPackageLink. I did similar like:
$requestedPackageLineItem->Dimensions->Length = 0;
$requestedPackageLineItem->Dimensions->Units = SimpleType\LinearUnits::_IN;
$requestedPackageLineItem->Weight->Value = 151;
$requestedPackageLineItem->Weight->Units = SimpleType\WeightUnits::_LB;
$requestedPackageLineItem->setCustomerReferences([$refCust, $refDept, $refPO]);
$requestedPackageLineItems[] = $requestedPackageLineItem;
For Commodity Model
$commodity = new ComplexType\Commodity([
'NumberOfPieces' => 1,
'Description' =>'Testing Name',
'CountryOfManufacture' => 'MX',
'Weight' => new ComplexType\Weight([
'Units' => SimpleType\WeightUnits::_LB,
'Value' => 2000
]),
'Quantity' => $item->getQuantity(),
'QuantityUnits' => 'EA',
'UnitPrice' => new Money([
'Currency' => 'USD',
'Amount' => $unitValue
]),
]);
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
If both the recipient and sender are in the United States, they work well. But if the recipient is in Canada, there is a problem.
irst I change serviceType to INTERNATIONAL_PRIORITY,then I get a error,the code is 2033 and the message is Customs Value is required.
So I add this code:
$money = new ComplexType\Money(); $money->setCurrency('USD'); $money->setAmount('120'); $cus = new ComplexType\CustomsClearanceDetail(); $cus->setCustomsValue($money); $requestedShipment->setCustomsClearanceDetail($cus);
Then I get two errors.First error code is 6005,message is Commodities are required.Second error code is 2009, message is Duties payment type is not compatible with destination country.I added some more code: ` $payor = new ComplexType\Payor();
$payor->setResponsibleParty($recipient);
$pay = new ComplexType\Payment();
$pay->setPaymentType(SimpleType\PaymentType::_SENDER);
$pay->setPayor($payor);
$arr = array('name'=>'test','NumberOfPieces'=>5,'Description'=>'tetetetetetetet','CountryOfManufacture'=>'CN','HarmonizedCode'=>'851711100000','weight'=>array('Value' => 10,'Units' => SimpleType\WeightUnits::_LB),'Quantity'=>1,'QuantityUnits'=>'PCS');
$cus->setCustomsValue($money);
$cus->setDutiesPayment($pay); `
But still not right,I get a new error that 'SOAP-ERROR: Encoding: object has no 'Weight' property'.
Can you help me out? Thank you very much!