0% found this document useful (0 votes)
121 views3 pages

Quick PHP Payment Integration Doc Ver 2.0

This document provides instructions for integrating a PHP payment request API from Aggrepay Payments Solutions. It includes a PHP integration kit file that can be used to submit payment requests. Developers need to include their API key and salt for authentication. The file describes required payment parameters to submit and return fields that are sent back on transaction completion. Common fields like order ID, amount, customer details need to be matched to validate the response.

Uploaded by

orbit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views3 pages

Quick PHP Payment Integration Doc Ver 2.0

This document provides instructions for integrating a PHP payment request API from Aggrepay Payments Solutions. It includes a PHP integration kit file that can be used to submit payment requests. Developers need to include their API key and salt for authentication. The file describes required payment parameters to submit and return fields that are sent back on transaction completion. Common fields like order ID, amount, customer details need to be matched to validate the response.

Uploaded by

orbit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

2019

Quick PHP Payment


Integration

AGGREPAY PAYMENTS SOLUTIONS PRIVATE LIMITED


PHP INTEGRATION KIT : README FILE
This kit is for integrating Aggrepaypayments Payment request API in your PHP application. This is
intended to developers how need quick PHP integration. For a more detailed documentation see
“Aggrepaypayments Api Integration Document v1.3” (Request Aggrepaypayments if you need
detailed api documentation).

Content
The Zip file contains one file “paymentrequest.php”.

Requirement
You will need following for your api integration to work.

1. API Access: You need to be enabled by Aggrepaypayments to use api integration.


2. API Key: You will need an api_key, this will be provided by Aggrepaypayments
3. Salt: This is like a password for you api access. This will be provided by Aggrepaypayments.

Usage
Follow the steps below:

1. Place the paymentrequest.php in suitable location on your server.


2. Edit this file and update your api_key and salt.
3. Now submit a post request to this file from your application. Below is list of fields that are
allowed to post.

Fields needed to post to paymentrequest.php:


Parameter Description Data type Mandatory
order_id This is your (merchant) reference number. It must be unique Unsigned Yes
for every transaction. We do perform a validation at our end Integer
and do not allow duplicate order_ids for the same merchant.
mode This is the payment mode (TEST or LIVE are valid values) Varchar(4) Optional
amount This is the payment amount. Decimal(15,2) Yes
currency This is the 3digit currency code (This value should be INR) Varchar(3) Yes
description Brief description of product or service that the customer is Varchar(500) Yes
being charged for.
name Name of customer. Varchar(100) Yes
email Customer email address. Varchar(100) Yes
phone Customer phone number Varchar(50) Yes
address_line_1 Customer address line 1 Varchar(100) Optional
address_line_2 Customer address line 2 Varchar(100) Optional
city Customer city Varchar(50) Yes
state Customer State Varchar(50) Optional
country Customer country (This value should be IND) Varchar(50) Yes
zip_code Customer zip code Varchar(20) Yes
return_url Return URL – Aggrepaypayments will make a POST request Varchar(300) Yes
to this URL after transaction is completed (success or failure),
with a set of parameters, which you can process as you want
to.
udf1 User defined field 1 Varchar(300) Optional
udf2 User defined field 2 Varchar(300) Optional
udf3 User defined field 3 Varchar(300) Optional
udf4 User defined field 4 Varchar(300) Optional
udf5 User defined field 5 Varchar(300) Optional

Fields returned to return_url after success or failure response.


Parameter name Description

transaction_id A unique ID that can be used to trace the transaction uniquely within Aggrepaypayments.
Transaction IDs are alphanumeric.
payment_method This tells the payment method used by customer – example: “credit card”, “debit card”,
“netbanking”, etc.
payment_datetime Date and Time of this payment in “YYYY-MM-DD HH:MM:SS” format *
response_code Status of the transaction (return code). 0 signifies successful transaction. Non-zero values
signify error.
response_message Can have a value of “success” or “failure”.
order_id The same order_id that was originally posted by the merchant in the request.
amount The same original amount that was sent by the merchant in the transaction request.
currency This is the 3digit currency code (INR), it will be same value that was originally sent by
merchant. *
description The same description that was originally sent by the merchant in the transaction request.

name The same value that was originally sent by merchant


email The same value that was originally sent by merchant
phone The same value that was originally sent by merchant
address_line_1 The same value that was originally sent by merchant
address_line_2 The same value that was originally sent by merchant
city The same value that was originally sent by merchant
state The same value that was originally sent by merchant
country The same value that was originally sent by merchant
zip_code The same value that was originally sent by merchant
udf1 The same value that was originally sent by merchant
udf2 The same value that was originally sent by merchant
udf3 The same value that was originally sent by merchant
udf4 The same value that was originally sent by merchant
udf5 The same value that was originally sent by merchant
hash Aggrepaypaments calculates the hash using the same algorithm which was outlined earlier.
Hence, the merchant needs to check whether this returned hash matches the hash that
was originally passed. This is to make sure the response is not modified and you are seeing
a legitimate response for current transaction. (If you need to know the hashing algorithm
look at function hashCalculate($salt, $input) in paymentrequest.php)
error_desc Failure reason (if transaction is failed)

You might also like