WL-IPG-Merchant Integration Kit - Standard - V1.2 - PHP
WL-IPG-Merchant Integration Kit - Standard - V1.2 - PHP
This documentation shall only be used for evaluating the planned services designated
herein, and may contain information that is privileged, confidential, Proprietary or
otherwise protected from disclosure. As a result, this document or content thereof shall
not be disclosed, used or duplicated, in whole or in part, for any purpose other than the
Scope of Work assigned by Worldline India Private Limited (“WL India”) to your company
(“Recipient”). Upon completion of service or termination of service, the Recipient shall
return all materials, including, without limiting the generality of the foregoing, all
originals, copies, reproductions and summaries of confidential information. Any
unauthorized use or disclosure by the directors, officers or employees of the Recipient
shall be deemed to be unauthorized use or disclosure by the Recipient and the Recipient
shall indemnify and hold harmless the WL India from and against any and all damages,
losses, costs and expenses incurred as a result of such breach.
WL India may seek injunctive relief restraining the unauthorized disclosure or use of
confidential information in addition to any other legal or equitable remedy otherwise
available.
Recipient is not authorized to share this document with any other entity without taking
written consent from WL India.
4 Certificate ............................................................................................................... 16
1.1 Purpose
This document details out the technical integration approach between WL PG and the
Merchants. It also describes the WL PG Client API functionalities that provide quick
integration solution for Merchants.
1.2 Prerequisites
Merchants should have the following pre-requites in place before integrating with WL PG.
2. Merchants should have a valid Merchant Encryption Key that is generated &
sent to Merchants on successful onboarding process.
1. Transaction API.
Once the Request Message is generated, Merchant can then redirect the
customer to WL PG along with the Request Message.
d. Transaction Currency
e. Payment Description
f. Transaction: Value can be either “S” or “P” as described in the table above.
g. Return URL
$reqMsgDTO->setOrderId("1000001");
$reqMsgDTO->setMid("AWL000000000001");
$reqMsgDTO->setTrnAmt(200); //Paisa Format
$reqMsgDTO->setTrnCurrency("INR");
$reqMsgDTO->setMeTransReqType("S");
$reqMsgDTO->setEnckey("4f5390bey3ef1ee3d4a7e77fd42238cb");
$reqMsgDTO->setResponseUrl(“http://merchant.com/meTrnPay.aspx”);
$reqMsgDTO->setTrnRemarks(“Mobile bill paid”);
//Optional Fields
$reqMsgDTO->setAddField1(“Info1”);
$reqMsgDTO->setAddField2(“Info 2”);
$reqMsgDTO->setAddField3(“”);
$reqMsgDTO->setAddField4(“”);
$reqMsgDTO->setAddField5(“”);
$reqMsgDTO->setAddField6(“”);
$reqMsgDTO->setAddField7(“”);
$reqMsgDTO->setAddField8(“”);
$merchantRequest = "";
$reqMsgDTO = $obj->generateTrnReqMsg($reqMsgDTO);
if ($reqMsgDTO->getStatusDesc() == "Success"){
$merchantRequest = $reqMsgDTO->getReqMsg();
}
?>
Sample Code:
Data Max
S.No Fields Description
Type Length
1. On receipt of Transaction Response from WL PG, Merchant shall call the API to parse
the Response Message and interpret the Status received in the Response.
<?php
include 'AWLMEAPI.php';
$responseMerchant = $_REQUEST['merchantResponse'];
if ($response->getStatusCode()=="S")
//Success
else
//Failed
?>
Request Parameters:
$orderId = “1000001”;
$mId =”AWL000000000001”
$enc_key=”4f5390bey3ef1ee3d4a7e77fd42238cb”;
$pgMeTrnRefNo=””;
//Step 2: Construct the request DTO with respective Parameter
Request Parameters:
Response Parameters:
Request Parameters:
Response Parameters :
The URL’s that needs to be called for each of the API call is defined/configured in a
configuration file named “ClientAPI.ini” available in the Kit. Below are the URL’s that needs
to be configured for each of the API calls:
Test Environment
API Property URL
Transaction Status API GET_TRANS_STATUS https://cgt.in.worldline.com/ipg/getTransactionStatus
Cancel Transaction
API CANCEL_TRANS_API https://cgt.in.worldline.com/ipg/doCancelRequest
Refund Transaction
API REFUND_TRANS_API https://cgt.in.worldline.com/ipg/doRefundRequest
Production Environment
API Property URL
Transaction Status API GET_TRANS_STATUS https://ipg.in.worldline.com/getTransactionStatus
Cancel Transaction
API CANCEL_TRANS_API https://ipg.in.worldline.com/doCancelRequest
Refund Transaction
API REFUND_TRANS_API https://ipg.in.worldline.com/doRefundRequest
Section 3.2:
Below is the URL that needs to be called when customer is redirected to WL PG Pay Page.
This needs to be defined in the action property while doing the form submission.
Production Environment
Form Action URL https://ipg.in.worldline.com/doMEPayRequest
4 Certificate
To ensure proper WL PG connectivity via PHP, required WL PG certificate needs to be included in the
KIT during Integration.
Certificates for Test & Production environment are currently available in the “Certificates” folder.
During Integration, based on the environment, it needs to be included in the Kit.
EntrustRootCertificationAuthority-G2.crt