-
Notifications
You must be signed in to change notification settings - Fork 0
/
response.html
294 lines (208 loc) · 11 KB
/
response.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Nodejs - JavaScript - PAYU - Integration - Thank You</title>
</head>
<style type="text/css">
.main {
margin-left:30px;
font-family:Verdana, Geneva, sans-serif, serif;
}
.text {
float:left;
width:180px;
}
.dv {
margin-bottom:5px;
}
</style>
<body>
<div class="main">
<div>
<img src="/images/logo.png" />
</div>
<div>
<h3>Thank you Response</h3>
</div>
<!-- See below for all response parameters and their brief descriptions //-->
<div class="dv">
<span><%= jsonData %></span><br/><br/>
<span class="text"><label>Transaction/Order ID:</label></span>
<span><%= txnid %></span>
</div>
<div class="dv">
<span class="text"><label>Amount:</label></span>
<span><%= amount %></span>
</div>
<div class="dv">
<span class="text"><label>Additional Charges:</label></span>
<span><%= additionalcharges %></span>
</div>
<div class="dv">
<span class="text"><label>Product Info:</label></span>
<span><%= productinfo %></span>
</div>
<div class="dv">
<span class="text"><label>First Name:</label></span>
<span><%= firstname %></span>
</div>
<div class="dv">
<span class="text"><label>Email ID:</label></span>
<span><%= email %></span>
</div>
<div class="dv">
<span class="text"><label>Mihpayid:</label></span>
<span><%= mihpayid %></span>
</div>
<div class="dv">
<span class="text"><label>Hash:</label></span>
<span><%= resphash %></span>
</div>
<div class="dv">
<span class="text"><label>Transaction Status:</label></span>
<span><%= status %></span>
</div>
<div class="dv">
<span class="text"><label>Message:</label></span>
<span><%= msg %></span>
</div>
<br />
<br />
<div class="dv">
<span class="text"><label>Payment Verified:</label></span>
<span><%= verified %></span>
<br />
<br />
<div class="dv">
<span class="text"><a href="https://payu-nodejs-demo.herokuapp.com" alt="New Order">New Order</a></span>
</div>
<!-- Response Parameters
For more details please refer PDF...
1
mihpayid
It is a unique reference number created for each transaction at PayU’s end. For every new transaction request that hits PayU’s server (coming from any of our merchants), a unique reference ID is created and it is known as <strong>mihpayid (or PayU ID)
2
mode
This parameter describes the payment category by which the transaction was completed/attempted by the customer. The values are mentioned below:</p>
3
status
This parameter gives the status of the transaction. Hence, the value of this parameter depends on whether the transaction was successful or not. You must map the order status using this parameter only. The values are as below:
If the transaction is successful, the value of ‘status’ parameter would be ‘success’.
The value of ‘status’ as ‘failure’ or ‘pending’ must be treated as a failed transaction only.
4
key
This parameter would contain the merchant key for the merchant’s account at PayU. It would be the same as the key used while the transaction request is being posted from merchant’s end to PayU.
5
txnid
This parameter would contain the transaction ID value posted by the merchant during the transaction request.
6
amount
This parameter would contain the original amount which was sent in the transaction request by the merchant.
7
discount
This parameter would contain the discount given to user - based on the type of offer applied by the merchant.
8
offer
This parameter would contain the offer key which was sent in the transaction request by the merchant.
9
productinfo
This parameter would contain the same value of productinfo which was sent in the transaction request from merchant’s end to PayU
10
firstname
This parameter would contain the same value of firstname which was sent in the transaction request from merchant’s end to PayU
11
lastname
This parameter would contain the same value of lastname which was sent in the transaction request from merchant’s end to PayU
12
address1
This parameter would contain the same value of address1 which was sent in the transaction request from merchant’s end to PayU
13
address2
This parameter would contain the same value of address2 which was sent in the transaction request from merchant’s end to PayU
14
city
This parameter would contain the same value of city which was sent in the transaction request from merchant’s end to PayU
15
state
This parameter would contain the same value of state which was sent in the transaction request from merchant’s end to PayU
16
country
This parameter would contain the same value of country which was sent in the transaction request from merchant’s end to PayU
17
zipcode
This parameter would contain the same value of zipcode which was sent in the transaction request from merchant’s end to PayU
18
email
This parameter would contain the same value of email which was sent in the transaction request from merchant’s end to PayU
19
phone
This parameter would contain the same value of phone which was sent in the transaction request from merchant’s end to PayU
20
udf1
This parameter would contain the same value of udf1 which was sent in the transaction request from merchant’s end to PayU
21
udf2
This parameter would contain the same value of udf2 which was sent in the transaction request from merchant’s end to PayU
22
udf3
This parameter would contain the same value of udf3 which was sent in the transaction request from merchant’s end to PayU
23
udf4
This parameter would contain the same value of udf4 which was sent in the transaction request from merchant’s end to PayU
24
udf5
This parameter would contain the same value of udf5 which was sent in the transaction request from merchant’s end to PayU
25
hash
This parameter is absolutely crucial and is similar to the hash parameter used in the transaction request send by the merchant to PayU. PayU calculates the hash using a string of other parameters and returns to the merchant. The merchant must verify the hash and then only mark a transaction as success/failure. This is to make sure that the transaction hasn’t been tampered with. The calculation is as below:
sha512(SALT|status||||||udf5|udf4|udf3|udf2|udf1|email|firstname|productinfo|amount|txnid|key)
The handling of udf1 – udf5 parameters remains similar to the hash calculation when the merchant sends it in the transaction request to PayU. If any of the udf (udf1-udf5) was posted in the transaction request, it must be taken in hash calculation also.
If none of the udf parameters were posted in the transaction request, they should be left empty in the hash calculation too.
26
error
For the failed transactions, this parameter provides the reason of failure. Please note that the reason of failure depends upon the error codes provided by different banks and hence the detailing of error reason may differ from one transaction to another. The merchant can use this parameter to retrieve the reason of failure for a particular transaction.
27
bankcode
This parameter would contain the code indicating the payment option used for the transaction. For example, in Debit Card mode, there are different options like Visa Debit Card, Mastercard, Maestro etc. For each option, a unique bankcode exists. It would be returned in this bankcode parameter. For example, Visa Debit Card – VISA, Master Debit Card – MAST.
28
PG_TYPE
This parameter gives information on the payment gateway used for the transaction. For example, if SBI PG was used, it would contain the value SBIPG. If SBI Netbanking was used for the transaction, the value of PG_TYPE would be SBINB. Similarly, it would have a unique value for all different type of payment gateways.
29
bank_ref_num
For each successful transaction – this parameter would contain the bank reference number generated by the bank.
30
shipping_firstname
This parameter would contain the same value of shipping_firstname which was sent in the transaction request from merchant’s end to PayU
31
shipping_lastname
This parameter would contain the same value of shipping_lastname which was sent in the transaction request from merchant’s end to PayU
32
shipping_address1
This parameter would contain the same value of shipping_address1 which was sent in the transaction request from merchant’s end to PayU
33
shipping_address2
This parameter would contain the same value of shipping_address2 which was sent in the transaction request from merchant’s end to PayU
34
shipping_city
This parameter would contain the same value of shipping_city which was sent in the transaction request from merchant’s end to PayU
35
shipping_state
This parameter would contain the same value of shipping_state which was sent in the transaction request from merchant’s end to PayU
36
shipping_country
This parameter would contain the same value of shipping_country which was sent in the transaction request from merchant’s end to PayU
37
shipping_zipcode
This parameter would contain the same value of shipping_zipcode which was sent in the transaction request from merchant’s end to PayU
38
shipping_phone
This parameter would contain the same value of shipping_phone which was sent in the transaction request from merchant’s end to PayU
39
unmappedstatus
This parameter contains the status of a transaction as per the internal database of PayU. PayU’s system has several intermediate status which are used for tracking various activities internal to the system. Hence, this status contains intermediate states of a transaction also - and hence is known as unmappedstatus.
For example: dropped/bounced/captured/auth/failed/usercancelled/pending
//-->
</div>
</body>
</html>