PHP Classes

PHP Payment Gateway Library: Process payments with multiple gateways

Recommend this page to a friend!
  Info   View files Documentation   View files View files (32)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2023-12-27 (5 months ago) RSS 2.0 feedNot enough user ratingsTotal: 57 All time: 10,536 This week: 63Up
Version License PHP version Categories
payment-gateways 1.0MIT/X Consortium ...8E-Commerce, Web services, PHP 7
Description 

Authors

Ujah Chigozie
Nanoblock Technology


Contributor

This package can process payments with multiple gateways using the same application code.

It provides a factory class that can create an object to perform operations with a specific payment gateway platform, for instance:

- Create a payment customer record

- List all customers with payment accounts

- Get a payment charge authorization

- Verify a payment

- Resolve account numbers

- Resolve bank account number

- Create a payment recipient

- Execute a transfer

- Create Webhook and Routing

- List all available banks

- Get bank by code

Currently, the package supports the payment gateway PayStack.

Picture of Ujah Chigozie peter
  Performance   Level  
Innovation award
Innovation award
Nominee: 11x

 

Documentation

PayStack Initialize

To initialize the payment gateway you will need to pass the merchant interface you want to use

First, initialize your payment merchant gateway

$gateway = new PayStack("PAYMENT_PRIVATE_KEY");

Calling Merchant::getInstance will return instances of Bank, Customers, and Processor as Payment which can then be used to access individual class instances $merchant->bank->foo()

$merchant = Merchant::getInstance($gateway);

Initialize with payment instance

$payment = Merchant::getPaymentInstance($gateway);

Initialize with customer instance

$customer = Merchant::getCustomerInstance($gateway);

Initialize with a bank instance

$bank = Merchant::getBankInstance($gateway);

Details

PHP PAYMENT GATEWAYS

Easy to use PHP payment gateway library designed for PHP 8 and above. The primary goal of this library is to facilitate seamless transitions between different payment merchants, allowing developers to switch gateways without the need for relearning of new implementation and documentation. Initialization involves specifying the preferred merchant, ensuring a smooth and consistent experience. Currently, PayStack is the starting point for this library.

Installation Guide via Composer:

composer require nanoblocktech/payment-gateways

Available Merchant Payment

  1. PayStack - Here you can find about PayStack API documentation to get started https://paystack.com/docs/api/

Documentations

To get started see the library documentation

  1. Getting Started
  2. Customer Management
  3. Customers Account Management
  4. Payments & Transactions
  5. Payment Charges Calculations
  6. Banks & Dedicated Virtual Account
  7. Webhook & Routing Handling
  8. API Request Response

License

The MIT License (MIT). Please see License for more information.


  Files folder image Files  
File Role Description
Files folder imagedocs (8 files)
Files folder imagesrc (2 files, 10 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpstan.includes.php Aux. Auxiliary script
Accessible without login Plain text file phpstan.neon Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Plain text file rector.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:57
This week:0
All time:10,536
This week:63Up
User Comments (1)
This software actually does nothing.
5 months ago (Shamiim Islam)
7%Star