<?php
require_once '../app/db.php';
$booking_id = $_GET['id'];

$stmt = $pdo->prepare("SELECT * FROM bookings WHERE id=?");
$stmt->execute([$booking_id]);
$booking = $stmt->fetch();
?>

<h2>PayNow Payment</h2>
<p>Scan QR below and transfer: $<?= $booking['estimated_price'] ?></p>

<img src="assets/images/paynow-qr.png" width="250">

<p>Reference: <?= $booking['booking_code'] ?></p>

<form method="POST" action="paynow_confirm.php">
<input type="hidden" name="id" value="<?= $booking_id ?>">
<input type="text" name="reference" placeholder="Enter Bank Reference" required>
<button type="submit">Confirm Payment</button>
</form>
