Download the PHP package pashamesh/psb-acquiring-php-sdk without Composer

On this page you can find all versions of the php package pashamesh/psb-acquiring-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 psb-acquiring-php-sdk

Code style Tests

acquiring API PHP SDK.

This package provides Software Development Kit for PromSvyazBank (PSB) Acquiring API.

Installation

You can install the package via composer:

Usage

Setup client

Setup instance of Config:

where component1, component2, merchantNumber and terminalNumber are credentials provided by bank.

Test environment

To configure client to use test environment for test and development purposes just skip component1 and component2:

How to use

Preauthorization

Start preauthorization

Render and automatically submit preauthorization form which will redirect customer to the bank payment page:

Or it's possible to get form HTML content if you need more control:

It's also possible to get payment link for preauthorization which maybe sent to customer by email for example:

To save card during the preauthorization process use preauthorizeAndSaveCard method:

Notification HTTP call will contain TOKEN_ID identifying saved card.

There is a preauthorizeUsingCard to do preauthorization and use already saved card:

Complete preauthorization

Cancel preauthorization

Purchase

Purchase uses similar to preauthorization workflow. Render and automatically submit preauthorization form which will redirect customer to the bank payment page:

Or get form HTML content :

Or get payment link for purchase:

To save card during the purchase process use purchaseAndSaveCard method:

There is a purchaseUsingCard to do purchase and use already saved card:

Recurring payment

Register

Do payment

Refund

Cards

Save card from existing transaction

$syncResponse will contain TOKEN_ID identifying saved card.

Forget saved card

Handle callback HTTP call

Payload of asynchronous HTTP callback request must be validated for valid signature. SDK provide convenient method handleCallbackRequest. It validates signature and returns Payload model with request attributes.

Example

Development

There is a Docker-compose setup and set of handy make shortcuts for development purposes.

Install dependencies

Use next command to install composer dependencies:

Code styling

This package follows the PSR-12 coding standard and the PSR-4 autoload standard.

Use next command to fix code styling:

Running tests

Use next command to run Unit and code static analysis:

Links


All versions of psb-acquiring-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
guzzlehttp/guzzle Version ^6.5
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 pashamesh/psb-acquiring-php-sdk contains the following files

Loading the files please wait ....