-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpayment.html
189 lines (163 loc) · 6.19 KB
/
payment.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
<!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>Payment System</title>
<!-- Bootstrap CSS -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome for Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<style>
body {
font-family: Arial, sans-serif;
background-color: #f9f9f9;
color: #333;
margin: 0;
padding: 0;
}
.payment-section {
width: 650px;
margin: 50px auto;
padding: 20px;
background-color: #fff;
box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1);
border-radius: 8px;
margin-bottom: 20px;
}
h2 {
text-align: center;
margin-bottom: 20px;
color: #444;
}
.form-group {
margin-bottom: 20px;
}
label {
display: block;
font-weight: bold;
margin-bottom: 5px;
color: #555;
}
input[type="email"],
input[type="tel"],
input[type="text"] {
width: 100%;
padding: 12px;
border: 1px solid black;
border-radius: 5px;
font-size: 16px;
box-sizing: border-box;
background-color: #f7f7f7;
transition: all 0.3s ease-in-out;
}
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="text"]:focus {
border-color: black;
background-color: #fff;
outline: none;
}
button[type="submit"] {
width: 20%;
background-color: rgb(34, 32, 32); /* Match the Account button color */
color: white;
padding: 12px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 18px;
transition: background-color 0.3s ease-in-out;
}
button[type="submit"]:hover {
background-color: black;
}
</style>
</head>
<body>
<!-- Back to Home Link -->
<div class="text-center mt-3" style="text-align: center; margin-bottom: -20px; margin-top: 10px; font-size: 27px;">
<a href="index.php" class="btn btn-outline-primary">Go Back Home</a>
</div>
<!-- Paystack Payment Section -->
<section class="py-5 bg-light">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-6">
<h2 class="mb-4 text-center text-primary">Make a Payment with Paystack</h2>
<form id="paystackForm" class="p-4 bg-white shadow rounded">
<div class="mb-3">
<label for="email-address" class="form-label">Email Address</label>
<input type="email" id="email-address" class="form-control" placeholder="Enter your email" required />
</div>
<div class="mb-3">
<label for="amount" class="form-label">Amount</label>
<input type="tel" id="amount" class="form-control" placeholder="Enter amount" required />
</div>
<div class="mb-3">
<label for="first-name" class="form-label">First Name</label>
<input type="text" id="first-name" class="form-control" placeholder="Enter your first name" />
</div>
<div class="mb-3">
<label for="last-name" class="form-label">Last Name</label>
<input type="text" id="last-name" class="form-control" placeholder="Enter your last name" />
</div>
<div class="d-grid">
<button type="button" class="btn btn-primary btn-lg" onclick="payWithPaystack()">
Pay with Paystack
</button>
</div>
</form>
</div>
</div>
</div>
</section>
<section class="vh-100 d-flex align-items-center justify-content-center bg-light">
<div class="container text-center">
<div class="row justify-content-center">
<div class="col-md-6">
<h2 class="mb-4 text-primary">Make a Payment with PayPal</h2>
<p class="text-muted mb-4">
Use the button below to proceed with your payment securely via PayPal.
</p>
<div class="payment">
<a href="https://www.paypal.com/ncp/payment/2MHGRBFDX99SG"
target="_blank"
class="btn btn-primary btn-lg px-5 py-3">
Pay with PayPal
</a>
</div>
</div>
</div>
</div>
</section>
</div>
<!-- Paystack Script -->
<script src="https://js.paystack.co/v1/inline.js"></script>
<script>
function payWithPaystack() {
var email = document.getElementById('email-address').value;
var amount = document.getElementById('amount').value * 100; // Convert to kobo
var firstName = document.getElementById('first-name').value;
var lastName = document.getElementById('last-name').value;
var handler = PaystackPop.setup({
key: 'your-public-key', // Replace with your public key
email: email,
amount: amount,
currency: 'NGN', // Replace with your preferred currency
firstname: firstName,
lastname: lastName,
callback: function(response) {
alert('Payment successful. Transaction reference: ' + response.reference);
},
onClose: function() {
alert('Transaction was not completed, window closed.');
}
});
handler.openIframe();
}
</script>
<br><br><br>
</body>
</html>