PHPackages                             tigron/shipping-ups - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tigron/shipping-ups

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tigron/shipping-ups
===================

Tigron Ups

v2.0.8(8mo ago)117.4k↓30%MITPHP

Since Oct 30Pushed 8mo ago5 watchersCompare

[ Source](https://github.com/tigron/shipping-ups)[ Packagist](https://packagist.org/packages/tigron/shipping-ups)[ RSS](/packages/tigron-shipping-ups/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (32)Used By (0)

shipping-ups
============

[](#shipping-ups)

PHP library to allow shipping via UPS

Howto
-----

[](#howto)

```
/**
 * Initialize the UPS package
 */
\Tigron\Ups\Config::$license_number = 'ups_license_number';
\Tigron\Ups\Config::$account_number = 'account_number';
\Tigron\Ups\Config::$user_id = 'user_id';
\Tigron\Ups\Config::$password = 'password';
\Tigron\Ups\Config::$logfile = 'path to log file';
\Tigron\Ups\Config::$mode = 'test/prod';
\Tigron\Ups\Config::$socket_timeout = 5; // Default = 5

/**
 * Define the shipper
 */
$shipper_address = new \Tigron\Ups\Address();
$shipper_address->line1 = 'street 1';
$shipper_address->line2 = 'additional line';
$shipper_address->line3 = 'additional line';
$shipper_address->zipcode = '12345';
$shipper_address->city = 'City';
$shipper_address->country = 'BE'; 	// ISO2 country code

$shipper = new \Tigron\Ups\Contact();
$shipper->company = 'Company name';
$shipper->firstname = 'Recipient firstname';
$shipper->lastname = 'Recipient lastname';
$shipper->phone = '+32.1234567';
$shipper->fax = '+32.1234567';
$shipper->email = 'info@example.com';
$shipper->vat = '000000000';
$shipper->address = $shipper_address;

/**
 * Define the ship from address
 */
$ship_from_address = new \Tigron\Ups\Address();
$ship_from_address->line1 = 'street 1';
$ship_from_address->line2 = 'additional line';
$ship_from_address->line3 = 'additional line';
$ship_from_address->zipcode = '12345';
$ship_from_address->city = 'City';
$ship_from_address->country = 'BE'; 	// ISO2 country code

$ship_from = new \Tigron\Ups\Contact();
$ship_from->company = 'Company name';
$ship_from->firstname = 'Recipient firstname';
$ship_from->lastname = 'Recipient lastname';
$ship_from->phone = '+32.1234567';
$ship_from->fax = '+32.1234567';
$ship_from->email = 'info@example.com';
$ship_from->vat = '000000000';
$ship_from->address = $ship_from_address;

/**
 * Define the Recipient
 */
$address = new \Tigron\Ups\Address();
$address->line1 = 'street 1';
$address->line2 = 'additional line';
$address->line3 = 'additional line';
$address->zipcode = '12345';
$address->city = 'City';
$address->state = 'NY' // Required for US/Canada/Ireland
$address->country = 'BE'; 	// ISO2 country code

$recipient = new \Tigron\Ups\Contact();
$recipient->company = 'Company name';
$recipient->firstname = 'Recipient firstname';
$recipient->lastname = 'Recipient lastname';
$recipient->phone = '+32.1234567';
$recipient->fax = '+32.1234567';
$recipient->email = 'info@example.com';
$recipient->vat = '000000000';
$recipient->address = $address;

/**
 * Define the package type
 */
$package_type = \Tigron\Ups\Package\Type::get_by_code('02');

/**
 * Create packages
 */
$package1 = new \Tigron\Ups\Package();
$package1->type = $package_type;
$package1->description = 'Order x';
$package1->weight = $shipment->get_weight()/1000;

$package2 = new \Tigron\Ups\Package();
$package2->type = $package_type;
$package2->description = 'Order y';
$package2->weight = $shipment->get_weight()/1000;

$packages = [ $package1, $package2 ];

/**
 * Select the UPS service
 */
$service = new \Tigron\Ups\Service();
$service->name = 'UPS Saver';
$service->code = 65;

/**
 * Add notifications
 */
$notification = new \Tigron\Ups\Notification();
$notification->code = 2;
$notification->email_addresses = [ 'test@example.com' ];

/**
 * Optional: Send paperless invoice
 */
$internationalForms = new \Tigron\Ups\Internationalforms();
$internationalForms->type = '01';
$internationalForms->export_reason = 'SALE';
$internationalForms->add_soldto($this->get_ups_customer($shipment));

$product = new \Tigron\Ups\Product();
$product->description = 'This is my test product';
$product->quantity = 5;
$product->measurement_code = 'PC';
$product->origin_country = 'BE';
$product->value = 100;

$internationalForms->add_product($product);

/**
 * Ship
 */
$shipping = new \Tigron\Ups\Shipping();

$shipping->set_shipper($shipper);
$shipping->set_ship_from($ship_from);
$shipping->set_ship_to($recipient);
$shipping->set_sold_to($recipient);
$shipping->add_package($package1);
$shipping->add_package($package2);
$shipping->set_service($service);
$shipping->add_notification($notification);

$result = $shipping->confirm();
$accept_result = $shipping->accept($result['ShipmentDigest']);

/**
 * This is the label in GIF format
 */
$label = base64_decode($accept_result['ShipmentResults']['PackageResults']['LabelImage']['GraphicImage']);

```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance59

Moderate activity, may be stable

Popularity27

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 55.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~119 days

Recently: every ~108 days

Total

31

Last Release

264d ago

Major Versions

0.1.17 → 1.0.02020-06-05

v1.0.3 → v2.0.12024-05-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/8bff1383483dacb0c3f89d2d3856ae03d4cf3e80de26a2998248dd1175317285?d=identicon)[tigron](/maintainers/tigron)

---

Top Contributors

[![christopheg](https://avatars.githubusercontent.com/u/199087?v=4)](https://github.com/christopheg "christopheg (38 commits)")[![LionelLaffineur](https://avatars.githubusercontent.com/u/21120913?v=4)](https://github.com/LionelLaffineur "LionelLaffineur (27 commits)")[![gerryd](https://avatars.githubusercontent.com/u/3003371?v=4)](https://github.com/gerryd "gerryd (3 commits)")

### Embed Badge

![Health badge](/badges/tigron-shipping-ups/health.svg)

```
[![Health](https://phpackages.com/badges/tigron-shipping-ups/health.svg)](https://phpackages.com/packages/tigron-shipping-ups)
```

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
