function redirectToPayment(&$d) { require_once CLASSPATH . 'ps_checkout.php'; $checkout_steps = ps_checkout::get_checkout_steps(); $current_stage = 0; foreach ($checkout_steps as $step) { if (in_array('CHECK_OUT_GET_PAYMENT_METHOD', $checkout_steps[$current_stage])) { break; } else { $current_stage++; } } //Request used for when going from a regular link instead of a post from form $_REQUEST['checkout_stage'] = $current_stage; $_POST['checkout_this_step'] = $checkout_steps[$current_stage]; ps_paypal_api::destroyPaypalSession(); vmRedirect($sess->url('index.php?page=checkout.index&shipping_rate_id=' . urlencode($d['shipping_rate_id']) . '&ship_to_info_id=' . $d['ship_to_info_id'] . '&checkout_stage=' . $current_stage, false, false)); }
* @subpackage themes * @copyright Copyright (C) 2008 soeren - All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details. * @author Erich Vinson * http://virtuemart.net */ mm_showMyFileName(__FILE__); require_once CLASSPATH . 'payment/ps_paypal_api.cfg.php'; require_once CLASSPATH . 'payment/ps_paypal_api.php'; if ($_REQUEST['page'] == 'shop.cart') { ps_paypal_api::destroyPaypalSession(); } // Paypal API / Express // ToDo: Replace Text with Language Variable if (!defined('_MIN_POV_REACHED')) { ?> <span style="font-weight:bold;"><?php echo $VM_LANG->_('PHPSHOP_CHECKOUT_ERR_MIN_POV2') . " " . $CURRENCY_DISPLAY->getFullValue($_SESSION['minimum_pov']); ?> </span> <?php } else { if ($_REQUEST['page'] == 'shop.cart' && (PAYPAL_API_CART_BUTTON_ON == '1' || PAYPAL_API_CART_BUTTON_ON == 1)) { $paypal_express_href = $sess->url($_SERVER['PHP_SELF'] . '?page=checkout.index&ssl_redirect=1&ppex=1', true); echo '<a href="' . $paypal_express_href . '"><img src="https://www.paypal.com/' . $ppex_img_iso . '/i/btn/btn_xpressCheckout.gif" align="left" style="float: right;" alt="Paypal Express Checkout" title="Click here for Paypal Express Checkout!" align="right"></a>'; }