Source of file SuccessStep.php
Size: 0,847 Bytes - Last Modified: 2021-12-24T06:33:52+00:00
/var/www/docs.ssmods.com/process/src/src/Checkout/Steps/SuccessStep.php
12345678910111213141516171819202122232425262728293031 | <?php namespace Broarm\EventTickets\Checkout\Steps; use Broarm\EventTickets\Session\ReservationSession; class SuccessStep extends CheckoutStep { public $step = 'success'; private static $allowed_actions = array( 'success' ); /** * End at the success step */ public function success() { // If we get to the success controller form any state except PENDING or PAID // This would mean someone would be clever and change the url from summary to success bypassing the payment // End the session, thus removing the reservation, and redirect back if (!in_array($this->getReservation()->Status, array('PENDING', 'PAID'))) { ReservationSession::end(); return $this->owner->redirect($this->owner->Link()); } return $this->owner; } } |