From 66377e84f8b002cd7c6568f02ba63647117232df Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Thu, 7 Mar 2019 15:57:52 -0600 Subject: [PATCH] thank you page --- index.php | 10 +++++++++- views/thankyou.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 views/thankyou.php diff --git a/index.php b/index.php index ae3e850..89d44ba 100644 --- a/index.php +++ b/index.php @@ -164,6 +164,14 @@ $router->get('/manage/{uuid}', function ($uuid) { include 'views/common/footer.php'; }); +$router->get('/thank-you/{uuid}', function ($uuid) { + $order = R::findOne('orders', ' uuid = ?', [$uuid]); + $guests = R::findAll('guests', ' order_id = ?', [$order->id]); + include 'views/common/head.php'; + include 'views/thankyou.php'; + include 'views/common/footer.php'; +}); + $router->post('/manage/{uuid}', function ($uuid) { if ($uuid !== $_POST['uuid']) { throw new Exception('Invalid form submission', 400); @@ -188,7 +196,7 @@ $router->post('/manage/{uuid}', function ($uuid) { } } - header('Location: /manage/'.$uuid); + header('Location: /thank-you/'.$uuid); }); // Run it! diff --git a/views/thankyou.php b/views/thankyou.php new file mode 100644 index 0000000..5f29d44 --- /dev/null +++ b/views/thankyou.php @@ -0,0 +1,42 @@ +
+
+
+

+

Thank You!

+

Please print this page for your records.

+
+
+

+ Receipt #id?> +

+ payment_type == 1) { ?> +

Mail or drop off payment within seven days of submitting this form or your tickets will be released + for others to purchase
+
+ Mail to:
+ Attn: Dinner in the Woods
+ Nature's Classroom
+ PO Box 660
+ Mukwonago, WI 53149 +

+ +

Your payment will be processed by our payment processor Stripe (stripe_token?>)

+ +
    + ticket_cents, $order->ticket_quantity . ' x tickets');?> + cabana_cents);?> + enhancer_cents, $order->enhancer_quantity . ' x enhancers');?> + additional_cents);?> + total_cents);?> + +
+ +

We will send you an email notification before the event as a reminder. If you purchased additional tickets for your + guests you can manage your guests. If you have any questions please email deepa@nciw.org

+

Manage Guests

+
+ +
+ +
\ No newline at end of file