当前位置: 首页>>代码示例>>PHP>>正文


PHP Cart66Common::isHttps方法代码示例

本文整理汇总了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;
        }
开发者ID:cyrrill,项目名称:paymill-wordpress,代码行数:44,代码来源:cart66.inc.php

示例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;
 }
开发者ID:rbredow,项目名称:allyzabbacart,代码行数:17,代码来源:Cart66ShortcodeManager.php

示例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');
        ?>
开发者ID:arraysoftlab,项目名称:tracy-thedarkroom.com,代码行数:31,代码来源:shipping_address.php


注:本文中的Cart66Common::isHttps方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。