New Shipment

38 views
Skip to first unread message

Aaron

unread,
Aug 14, 2009, 11:32:48 PM8/14/09
to ups-php-discuss
I checked out the latest code in trunk and it looks solid for creating
a shipment on the backend side of things. But how can it be used to
print an actual label that can be stuck on a box to be dropped off at
a UPS substation?

Thanks and great work,
Aaron

Mark Sanborn

unread,
Aug 14, 2009, 11:53:21 PM8/14/09
to ups-php...@googlegroups.com
Hi Aaron,

You can use thermal or laser printers.  The label generation is easy but it takes some doing to get the labels to print on a thermal printer.

I have been working on some code to get this to work easier.  Stay tuned.

Mark
--
Mark Sanborn
406-924-9590

Aaron Ryden

unread,
Aug 23, 2009, 5:03:52 PM8/23/09
to ups-php...@googlegroups.com
I'm trying to put together the 5 required tests to get certified to ship actual packages... but the void script isn't working. As per UPS instructions you're supposed to void 4 of the 5 test shipments.

I'm voiding the tracking numbers that i just generated and none of them are working... does it only work in production? Here's the response and the request

0FailureHard190102No shipment found within the allowed void period

XML Sent to UPS

<?xml version="1.0"?>
<AccessRequest xml:lang="en-US">
<AccessLicenseNumber>AC4A6A0107D5DAEC</AccessLicenseNumber>
<UserId>atguser</UserId>
<Password>sept2009</Password>
</AccessRequest>
<?xml version="1.0" encoding="utf-8"?>
<VoidShipmentRequest>
<Request>
<RequestAction>1</RequestAction>
</Request>
<ShipmentIdentificationNumber>1Z95R74V0397354673</ShipmentIdentificationNumber>
</VoidShipmentRequest>

Any advice?

Thanks

Aaron Ryden

unread,
Aug 23, 2009, 5:05:44 PM8/23/09
to ups-php...@googlegroups.com
I should probably change that password now.

Mark Sanborn

unread,
Aug 23, 2009, 5:26:19 PM8/23/09
to ups-php...@googlegroups.com
Aaron,

I would have to look at the code but I am not sure that I finished the void shipments to void multiple packages in the ups-php code.  Keep in mind that not all of the void responses are supposed to be successful.  Some of them are suppose to return an error.

If you want, I have some code that will automatically generate the 40+ files needed to certify.  You can find it at: http://rocketship.it

Otherwise you can wait till I implement it into ups-php.

Mark
--
Mark Sanborn
406-924-9590

Aaron Ryden

unread,
Aug 23, 2009, 5:44:14 PM8/23/09
to ups-php...@googlegroups.com
Following this example I could probably just modify the XML template no?. However I don't think multiple packages is my problem. I think I'm not using the correct value for ShipmentIdentificationNumber. Where does that come from? I thought it was just the tracking number of the first package and since my shipments only contained one package I just used what was on the label image file. Is that wrong?


<?xml version="1.0" ?>
<AccessRequest xml:lang='en-US'>
<AccessLicenseNumber>YOURACCESSLICENSENUMBER</AccessLicenseNumber>
<UserId>YOURUSERID</UserId>
<Password>YOURPASSWORD</Password>
</AccessRequest>
<?xml version="1.0" encoding="UTF-8" ?>
<VoidShipmentRequest>
<Request>
<TransactionReference>
<CustomerContext>Customer Transaction ID</CustomerContext>
<XpciVersion>1.0001</XpciVersion>
</TransactionReference>
<RequestAction>Void</RequestAction>
<RequestOption />
</Request>
<ExpandedVoidShipment>
<ShipmentIdentificationNumber>
1Z12345E2318693258
</ShipmentIdentificationNumber>
<TrackingNumber>1Z12345E0390819985</TrackingNumber>
<TrackingNumber>1Z12345E0193078536</TrackingNumber>
</ExpandedVoidShipment>
</VoidShipmentRequest>

Mark Sanborn

unread,
Aug 23, 2009, 10:54:32 PM8/23/09
to ups-php...@googlegroups.com
Aaron,

The ShipmentIdentificationNumber is the first package tracking number in a shipment with only 1 package.  If there are multiple packages it is usually the same as the first package.  When doing your voiding tests you will need to put the shipment number in and the package tracking number in some cases.  In other cases you only will need the shipment identification number.

Hope this helps,

Mark
--
Mark Sanborn
406-924-9590
Reply all
Reply to author
Forward
0 new messages