PHP code example of inalto / pagonline
1. Go to this page and download the library: Download inalto/pagonline 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/ */
inalto / pagonline example snippets
use PagOnline\init\IgfsCgInit;
$init = new IgfsCgInit();
//$init->disableCheckSSLCert();
$init->serverURL="https://paymentgateway.it/IGFS_CG_SERVICES/services";
$init->timeout=30000;
$init->tid="TID-CODE1234";
$init->kSig="0000000000000000000000000000";
$init->shopID="mytransactionid";
$init->shopUserRef="customer-email";
$init->trType="AUTH";
$init->currencyCode="EUR";
$init->amount=4400; //Amount without comma, 1,00EUR will be 100
$init->landID="IT"; //Language iso code
$init->notifyURL="https://myserver.it/my-thankyou-page.php";
$init->errorURL="https://myserver.it/my-error-page.php";
if(!$init->execute()){
echo $init->rc;
}else{
print ("location: ".$init->redirectURL);
}