.json written by webhook.php and shows a receipt with items $dataDir = __DIR__ . '/data'; $invoice = $_GET['invoice'] ?? ''; $cancel = isset($_GET['cancel']); $status = 'PENDING'; $details = null; $items = []; if ($invoice && is_file("$dataDir/$invoice.json")) { $details = json_decode(file_get_contents("$dataDir/$invoice.json"), true); if (!empty($details['status'])) { $status = $details['status']; } if (!empty($details['items']) && is_array($details['items'])) { $items = $details['items']; } } // Helpers function h($s){ return htmlspecialchars((string)$s, ENT_QUOTES, 'UTF-8'); } function money_fmt($value, $currency) { if ($value === null || $value === '') return ''; return h($currency) . ' ' . h(number_format((float)$value, 2, '.', '')); } ?> Payment Status

Payment canceled

Invoice:

You can return to your cart and try again.

Thank you!

Invoice:

Status:

Summary

Items

'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } ?>
Server ID Item Qty Unit Price Line Total
'.h($sku).''.h($name).''.h($qty).''.money_fmt($unit, $currency).''.money_fmt($line, $currency).'
Total

No line items were included in this webhook. If you just paid, refresh in a few seconds.

Waiting for confirmation from PayPal… this can take a few seconds. Refresh to update.

We’re waiting for PayPal to confirm your payment. This page will show the receipt once we receive the webhook. Try refreshing in a few seconds.