forked from PromptPay/promptpay.github.io
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
252 lines (235 loc) · 11 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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:title" content="PromptPay QR Code Generator" />
<meta property="og:site_name" content="Promptpay.github.io" />
<meta property="og:url" content="https://promptpay.github.io/" />
<meta property="og:description"
content="แค่มีเบอร์มือถือ, รหัสประจำตัวประชาชน, TAX ID หรือ e-Wallet เพียงอย่างใดอย่างหนึ่งก็สามารถโอนเงินผ่านระบบพร้อมเพย์ได้แล้ว" />
<meta property="og:image" content="./img/meta-screen.png" />
<title>PromptPay QR Code Generator</title>
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/new-age.min.css">
<link rel="stylesheet" type="text/css" href="font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/custom.min.css">
</head>
<body id="page-top">
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
<div class="container">
<a class="navbar-brand js-scroll-trigger" href="#page-top">PromptPay QR Code Generator</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse"
data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false"
aria-label="Toggle navigation">
Menu
<i class="fa fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#generate">สร้าง QR Code รับเงิน</a>
</li>
</ul>
</div>
</div>
</nav>
<header class="masthead">
<div class="container">
<div class="row">
<div class="col-lg-12 my-auto content-header">
<div class="header-content mx-auto">
<h1 class="mb-3">การโอนเงินเป็นเรื่องง่าย ๆ</h1>
<p class="mb-5">แค่มีเบอร์มือถือ, รหัสประจำตัวประชาชน, TAX ID หรือ e-Wallet
เพียงอย่างใดอย่างหนึ่งก็สามารถโอนเงินผ่านระบบพร้อมเพย์ได้แล้ว</p>
<p class="mb-5">เว็บไซต์นี้เปิดให้ใช้งานได้ฟรี และที่สำคัญ <b>ไม่มีการเก็บข้อมูลใด ๆ ของคุณ</b></p>
<a href="#generate" class="btn btn-outline btn-xl js-scroll-trigger">สร้าง QR Code รับเงิน</a>
</div>
</div>
</div>
</div>
</header>
<section class="text-center" id="generate">
<div class="generate-section">
<div class="container generate-content">
<div class="row generate-form">
<div class="col-md-8 mx-auto" style="margin-top:90px;">
<form>
<div class="form-group">
<label>พร้อมเพย์ ไอดี</label>
<input type="number" inputmode="numeric" pattern="\d*" class="form-control" id="pp-id"
placeholder="เบอร์มือถือ, รหัสประจำตัวประชาชน, TAX ID, e-Wallet"
onKeyPress="if(this.value.length==15) return false;" required>
</div>
<div class="form-group error">
<label>จำนวนเงิน</label>
<input type="number" inputmode="decimal" step="0.01" class="form-control" id="amount" placeholder="1000.00 (Optional)">
</div>
<button type="button" class="btn btn-primary btn-lg" id="myBtn">สร้าง QR Code รับเงิน</button>
</form>
</div>
</div>
</div>
</div>
</section>
<footer>
<div class="container">
<p style="margin-bottom:20px; font-size: 15px;">Developed By</p>
<ul class="list-inline">
<li class="list-inline-item">
<div class="row">
<div class="col-md-4">
<img class="img-circle" src="./img/non.jpg">
</div>
<div class="col-md-8">
<p>Nontawat Numor</p>
<a href="https://www.facebook.com/MrNonz" target="_blank"><i
class="fa fa-facebook-square font-awasome-logo" aria-hidden="true"></i></a>
<a href="https://twitter.com/MrNonz" target="_blank"><i class="fa fa-twitter-square font-awasome-logo"
aria-hidden="true"></i></a>
<a href="https://www.instagram.com/mrnonx/" target="_blank"><i class="fa fa-instagram font-awasome-logo"
aria-hidden="true"></i></a>
<a href="https://github.com/mrnonz" target="_blank"><i class="fa fa-github-square font-awasome-logo"
aria-hidden="true"></i></a>
</div>
</div>
</li>
<li class="list-inline-item">
<div class="row">
<div class="col-md-4">
<img class="img-circle" src="./img/tum.jpg">
</div>
<div class="col-md-8">
<p>Sakan Komolvatin</p>
<a href="https://www.facebook.com/profile.php?id=100008378951555" target="_blank"><i
class="fa fa-facebook-square font-awasome-logo" aria-hidden="true"></i></a>
<a href="https://twitter.com/tu_tummm" target="_blank"><i class="fa fa-twitter-square font-awasome-logo"
aria-hidden="true"></i></a>
<a href="https://www.instagram.com/tu_tumm/" target="_blank"><i class="fa fa-instagram font-awasome-logo"
aria-hidden="true"></i></a>
<a href="https://github.com/tutumm" target="_blank"><i class="fa fa-github-square font-awasome-logo"
aria-hidden="true"></i></a>
</div>
</div>
</li>
<li class="list-inline-item">
<div class="row">
<div class="col-md-4">
<img class="img-circle" src="./img/ai.jpg">
</div>
<div class="col-md-8">
<p>Yanisa Hemprachitchai</p>
<a href="https://www.facebook.com/aiaiaiaiaiya" target="_blank"><i
class="fa fa-facebook-square font-awasome-logo" aria-hidden="true"></i></a>
<a href="https://twitter.com/aiaiaiaiaiya" target="_blank"><i
class="fa fa-twitter-square font-awasome-logo" aria-hidden="true"></i></a>
<a href="https://www.instagram.com/aiaiaiaiaiya/" target="_blank"><i
class="fa fa-instagram font-awasome-logo" aria-hidden="true"></i></a>
<a href="https://github.com/aiaiaiaiaiya" target="_blank"><i class="fa fa-github-square font-awasome-logo"
aria-hidden="true"></i></a>
</div>
</div>
</li>
</ul>
</div>
</footer>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">QR Code รับเงิน</h4>
</div>
<div class="modal-body" style="margin: auto;">
<img src="img/PromptPay-logo.jpg" alt="พร้อมเพย์" style="max-width: 250px;margin-bottom: 10px;">
<div id="qrcode" style="width:250px; height:250px;"></div>
<div id="pp-id-show" style="text-align: center; margin-top: 10px;"></div>
<div id="amount-show" style="text-align: center;"></div>
<div id="info-show" style="text-align: center; font-size: 70%; margin-top: 10px; color: #A6A6A6;">
สร้าง QR Code เองที่ pp.js.org
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default close-button" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="js/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="js/qrcode.min.js"></script>
<script type="text/javascript" src="js/promptpay.js"></script>
<script src="vendor/popper/popper.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<script src="js/new-age.min.js"></script>
<script type="text/javascript">
var qrcode = new QRCode(document.getElementById("qrcode"), {
width: 250,
height: 250,
correctLevel: QRCode.CorrectLevel.L
});
function makeCode() {
var ppID = document.getElementById("pp-id").value;
var amount = parseFloat(document.getElementById("amount").value);
if (!ppID) {
ppID = "promptpay.github.io";
}
qrcode.makeCode(generatePayload(ppID, amount));
$("#pp-id-show").html(ppID);
if (amount > 0.0) {
$("#amount-show").html(Number(amount.toFixed(2)).toLocaleString() + " บาท");
} else {
$("#amount-show").html("");
}
}
$(document).ready(function () {
$("#myBtn").click(function () {
var ppID = document.getElementById("pp-id").value;
var amount = parseFloat(document.getElementById("amount").value);
if (ppID == '') {
$('#pp-id').addClass('is-invalid')
} else {
$('#amount').removeClass('is-invalid')
$('#pp-id').removeClass('is-invalid')
makeCode();
$("#pp-id").
on("blur", function () {
makeCode();
}).
on("keydown", function (e) {
if (e.keyCode == 13) {
makeCode();
}
});
$("#amount").
on("blur", function () {
makeCode();
}).
on("keydown", function (e) {
if (e.keyCode == 13) {
makeCode();
}
});
$("#myModal").modal();
}
});
});
</script>
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-105771675-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>