UserDefined1 |
|
UserDefined2 |
|
UserDefined3
|
|
UserDefined4 |
|
UserDefined5 |
|
UserDefined6 |
|
UserDefined7
|
|
UserDefined8 |
|
UserDefined9 |
|
UserDefined10
|
|
IntegrationData
|
IntegrationData this PayG belongs to |
UserName
required
|
|
Source
required
|
Application Name and Version
|
IntegrationType |
// 0 default, 1 Seamless - CardNumber should be encrypted
|
HashData
|
|
PlatformId
|
Integrated Distributor ID - Platform
|
|
ShipmentData
|
|
RequestDateTime
|
MMDDYYYY
|
PayGAuthentication �
<MerchantAuthenticationKey>:<MerchantAuthenticationToken>:M:<MID>
{
"MID": "3EMF9915EF35567",
"UniqueRequestId": "TEST512scx3",
"UserDefinedData": {
"UserDefined1": ""
},
"ProductData": "{'PaymentReason':'OnlineOrder for OrderNo- 1234'}",
"RequestDateTime": "06232023",
"RedirectUrl": "https://payg.in",
"TransactionData": {
"AcceptedPaymentTypes": "",
"PaymentType": "",
"SurchargeType": "",
"SurchargeValue": "",
"RefTransactionId": "",
"IndustrySpecificationCode": "",
"PartialPaymentOption": ""
},
"OrderAmount": "3",
"OrderType": "",
"OrderAmountData": {
"AmountTypeDesc": "3",
"Amount": "2"
},
"CustomerData": {
"CustomerId": "123456",
"CustomerNotes": "Mens clothing",
"FirstName": "Ayush",
"LastName": "Rane",
"MobileNo": "7887673322",
"Email": "ayushtesting12@gmail.com",
"EmailReceipt": "true",
"BillingAddress": "76, Sch. 115",
"BillingCity": "Indore",
"BillingState": "MP",
"BillingCountry": "India",
"BillingZipCode": "452011",
"ShippingFirstName": "Ayush",
"ShippingLastName": "Rane",
"ShippingAddress": "76, Sch. 115",
"ShippingCity": "Indore",
"ShippingState": "MP",
"ShippingCountry": "India",
"ShippingZipCode": "452011",
"ShippingMobileNo": "9987887733"
},
"IntegrationData": {
"UserName": "Ayush",
"Source": "3213",
"IntegrationType": "",
"HashData": "",
"PlatformId": "1"
}
}
//basic authentication with base64encoded
$ch = \curl_init();
// set payment order url;
curl_setopt($ch, CURLOPT_URL, uatapi.payg.in/payment/api/order/create');
// set authentication header;
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
curl_setopt($ch, CURLOPT_POST, 1);
// set form data set
curl_setopt($ch, CURLOPT_POSTFIELDS, $arrDatajson);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$PayGresponseArr = json_decode($contents);
if(curl_errno($ch)){
throw new Exception(curl_error($ch));
}
return $PayGresponseArr;
curl_close($ch);
{
"OrderKeyId": "93281250227M10404UTEST512scx3",
"MerchantKeyId": 10121,
"UniqueRequestId": "TEST512scx3",
"OrderType": "PAYMENT",
"OrderAmount": 3,
"OrderId": null,
"OrderStatus": null,
"OrderPaymentStatus": 0,
"OrderPaymentStatusText": null,
"PaymentStatus": 0,
"PaymentTransactionId": null,
"PaymentResponseCode": 0,
"PaymentApprovalCode": null,
"PaymentReasonCode": null,
"PaymentTransactionRefNo": null,
"PaymentResponseText": null,
"PaymentMethod": null,
"PaymentAccount": null,
"OrderRefundTransactionId": 0,
"RefundPaymentResponseCode": 0,
"RefundPaymentResponseText": null,
"RefundDateTime": null,
"CardType": null,
"CardLevel": null,
"OrderNotes": null,
"PaymentDateTime": null,
"UpdatedDateTime": null,
"PaymentProcessUrl": "https://uat.payg.in/paymentv6/payment-form?OrderKeyId=93281250227M10404UTEST512scx3",
"CustomerData": {
"CustomerId": "123456",
"CustomerNotes": "Mens clothing",
"FirstName": "Ayush",
"LastName": "Rane",
"MobileNo": "7887673322",
"Email": "ayushtesting12@gmail.com",
"EmailReceipt": true,
"BillingAddress": "76, Sch. 115",
"BillingCity": "Indore",
"BillingState": "MP",
"BillingCountry": "India",
"BillingZipCode": "452011",
"ShippingFirstName": "Ayush",
"ShippingLastName": "Rane",
"ShippingAddress": "76, Sch. 115",
"ShippingCity": "Indore",
"ShippingState": "MP",
"ShippingCountry": "India",
"ShippingZipCode": "452011",
"ShippingMobileNo": "9987887733"
},
"ProductData": "{'PaymentReason':'OnlineOrder for OrderNo- 1234'}",
"OrderPaymentCustomerData": {
"FirstName": "Ayush",
"LastName": null,
"Address": null,
"City": null,
"State": null,
"ZipCode": null,
"Country": null,
"MobileNo": "7887673322",
"Email": "ayushtesting12@gmail.com",
"UserId": null,
"IpAddress": null
},
"UpiLink": null,
"OrderPaymentTransactionDetail": null,
"UserDefinedData": {
"UserDefined1": "",
"UserDefined2": null,
"UserDefined3": null,
"UserDefined4": null,
"UserDefined5": null,
"UserDefined6": null,
"UserDefined7": null,
"UserDefined8": null,
"UserDefined9": null,
"UserDefined10": null,
"UserDefined11": null,
"UserDefined12": null,
"UserDefined13": null,
"UserDefined14": null,
"UserDefined15": null,
"UserDefined16": null,
"UserDefined17": null,
"UserDefined18": null,
"UserDefined19": null,
"UserDefined20": null
},
"SplitPaymentResponse": null,
"Id": 93281
}
}
OrderKeyId |
Id generated based on the create order request |
MerchantKeyId |
Id which is obtained on MerchantRegistration |
MID |
Id which is obtained on MerchantRegistration |
UniqueRequestId |
Unique Id generated for that particular Request |
OrderType |
|
OrderAmount |
Transaction Amount |
OrderId |
|
OrderStatus |
Status of the order., eg:- 0,1,2,3,4,5,6,7 |
OrderPaymentStatus |
|
OrderPaymentStatusText |
created, completed-approved transaction,cancelled payment by user |
PaymentStatus |
Status of the order., eg:- 0,1,2,3,4,5,6,7 |
PaymentTransactionId |
Id generated for that transaction |
PaymentResponseCode |
Status of the order., eg:- 0,1,2,3,4,5,6,7 |
PaymentApprovalCode |
Unique number identifying the Approved transaction |
PaymentResponseText |
eg:- created, completed-approved transaction,cancelled payment by user |
PaymentMethod |
Identifies the type of the payment., eg:- Credit/debit/upi,etc |
PaymentAccount |
payment details |
OrderNotes |
|
PaymentDateTime |
|
UpdatedDateTime |
|
PaymentProcessUrl |
This url redirects to the payment page with order details |
OrderPaymentCustomerData |
|
UpiLink |
|
|