Skip to content

Commit

Permalink
We do have to update the booking in EduAdmin if this should work as w…
Browse files Browse the repository at this point in the history
…ell..
  • Loading branch information
itssimple committed Mar 20, 2018
1 parent 2354856 commit f0f24f0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions class-edu-klarnacheckout.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,15 @@ public function process_paymentstatus() {
$order->fetch();

if ( 'checkout_complete' === $order['status'] ) {

$patch_booking = new stdClass();
$patch_booking->Paid = true;

EDUAPI()->REST->Booking->PatchBooking(
intval( $_GET['booking_id'] ),
$patch_booking
);

$update = array();
$update['status'] = 'created';
$order->update( $update );
Expand Down

0 comments on commit f0f24f0

Please sign in to comment.