gabrielbull / gabrielbull/php-ups-api

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

Open
#333 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
457
Forks
257
PR merge metrics
No merged PRs in 30d

Description

HI,
I am using gabrill php - ups api for my ERP.
Label is generated successful but without a reference number.
when i use the code for the same it shows the following error :

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

can some help me about that?

```
// Set service
$service = new \Ups\Entity\Service;
$service->setCode(\Ups\Entity\Service::S_STANDARD);
$service->setDescription($service->getName());
$shipment->setService($service);

//------------GET REFERENCE NUMBER
$order_id0 = $_POST['invoice_nu'];

$referencenumber=new \Ups\Entity\ReferenceNumber;
//$referencenumber->setCode('RZ');
$referencenumber->setValue($order_id0);
$shipment->setReferenceNumber($referencenumber);

```

above code shows me an error, if i will not use this it generate label successfully ..

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.