Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure: Invalid merchandise description of package (120623) #363

Open
joyzalte opened this issue Nov 3, 2022 · 0 comments
Open

Failure: Invalid merchandise description of package (120623) #363

joyzalte opened this issue Nov 3, 2022 · 0 comments

Comments

@joyzalte
Copy link

joyzalte commented Nov 3, 2022

Can anyone help me on below issue?

I am receiving the below error message after the implementation return service.
Failure: Invalid merchandise description of package (120623)

Code what we used.
if (isset($return_order) && $return_order==1) {
$returnService = new \Ups\Entity\ReturnService;
$returnService->setCode(\Ups\Entity\ReturnService::PRINT_RETURN_LABEL_PRL);
$shipment->setReturnService($returnService);
}

If I also use the below code then it gives as mention error

Failure: Shipment/ReferenceNumber is not allowed for this shipment (120541)

Code what we used.
if (isset($return_order) && $return_order==1) {
$referenceNumber->setCode(\Ups\Entity\ReferenceNumber::CODE_RETURN_AUTHORIZATION_NUMBER);
$referenceNumber->setValue($shipping_reference_number);
} else {
$referenceNumber->setCode(\Ups\Entity\ReferenceNumber::CODE_INVOICE_NUMBER);
$referenceNumber->setValue($shipping_reference_number);
}
$shipment->setReferenceNumber($referenceNumber);

If I also use the below code then it gives as mention error

Failure: Invalid merchandise description of package (120623)

Code what we used.
if (isset($return_order) && $return_order==1) {
$referenceNumber->setCode(\Ups\Entity\ReferenceNumber::CODE_RETURN_AUTHORIZATION_NUMBER);
$referenceNumber->setValue($shipping_reference_number);
} else {
$referenceNumber->setCode(\Ups\Entity\ReferenceNumber::CODE_INVOICE_NUMBER);
$referenceNumber->setValue($shipping_reference_number);
}
$shipment->getPackages()[0]->setReferenceNumber($referenceNumber);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant