EXCEPTION :: Failure: Missing or Invalid Total Number of Pieces in all Pallets in a Shipment. (120030) UPS PHP - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Wednesday, June 9, 2021

EXCEPTION :: Failure: Missing or Invalid Total Number of Pieces in all Pallets in a Shipment. (120030) UPS PHP

I use this package https://github.com/gabrielbull/php-ups-api when I use packaging type PT_PACKAGE then ok...but I'm using PT_PALLET and service S_UPSWW_EXPRESSFREIGHT then showing this error. Here is my code. please give me any solution

// Set service
$service = new Service;
$service->setCode(Service::S_UPSWW_EXPRESSFREIGHT);
$service->setDescription($service->getName());
$shipment->setService($service);



// Add Package
$package = new Package();
$package->getPackagingType()->setCode(PackagingType::PT_PALLET);
$package->getPackageWeight()->setWeight(155);
$unit = new UnitOfMeasurement;
$unit->setCode(UnitOfMeasurement::UOM_LBS);
$package->getPackageWeight()->setUnitOfMeasurement($unit);


source https://stackoverflow.com/questions/67892571/exception-failure-missing-or-invalid-total-number-of-pieces-in-all-pallets-i

No comments:

Post a Comment