Based on https://payment-api-dev.pulpal.az/swagger/index.html
The php-pulpal package allows you to accept and process payments using PulPal API directly in your php application.
- Top-up Payment from the merchant to the client
- Check status of transaction
- Check merchant wallet balance and blocked funds
- PHP 5.6+
- cURL
Require the shabnamyusifzada/php-pulpal package in your composer.json and update your dependencies:
$ composer require shabnamyusifzada/php-pulpal- Download the class library and extract the contents do a directory in your project structure.
- Upload the files to your web server.
Save config/pulpal.php to a location of your choice and fill out your details accordingly.
To use the library in your project, include the following into your file(s).
- /path/to/config.php
- autoload.php
Include the following to your file:
<?php
require __DIR__.'/vendor/autoload.php';
use ShabnamYusifzada\Pulpal\Api\v1\TopUpPayment;
$config = include __DIR__."/config/pulpal.php";
$payment = new TopUpPayment(
$config['host'],
$config['merchant_id'],
$config['provider_id'],
$config['api_public_key'],
$config['api_private_key'],
$config['lang']
);
?>You must initialize payment for redirecting the merchant to the payment page using the following example: Example
And then process the payment result using the following example: Example
Example right here
Example right here
"Payment from the client to the merchant" feature
Released under the MIT License, see LICENSE.