PHPackages                             mothership-ec/cog-mothership-fedex - 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. mothership-ec/cog-mothership-fedex

AbandonedLibrary

mothership-ec/cog-mothership-fedex
==================================

Cog module for dispatching using Fedex

3.0.1(10y ago)11861[4 issues](https://github.com/mothership-ec/cog-mothership-fedex/issues)GPL-3.0++PHPPHP &gt;=5.4.0

Since Nov 18Pushed 10y ago3 watchersCompare

[ Source](https://github.com/mothership-ec/cog-mothership-fedex)[ Packagist](https://packagist.org/packages/mothership-ec/cog-mothership-fedex)[ Docs](http://mothership.ec)[ RSS](/packages/mothership-ec-cog-mothership-fedex/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (2)Versions (12)Used By (0)

Mothership FedEx
================

[](#mothership-fedex)

The `Message\Mothership\Fedex` cogule provides Fedex integration for dispatching orders. It also provides new dispatch methods for these.

Installation
------------

[](#installation)

Install this package using [Composer](http://getcomposer.org/). The package name is `mothership-ec/cog-mothership-fedex`.

Dispatch methods
----------------

[](#dispatch-methods)

This cogule provides two dispatch methods that are added to the `order.dispatch.methods` service:

- FedEx Express (`fedex-express`)
- FedEx UK (`fedex-uk`)

Automated dispatch
------------------

[](#automated-dispatch)

This cogule integrates with the FedEx Express API and enables automatic dispatch for any dispatch using the type `fedex-express`.

It is important to note that there is no integration with FedEx UK as they are a totally separate entity and, at the time of writing this, don't have a suitable API for submitting shipments.

API
---

[](#api)

This cogule contains a small library for interacting with FedEx's SOAP API.

### Configuration

[](#configuration)

There is a configuration fixture for this cogule. To connect to the FedEx API, you'll need to enter some authentication details in there. The base requirement is:

- `api-key` - The API key provided by FedEx
- `api-password` - The API password provided by FedEx
- `meter-number` - The meter number to bill shipments to
- `account-number` - The account number responsible for the shipments

For testing, it is possible to create an account on the [FedEx Developer Website](http://fedex.com/developer) and generate these details.

### Overview of the API library

[](#overview-of-the-api-library)

The API library consists of three main parts:

- **Requests**: These detail the request and request data to be sent to the FedEx API.
- **Responses**: These detail the response back from the FedEx API for a request. They are defined by the corresponding request.
- **Dispatcher**: This is responsible for handling requests, sending them to the FedEx API and returning the relevant response or throwing error exceptions.
- **Services**: FedEx group their API into different "services". Each has their own WSDL endpoint. The request defined which service should be used.

You may also notice some references to something called a `PreparedRequest`. This is an implementation detail you shouldn't need to worry about as an API consumer, but it is essentially there so the API authentication and other top-level generic request data doesn't need to belong to every single `Request` class.

### Events

[](#events)

Before an API request is made, the `fedex.api.request` event is dispatched. The event is an instance of `Message\Mothership\Fedex\Api\Event\RequestEvent` so listeners can inspect the request and call methods on it. This happens after the request is validated.

Once a response is received and has been validated an initialised, the `fedex.api.response` event is dispatched. The event is an instance of `Message\Mothership\Fedex\Api\Event\ResponseEvent` so the response can be inspected by listeners.

### Uploading documents

[](#uploading-documents)

There is an `UploadDocuments` request available which allows you to upload any document to the FedEx API and attach it to a shipment that you can submit later. Documents must be wrapped in the API's `Document` class so that the FedEx document identifier can be retrieved.

When the response has been successfully dispatched by the `Dispatcher`, the `Response` returned will have the documents and will have set the identifiers on them.

You can then add these `Document` instances to a `Shipment` you're about to submit using `addDocument()`.

### Generated Commercial Invoice

[](#generated-commercial-invoice)

It is possible to request for FedEx to generate a commercial invoice for your shipment. This requires the shipper to be signed up for ETD (electronic trade documents) but it's generally a great idea because it saves on a lot of paper and it saves us having to make our own commercial invoices.

Mothership does not generate commercial invoices yet, so it's important to enable this.

To do so, just call `requestGeneratedCommercialInvoice(true)` on your `Shipment` instance.

### WSDL files

[](#wsdl-files)

Each service needs its own `.wsdl` file supplied by FedEx on their [developer website](http://fedex.com/developer). These are stored in `/resources/wsdl` and are referenced by their relevant service classes (instances of `Message\Mothership\Fedex\Api\Service\ServiceInterface`).

The endpoints are automatically changed by the API subsystem depending on the value of the `test-mode` property on the `fedex` configuration group. The endpoint for both live and test must be set on the service class in the `getWsdlEndpoint()` method. When adding a new service or `.wsdl` file, you can get these endpoints by looking at the bottom of the file and finding the value of the `location` attribute in service-&gt;port-&gt;address. The live URI will be on the `ws.fedex.com` host and test URIs will be on the `wsbeta.fedex.com` host.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 55.6% 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 ~62 days

Recently: every ~89 days

Total

10

Last Release

3997d ago

Major Versions

1.0.1 → 2.0.02013-12-02

2.3.0 → 3.0.02015-02-25

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

2.0.1PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c80abec1ec847de90ada27e2239c31f4374ed1d91912493f5415a688c269a78?d=identicon)[thomasjthomasj](/maintainers/thomasjthomasj)

---

Top Contributors

[![thomasjthomasj](https://avatars.githubusercontent.com/u/4520924?v=4)](https://github.com/thomasjthomasj "thomasjthomasj (15 commits)")[![kuiche](https://avatars.githubusercontent.com/u/5089510?v=4)](https://github.com/kuiche "kuiche (9 commits)")[![joeholdcroft](https://avatars.githubusercontent.com/u/2511043?v=4)](https://github.com/joeholdcroft "joeholdcroft (2 commits)")[![lsjroberts](https://avatars.githubusercontent.com/u/3817697?v=4)](https://github.com/lsjroberts "lsjroberts (1 commits)")

---

Tags

moneyordersdispatchproductscogmothershipcommerceorderFedEx

### Embed Badge

![Health badge](/badges/mothership-ec-cog-mothership-fedex/health.svg)

```
[![Health](https://phpackages.com/badges/mothership-ec-cog-mothership-fedex/health.svg)](https://phpackages.com/packages/mothership-ec-cog-mothership-fedex)
```

###  Alternatives

[sylius/order-bundle

Sales order management for Symfony applications.

11415.2k8](/packages/sylius-order-bundle)[craftcms/digital-products

Sell digital product licenses with Craft Commerce

1814.3k3](/packages/craftcms-digital-products)

PHPackages © 2026

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