Download the PHP package carllee1983/newebpay-logistics without Composer

On this page you can find all versions of the php package carllee1983/newebpay-logistics. 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 newebpay-logistics

NewebPay Logistics Integration PHP SDK

English

Latest Version on Packagist Run Tests PHP Version

A PHP SDK for integrating with the NewebPay Logistics API (藍新金流物流 API). This package simplifies the process of creating transactions, selecting stores (CVS), querying orders, and printing shipping labels.

Features

Requirements

Installation

Install via Composer:

Configuration

Initialize the library with your NewebPay Logistics credentials.

Parameters

Parameter Application Description
$merchantId Required Your Shop ID (商店代號) provided by NewebPay.
$hashKey Required Hash Key (HashKey) for encryption.
$hashIV Required Hash IV (HashIV) for encryption.
$serverUrl Optional API Base URL. Default is testing env: https://ccore.newebpay.com/API/Logistic.

Laravel Integration

This package includes a Service Provider and Facade for seamless Laravel integration.

1. Installation

Publish the configuration file:

2. Configuration

Add the following variables to your .env file:

3. Usage via Facade

You can use the NewebPayLogistics facade anywhere in your Laravel application.

Usage

1. Map Interface (電子地圖)

Redirect the user to the logistics provider's map interface to select a store (7-11, FamilyMart, etc.).

1-1. Frontend Integration (Vue/React)

If you are using a decoupled architecture, return the form data as JSON.

2. Create Order (建立物流訂單)

Create a logistics order for B2C or C2C transactions.

3. Query Order (查詢物流訂單)

Query the status of an existing order.

Examples

Check the examples/ directory for complete vanilla PHP scripts:

API Reference

For detailed API documentation, please refer to the files in the doc/ directory:

FAQ

Q: How do I change the environment to Production? A: By default, NewebPayLogistics::create() uses the testing URL. Pass the production URL as the 4th argument, or set NEWEBPAY_LOGISTICS_SERVER_URL in Laravel .env.

Q: Can I use this without Laravel? A: Yes! The package is framework-agnostic. See the Configuration section.

Q: I get a "Validation Validation" error. A: Ensure all required fields are set. The SDK validates the request parameters before generating the payload.

Q: I get a "Check Value Error" or Decryption failure. A: This usually means your Merchant ID, Hash Key, or Hash IV are incorrect. Please double check them. Also ensure there are no extra spaces in your keys. In some cases, ensure your input data doesn't contain encoded characters that might mess up the length calculation.

Development

Contributing

Please see CONTRIBUTING.md for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

MIT


All versions of newebpay-logistics with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
ext-openssl Version *
guzzlehttp/guzzle Version ^7.0
psr/log Version ^3.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 carllee1983/newebpay-logistics contains the following files

Loading the files please wait ...