PHP code example of frankyso / laravel-ipaymu

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

    

frankyso / laravel-ipaymu example snippets



use iPaymu;

$iPaymu = new iPaymu('your-api-key', ['ureturn','unotify','ucancel']);

'iPaymu'=>\frankyso\iPaymu\Laravel\iPaymuFacade::class

php artisan vendor:publish

use iPaymu;

iPaymu::cart()->add("id","product-name", 'product-quantity','product-price');
iPaymu::cart()->checkout("transaction-comment");


function transaction(iPaymu $iPaymu){
    $iPaymu->cart()->add("id","product-name", 'product-quantity','product-price');
    $iPaymu->cart()->checkout("transaction-comment");
}