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