@@ 143-154 (lines=12) @@ | ||
140 | return; |
|
141 | } |
|
142 | ||
143 | if ( isset( $_REQUEST['edu-thankyou'] ) && isset( $_REQUEST['svea'] ) ) { |
|
144 | $booking_id = intval( $_GET['booking_id'] ); |
|
145 | $programme_booking_id = intval( $_GET['programme_booking_id'] ); |
|
146 | ||
147 | $deleted = $this->update_booking( intval( EDU()->session['svea-order-id'] ), $booking_id, $programme_booking_id ); |
|
148 | ||
149 | EDU()->session['svea-order-id'] = null; |
|
150 | ||
151 | if ( $deleted ) { |
|
152 | $this->handle_cancelled_payment(); |
|
153 | } |
|
154 | } |
|
155 | } |
|
156 | ||
157 | /** |
|
@@ 349-360 (lines=12) @@ | ||
346 | exit( 0 ); |
|
347 | } |
|
348 | ||
349 | if ( isset( $_REQUEST['edu-thankyou'] ) && isset( $_REQUEST['svea'] ) && ! empty( $_GET['status'] ) ) { |
|
350 | $booking_id = intval( $_GET['booking_id'] ); |
|
351 | $programme_booking_id = intval( $_GET['programme_booking_id'] ); |
|
352 | ||
353 | $deleted = $this->update_booking( intval( EDU()->session['svea-order-id'] ), $booking_id, $programme_booking_id ); |
|
354 | ||
355 | EDU()->session['svea-order-id'] = null; |
|
356 | ||
357 | if ( $deleted ) { |
|
358 | $this->handle_cancelled_payment(); |
|
359 | } |
|
360 | } |
|
361 | } |
|
362 | ||
363 | private function handle_cancelled_payment() { |