ajohnson6494/shippo-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ajohnson6494/shippo-php

Composer 安装命令:

composer require ajohnson6494/shippo-php

包简介

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

README 文档

README

Build Status

Shippo is a shipping API that connects you with multiple shipping carriers (such as USPS, UPS, DHL, Canada Post, Australia Post, UberRUSH and many others) through one interface.

Print a shipping label in 10 mins using our default USPS and DHL Express accounts. No need to register for a carrier account to get started.

Requirements

  • PHP 8.3 or later.

  • Shippo account - free to sign up, free to use the API. Only pay to print a live label, test labels are free.

Installation

Installing using Composer

  • Get Composer
  • Install via: composer require ajohnson6494/shippo-php

Installing using Laravel

In Laravel you can install the library as normal. Then within you app/Providers/AppServiceProvider.php file's boot() method add the following:

use Shippo\Shippo;

Shippo::setApiKey(env('SHIPPO_API_KEY'));

To take advantage of configuration caching, you can set a config parameter in config/services.php and retrieve your API key through the configuration.

Shippo::setApiKey(config('services.shippo.key'));

From here you can use the Shippo library anywhere in your application without setting the key when accessing it.

Testing

After installing the dependencies above, the test suite may be run: ./vendor/bin/phpunit

You may also run individual tests: ./vendor/bin/phpunit AddressTest.php

Getting Started

Simple usage looks like:

  use Shippo\Shippo;
  use Shippo\Address;

  // Replace <API-KEY> with your Shippo API Key
  Shippo::setApiKey("<API-KEY>");

  $address = Address::create([
    'object_purpose' => 'QUOTE',
    'name' => 'John Smith',
    'company' => 'Initech',
    'street1' => '6512 Greene Rd.',
    'city' => 'Woodridge',
    'state' => 'IL',
    'zip' => '60517',
    'country' => 'US',
    'phone' => '773 353 2345',
    'email' => 'jmercouris@iit.com',
    'metadata' => 'Customer ID 23424'
  ]);

  var_dump($address);

Documentation

Please see https://goshippo.com/docs for up-to-date documentation.

About Shippo

Connect with multiple different carriers, get discounted shipping labels, track parcels, and much more with just one integration. You can use your own carrier accounts or take advantage of our discounted rates with the USPS and DHL Express. Using Shippo makes it easy to deal with multiple carrier integrations, rate shopping, tracking and other parts of the shipping workflow. We provide the API and dashboard for all your shipping needs.

Supported Features

The Shippo API provides in depth support of carrier and shipping functionalities. Here are just some of the features we support through the API:

Supported Features

The Shippo API provides in depth support of carrier and shipping functionalities. Here are just some of the features we support through the API:

  • Shipping rates & labels - Docs
  • Tracking for any shipment with just the tracking number - Docs
  • Batch label generation - Docs
  • Multi-piece shipments - Docs
  • Manifests and SCAN forms - Docs
  • Customs declaration and commercial invoicing - Docs
  • Address verification - Docs
  • Consolidator support including:
    • DHL eCommerce
    • UPS Mail Innovations
    • FedEx Smartpost
  • Additional services: cash-on-delivery, certified mail, delivery confirmation, and more - Docs

ajohnson6494/shippo-php 适用场景与选型建议

ajohnson6494/shippo-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.93k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 04 月 29 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「address」 「FedEx」 「shipping」 「tracking」 「ups」 「usps」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 ajohnson6494/shippo-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 ajohnson6494/shippo-php 我们能提供哪些服务?
定制开发 / 二次开发

基于 ajohnson6494/shippo-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 2.93k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 18
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 89
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-29