osag11/kkiapay-php

Php sdk for kkiapay payment gateway

dev-master 2021-05-02 08:02 UTC

This package is not auto-updated.

Last update: 2024-09-30 09:24:17 UTC


README

Raw Files

    git clone https://github.com/osag11/php-sdk.git

Installing

Using composer:

    composer require osag11/kkiapay-php

Initialization

Production

    $kkiapay = new \Kkiapay\Kkiapay($public_key, $private_key, $secret);

Sandbox

    $kkiapay = new \Kkiapay\Kkiapay($public_key, $private_key, $secret, $sandbox = true);

Request to retrieve transactions

EXAMPLE

    $kkiapay->verifyTransaction($transaction_id);

Request to revert transaction

EXAMPLE

    $kkiapay->refundTransaction($transaction_id);

Request to schedule payout

EXAMPLE

    
    // Example to schedule payout when amount reaches a ceiling
    $kkiapay->setupPayout(array( "algorithm" => "roof", "send_notification" => true, 
        "destination_type" => "MOBILE_MONEY", "roof_amount" => "1000", 
        "destination" => "22997000000" ));
        
        // Example to schedule payout by frequency
    $kkiapay->setupPayout(array( "algorithm" => "rate", "send_notification" => true, 
        "destination_type" => "MOBILE_MONEY", "rate_frequency" => "1m", 
        "destination" => "22997000000" ));

COMPLETE POSSIBLE STATUS LIST