maatify/paystack

Official PHP library for maatify.dev PayStack API handler, known by our team

1.0.2 2023-07-25 14:41 UTC

This package is auto-updated.

Last update: 2024-10-24 16:35:13 UTC


README

composer require maatify/paystack

Usage

Instance

use Maatify\PayStack\PayStackController;

require_once __DIR__ . '/vendor/autoload.php';

$pay_stack = new PayStackController(__SECRET_KEY__); // PayStack instance

Setting optional: Query Or Body Parameters

there is two options to set parameters for All Methods :

This explains for transaction Initialize Example
  • 1st
$caller_object = $pay_stack->Transaction()->Initialize(); // transaction Initialize Example
$result = $caller_object
->SetOptional(__key__, __val__)
->SetOptional(__key__, __val__)
->Execute(__CUSTOMER_EMAIL__, __AMOUNT_IN_CENT__);
  • 2nd
$caller_object = $pay_stack->Transaction()->Initialize(); // transaction Initialize Example
$result = $caller_object->SetAllOptionalAsArray([
__key1__ => __val1__, 
__key2__ => __val2__, 
])
->Execute(__CUSTOMER_EMAIL__, __AMOUNT_IN_CENT__);

Transactions Example

  • The Transactions API allows you create and manage payments on your integration.
  • ✨ examples: Transactions.md

Customers Example

  • TThe Customers API allows you create and manage customers on your integration.
  • ✨ examples: Customers.md

Plans Example

  • The Plans API allows you create and manage installment payment options on your integration.
  • ✨ examples: Plans.md

Subscriptions Example

  • The Subscriptions API allows you create and manage recurring payment on your integration.
  • ✨ examples: Subscriptions.md