-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
119 lines (97 loc) · 3.73 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
<!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">
<title>RazorPay</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="pay.css">
</head>
<body>
<div class="container parent_main">
<div class="card" style="width: 30rem;">
<div class="card-body">
<form action="payscript.php" method="post">
<div class="mb-3">
<label class="form-label">Name</label>
<input type="text" class="form-control" name="name" required>
</div>
<div class="mb-3">
<label class="form-label">Email address</label>
<input type="email" class="form-control" name="email" required>
</div>
<div class="mb-3">
<label class="form-label">Mobile</label>
<input type="number" class="form-control" name="mobile" required>
</div>
<div class="mb-3">
<label class="form-label">Billing Address</label>
<input type="text" class="form-control" name="address" required>
</div>
<div class="mb-3">
<label class="form-label">Choose Plans</label>
<select class="form-select" name="plan" required id="plan">
<option selected>Select One Plan</option>
<option value="1500">Business Starter Plan</option>
<option value="2000">Business Plus Plan</option>
<option value="2500">Enterprise Starter Plan</option>
</select>
</div>
<div class="mb-3">
<label class="form-label">Quantity</label>
<div class="number">
<span class="minus">-</span>
<input type="number" value="1" id="qty" name="qty">
<span class="plus">+</span>
</div>
</div>
<div class="mb-3">
<label class="form-label">Total Price(Include 18% GST)</label>
<input id="total" type="number" class="form-control" name="total" readonly required>
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary">Pay with RazorPay</button>
</div>
</form>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
<script>
$(document).ready(function () {
var qty = parseInt($("#qty").val());
$("#plan").change(function () {
var amt = parseInt($("#plan").val());
showAmt(amt, qty);
});
$('.minus').click(function () {
var $input = $(this).parent().find('input');
var count = parseInt($input.val()) - 1;
count = count < 1 ? 1 : count;
$input.val(count);
$input.change();
amt = parseInt($("#plan").val());
qty = parseInt($("#qty").val());
showAmt(amt, qty);
return false;
});
$('.plus').click(function () {
var $input = $(this).parent().find('input');
$input.val(parseInt($input.val()) + 1);
$input.change();
amt = parseInt($("#plan").val());
qty = parseInt($("#qty").val());
showAmt(amt, qty);
return false;
});
function showAmt(amt, qty) {
amt = amt * qty;
var gst = parseInt((amt * 0.18));
$("#total").val(amt + gst);
}
});
</script>
</body>
</html>