Download the PHP package ctwillie/laravel-usps without Composer

On this page you can find all versions of the php package ctwillie/laravel-usps. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-usps

Laravel-Usps

This package provides a very simple wrapper for the United States Postal Service API. Currently, this package only provides address validation features, but will soon comprise all features offered by the USPS API.

Prerequisites

Be sure to register at www.usps.com/webtools/ to receive your unique user ID from the United States Postal Service. This user ID is required to use this package.

Installation

Configuration

There are three important configurations.

  1. Your USPS user ID:

    • If you have not received your USPS user ID, follow the link in the prerequisites section to register with the United States Postal Service. It is required to use this package.
  2. Whether you want SSL verification enabled for API requests:

    • This setting is set to true by default for security reasons. You can override this behavior by setting the verrifyssl config setting to false. Do this at your own risk.
  3. Which environment you are working in:
    • The options are 'local' and 'production' which tell the package which API url to use, testing or production respectively. If no configuration is found for env, it will default to the environment recognized by laravel. This setting takes precedence over APP_ENV from your .env file.

We recommend placing all configuration settings in your .env file and use Laravel's env() helper function to access these values.

In config/services.php add these three settings.

Usage

The current features offered by this package are:

Address Validation

The Address class handles creating and formatting address data. Pass the constructor an associative array of address details. Array keys are case-sensitive. Below is an example of creating an address and making an api request for validation.

The USPS api supports up to 5 address validations per request. If you need to validate more than one address at a time, pass an array of addresses to the Address constructor.

The response will contain the corrected address, or an error if not enough information was given or the address does not exists.

Response Formatting

You can specify the format of the response by passing an optional, case-insensitive parameter to the validate method. The default format is an associative array.

Contributing

Contributions are always welcomed and will receive full credit.

We accept contributions via Pull Requests on Github.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details


All versions of laravel-usps with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ^6.4
spatie/array-to-xml Version ^2.11
guzzlehttp/guzzle Version ~6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ctwillie/laravel-usps contains the following files

Loading the files please wait ....