本文整理汇总了PHP中Cart66Common::isHttps方法的典型用法代码示例。如果您正苦于以下问题:PHP Cart66Common::isHttps方法的具体用法?PHP Cart66Common::isHttps怎么用?PHP Cart66Common::isHttps使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cart66Common
的用法示例。
在下文中一共展示了Cart66Common::isHttps方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _buildCheckoutView
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;
}
示例2: _buildCheckoutView
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;
}
示例3:
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');
?>