Download the PHP package didipay/merchant-php-sdk without Composer

On this page you can find all versions of the php package didipay/merchant-php-sdk. 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 merchant-php-sdk

Didipay payment merchant php SDK

Official website (https://didipay.didiglobal.com)

Dependencies

Php 5.6.0 or higher is required

ext-openssl is required

ext-curl is required

ext-json is required

Signature process

Get all request parameters, excluding byte-type parameters, such as files and byte streams, remove the sign field, and sort them in ascending order according to the key-value ASCII code of the first character (in ascending alphabetical order). The two-character key-value ASCII codes are sorted in ascending order, and so on.

Filter and sort

Splicing: Combine the sorted parameters and their corresponding values ​​into the format of "parameter=parameter value", and connect these parameters with the & character, and the generated string is the string to be signed.

Call the signature algorithm: Use the SHA256WithRSA signature function corresponding to the respective language to use the merchant's private key to sign the signature string to be signed, and perform Base64 encoding. Assign the generated signature to the sign parameter and concatenate it into the request parameter.

Key format issue

The private key used in this project is in PKCS1 format. The Java language needs to remove the BEGIN, END lines, line breaks, and spaces in the key. Non-Java languages ​​retain the original key format.

Getting Started

We recommend managing third-party dependencies from Packagist using Composer, which allows you to add new libraries and include them in your PHP projects.

Install Composer

From the command-line, download Composer.

Install the library

We recommend installing the library with Composer, a package manager for PHP:

Command Line

composer require didipay/merchant-php-sdk After you install the library with Composer, the library is added automatically as a dependency in your project’s composer.json file. For example:

To use the bindings, use Composer’s autoload. For example:

You can use composer to install this package.For example:

Run your first request:

Now that you have the PHP SDK installed, you can create API requests.

Save the file as merchant_client_test.php. From the command-line, cd to the directory containing the file you just saved then run:

If everything worked, the command-line shows the following response. Save these identifiers so you can use them while building your integration. This wraps up the quickstart. See the link below for a few different ways to process a payment for the product you just created.

Document


All versions of merchant-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-openssl Version *
ext-curl Version *
ext-json Version *
monolog/monolog Version 1.23.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 didipay/merchant-php-sdk contains the following files

Loading the files please wait ...