1. Go to this page and download the library: Download mars-iq/iqpay 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/ */
mars-iq / iqpay example snippets
use \iqpay\PayClass;
use \iqpay\getWays;
$PayClass = new PayClass();
$PayClass->amount = "10000";
$PayClass->currency = "IQD";// or USD
$PayClass->returnUrl = "http://example.com";
$PayClass->failUrl = "http://example.com";
$PayClass->language = "ar";// or "en"
$PayClass->description = "xxxxxxx";
$PayClass->ordernum = "xxxxxxx";
$PayClass->nameCostumer = "xxxxxxx";
$PayClass->phoneCostumer = "xxxxxxx";
$PayClass->method =getWays::qi; // or "getWays::qi" or "getWays::zaincash" or "getWays::aps" or "getWays::amwal"
$response=$PayClass->Pay();//to procces Pay - response (transiction_id,url) status=>1 is succes or status=> 0 if have erorr and response=>xxxx
//array(transiction_id,url) url use for redirect to the payment getway examlpe: header('location: http://paygate.com')
//transiction_id to save in your database
$PayClass = new PayClass();
$PayClass->method=getWays::switch;
$PayClass->amount="90";
$PayClass->cardNumber="xxxxxxxxxxxxxxx";
$PayClass->cardHolder="xxxxxxxxxxxxxxx";
$PayClass->currency="IQD"; // or USD
$PayClass->Mounth="xxx";
$PayClass->Year="xxx";
$PayClass->Cvv="xxx";
$response=$PayClass->PaySwitch();//to procces Pay - response (transiction_id) and status=>1 success or status=>0 if have erorr
//transiction_id to save in your database
$orderId = "xxxxxxxxxxxxxxxxxxxx";
$transiction_id = "xxxxxxxxxxxxxxxxxxxx";
$PayClass = new PayClass();
$PayClass->method = getWays::aps;// or getWays::qi
$res = $PayClass->checkOrder($orderId,$transiction_id); // return -1 not supported or 'status'=> 1 succes or 'status'=> 2 error and response
$orderId = "xxxxxxxxxxxxxxxxxxxx";
$transiction_id = "xxxxxxxxxxxxxxxxxxxx";
$PayClass = new PayClass();
$PayClass->method = getWays::qi;
$res = $PayClass->QiVoidOrder($orderId,$transiction_id); // return -1 not supported or 'status'=> 1 succes or 'status'=> 2 error and response
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.