This post is just a guide/approach for the bill desk payment gateway integration.
IntroductionThe approach between the merchant (i.e.
User/Service Provider) website and BillDesk is described below:
BillDesk Payment Gateway Integration Approach
The merchant constructs a string separated
by [‘|’] pipe with some important input data. Let’s take an example of shopping cart with
- Order Number
- Transaction Amount
- Product Number
- Product Type
- Return Response URL
Message Details Format
Sample message with checksum
value generation details
The data is to be generated and arranged in a single line.
The checksum is an important part while some one receives
the message from BillDesk.
Once the User (site owner) gets the response from BillDesk,
a new checksum is generated at the user site to verify the received one. Any differences
in the checksum indicate that the messages has been modified or received
BillDesk provides a checksum component to the user (site
owner) to generate the checksum.
The Checksum component will require a message string and
common string, i.e. password shared by bill desk to generate checksum.
Let’s assume that the checksum is 5598765478
Sample transaction Message
to be sent to Bill Desk URL as parameter ‘msg’ through “POST” mechanism
The payment response is sent to
the Return URL which was specified dynamically by Merchant for each
This response is a browser response
and the message will be posted to the Merchant’s Return URL as a parameter – msg
Sample Response Message Details:
Sample Response Message from Bill Desk:
AuthStatus - Status
Reason - Proposed Transaction Status
0300 - Success - Successful Transaction
0399 - Invalid Authentication at Bank - Cancel Transaction
NA - Invalid Input in the Request Message - Cancel Transaction
0002 - Billdesk is waiting for Response from Bank - Cancel Transaction
0001 - Error at Billdesk - Cancel Transaction
You can store some of the key
information in the config file
<add key="MerchantId" value=" MYSITE "/>
<add key="CurrencyType" value="INR"/>
<add key="TypeField1" value="R"/>
<add key="SecurityId" value="mysite"/>
<add key="TypeField2" value="F"/>
<add key="AdditionlaInfo1" value="NA"/>
<add key="AdditionlaInfo2" value="NA"/>
<add key="ReturnUrl" value="http://www.mysite.com/ReturnFromBillDesk.aspx"/>
<add key="BillDeskUrl" value="https://www.billdesk.com/pgidsk/PaymentEntry.jsp"/>
<add key="CheckSumKey" value="9FGcERMK1GfF"/>
Read all the
config value and create the message string. Generate the checksum key and pass
the same along with message string created earlier through post method to bill
information from bill desk through response and extract the required
information. Store and display as per your requirement.
Conclusion I hope this helps!