-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpayment.js
More file actions
85 lines (77 loc) · 2.26 KB
/
Copy pathpayment.js
File metadata and controls
85 lines (77 loc) · 2.26 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
function showForm(paymentMethod) {
const formContent = document.getElementById("form-content");
const upiQr = `
<div id="upi-qr">
<label>Scan QR Code:</label>
<img src="qrqr .jpg" alt="QR Code" width="150">
</div>
`;
switch (paymentMethod) {
case "card":
formContent.innerHTML = `
<div class="input-field">
<label>Card Number:</label>
<input type="text" placeholder="Enter card number">
</div>
<div class="input-field">
<label>Expiry Date:</label>
<input type="text" placeholder="MM/YY">
</div>
<div class="input-field">
<label>CVV:</label>
<input type="text" placeholder="***">
</div>
<div class="input-field">
<label>Cardholder's Name:</label>
<input type="text" placeholder="Name on card">
</div>
`;
break;
case "netbanking":
formContent.innerHTML = `
<div class="input-field">
<label>Select Bank:</label>
<select>
<option>SBI</option>
<option>HDFC</option>
<option>ICICI</option>
<option>AXIS</option>
<option>RBI</option>
</select>
</div>
`;
break;
case "wallet":
formContent.innerHTML = `
<div class="input-field">
<label>Wallet:</label>
<select>
<option>PayPal</option>
<option>Paytm</option>
<option>Apple Pay</option>
</select>
</div>
`;
break;
case "upi":
formContent.innerHTML = `
<div class="input-field">
<label>UPI ID:</label>
<input type="text" placeholder="Enter UPI ID">
</div>
${upiQr}
`;
document.getElementById("upi-qr").style.display = "block";
break;
case "cod":
formContent.innerHTML = `
<p>Cash on Delivery selected. No additional information required.</p>
`;
break;
default:
formContent.innerHTML = "";
}
}
function processPayment() {
alert("Processing payment...");
}