forked from koriaf/demo-migs-endpoint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
228 lines (215 loc) · 11.9 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<title>Some MIGS Protocol Endpoint</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="header clearfix">
<h3 class="text-muted">Demo MIGS Endpoint</h3>
</div>
<div>
<form action='' method='get' id='id_action_form'>
<fieldset><legend>Income data</legend>
<div id='id_incoming_parameters'></div>
</fieldset>
<br/><br/>
<button class='btn btn-success btn-lg'>Imitate successful payment</button>
<br/><br/>
<div id='id_outgoing_parameters'>
<table class='table table-striped'>
<tr>
<th style='width: 30%'>Field</th>
<td>Value</td>
</tr>
<tr>
<th>vpc_3DSECI</th>
<td><input type='text' class='form-control' name='vpc_3DSECI' value='06' /></td>
</tr>
<tr>
<th>vpc_3DSXID</th>
<td><input type='text' class='form-control' name='vpc_3DSXID' value='xnXXXXXXXXXXXXXXXXXXX=' /></td>
</tr>
<tr>
<th>vpc_3DSenrolled</th>
<td><input type='text' class='form-control' name='vpc_3DSenrolled' value='Y' /></td>
</tr>
<tr>
<th>vpc_3DSstatus</th>
<td><input type='text' class='form-control' name='vpc_3DSstatus' value='A' /></td>
</tr>
<tr>
<th>vpc_AVSRequestCode</th>
<td><input type='text' class='form-control' name='vpc_AVSRequestCode' value='Z' /></td>
</tr>
<tr>
<th>vpc_AVSResultCode</th>
<td><input type='text' class='form-control' name='vpc_AVSResultCode' value='Unsupported' /></td>
</tr>
<tr>
<th>vpc_AcqAVSRespCode</th>
<td><input type='text' class='form-control' name='vpc_AcqAVSRespCode' value='Unsupported' /></td>
</tr>
<tr>
<th>vpc_AcqCSCRespCode</th>
<td><input type='text' class='form-control' name='vpc_AcqCSCRespCode' value='M' /></td>
</tr>
<tr>
<th>vpc_AcqResponseCode</th>
<td><input type='text' class='form-control' name='vpc_AcqResponseCode' value='00' /></td>
</tr>
<tr>
<th>vpc_Amount</th>
<td><input type='text' class='form-control' name='vpc_Amount' value='99990' /></td>
</tr>
<tr>
<th>vpc_AuthorizeId</th>
<td><input type='text' class='form-control' name='vpc_AuthorizeId' value='999991' /></td>
</tr>
<tr>
<th>vpc_BatchNo</th>
<td><input type='text' class='form-control' name='vpc_BatchNo' value='00000001' /></td>
</tr>
<tr>
<th>vpc_CSCResultCode</th>
<td><input type='text' class='form-control' name='vpc_CSCResultCode' value='M' /></td>
</tr>
<tr>
<th>vpc_Card</th>
<td><input type='text' class='form-control' name='vpc_Card' value='VC' /></td>
</tr>
<tr>
<th>vpc_Command</th>
<td><input type='text' class='form-control' name='vpc_Command' value='pay' /></td>
</tr>
<tr>
<th>vpc_Locale</th>
<td><input type='text' class='form-control' name='vpc_Locale' value='en' /></td>
</tr>
<tr>
<th>vpc_MerchTxnRef</th>
<td><input type='text' class='form-control' name='vpc_MerchTxnRef' value='' /></td>
</tr>
<tr>
<th>vpc_Merchant</th>
<td><input type='text' class='form-control' name='vpc_Merchant' value='' /></td>
</tr>
<tr>
<th>vpc_Message</th>
<td><input type='text' class='form-control' name='vpc_Message' value='Approved' /></td>
</tr>
<tr>
<th>vpc_OrderInfo</th>
<td><input type='text' class='form-control' name='vpc_OrderInfo' value='' /></td>
</tr>
<tr>
<th>vpc_ReceiptNo</th>
<td><input type='text' class='form-control' name='vpc_ReceiptNo' value='0' /></td>
</tr>
<tr>
<th>vpc_SecureHash</th>
<td><input type='text' class='form-control' name='vpc_SecureHash' value='disable check on your side or send PR to calculate it' /></td>
</tr>
<tr>
<th>vpc_TransactionNo</th>
<td><input type='text' class='form-control' name='vpc_TransactionNo' value='0' /></td>
</tr>
<tr>
<th>vpc_TxnResponseCode</th>
<td><input type='text' class='form-control' name='vpc_TxnResponseCode' value='0' /></td>
</tr>
<tr>
<th>vpc_VerSecurityLevel</th>
<td><input type='text' class='form-control' name='vpc_VerSecurityLevel' value='06' /></td>
</tr>
<tr>
<th>vpc_VerStatus</th>
<td><input type='text' class='form-control' name='vpc_VerStatus' value='M' /></td>
</tr>
<tr>
<th>vpc_VerToken</th>
<td><input type='text' class='form-control' name='vpc_VerToken' value='XXXXXXXXXXXXXXXX' /></td>
</tr>
<tr>
<th>vpc_VerType</th>
<td><input type='text' class='form-control' name='vpc_VerType' value='3DS' /></td>
</tr>
<tr>
<th>vpc_Version</th>
<td><input type='text' class='form-control' name='vpc_Version' value='1' /></td>
</tr>
</table>
</div>
</form>
</div>
<footer class="footer">
<p>This page has no relation with any bank or any existing finance organisation</p>
</footer>
</div> <!-- /container -->
<script src="//code.jquery.com/jquery-2.2.3.min.js"
integrity="sha256-a23g1Nt4dtEYOj7bR+vTu7+T8VP13humZFBJNIYoEJo="
crossorigin="anonymous"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script>
'use strict';
(function() {
function getURLParameters(url){
var result = {};
var searchIndex = url.indexOf("?");
if (searchIndex == -1 ) return result;
var sPageURL = url.substring(searchIndex +1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++)
{
var sParameterName = sURLVariables[i].split('=');
result[sParameterName[0]] = decodeURIComponent(sParameterName[1]);
}
return result;
}
$(document).ready(function() {
console.log('ready');
var GET = getURLParameters(location.href);
// GET['vpc_ReturnURL'] = decodeURIComponent(GET['vpc_ReturnURL']);
var parameters_income_container = $("#id_incoming_parameters");
for (var key in GET) {
parameters_income_container.html(
// sorry, but it's quick.
parameters_income_container.html() + "<b>" + key + ": </b> " + GET[key] + "<br/>"
)
};
$("#id_action_form").attr('action', GET['vpc_ReturnURL']);
$("input[name='vpc_Amount']").val(GET['vpc_Amount']);
$("input[name='vpc_MerchTxnRef']").val(GET['vpc_MerchTxnRef']);
$("input[name='vpc_OrderInfo']").val(GET['vpc_OrderInfo']);
$("input[name='vpc_Merchant']").val(GET['vpc_Merchant']);
$("input[name='vpc_TransactionNo']").val(
2000000000 + Math.floor(Math.random()*10000)
);
$("input[name='vpc_AuthorizeId']").val(
1000000 + Math.floor(Math.random()*10000)
);
$("input[name='vpc_BatchNo']").val(
1000000 + Math.floor(Math.random()*10000)
);
$("input[name='vpc_ReceiptNo']").val(
600000000000 + Math.floor(Math.random()*10000000)
);
})
})();
</script>
</body>
</html>