Payunit PHP SDK for the online agreggator

1.0.10 2023-05-05 18:17 UTC

This package is not auto-updated.

Last update: 2024-05-31 23:45:43 UTC


README

This is a payment sdk developed by the sevenCommonFactor for it's Payunit agreggator platform

Requirements

  • PHP >= 7.2 (not working with PHP 7.3)
  • Latest cURL Extension

Installation

    composer require sevencommonfactor/payunit

Usage

Add the PayUnit Namespace in your desired controller

    use SevenGps\PayUnit

Create a new instance of the PayUnit class and pass in all the required attributes

  •   $myPayment = new PayUnit(
        "your_api_key",
        "your_api_password",
        "your_api_username",
        "returnUrl",
        "notifyUrl",
        "mode",
        "description",
        "purchaseRef",
        "currency",
        "merchant_name",
        "transaction_id (This id should be alpha numeric and less than 20 characters)"
    );
    

The Mode can be live or test

Call the MakePayment method. This method will redirect to the payment page where the client can perform payment with the payment method you have activated on your dashboard

    $myPayment->makePayment("amount");

Recommendations

Please for security reasons make sure you read your Api key, Api password and Api user are set in an environment config file

Demo

link to demo application https://gitlab.com/sevencommonfactor/payunit-php-demo/-/tree/dev

License

The Payunit PHP SDK is released under a Propretary license sevenCommonFactor.