@@ 141-152 (lines=12) @@ | ||
138 | return; |
|
139 | } |
|
140 | ||
141 | if ( isset( $_REQUEST['edu-thankyou'] ) && isset( $_REQUEST['svea'] ) ) { |
|
142 | $booking_id = intval( $_GET['booking_id'] ); |
|
143 | $programme_booking_id = intval( $_GET['programme_booking_id'] ); |
|
144 | ||
145 | $deleted = $this->update_booking( intval( EDU()->session['svea-order-id'] ), $booking_id, $programme_booking_id ); |
|
146 | ||
147 | EDU()->session['svea-order-id'] = null; |
|
148 | ||
149 | if ( $deleted ) { |
|
150 | $this->handle_cancelled_payment(); |
|
151 | } |
|
152 | } |
|
153 | } |
|
154 | ||
155 | /** |
|
@@ 379-390 (lines=12) @@ | ||
376 | exit( 0 ); |
|
377 | } |
|
378 | ||
379 | if ( isset( $_REQUEST['edu-thankyou'] ) && isset( $_REQUEST['svea'] ) && ! empty( $_GET['status'] ) ) { |
|
380 | $booking_id = intval( $_GET['booking_id'] ); |
|
381 | $programme_booking_id = intval( $_GET['programme_booking_id'] ); |
|
382 | ||
383 | $deleted = $this->update_booking( intval( EDU()->session['svea-order-id'] ), $booking_id, $programme_booking_id ); |
|
384 | ||
385 | EDU()->session['svea-order-id'] = null; |
|
386 | ||
387 | if ( $deleted ) { |
|
388 | $this->handle_cancelled_payment(); |
|
389 | } |
|
390 | } |
|
391 | } |
|
392 | ||
393 | private function handle_cancelled_payment() { |