$checkoutData = array('option' => 'com_virtuemart', 'Itemid' => $Itemid, 'user_id' => (int) $auth['user_id'], 'page' => 'checkout.thankyou', 'func' => 'checkoutProcess', 'zone_qty' => $zone_qty, 'ship_to_info_id' => $ship_to_info_id, 'shipping_rate_id' => urlencode($shipping_rate_id), 'ship_method_id' => $shipping_rate_id, 'payment_method_id' => $payment_method_id, 'checkout_last_step' => '4', 'checkout_this_step' => array('CHECK_OUT_GET_FINAL_CONFIRMATION')); //Make sure to set the request variables before creating a new ps_checkout(); //Just in case $_REQUEST['shipping_rate_id'] = urlencode($shipping_rate_id); $_REQUEST['ship_method_id'] = $shipping_rate_id; $_REQUEST['user_id'] = (int) $auth['user_id']; $_REQUEST['zone_qty'] = $zone_qty; $_REQUEST['ship_to_info_id'] = $ship_to_info_id; $_REQUEST['payment_method_id'] = $payment_method_id; //Set our $_SESSION variable for DoExpressCheckout //So we know which way we came from $_SESSION['ppex_cart_ecm'] = '1'; $checkout = new ps_checkout(); //Try to process the order //On Success redirect to checkout.thankyou if ($checkout->process($checkoutData)) { vmRedirect($sess->url('index.php?page=checkout.thankyou&order_id=' . $checkoutData['order_id'], false, false)); } } else { $vmLogger->err(@$nvp_common_015); } } } } $theme = new $GLOBALS['VM_THEMECLASS'](); $theme->set_vars(array('zone_qty' => $zone_qty, 'ship_to_info_id' => $ship_to_info_id, 'shipping_rate_id' => $shipping_rate_id, 'current_stage' => $current_stage, 'payment_method_id' => $payment_method_id, 'weight_total' => $weight_total, 'Itemid' => $Itemid)); if ($cart["idx"] > 0) { echo '<h3>' . $VM_LANG->_('PHPSHOP_CHECKOUT_TITLE') . '</h3>'; if (!defined('_MIN_POV_REACHED')) { echo $basket_html; ?>