zc156c, PHP 7.1 (PHP-FPM).
If a PayPal Express Checkout transaction is denied (error codes 10422 or 10486), the checkout "dies" since the 'ec_redirect_url' class-variable isn't set.
Code:
case 'DoExpressCheckoutPayment':
if ($basicError || $_SESSION['paypal_ec_token'] != urldecode($response['TOKEN'])) {
// there's an error, so alert customer, and if debug is on, notify storeowner
if ($this->enableDebugging) {
$this->_doDebug('PayPal Error Log - before_process() - EC', "In function: before_process() - Express Checkout\r\n\r\nValue List:\r\n" . str_replace('&',"\r\n", $doPayPal->_sanitizeLog($doPayPal->_parseNameValueList($doPayPal->lastParamList))) . "\r\n\r\nResponse:\r\n" . print_r($response, true));
}
// if funding source problem occurred, must send back to re-select alternate funding source
if ($response['L_ERRORCODE0'] == 10422 || $response['L_ERRORCODE0'] == 10486) {
header("HTTP/1.1 302 Object Moved");
zen_redirect($this->ec_redirect_url);
die("Funding source problem; please go to Paypal.com (Error " . zen_output_string_protected($response['L_ERRORCODE0']) . ")");
}
Bookmarks