Download the PHP package meanbee/royalmail-php-library without Composer

On this page you can find all versions of the php package meanbee/royalmail-php-library. 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 royalmail-php-library

Royal Mail PHP Shipping Method Library

image

This repository contains the source code for the Meanbee Royal Mail PHP Library. It takes the country code, package value, and package weight and then outputs an array of objects containing the available shipping methods.

Using the Library

To use the library, call the getMethods method with your country code (in the ISO 3166 format), package value, and package weight.

Example Usage

This will return an array of objects where each object contains the shipping method name, minimum weight, maximum weight, price of the method, maximum insurance value, and proper name of the shipping method.

Unit Testing

This program is automatically unit tested with phpunit and travis.

CSV data format

This library uses six CSV files to determine which shipping methods are available:

  1. 1_countryCodeToZone.csv

    • Country code
    • World zone. Each country, defined by its country code can be in more then one zone. The code "GB" for Great Britain is in the EU and the GB World zone. There are four world zones:
      • WORLD_ZONE_GB
      • WORLD_ZONE_EU
      • WORLD_ZONE_ONE
      • WORLD_ZONE_TWO
  2. 2_zoneToDeliveryMethod.csv

    • World zone
    • Shipping zone.

    Each shipping method's name starts with the world zone it links to as prices differ between zones.

  3. 3_deliveryMethodMeta.csv

    • Delivery method
    • Minimum price of method
    • Maximum price available to the method (the maximum price of shipping cart this method applies to)
    • Max insurance available on method
    • Human-friendly method name
    • Delivery group
  4. 4_deliveryToPrice.csv
    • Method name
    • Minimum weight
    • Maximum weight
    • Price of method
    • Max insurance value
    • In the case of small or medium parcel up to 2kg in weight "SMALL" or "MEDIUM" else blank

Method names are constructed in the WORLDZONE_NAME_WITH_UNDERSCORES format with a separate method being added for each separate foramt. Examples of these can be seen in multiple of the csvs. In the case of extra insurance available on the item, another method must be created. An example can be seen in the 3_deliveryMethodMeta.csv.


All versions of royalmail-php-library with dependencies

PHP Build Version
Package Version
No informations.
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 meanbee/royalmail-php-library contains the following files

Loading the files please wait ....