PHP Classes

File: docs/README.md

Recommend this page to a friend!
  Classes of Ujah Chigozie peter   PHP Payment Gateway Library   docs/README.md   Download  
File: docs/README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Payment Gateway Library
Process payments with multiple gateways
Author: By
Last change:
Date: 0 years ago
Size: 768 bytes
 

Contents

Class file image Download

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);