diff --git a/index.php b/index.php index 1204b91..960b35c 100644 --- a/index.php +++ b/index.php @@ -399,14 +399,13 @@ $router->post('/', function () { // Calculate totals $additionalContribution = convertPossibleFloatToCents($_POST['additionalContribution']); - $cabanaReservation = convertPossibleFloatToCents($_POST['cabanaReservation']); list($tableTicketQty, $eventTicketQty) = eventPricing($eventTicketQty); $eventTicketPrice = convertPossibleFloatToCents($eventTicketQty * $_SERVER['EVENT_TICKET_PRICE']); $tableTicketPrice = convertPossibleFloatToCents($tableTicketQty * $_SERVER['TABLE_TICKET_PRICE']); $ticketEnhancerPrice = convertPossibleFloatToCents($ticketEnhancerQty * $_SERVER['ENHANCER_TICKET_PRICE']); // Sum the cart totals - $cartTotal = $eventTicketPrice + $tableTicketPrice + $ticketEnhancerPrice + $additionalContribution + ($cabanaReservation * $_SERVER['CABANA_PRICE']); + $cartTotal = $eventTicketPrice + $tableTicketPrice + $ticketEnhancerPrice + $additionalContribution; include 'views/common/head.php'; include 'views/step2.php'; include 'views/common/footer.php'; @@ -424,10 +423,9 @@ $router->post('/checkout', function () { $eventTicketPrice = convertPossibleFloatToCents($eventTicketQty * $_SERVER['EVENT_TICKET_PRICE']); $tableTicketPrice = convertPossibleFloatToCents($tableTicketQty * $_SERVER['TABLE_TICKET_PRICE']); $ticketEnhancerPrice = convertPossibleFloatToCents($ticketEnhancerQty * $_SERVER['ENHANCER_TICKET_PRICE']); - $cabanaReservation = $_POST['cabanaReservation'] > 0 ? convertPossibleFloatToCents($_SERVER['CABANA_PRICE']) : 0; // Sum the cart totals - $cartTotal = $eventTicketPrice + $tableTicketPrice + $ticketEnhancerPrice + $additionalContribution + $cabanaReservation; + $cartTotal = $eventTicketPrice + $tableTicketPrice + $ticketEnhancerPrice + $additionalContribution; $redirectUuid = $uuid = \Ramsey\Uuid\Uuid::uuid1(); @@ -460,7 +458,6 @@ $router->post('/checkout', function () { $order->enhancer_quantity = $ticketEnhancerQty; $order->enhancer_cents = $ticketEnhancerPrice; $order->additional_cents = $additionalContribution; - $order->cabana_cents = $cabanaReservation; $order->total_cents = $cartTotal; $order->first_name = $_POST['firstName']; $order->last_name = $_POST['lastName']; @@ -513,10 +510,6 @@ $router->post('/checkout', function () { 'amount' => '$' . number_format(($ticketEnhancerPrice / 100), 2) ]); } - if ($cabanaReservation > 0) { - array_push($orderedItems, - ['description' => 'Cabana reservation', 'amount' => '$' . number_format(($cabanaReservation / 100), 2)]); - } if ($additionalContribution > 0) { array_push($orderedItems, [ 'description' => 'Additional contribution', diff --git a/views/step2.php b/views/step2.php index 2d2f16c..270182f 100644 --- a/views/step2.php +++ b/views/step2.php @@ -7,7 +7,6 @@