protected function _buildCheckoutView($gateway) { $ssl = Cart66Setting::getValue('auth_force_ssl'); if ($ssl) { if (!Cart66Common::isHttps()) { $sslUrl = "https://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; wp_redirect($sslUrl); exit; } } // use manual gateway form to gather user information require_once CART66_PATH . "/gateways/Cart66ManualGateway.php"; $gateway = new Cart66_paymill_for_wordpress(); if (!Cart66Session::get('Cart66Cart')) { Cart66Session::set('Cart66Cart', new Cart66Cart()); } if (!$GLOBALS['paymill_active']) { paymill_load_frontend_scripts(); // load frontend scripts // settings $GLOBALS['paymill_active'] = true; $cart_total = intval(Cart66Session::get('Cart66Cart')->getGrandTotal(false) * 100); $currency = CURRENCY_CODE; $no_logos = false; ob_start(); // form ids echo '<script> paymill_form_checkout_id = "#Cart66_paymill_for_wordpress_form"; paymill_form_checkout_submit_id = "#Cart66CheckoutButton"; paymill_shop_name = "cart66"; paymill_pcidss3 = ' . (empty($GLOBALS['paymill_settings']->paymill_general_settings['pci_dss_3']) || $GLOBALS['paymill_settings']->paymill_general_settings['pci_dss_3'] != '1' ? 1 : 0) . '; paymill_pcidss3_lang = "' . substr(apply_filters('plugin_locale', get_locale(), $domain), 0, 2) . '"; </script> '; require_once PAYMILL_DIR . 'lib/tpl/checkout_form.php'; $view .= '<h2>' . __('Payment Information', 'paymill') . '</h2>'; $view .= ob_get_clean(); $checkout = Cart66Common::getView('views/checkout.php', array('gateway' => $gateway), true, true); $view .= str_replace(array('Cart66ManualGateway', 'Payment Information'), array('Cart66_paymill_for_wordpress', 'Contact Information'), $checkout); } else { $view = '<div class="paymill_notification paymill_notification_once_only"><strong>Error:</strong> Paymill can be loaded once only on the same page.</div>'; } return $view; }
protected function _buildCheckoutView($gateway) { $ssl = Cart66Setting::getValue('auth_force_ssl'); if ($ssl) { if (!Cart66Common::isHttps()) { $sslUrl = "https://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; wp_redirect($sslUrl); exit; } } if (!Cart66Session::get('Cart66Cart')->requirePayment()) { require_once CART66_PATH . "/gateways/Cart66ManualGateway.php"; $gateway = new Cart66ManualGateway(); } $view = Cart66Common::getView('views/checkout.php', array('gateway' => $gateway), true, true); return $view; }
if (Cart66Session::get('Cart66Cart')->hasSubscriptionProducts() || Cart66Session::get('Cart66Cart')->hasMembershipProducts()) { echo ' subscription'; } ?> "> <input type="hidden" class="ajax-tax-cart" name="ajax-tax-cart" value="<?php echo Cart66Session::get('Cart66Cart')->hasTaxableProducts() ? 'true' : 'false'; ?> " /> <input type="hidden" name="cart66-gateway-name" value="<?php echo $gatewayName; ?> " id="cart66-gateway-name" /> <?php $url = Cart66Common::appendWurlQueryString('cart66AjaxCartRequests'); if (Cart66Common::isHttps()) { $url = preg_replace('/http[s]*:/', 'https:', $url); } else { $url = preg_replace('/http[s]*:/', 'http:', $url); } ?> <input type="hidden" name="confirm_url" value="<?php echo $url; ?> " id="confirm-url" /> <?php if ($cart->requireShipping()) { ?> <h2><?php _e('Shipping Address', 'cart66'); ?>