mohamedhekal / shipbridge-ups
UPS carrier driver for ShipBridge (Global)
v0.2.0
2026-07-16 15:31 UTC
Requires
- php: ^8.2
- illuminate/http: ^11.0|^12.0
- illuminate/support: ^11.0|^12.0
- mohamedhekal/shipbridge: ^0.1
Requires (Dev)
- laravel/pint: ^1.18
- orchestra/testbench: ^9.0|^10.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/phpstan: ^2.0
README
UPS shipping driver for ShipBridge · Region: Global / عالمي
Real UPS REST API: OAuth2 + Ship + Track (onlinetools.ups.com)
بالعربي — في ٣ خطوات
١) ثبّت الحزمتين
composer require mohamedhekal/shipbridge mohamedhekal/shipbridge-ups
٢) حط مفاتيح UPS في .env
SHIPBRIDGE_DRIVER=ups UPS_BASE_URL=https://onlinetools.ups.com UPS_CLIENT_ID=your-client-id UPS_CLIENT_SECRET=your-client-secret UPS_ACCOUNT_NUMBER=your-account UPS_SERVICE_CODE=11 UPS_LABEL_IMAGE_FORMAT=GIF
Sandbox:
UPS_BASE_URL=https://wwwcie.ups.com— التفاصيل فيdocs/GUIDE_AR.md.
٣) ابعت شحنة
use Hekal\ShipBridge\Facades\ShipBridge; use Hekal\ShipBridge\DTOs\Address; use Hekal\ShipBridge\DTOs\CreateShipmentRequest; use Hekal\ShipBridge\DTOs\Parcel; $shipment = ShipBridge::driver('ups')->createShipment(new CreateShipmentRequest( origin: new Address('المخزن', 'شارع ١', 'Cairo', 'EG', phone: '01011111111'), destination: new Address('العميل', 'شارع النيل', 'Giza', 'EG', phone: '01000000000'), parcels: [new Parcel(weightKg: 1.2)], reference: 'ORD-42', )); echo $shipment->trackingNumber;
الليبل: GIF/PDF base64 في $shipment->raw — استخدم UpsDriver::extractLabelContents($shipment->raw).
English — Quick start
composer require mohamedhekal/shipbridge mohamedhekal/shipbridge-ups
SHIPBRIDGE_DRIVER=ups UPS_CLIENT_ID=... UPS_CLIENT_SECRET=... UPS_ACCOUNT_NUMBER=...
ShipBridge::driver('ups')->createShipment(...); // POST /api/shipments/v1/ship ShipBridge::driver('ups')->track('1Z...'); // GET /api/track/v1/details/{id} ShipBridge::driver('ups')->label('1Z...'); // UPS tracking URL (label in create raw)
See docs/API.md for OAuth, payload fields, COD, and status codes.
How it fits
Your Laravel app
│
▼
ShipBridge (one API for all carriers)
│
▼
shipbridge-ups ← this package (UPS REST OAuth2)
Testing
composer install && composer test
License
MIT © Mohamed Hekal
