Search by

hiotech / paysortaphp

guytedd

php package for paysorta

Package info

github.com/hioweb003/paysorta-php

Homepage

Type:package

pkg:composer/hiotech/paysortaphp

Statistics

Installs: 11

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.7 2026-08-10 08:07 UTC

This package is auto-updated.

Last update: 2026-09-10 08:15:44 UTC


README

PHP SDK for Paysorta — initiate payments, generate hosted checkout links, and verify transactions.

Installation

composer require hiotech/paysortaphp

Requirements

  • PHP ^8.0^8.6

Quick start

use Hiotech\PaysortaPhp\Payment;

$payment = new Payment($secretkey);

$response = $payment->redirectToCheckout([
    'firstName' => 'john',
    'lastName'  => 'Doe',
    'email'  => 'customer@example.com',
    'amount' => 1000,
    'currency'     => 'NGN',
    'reference'    => 'ORDER-123',             
    'callBackURL' => 'https://example.com/callback',  
    'metadata'     => ['order_id' => 123]
]);

Usage

Redirect straight to checkout

$response = $payment->redirectToCheckout([
    'firstName' => 'john',
    'lastName'  => 'Doe',
    'email'        => 'customer@example.com', // required
    'amount'       => 1000,                   // required, numeric minimum 1
    'currency'     => 'NGN',                  // optional, defaults to NGN
    'reference'    => 'ORDER-123',             
    'callBackURL' => 'https://example.com/callback', // optional
    'metadata'     => ['order_id' => 123]    // optional
]);

Verify a transaction

After the customer returns from checkout, verify the payment by its reference:

$result = $payment->verifyPaymentCheckout('PSA_7cdc78f8d732fdb9');

License

MIT