PHP code example of iqomp / growinc-pga

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

    

iqomp / growinc-pga example snippets



use Iqomp\GrowIncPGA\PGA;

$pga = new PGA($merc_code, $merc_secret);

// get all payment methods
$payment_methods = $pga->getPaymentMethods();

// create new bill
$body = [
    'invoice_no' => ::string,
    'description' => ::string,
    'amount' => ::int,
    'customer_name' => ::string,
    'customer_email' => ::string,
    'customer_phone' => ::string,
    'expire_in' => ::int,
    'payment_method_code' => ::string
];
$bill = $pga->createBill($body);

// check bill status
$body = [
    'reference_no' => ::string
];
$status = $pga->checkBill($body);

// get all exists transactions
$body = [
    'start_date' => ::string,
    'end_date' => ::string,
    'show_per_page' => ::int
];
$trans = $pga->getTransactions($body);