This is JioMoney’s PHP based sample library for integration of redirection based Payment Gateway/ Wallet
• STEP1: Copy JioMoney Lib inside your project. • STEP2: Now add provided credentials (like MID,CID & SEED) into lib/config_jiomoney.php file or set during Runtime. • STEP3: To use JioMoney API include JioMoney.php and add use JioMoney\lib\JioMoney; • STEP4: Create object by new JioMoney() or JioMoney::setCredentials(ClientId,MerchnatId,seed,env); • STEP5: Now you can call specified functions with required parameters
require 'lib\JioMoney.php';
$call = new JioMoney(); OR $call = JioMoney::setCredentials($clientId,$merchnatId,$seed,$env);
$call->purchase(array('transaction.extref' => 'Purchase01',,'channel' => 'WEB','version' => '2.0','transaction.amount' => '1.00', 'subscriber.customerid'=>'CUST_01','subscriber.customername'=>'demo_name','subscriber.mobilenumber'=>'9812345678','returl'=>'http://return_URL'));
$response = $call->api(array('api_name'=> 'REFUND','timestamp' => date('YmdHis'),'tran_ref_no' => 'Refund01','txn_amount' => '1.00','org_jm_tran_ref_no'=>'Jiomoney_ref_no','org_txn_timestamp'=>'Jiomoney_timestamp','mode'=>'2','additional_info' => 'optional'));
$call->api(array('api_name'=> 'CHECKPAYMENTSTATUS','tranid'=>'Purchase1k2sai','mode'=>'2','timestamp' => date('YmdHis'), 'requestid'=>$requestId,'version'=>'3.0'));
// To generate uuid format request id $requestId = $call->gen_uuid();
$response = $call->api(array('api_name'=> 'GETTRANSACTIONDETAILS','tranid'=>'901033422981','mode'=>'2', 'requestid'=>$requestId));