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  
Name: Ujah Chigozie peter <contact>
Classes: 25 packages by
Country: Nigeria Nigeria
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

  Files folder image Files  /  docs  
File Role Description
  Accessible without login Plain text file ACCOUNT.md Data Auxiliary data
  Accessible without login Plain text file BANK.md Data Auxiliary data
  Accessible without login Plain text file CHARGES.md Data Auxiliary data
  Accessible without login Plain text file CUSTOMER.md Data Auxiliary data
  Accessible without login Plain text file HOOK.md Data Auxiliary data
  Accessible without login Plain text file PAYMENT.md Data Auxiliary data
  Accessible without login Plain text file README.md Doc. Documentation
  Accessible without login Plain text file RESPONSE.md Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
Files folder imageBanks (1 file)
Files folder imageCharges (2 files)
Files folder imageCustomers (2 files)
Files folder imageExceptions (1 file)
Files folder imageGateway (1 file)
Files folder imageHooks (1 file)
Files folder imageHttp (2 files)
Files folder imageMerchants (3 files)
Files folder imageModels (1 file)
Files folder imageUtils (1 file)
  Plain text file Merchant.php Class Class source
  Plain text file MerchantInterface.php Class Class source

  Files folder image Files  /  src  /  Banks  
File Role Description
  Plain text file Bank.php Class Class source

  Files folder image Files  /  src  /  Charges  
File Role Description
  Plain text file Builder.php Class Class source
  Plain text file Charge.php Class Class source

  Files folder image Files  /  src  /  Customers  
File Role Description
  Plain text file Account.php Class Class source
  Plain text file Customers.php Class Class source

  Files folder image Files  /  src  /  Exceptions  
File Role Description
  Plain text file PaymentException.php Class Class source

  Files folder image Files  /  src  /  Gateway  
File Role Description
  Plain text file Processor.php Class Class source

  Files folder image Files  /  src  /  Hooks  
File Role Description
  Plain text file Event.php Class Class source

  Files folder image Files  /  src  /  Http  
File Role Description
  Plain text file Network.php Class Class source
  Plain text file Response.php Class Class source

  Files folder image Files  /  src  /  Merchants  
File Role Description
  Plain text file Clients.php Class Class source
  Plain text file MerchantsInstance.php Class Class source
  Plain text file PayStack.php Class Class source

  Files folder image Files  /  src  /  Models  
File Role Description
  Plain text file BankModel.php Class Class source

  Files folder image Files  /  src  /  Utils  
File Role Description
  Plain text file Helper.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