diff --git a/index.php b/index.php index 684ab44..b13b80a 100644 --- a/index.php +++ b/index.php @@ -56,6 +56,18 @@ $mpdf->allow_charset_conversion = true; //Get Payment methode using ternary operator $zahlung = $row2["paypal_token"] != "" ? "Paypal" : "Barzahlung"; +$pp_paid = ""; + +if($row2["paypal_token"] != ""){ + $unserialized = unserialize($row2["paypal_response"]); + if($unserialized["ACK"]=="Success"){ + $pp_paid = " - Bezahlt"; + }else{ + $pp_paid = " - Unbezahlt"; + } +} + +$zahlung .= $pp_paid; //Looks like shit, but works :D (PHP Serialized Class -> JSON -> PHP stdClass -> PHP Object) $seats = json_decode(json_encode(unserialize($row2["places"], ['allowed_classes' => false])), true); diff --git a/ticket-check.php b/ticket-check.php index 2dc229c..a6e0596 100644 --- a/ticket-check.php +++ b/ticket-check.php @@ -47,6 +47,19 @@ if(!($row2["order_id"]>0)){ //Get Payment methode using ternary operator $zahlung = $row2["paypal_token"] != "" ? "Paypal" : "Barzahlung"; +$pp_paid = ""; + +if($row2["paypal_token"] != ""){ + $unserialized = unserialize($row2["paypal_response"]); + if($unserialized["ACK"]=="Success"){ + $pp_paid = " - Bezahlt"; + }else{ + $pp_paid = " - Unbezahlt"; + } +} + +$zahlung .= $pp_paid; + //Looks like shit, but works :D (PHP Serialized Class -> JSON -> PHP stdClass -> PHP Object) $seats = json_decode(json_encode(unserialize($row2["places"])), true);