-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
2123 lines (1866 loc) · 78.3 KB
/
index.php
File metadata and controls
2123 lines (1866 loc) · 78.3 KB
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
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"/>
<!-- Primary Meta Tags -->
<title>Checkout - Amwal Store | Secure and Flexible Bank Installments Payments</title>
<meta name="title" content="Checkout - Amwal Store | Secure and Flexible Bank Installments Payments"/>
<meta name="description" content="Complete your purchase securely with Amwal's advanced checkout system. Bank installments available with 0 fees. Fast, secure, throw 0% Sharia compliant 12 months installments."/>
<meta name="keywords" content="amwal, checkout, payment gateway, bank installments, secure payment, saudi arabia, fintech, e-commerce"/>
<meta name="author" content="Amwal"/>
<!-- Favicon -->
<link rel="icon" type="image/x-icon" href="https://cdn.prod.website-files.com/62294ce746440b7bc08b4fc5/63233e5f7a6ac8f35140a0f0_Vector.png"/>
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.prod.website-files.com/62294ce746440b7bc08b4fc5/63233e5f7a6ac8f35140a0f0_Vector.png"/>
<link rel="icon" type="image/png" sizes="32x32" href="https://cdn.prod.website-files.com/62294ce746440b7bc08b4fc5/63233e5f7a6ac8f35140a0f0_Vector.png"/>
<link rel="icon" type="image/png" sizes="16x16" href="https://cdn.prod.website-files.com/62294ce746440b7bc08b4fc5/63233e5f7a6ac8f35140a0f0_Vector.png"/>
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website"/>
<meta property="og:title" content="Checkout - Amwal Store | Secure and Flexible Bank Installments Payments"/>
<meta property="og:description" content="Complete your purchase securely with Amwal's advanced checkout system. Bank installments available with 0 fees, throw 0% Sharia compliant 12 months installments."/>
<meta property="og:image" content="https://cdn.prod.website-files.com/62294ce746440b7bc08b4fc5/63233e5f7a6ac8f35140a0f0_Vector.png"/>
<meta property="og:url" content="https://example.amwal.tech"/>
<meta property="og:site_name" content="Amwal Store"/>
<meta property="og:locale" content="en_US"/>
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:title" content="Checkout - Amwal Store | Secure and Flexible Bank Installments Payments"/>
<meta name="twitter:description" content="Complete your purchase securely with Amwal's advanced checkout system. Bank installments available with 0 fees, throw 0% Sharia compliant 12 months installments."/>
<meta name="twitter:image" content="https://media.licdn.com/dms/image/v2/D4D3DAQEmJdGRqNTsiQ/image-scale_191_1128/B4DZU3QO_xG8Ao-/0/1740388758185/amwal_tech_cover?e=1762182000&v=beta&t=v-LcAzFmkfNwzY_ngv4xaxP5G0DtGZhIXsIW9Mx9nsg"/>
<meta name="twitter:site" content="@amwal_tech"/>
<meta name="twitter:creator" content="@amwal_tech"/>
<!-- Additional Meta Tags -->
<meta name="theme-color" content="#2563eb"/>
<meta name="msapplication-TileColor" content="#2563eb"/>
<meta name="msapplication-TileImage" content="https://media.licdn.com/dms/image/v2/D4D3DAQEmJdGRqNTsiQ/image-scale_191_1128/B4DZU3QO_xG8Ao-/0/1740388758185/amwal_tech_cover?e=1762182000&v=beta&t=v-LcAzFmkfNwzY_ngv4xaxP5G0DtGZhIXsIW9Mx9nsg"/>
<!-- Preconnect to external domains for performance -->
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin/>
<link rel="preconnect" href="https://cdn.prod.website-files.com" crossorigin/>
<!-- Scripts -->
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/amwal-checkout-button@latest/dist/checkout/checkout.esm.js"></script>
<!-- Structured Data for E-commerce -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebPage",
"name": "Checkout - Amwal Store",
"description": "Complete your purchase securely with Amwal's advanced checkout system. Bank installments available with 0 fees, throw 0% Sharia compliant 12 months installments",
"url": "https://example.amwal.tech",
"mainEntity": {
"@type": "Organization",
"name": "Amwal",
"url": "https://www.amwal.tech",
"logo": "https://cdn.prod.website-files.com/62294ce746440b7bc08b4fc5/63233e5f7a6ac8f35140a0f0_Vector.png",
"sameAs": [
"https://github.com/amwal-tech"
]
}
}
</script>
<style type="text/tailwindcss">
@layer base {
body {
@apply bg-white;
}
}
@layer components {
.input-field {
@apply w-full px-3 py-3 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all text-base;
}
.input-field:focus {
@apply outline-none;
}
.btn-primary {
@apply bg-blue-600 hover:bg-blue-700 text-white font-medium px-6 py-4 rounded-md transition-all w-full text-base;
}
.section-header {
@apply flex items-center justify-between mb-4 pb-3 border-b border-gray-200;
}
.breadcrumb {
@apply flex items-center gap-2 text-sm flex-wrap;
}
.breadcrumb-item {
@apply text-blue-600 hover:text-blue-700;
}
.breadcrumb-separator {
@apply text-gray-400;
}
.payment-method {
@apply border border-gray-300 rounded-md p-4 cursor-pointer transition-all hover:border-gray-400;
}
.payment-method.selected {
@apply border-blue-600 bg-blue-50;
}
.order-summary-item {
@apply flex gap-4 pb-4 border-b border-gray-200;
}
.header-nav {
@apply bg-white border-b border-gray-200 sticky top-0 z-40;
}
.nav-link {
@apply text-gray-600 hover:text-gray-900 px-3 py-2 rounded-md text-sm font-medium transition-colors;
}
.nav-link.active {
@apply text-blue-600 bg-blue-50;
}
.nav-button {
@apply bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md text-sm font-medium transition-colors;
}
.nav-button-outline {
@apply border border-gray-300 hover:border-gray-400 text-gray-700 hover:text-gray-900 px-4 py-2 rounded-md text-sm font-medium transition-colors;
}
.env-badge {
@apply inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium;
}
.env-badge.sandbox {
@apply bg-yellow-100 text-yellow-800;
}
.env-badge.production {
@apply bg-green-100 text-green-800;
}
.env-badge.custom {
@apply bg-purple-100 text-purple-800;
}
.env-toolbar {
@apply fixed bottom-6 right-6 z-50 bg-white rounded-lg shadow-2xl border border-gray-300;
max-width: 400px;
transition: all 0.3s ease;
}
.env-toolbar.collapsed {
width: auto;
}
.env-toolbar.expanded {
width: 400px;
}
.env-toolbar-header {
@apply px-4 py-3 bg-gradient-to-r from-blue-600 to-blue-700 rounded-t-lg flex items-center justify-between cursor-pointer;
}
.env-toolbar-content {
@apply p-4 max-h-96 overflow-y-auto;
}
.env-form-group {
@apply mb-4;
}
.env-label {
@apply block text-sm font-medium text-gray-700 mb-1;
}
.env-input {
@apply w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500;
}
.env-select {
@apply w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white;
}
.env-btn {
@apply px-4 py-2 rounded-md text-sm font-medium transition-colors;
}
.env-btn-primary {
@apply bg-blue-600 hover:bg-blue-700 text-white;
}
.env-btn-secondary {
@apply bg-gray-200 hover:bg-gray-300 text-gray-700;
}
.env-toggle-btn {
@apply fixed bottom-6 right-6 z-40 bg-blue-600 hover:bg-blue-700 text-white rounded-full shadow-lg transition-all;
width: 56px;
height: 56px;
display: flex;
align-items: center;
justify-content: center;
}
.env-toggle-btn.toolbar-open {
@apply opacity-0 pointer-events-none;
}
@media (max-width: 640px) {
.env-toolbar {
@apply bottom-0 right-0 left-0 rounded-t-lg rounded-b-none;
max-width: 100%;
}
.env-toolbar.expanded {
width: 100%;
}
.env-toggle-btn {
@apply bottom-4 right-4;
width: 48px;
height: 48px;
}
.env-toolbar-content {
max-height: 60vh;
}
}
}
.loading-overlay {
@apply fixed inset-0 bg-white/90 backdrop-blur-sm flex items-center justify-center z-50;
display: none;
}
.spinner {
@apply w-10 h-10 border-3 border-gray-300 border-t-blue-600 rounded-full;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.toast {
@apply fixed top-5 right-5 p-4 rounded-md shadow-lg z-50 flex items-center gap-3;
max-width: calc(100vw - 40px);
transform: translateX(400px);
transition: transform 0.3s ease;
}
@media (max-width: 640px) {
.toast {
@apply top-auto bottom-5 left-5 right-5 max-w-none;
transform: translateY(200px);
}
.toast.visible {
transform: translateY(0);
}
}
.toast.visible {
transform: translateX(0);
}
.toast.success {
@apply bg-green-600 text-white;
}
.toast.error {
@apply bg-red-600 text-white;
}
@media (max-width: 1024px) {
.order-summary-sidebar {
@apply border-b border-gray-200 bg-gray-50;
}
}
@media (max-width: 768px) {
/* Stack payment methods vertically on mobile */
.payment-method {
@apply mb-3;
}
/* Ensure buttons are full width on mobile */
.btn-primary,
.nav-button,
.nav-button-outline {
@apply w-full;
}
/* Better spacing on mobile */
.input-field {
@apply text-base; /* Prevent zoom on iOS */
}
/* Touch-friendly targets */
.payment-method {
@apply py-4;
}
}
@media (max-width: 640px) {
/* Smaller padding on mobile */
.max-w-2xl,
.max-w-xl {
@apply px-4;
}
/* Stack discount code input and button */
.discount-container {
@apply flex-col;
}
.discount-container button {
@apply w-full;
}
}
.express-checkout {
@apply border border-gray-300 rounded-md p-4 hover:bg-gray-50 transition-all cursor-pointer text-center font-medium;
min-height: 48px; /* Ensure touch-friendly height */
}
.badge-quantity {
@apply absolute -top-2 -right-2 bg-gray-500 text-white text-xs rounded-full w-5 h-5 flex items-center justify-center font-semibold;
}
/* Prevent iOS zoom on input focus */
@supports (-webkit-touch-callout: none) {
input,
select,
textarea {
font-size: 16px !important;
}
}
/* Better mobile scrolling */
@media (max-width: 768px) {
html {
-webkit-text-size-adjust: 100%;
}
body {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
/* Ensure payment buttons are touch-friendly */
.payment-method {
min-height: 60px;
}
/* Make radio buttons larger on mobile */
input[type="radio"] {
width: 20px;
height: 20px;
}
.desktop-menu {
display: none;
}
}
</style>
</head>
<body>
<!-- Header Navigation -->
<header class="header-nav">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<!-- Logo -->
<div class="flex items-center gap-3">
<a href="#" class="flex items-center">
<img src="https://cdn.prod.website-files.com/62294ce746440b7bc08b4fc5/624352eb48193d537d329386_1-2-p-500.png"
alt="Amwal Store" class="h-8">
</a>
<!-- Environment Badge -->
<span id="env-badge" class="env-badge sandbox hidden md:inline-flex">
<svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path>
</svg>
<span id="env-text">Sandbox</span>
</span>
</div>
<!-- Navigation Links -->
<nav class="md:flex items-center space-x-8 desktop-menu">
<a href="https://www.amwal.tech" class="nav-link flex items-center gap-2" target="_blank">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-4m4 0h-4m4 0H8m4 0H8"></path>
</svg>
Product
</a>
<a href="https://docs.amwal.tech" class="nav-link flex items-center gap-2" target="_blank"
rel="noopener noreferrer">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
</svg>
Docs
</a>
<a href="https://github.com/amwal-tech" class="nav-link flex items-center gap-2" target="_blank"
rel="noopener noreferrer">
<svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
</svg>
GitHub
</a>
</nav>
<!-- Auth Buttons -->
<div class="flex items-center space-x-4 desktop-menu">
<a class="nav-button flex items-center gap-2" href="https://merchant.sa.amwal.tech" target="_blank" rel="noopener noreferrer">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"></path>
</svg>
Login
</a>
</div>
<!-- Mobile menu button -->
<div class="md:hidden">
<button id="mobile-menu-button" class="nav-link p-2">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M4 6h16M4 12h16M4 18h16"></path>
</svg>
</button>
</div>
</div>
<!-- Mobile Navigation Menu -->
<div id="mobile-menu" class="md:hidden hidden border-t border-gray-200 py-4">
<div class="space-y-2">
<div class="pb-2 border-b border-gray-200">
<span id="env-badge-mobile" class="env-badge sandbox inline-flex">
<svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path>
</svg>
<span id="env-text-mobile">Sandbox Mode</span>
</span>
</div>
<a href="https://www.amwal.tech" class="nav-link flex items-center gap-2" target="_blank">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-4m4 0h-4m4 0H8m4 0H8"></path>
</svg>
Product
</a>
<a href="https://docs.amwal.tech" class="nav-link flex items-center gap-2" target="_blank"
rel="noopener noreferrer">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
</svg>
Docs
</a>
<a href="https://github.com/amwal-tech" class="nav-link flex items-center gap-2" target="_blank"
rel="noopener noreferrer">
<svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
</svg>
GitHub
</a>
<div class="pt-4 border-t border-gray-200 space-y-2">
<a class="nav-button w-full flex items-center justify-center gap-2" href="https://merchant.sa.amwal.tech" target="_blank" rel="noopener noreferrer">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"></path>
</svg>
Login
</a>
</div>
</div>
</div>
</div>
</header>
<!-- Loading Overlay -->
<div id="loading-overlay" class="loading-overlay">
<div class="spinner"></div>
</div>
<!-- Toast Container -->
<div id="toast" class="toast"></div>
<div class="min-h-screen lg:grid lg:grid-cols-2">
<!-- Left Column - Checkout Form -->
<div class="lg:border-r border-gray-200">
<div class="max-w-2xl mx-auto px-6 sm:px-8 lg:px-12 py-6 lg:py-10">
<!-- Logo & Breadcrumb -->
<div class="mb-8">
<nav class="breadcrumb">
<a href="#" class="breadcrumb-item">Cart</a>
<span class="breadcrumb-separator">›</span>
<span class="text-gray-900 font-medium">Information</span>
<span class="breadcrumb-separator">›</span>
<span class="text-gray-400">Shipping</span>
<span class="breadcrumb-separator">›</span>
<span class="text-gray-400">Payment</span>
</nav>
</div>
<!-- Express Checkout -->
<div class="mb-8">
<div class="text-sm text-gray-600 mb-4 text-center flex flex-col sm:flex-row items-center justify-center gap-2">
<span>Bank Installment with Amwal</span>
<span class="bg-green-100 text-green-700 text-xs px-2 py-0.5 rounded-full font-medium">0 fees</span>
</div>
<div class="space-y-3">
<amwal-checkout-button
id="express-checkout-btn"
amount="931.50"
country-code="SA"
locale="en"
label="Pay with Amwal"
address-required="false"
class="w-full">
</amwal-checkout-button>
</div>
<div class="relative my-6">
<div class="absolute inset-0 flex items-center">
<div class="w-full border-t border-gray-200"></div>
</div>
<div class="relative flex justify-center text-sm">
<span class="px-4 bg-white text-gray-500">OR</span>
</div>
</div>
</div>
<!-- Contact Information -->
<div class="mb-8">
<h2 class="text-lg font-semibold text-gray-900 mb-4">Contact</h2>
<div class="space-y-4">
<div>
<input
type="email"
id="customer-email"
class="input-field"
value="ahmed.almansour@example.com"
placeholder="Email"
/>
</div>
<label class="flex items-start gap-2 text-sm text-gray-700">
<input type="checkbox" checked
class="mt-0.5 rounded border-gray-300 text-blue-600 focus:ring-blue-500">
<span>Email me with news and offers</span>
</label>
</div>
</div>
<!-- Shipping Address -->
<div class="mb-8">
<h2 class="text-lg font-semibold text-gray-900 mb-4">Shipping address</h2>
<div class="space-y-4">
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
<div>
<input
type="text"
id="customer-first-name"
class="input-field"
value="Ahmed"
placeholder="First name"
/>
</div>
<div>
<input
type="text"
id="customer-last-name"
class="input-field"
value="Al-Mansour"
placeholder="Last name"
/>
</div>
</div>
<div>
<input
type="text"
id="address-street1"
class="input-field"
value="123 King Fahd Road"
placeholder="Address"
/>
</div>
<div>
<input
type="text"
id="address-street2"
class="input-field"
value="Apartment 4B"
placeholder="Apartment, suite, etc. (optional)"
/>
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
<div>
<input
type="text"
id="address-city"
class="input-field"
value="Riyadh"
placeholder="City"
/>
</div>
<div>
<input
type="text"
id="address-state"
class="input-field"
value="Riyadh"
placeholder="State"
/>
</div>
<div class="sm:col-span-2 md:col-span-1">
<input
type="text"
id="address-postcode"
class="input-field"
value="12345"
placeholder="Postal code"
/>
</div>
</div>
<div>
<select id="address-country" class="input-field">
<option value="SA">Saudi Arabia</option>
<option value="AE">United Arab Emirates</option>
<option value="KW">Kuwait</option>
</select>
</div>
<div>
<input
type="tel"
id="customer-phone"
class="input-field"
value="+966501234567"
placeholder="Phone"
/>
</div>
<label class="flex items-start gap-2 text-sm text-gray-700">
<input type="checkbox" class="mt-0.5 rounded border-gray-300 text-blue-600 focus:ring-blue-500">
<span>Save this information for next time</span>
</label>
</div>
</div>
<!-- Shipping Method -->
<div class="mb-8">
<h2 class="text-lg font-semibold text-gray-900 mb-4">Shipping method</h2>
<div class="border border-gray-300 rounded-md p-4 flex justify-between items-center bg-blue-50">
<div class="flex items-center gap-3">
<input type="radio" checked class="w-4 h-4 text-blue-600">
<span class="text-gray-900 font-medium">Standard Shipping</span>
</div>
<span class="text-gray-900 font-medium">Free</span>
</div>
</div>
<!-- Payment Method - Simple Toggle -->
<div class="mb-8">
<h2 class="text-lg font-semibold text-gray-900 mb-4">Payment</h2>
<div class="text-xs text-gray-500 mb-3">All transactions are secure and encrypted.</div>
<div class="space-y-0 border border-gray-300 rounded-md overflow-hidden">
<!-- Bank Installments -->
<div class="border-b border-gray-300">
<label class="block p-4 cursor-pointer hover:bg-gray-50 transition-colors">
<div class="flex items-center justify-between">
<div class="flex items-center gap-3">
<input type="radio" name="payment" value="installment" checked
class="w-4 h-4 text-blue-600 focus:ring-blue-500">
<span class="text-gray-900 font-medium">Bank Installments</span>
</div>
<span class="text-xs bg-green-100 text-green-700 px-2 py-1 rounded-full font-medium">Most Popular</span>
</div>
</label>
<div id="details-installment" class="bg-gray-50 px-4 py-3 border-t border-gray-200">
<div class="text-sm text-gray-700">
<amwal-checkout-button
id="installment-checkout-btn"
amount="931.50"
country-code="SA"
locale="en"
label="Bank Installment"
only-show-bank-installment="true"
address-required="false"
class="w-full">
</amwal-checkout-button>
</div>
</div>
</div>
<!-- Quick Checkout -->
<div class="border-b border-gray-300">
<label class="block p-4 cursor-pointer hover:bg-gray-50 transition-colors">
<div class="flex items-center gap-3">
<input type="radio" name="payment" value="quick"
class="w-4 h-4 text-blue-600 focus:ring-blue-500">
<span class="text-gray-900 font-medium">Quick Checkout</span>
</div>
</label>
<div id="details-quick" class="bg-gray-50 px-4 py-3 border-t border-gray-200 hidden">
<div class="text-sm text-gray-700">
<amwal-checkout-button
id="quick-checkout-btn"
amount="931.50"
country-code="SA"
locale="en"
label="Pay Now"
address-required="true"
class="w-full">
</amwal-checkout-button>
</div>
</div>
</div>
<!-- Apple Pay -->
<div class="border-b border-gray-300">
<label class="block p-4 cursor-pointer hover:bg-gray-50 transition-colors">
<div class="flex items-center gap-3">
<input type="radio" name="payment" value="apple"
class="w-4 h-4 text-blue-600 focus:ring-blue-500">
<span class="text-gray-900 font-medium">Apple Pay</span>
</div>
</label>
<div id="details-apple" class="bg-gray-50 px-4 py-3 border-t border-gray-200 hidden">
<div class="text-sm text-gray-700">
<amwal-checkout-button
id="apple-checkout-btn"
amount="931.50"
country-code="SA"
locale="en"
label="Pay with Apple Pay"
address-required="false"
enable-apple-checkout="true"
class="w-full">
</amwal-checkout-button>
</div>
</div>
</div>
<!-- Credit Card -->
<div>
<label class="block p-4 cursor-pointer hover:bg-gray-50 transition-colors">
<div class="flex items-center gap-3">
<input type="radio" name="payment" value="credit"
class="w-4 h-4 text-blue-600 focus:ring-blue-500">
<span class="text-gray-900 font-medium">Credit Card</span>
</div>
</label>
<div id="details-credit" class="bg-gray-50 px-4 py-3 border-t border-gray-200 hidden">
<div class="p-2 bg-blue-50 rounded text-xs text-blue-700 flex items-start gap-2 mb-3">
<svg class="w-4 h-4 flex-shrink-0 mt-0.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path>
</svg>
<span><strong>Tip:</strong> Use Amwal above for instant checkout with no manual entry</span>
</div>
<div class="text-sm text-gray-700">
<div class="space-y-3">
<div>
<label class="block text-xs font-medium text-gray-700 mb-1">Card Number</label>
<input type="text" placeholder="Enter 16-digit card number manually" class="input-field text-sm">
</div>
<div class="grid grid-cols-2 gap-3">
<div>
<label class="block text-xs font-medium text-gray-700 mb-1">Expiry</label>
<input type="text" placeholder="MM/YY" class="input-field text-sm">
</div>
<div>
<label class="block text-xs font-medium text-gray-700 mb-1">CVC</label>
<input type="text" placeholder="3-4 digits" class="input-field text-sm">
</div>
</div>
<div>
<label class="block text-xs font-medium text-gray-700 mb-1">Cardholder Name</label>
<input type="text" placeholder="Enter full name as on card" class="input-field text-sm">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="mt-4 bg-blue-50 rounded-md p-4">
<div class="flex items-start gap-3">
<svg class="w-5 h-5 text-blue-600 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor"
viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path>
</svg>
<div class="text-sm text-blue-900">
<p class="font-medium mb-1">Your payment is secure</p>
<p class="text-blue-700">We use bank-level encryption to protect your data.</p>
</div>
</div>
</div>
</div>
<!-- Billing Address -->
<div class="mb-8">
<h2 class="text-lg font-semibold text-gray-900 mb-4">Billing address</h2>
<label class="flex items-center gap-2 text-sm text-gray-700">
<input type="radio" checked class="rounded-full border-gray-300 text-blue-600 focus:ring-blue-500">
<span>Same as shipping address</span>
</label>
</div>
<!-- Navigation Buttons -->
<div class="flex items-center justify-between pt-4 border-t border-gray-200 mb-8">
<a href="#" class="text-sm text-blue-600 hover:text-blue-700 flex items-center gap-1">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M15 19l-7-7 7-7"></path>
</svg>
Return to cart
</a>
<button class="bg-gray-400 text-white font-medium px-6 py-4 rounded-md w-full max-w-xs cursor-not-allowed flex items-center justify-center gap-2"
id="complete-order-btn" disabled>
<span>Complete order</span>
<span class="text-xs bg-green-100 text-green-700 px-2 py-1 rounded-full font-medium">Amwal above</span>
</button>
</div>
<!-- Footer Links -->
<div class="text-xs text-gray-500 space-y-2">
<div class="flex items-center justify-center gap-4">
<a href="#" class="hover:text-gray-700">Refund policy</a>
<span>•</span>
<a href="#" class="hover:text-gray-700">Privacy policy</a>
<span>•</span>
<a href="#" class="hover:text-gray-700">Terms of service</a>
</div>
</div>
</div>
</div>
<!-- Right Column - Order Summary -->
<div class="order-summary-sidebar bg-gray-50 border-b lg:border-b-0 lg:border-l border-gray-200">
<div class="max-w-xl mx-auto px-6 sm:px-8 lg:px-12 py-6 lg:py-10 lg:sticky lg:top-0">
<!-- Product List -->
<div class="space-y-4 mb-6">
<div class="order-summary-item">
<div class="relative">
<div class="w-16 h-16 bg-white border border-gray-200 rounded-lg flex items-center justify-center overflow-hidden">
<img src="https://i0.wp.com/shop.amwal.tech/wp-content/uploads/2022/08/Amwal-Sticker.png" alt="Product Image" class="w-full h-full object-cover">
</div>
<span class="badge-quantity" id="summary-quantity">1</span>
</div>
<div class="flex-1">
<h3 class="text-sm font-medium text-gray-900" id="summary-product-name">Amwal Poster</h3>
<p class="text-xs text-gray-600 mt-1">Size: 24" x 36"</p>
</div>
<div class="text-sm font-medium text-gray-900" id="summary-item-price">SAR 5,000.00</div>
</div>
</div>
<!-- Discount Code -->
<div class="mb-6">
<div class="flex flex-col sm:flex-row gap-2">
<input
type="text"
class="input-field flex-1"
placeholder="Discount code or gift card"
/>
<button class="px-6 py-3 border border-gray-300 rounded-md font-medium text-gray-700 hover:bg-gray-50 transition-all whitespace-nowrap">
Apply
</button>
</div>
</div>
<!-- Price Summary -->
<div class="space-y-3 pb-4 border-b border-gray-200 mb-4">
<div class="flex justify-between text-sm">
<span class="text-gray-600">Subtotal</span>
<span class="text-gray-900" id="summary-subtotal">SAR 5,000.00</span>
</div>
<div class="flex justify-between text-sm">
<span class="text-gray-600">Shipping</span>
<span class="text-gray-900">Free</span>
</div>
<div class="flex justify-between text-sm">
<span class="text-gray-600">Discount</span>
<span class="text-green-600" id="summary-discount">-SAR 500.00</span>
</div>
<div class="flex justify-between text-sm">
<span class="text-gray-600">Tax (VAT 15%)</span>
<span class="text-gray-900" id="summary-tax">SAR 675.00</span>
</div>
</div>
<!-- Total -->
<div class="flex justify-between items-center mb-6">
<span class="text-base font-semibold text-gray-900">Total</span>
<div class="text-right">
<div class="text-xs text-gray-500 mb-1">SAR</div>
<div class="text-2xl font-bold text-gray-900" id="summary-total">5,175.00</div>
</div>
</div>
<!-- Test Cards Section - For Development/Testing -->
<div class="border border-amber-300 bg-amber-50 rounded-lg overflow-hidden">
<button
class="w-full px-3 py-2.5 flex items-center justify-between bg-amber-100 hover:bg-amber-200 transition-colors">
<div class="flex items-center gap-2">
<svg class="w-4 h-4 text-amber-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path>
</svg>
<span class="text-sm font-semibold text-amber-900">Test Cards</span>
</div>
</button>
<div id="test-cards-content" class="p-3">
<p class="text-xs text-amber-800 mb-3">
Use these test cards for development and testing only.
</p>
<!-- Pay in Full Cards -->
<div class="mb-4">
<h3 class="text-sm font-semibold text-gray-900 mb-2 flex items-center gap-2">
<span class="w-1.5 h-1.5 bg-green-500 rounded-full"></span>
Pay in Full
</h3>
<div class="overflow-x-auto">
<table class="min-w-full bg-white border border-gray-300 text-xs">
<thead class="bg-gray-100">
<tr>
<th class="px-2 py-1.5 text-left font-semibold text-gray-700 border-b">Card Number</th>
<th class="px-2 py-1.5 text-left font-semibold text-gray-700 border-b">Exp</th>
<th class="px-2 py-1.5 text-left font-semibold text-gray-700 border-b">CCV</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200">
<tr class="hover:bg-gray-50">
<td class="px-2 py-1.5 font-mono text-gray-900">5454 5454 5454 5454</td>
<td class="px-2 py-1.5 text-gray-600">Any</td>
<td class="px-2 py-1.5 text-gray-600">Any</td>
</tr>
<tr class="hover:bg-gray-50">
<td class="px-2 py-1.5 font-mono text-gray-900">4000 0000 0000 0002</td>
<td class="px-2 py-1.5 text-gray-600">05/26</td>
<td class="px-2 py-1.5 text-gray-600">123</td>
</tr>
<tr class="hover:bg-gray-50">
<td class="px-2 py-1.5 font-mono text-gray-900">5453 0100 0009 5539</td>
<td class="px-2 py-1.5 text-gray-600">12/25</td>
<td class="px-2 py-1.5 text-gray-600">300</td>
</tr>
<tr class="hover:bg-gray-50">
<td class="px-2 py-1.5 font-mono text-gray-900">5200 0000 0000 0007</td>
<td class="px-2 py-1.5 text-gray-600">10/26</td>
<td class="px-2 py-1.5 text-gray-600">977</td>
</tr>
<tr class="hover:bg-gray-50">
<td class="px-2 py-1.5 font-mono text-gray-900">5123 4500 0000 0008</td>
<td class="px-2 py-1.5 text-gray-600">12/25</td>
<td class="px-2 py-1.5 text-gray-600">212</td>
</tr>
<tr class="hover:bg-gray-50">
<td class="px-2 py-1.5 font-mono text-gray-900">4464 0400 0000 0007</td>
<td class="px-2 py-1.5 text-gray-600">02/25</td>
<td class="px-2 py-1.5 text-gray-600">123</td>
</tr>
<tr class="hover:bg-gray-50">
<td class="px-2 py-1.5 font-mono text-gray-900">4111 1111 1111 1111</td>
<td class="px-2 py-1.5 text-gray-600">Any</td>
<td class="px-2 py-1.5 text-gray-600">Any</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Installment Cards -->
<div>
<h3 class="text-sm font-semibold text-gray-900 mb-2 flex items-center gap-2">
<span class="w-1.5 h-1.5 bg-blue-500 rounded-full"></span>
Installment
</h3>
<div class="overflow-x-auto">
<table class="min-w-full bg-white border border-gray-300 text-xs">
<thead class="bg-gray-100">