checking PayPal Payment status in Ticket

This commit is contained in:
Alec Höfler 2022-05-18 14:22:22 +02:00
parent 3e9138a9ec
commit f65a680e15
No known key found for this signature in database
GPG Key ID: BE83D6C1099F2835
2 changed files with 25 additions and 0 deletions

View File

@ -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);

View File

@ -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);