-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
367 lines (351 loc) · 9.91 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
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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
<!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.0" />
<link
href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css"
rel="stylesheet"
/>
<title>Paystack Test Tool</title>
</head>
<body>
<div class="w-8/12 mx-auto mt-10 flex justify-between">
<section class="w-8/12 pr-10">
<h2 class="text-3xl font-bold text-gray-700">Pay</h2>
<p id="message" class="block mt-5 text-gray-700"></p>
<p id="transactionReferenceText" class="block font-bold"></p>
<form
id="paymentForm"
class="bg-white shadow rounded px-8 pt-6 pb-8 mt-5 mb-4"
>
<!-- Select Project -->
<div class="mb-4">
<label
class="block text-gray-700 text-sm font-bold mb-2"
for="project"
>
Project
</label>
<div class="relative">
<select
class="
appearance-none
border
rounded
w-full
py-2
px-3
text-gray-700
leading-tight
focus:outline-none focus:shadow-outline
"
id="projectList"
onchange="updateProjectForm(this)"
>
<option value="">-- Select Project --</option>
</select>
<div
class="
pointer-events-none
absolute
inset-y-0
right-0
flex
items-center
px-2
text-gray-700
"
>
<svg
class="fill-current h-4 w-4"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
>
<path
d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"
/>
</svg>
</div>
</div>
</div>
<!-- Email Address -->
<div class="mb-4">
<label
class="block text-gray-700 text-sm font-bold mb-2"
for="email"
>
Email Address
</label>
<input
class="
appearance-none
border
rounded
w-full
py-2
px-3
text-gray-700
leading-tight
focus:outline-none focus:shadow-outline
"
id="email"
type="email"
placeholder="[email protected]"
/>
</div>
<!-- Amount -->
<div class="mb-4">
<label
class="block text-gray-700 text-sm font-bold mb-2"
for="amount"
>
Amount
</label>
<input
class="
appearance-none
border
rounded
w-full
py-2
px-3
text-gray-700
leading-tight
focus:outline-none focus:shadow-outline
"
id="amount"
type="text"
placeholder="5000"
/>
</div>
<!-- First Name -->
<div class="mb-4">
<label
class="block text-gray-700 text-sm font-bold mb-2"
for="firstname"
>
Firstname
</label>
<input
class="
appearance-none
border
rounded
w-full
py-2
px-3
text-gray-700
leading-tight
focus:outline-none focus:shadow-outline
"
id="firstname"
type="text"
placeholder="John"
/>
</div>
<!-- Last Name -->
<div class="mb-4">
<label
class="block text-gray-700 text-sm font-bold mb-2"
for="lastname"
>
Lastname
</label>
<input
class="
appearance-none
border
rounded
w-full
py-2
px-3
text-gray-700
leading-tight
focus:outline-none focus:shadow-outline
"
id="lastname"
type="text"
placeholder="Doe"
/>
</div>
<!-- Reference -->
<div class="mb-4">
<label
class="block text-gray-700 text-sm font-bold mb-2"
for="lastname"
>
Reference
</label>
<input
class="
appearance-none
border
rounded
w-full
py-2
px-3
text-gray-700
leading-tight
focus:outline-none focus:shadow-outline
"
id="reference"
type="text"
placeholder="T615026437606272"
/>
</div>
<!-- Pay Button -->
<div class="flex items-center justify-between">
<button
class="
bg-blue-500
hover:bg-blue-700
text-white
font-bold
py-2
px-4
rounded
focus:outline-none focus:shadow-outline
"
type="submit"
>
Pay
</button>
</div>
</form>
</section>
<!-- Project Config -->
<section class="w-3/12">
<h2 class="text-3xl font-bold text-gray-700">Project Config</h2>
<form id="addProjectForm" class="bg-white pt-6 pb-8 mt-5 mb-4">
<input type="hidden" id="projectId" />
<div class="mb-4">
<label
class="block text-gray-700 text-sm font-bold mb-2"
for="projectName"
>
Project Name <span class="text-red-400 text-base">*</span>
</label>
<input
class="
appearance-none
border
rounded
w-full
py-2
px-3
text-gray-700
leading-tight
focus:outline-none focus:shadow-outline
"
id="projectName"
type="text"
placeholder="Harmony"
/>
</div>
<div class="mb-4">
<label
class="block text-gray-700 text-sm font-bold mb-2"
for="paystackKey"
>
Paystack Key <span class="text-red-400 text-base">*</span>
</label>
<input
class="
appearance-none
border
rounded
w-full
py-2
px-3
text-gray-700
leading-tight
focus:outline-none focus:shadow-outline
"
id="paystackKey"
type="text"
placeholder="pk_test_********************"
/>
</div>
<hr />
<div class="mb-4">
<label
class="block text-gray-700 text-sm font-bold mb-2"
for="verifyEndpoint"
>
Verify Endpoint
</label>
<input
class="
appearance-none
border
rounded
w-full
py-2
px-3
text-gray-700
leading-tight
focus:outline-none focus:shadow-outline
"
id="verifyEndpoint"
type="text"
placeholder="http://localhost:8000/api/v1/payment/verify/${response.reference}"
/>
</div>
<div class="mb-4">
<label
class="block text-gray-700 text-sm font-bold mb-2"
for="authToken"
>
Auth Token
</label>
<input
class="
appearance-none
border
rounded
w-full
py-2
px-3
text-gray-700
leading-tight
focus:outline-none focus:shadow-outline
"
id="authToken"
type="text"
placeholder="ejadfjk248u8ua8jfnj24u8u4ianfd"
/>
</div>
<button
class="
bg-blue-500
hover:bg-blue-700
text-white
font-bold
py-2
px-4
rounded
focus:outline-none focus:shadow-outline
"
type="submit"
>
Save
</button>
</form>
</section>
</div>
<!-- Axios -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.21.0/axios.min.js"></script>
<!-- Paystack -->
<script src="https://js.paystack.co/v1/inline.js"></script>
<!-- UUID -->
<script
src="https://cdnjs.cloudflare.com/ajax/libs/uuid/8.3.2/uuidv4.min.js"
integrity="sha512-BCMqEPl2dokU3T/EFba7jrfL4FxgY6ryUh4rRC9feZw4yWUslZ3Uf/lPZ5/5UlEjn4prlQTRfIPYQkDrLCZJXA=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<script src="./main.js"></script>
</body>
</html>