-
Notifications
You must be signed in to change notification settings - Fork 15
/
result.html
41 lines (36 loc) · 1.24 KB
/
result.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
<html>
<head>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<h1>Spreedly Express success</h1>
<p> Spreedly Express successfully added a payment token to the sample form. </p>
<p> The sample form was submitted successfully!!! </p>
<h3>Parameters Submitted From Master Form</h3>
<ul id="parameters">
</ul>
<br/>
<a href="/index.html">Back to basic example</a>
<br/><br/><br/>
<a href="/sample.html">View other example at sample.html</a>
</div>
<script>
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
var params = ['payment_method_token', 'full_name', 'month', 'year']
var ul = document.getElementById('parameters');
for(var i = 0; i < params.length; i++) {
li = document.createElement('li');
var param = params[i];
li.innerHTML = param + ': ' + getParameterByName(param);
ul.appendChild(li);
}
</script>
</body>
</html>