Commit f5237903 authored by Andy J's avatar Andy J

clean up session on failure

parent fcf92051
Pipeline #69570122 passed with stages
in 1 minute and 22 seconds
......@@ -416,17 +416,21 @@ class PayPalExpress extends PaymentMethod
break;
}
// https://developer.paypal.com/docs/classic/express-checkout/ht_ec_fundingfailure10486/
case 'Failure': {
$error = $response->Errors[0];
if ((int)$error->ErrorCode === 10486) {
$redirect = $this->PayPalURL . $_SESSION['reshash']['Token'];
header("Location: {$redirect}");
exit;
}
}
default:
if (is_array($response->Errors)) {
$error = $response->Errors[0];
if ((int)$error->ErrorCode === 10486) {
$redirect = $this->PayPalURL . $_SESSION['reshash']['Token'];
header("Location: {$redirect}");
exit;
}
}
unset($_SESSION['reshash'], $_SESSION['paypalexpress']);
header('location: ' . Shop::getURL() . '/bestellvorgang.php?editZahlungsart=1');
exit;
break;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment