Download the PHP package johnpaulmedina/laravel-usps without Composer
On this page you can find all versions of the php package johnpaulmedina/laravel-usps. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download johnpaulmedina/laravel-usps
More information about johnpaulmedina/laravel-usps
Files in johnpaulmedina/laravel-usps
Package laravel-usps
Short Description USPS API for Laravel 10
License MIT
Homepage https://github.com/johnpaulmedina/laravel-usps/
Informations about the package laravel-usps
Laravel-USPS
Laravel-USPS is a composer package that allows you to integrate the USPS Address / Shipping API / Rates Calculator. This package is ported from @author Vincent Gabriel https://github.com/VinceG/USPS-php-api
- Requires a valid USPS API Username
- Tested on Laravel 10
Installation
Begin by installing this package through Composer. Run this command from the Terminal:
Laravel integration
For Laravel 5.5 and later, this package will be auto discovered and registered.
To wire this up in your Laravel 5.4 project you need to add the service provider.
Open config/app.php
, and add a new item to the providers array.
Then you must also specify the alias in config/app.php
. Add a new item to the Aliases array.
This will allow integration by adding the Facade Use Usps;
Laravel Config
Add your USPS username config in config/services.php
.
Example Controller Usage
The only method completed for Laravel is the Usps::validate
, Usps::rate
which is defined in vendor/johnpaulmedina/laravel-usps/src/Usps/Usps.php
. As this package was developed for internal use I did not bring over all the features but you are more than welcome to contribute the methods you need and I will merge them. I suggest looking at the original PHP-Wrapper by @VinceG USPS PHP-Api as I ported those clases and autoloaded them to use in the Usps.php
file.
Contributors
@pdbreen @bredmor @scs-ben @daveore090
@VinceG Original README.MD
USPS PHP API
This wrapper allows you to perform some basic calls to the USPS api. Some of the features currently supported are:
- Rate Calculator (Both domestic and international)
- Zip code lookup by address
- City/State lookup by zip code
- Verify address
- Create Priority Shipping Labels
- Create Open & Distribute Shipping Labels
- Create International Shipping Labels (Express, Priority, First Class)
- Service Delivery Calculator
- Confirm Tracking
Requirements
- PHP >= 8.1
- USPS API Username
-
- Laravel 10
Authors
- Vincent Gabriel http://vadimg.com (Original PHP-Wrapper)