1. Go to this page and download the library: Download matscode/paystack-php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
matscode / paystack-php-sdk example snippets
$response = $Paystack->transaction->initialize([
'email' => '[email protected]',
'amount' => 500000, // amount is in kobo
'callback_url' => 'https://www.app.local/paystack/transaction/verify'
]);
$response = $Paystack->bank->list();
$bank_code='0000';
$account_number='0987654321'
$response = $Paystack->bank->resolve($bank_code, $account_number);
//result: returns account information is found, throws exception otherwise
bash
composer
php
php
php
use Matscode\Paystack\Paystack;
$paystackSecret = 'sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$Paystack = new Paystack($paystackSecret);