$show_basket = false; } $current_stage = ps_checkout::get_current_stage(); $checkout_steps = ps_checkout::get_checkout_steps(); } if (!empty($paypal_api_payment_method_id) && in_array('CHECK_OUT_GET_PAYMENT_METHOD', $checkout_steps[$current_stage])) { if ($paypalActive) { // Paypal API / Express echo '<script type="text/javascript">window.addEvent("domready", function() { $$(\'label\').each( function(el) { if(el.htmlFor == "' . ps_paypal_api::getPaymentMethodName() . '") { el.innerHTML = "Credit Card";} }); });</script>'; } } if (in_array('CHECK_OUT_GET_FINAL_CONFIRMATION', $checkout_steps[$current_stage])) { if ($paypalActive && !empty($paypal_api_payment_method_id) && $paypal_api_payment_method_id == $payment_method_id && empty($_SESSION['ppex_token'])) { ps_paypal_api::gettoken(2); } $next_page = 'checkout.thankyou'; if (sizeof($checkout_steps[$current_stage]) > 1) { include_once PAGEPATH . 'basket.php'; } else { include_once PAGEPATH . 'ro_basket.php'; } } else { $next_page = 'checkout.index'; include_once PAGEPATH . 'basket.php'; } // Get the zone quantity after it has been calculated in the basket $zone_qty = vmGet($vars, 'zone_qty'); //Check for express checkout from paypal if (isset($_SESSION['ppex_userdata']) && is_array($_SESSION['ppex_userdata']) && isset($_SESSION['ppex_token']) && $paypalActive) {
//$GLOBALS['vmLogger']->warning( 'PayPal Zahlung abgebrochen!' ); require_once CLASSPATH . 'payment/ps_paypal_api.php'; ps_paypal_api::destroyPaypalSession(); $payment_method_id = $_GET['payment_method_id'] = $_REQUEST['payment_method_id'] = 0; if (!empty($_GET['ship_to_info_id']) && !empty($_GET['shipping_rate_id'])) { $_POST['checkout_this_step'][] = 'CHECK_OUT_GET_SHIPPING_ADDR'; $_REQUEST['checkout_last_step'] = 2; } } if ($paypal_express_checkout) { // Check for token and redirect to PayPal to get one, if not available yet $_SESSION['ppex_token'] = $ppex_token = ps_paypal_api::gettoken(1); } else { if ($paypal_express_checkout_payment === "2") { // Check for token at payment select screen and redirect to PayPal to get one, if not available yet $_SESSION['ppex_token'] = $ppex_token = ps_paypal_api::gettoken(2); } } $paypal_express_checkout = vmGet($_REQUEST, 'ppex_gecd', null); if (isset($_SESSION['ppex_userdata']) && is_array($_SESSION['ppex_userdata']) && isset($_SESSION['ppex_token']) && $paypalActive) { if (!isset($auth['user_id']) || $auth['user_id'] <= 0) { ps_paypal_api::ppex_userLogin($auth); } ps_paypal_api::checkAddress($auth); $ship_to_info_id = vmGet($_REQUEST, 'ship_to_info_id'); $shipping_rate_id = urldecode(vmGet($_REQUEST, "shipping_rate_id", null)); $paypal_api_payment_method_id = $payment_method_id = ps_paypal_api::getPaymentMethodId(); $_REQUEST['payment_method_id'] = $payment_method_id; $Itemid = $sess->getShopItemid(); if ($auth['user_id'] > 0) { $show_basket = true;