yexk / paystack-php
Paystack Library for PHP
1.0.0
2022-06-02 08:01 UTC
Requires
- php: >=5.5
- nategood/httpful: *
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is auto-updated.
Last update: 2024-10-30 02:21:34 UTC
README
Paystack PHP is a library for using the Paystack API from PHP.
While there are other PHP libraries for Paystack, this library is designed to make it less cumbersome to implement a payment flow on the Paystack payment platform.
Installation
To install using composer
composer install putianxin/paystack-php
Usage
First you initialize the library with your secret key
\Paystack\Paystack::init('__secret_key_here__');
Transaction
Initialize a transaction
$payment = \Paystack\Transaction::initialize([ 'email' => 'jame@gosling.com', 'amount' => '3000' ]);
Customer
Create Customer
$customer = \Paystack\Customer::create([ 'email' => 'google@gosling.com', 'first_name' => 'Perfect', 'last_name' => 'Makanju', 'phone' => 'xxxxxxx' ]); echo 'Customer\'s first name is: '.$customer->first_name;
Todo
This library is far from complete and not yet stable. So I don't advice using it yet.
- Finish up all the resources
- Tests for each Resource
- Fix travis build script