PHP code example of abdu / paymentgateway

1. Go to this page and download the library: Download abdu/paymentgateway 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/ */

    

abdu / paymentgateway example snippets


use Abdu\Paymentgateway\Payment;

public function showBalance(){
    $payment = new Payment();
    
    return payment->queryBalance();
}

    $payment->checkout($amount,$redirect_url,$error_redirect_url) 

    $payment->queryBalance() 

$payment->getInvoice($transaction_id) 

    $payment->invoice()

    //option 1 single adress
    $address = "+251917949637";
    $amount = 4223.02;

    $payment->send($address,$amount);

    //option 2 multiple address and constant amount

    $address = ["+251917949637","+251929194872"];
    $amount = 4223.02;

    $payment->send($address,$amount);

    //option 2 multiple address with different amount

    $address = ["+251917949637","+251929194872"];
    $amount = [4223.02,488.98];

    $payment->send($address,$amount);