-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpayment.html
More file actions
125 lines (106 loc) · 3.8 KB
/
payment.html
File metadata and controls
125 lines (106 loc) · 3.8 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>UPI Payment</title>
<script src="https://cdn.jsdelivr.net/npm/qrcode@1.4.4/build/qrcode.min.js"></script>
<style>
body {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
background-image: url('C:\\Users\\harsh\\Downloads\\OIP (2).jpeg'); /* Replace with your image path */
background-size: cover;
font-family: Arial, sans-serif;
}
.container {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
width: 100%;
}
form {
width: 100%;
max-width: 400px;
padding: 20px;
border: 1px solid #ccc;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
background-color: rgba(255, 255, 255, 0.9);
text-align: center;
}
h2 {
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 8px;
font-weight: bold;
}
input[type="text"], input[type="file"] {
width: calc(100% - 20px);
padding: 10px;
margin-bottom: 16px;
border: 1px solid #ddd;
border-radius: 4px;
box-sizing: border-box;
}
button {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
margin: 5px;
font-size: 16px;
}
button:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<div class="container">
<form id="payment-form">
<h2>Payment</h2>
<label for="payment-file">Upload Payment File:</label>
<input type="file" id="payment-file" accept=".txt,.csv" required>
<label for="amount">Amount to Pay:</label>
<input type="text" id="amount" value="500" readonly>
<label for="transaction-id">Transaction ID:</label>
<input type="text" id="transaction-id" placeholder="Enter Transaction ID" required>
<button type="button" onclick="completeRegister()">Complete Register</button>
<button type="button" onclick="cancelRegister()">Cancel Register</button>
</form>
</div>
<script>
function completeRegister() {
const paymentFile = document.getElementById('payment-file').files[0];
const amount = document.getElementById('amount').value;
const transactionId = document.getElementById('transaction-id').value;
if (!paymentFile || !amount || !transactionId) {
alert('Please fill in all required fields.');
return;
}
// Simulate registration completion
alert(`Registration completed!\nAmount: ₹${amount}\nTransaction ID: ${transactionId}`);
// Clear form
resetForm();
}
function cancelRegister() {
// Redirect to another page or clear the form
window.location.href = 'reg.html';
}
function resetForm() {
document.getElementById('payment-file').value = '';
document.getElementById('amount').value = '500'; // Reset to default value
document.getElementById('transaction-id').value = '';
}
</script>
</body>
</html>