• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wpsc_get_checkout_url函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中wpsc_get_checkout_url函数的典型用法代码示例。如果您正苦于以下问题:PHP wpsc_get_checkout_url函数的具体用法?PHP wpsc_get_checkout_url怎么用?PHP wpsc_get_checkout_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了wpsc_get_checkout_url函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: callback_login

 private function callback_login()
 {
     if (empty($_COOKIE[TEST_COOKIE])) {
         $this->message_collection->add(__("Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to log in to your account.", 'wp-e-commerce'), 'error');
     }
     $form_args = wpsc_get_login_form_args();
     $validation = wpsc_validate_form($form_args);
     if (is_wp_error($validation)) {
         wpsc_set_validation_errors($validation);
         return;
     }
     $user = wp_signon(array('user_login' => $_POST['username'], 'user_password' => $_POST['password'], 'rememberme' => !empty($_POST['rememberme'])));
     if (is_wp_error($user)) {
         $this->message_collection->add(__('We do not recognize the login information you entered. Please try again.', 'wp-e-commerce'), 'error');
         return;
     }
     $redirect_to = wp_get_referer();
     if (wpsc_get_customer_meta('checkout_after_login')) {
         $redirect_to = wpsc_get_checkout_url();
         wpsc_delete_customer_meta('checkout_after_login');
     }
     if (!$redirect_to || trim(str_replace(home_url(), '', $redirect_to), '/') == trim($_SERVER['REQUEST_URI'], '/')) {
         $redirect_to = wpsc_get_store_url();
     }
     wp_redirect($redirect_to);
     exit;
 }
开发者ID:ashik968,项目名称:digiplot,代码行数:27,代码来源:login.php


示例2: get_shopping_cart_payment_url

 public function get_shopping_cart_payment_url()
 {
     $te = get_option('wpsc_get_active_theme_engine', '1.0');
     return '1.0' !== $te ? wpsc_get_checkout_url('shipping-and-billing') : get_option('shopping_cart_url');
 }
开发者ID:AngryBird3,项目名称:WP-e-Commerce,代码行数:5,代码来源:payment-gateway.php


示例3: get_shopping_cart_payment_url

 public function get_shopping_cart_payment_url()
 {
     return _wpsc_maybe_activate_theme_engine_v2() ? wpsc_get_checkout_url('shipping-and-billing') : get_option('shopping_cart_url');
 }
开发者ID:jaysonpotter,项目名称:WP-e-Commerce,代码行数:4,代码来源:payment-gateway.php


示例4: review_order_url

 /**
  * Return Customer to Review Order Page if there are Shipping Costs.
  *
  * @param string $url
  * @return string
  */
 public function review_order_url($url)
 {
     if (wpsc_uses_shipping()) {
         $url = wpsc_get_checkout_url('review-order');
     }
     return $url;
 }
开发者ID:benhuson,项目名称:WP-e-Commerce,代码行数:13,代码来源:paypal-express-checkout.php


示例5: wpsc_theme_engine_v2_activate

function wpsc_theme_engine_v2_activate()
{
    $path = WPSC_FILE_PATH . '/wpsc-components/theme-engine-v2';
    require_once $path . '/core.php';
    _wpsc_te_v2_includes();
    wpsc_register_post_types();
    flush_rewrite_rules(true);
    update_option('transact_url', wpsc_get_checkout_url('results'));
    WPSC_Settings::get_instance();
    do_action('wpsc_theme_engine_v2_activate');
}
开发者ID:osuarcher,项目名称:WP-e-Commerce,代码行数:11,代码来源:wpsc-installer.php


示例6: init_checkout_wizard

 private function init_checkout_wizard()
 {
     $this->wizard = WPSC_Checkout_Wizard::get_instance();
     $this->wizard->steps = array('shipping-and-billing' => __('Details', 'wp-e-commerce'), 'shipping-method' => __('Delivery', 'wp-e-commerce'), 'payment' => __('Place Order', 'wp-e-commerce'), 'results' => __('Complete', 'wp-e-commerce'));
     if (!wpsc_uses_shipping()) {
         unset($this->wizard->steps['shipping-method']);
     }
     if (is_user_logged_in() && (!array_key_exists($this->wizard->active_step, $this->wizard->steps) || in_array($this->wizard->active_step, $this->wizard->disabled))) {
         wp_redirect(wpsc_get_checkout_url($this->wizard->pending_step));
         exit;
     }
 }
开发者ID:androidprojectwork,项目名称:WP-e-Commerce,代码行数:12,代码来源:checkout.php


示例7: wpsc_transaction_theme

function wpsc_transaction_theme()
{
    global $wpdb, $user_ID, $nzshpcrt_gateways, $sessionid, $cart_log_id, $errorcode;
    $errorcode = '';
    $transactid = '';
    $dont_show_transaction_results = false;
    if (isset($_GET['sessionid'])) {
        $sessionid = $_GET['sessionid'];
    }
    if (!isset($_GET['sessionid']) && isset($_GET['ms'])) {
        $sessionid = $_GET['ms'];
    }
    $selected_gateway = wpsc_get_customer_meta('selected_gateway');
    if ($selected_gateway && in_array($selected_gateway, array('paypal_certified', 'wpsc_merchant_paypal_express'))) {
        $sessionid = wpsc_get_customer_meta('paypal_express_sessionid');
    }
    if (isset($_REQUEST['eway']) && '1' == $_REQUEST['eway']) {
        $sessionid = $_GET['result'];
    } elseif (isset($_REQUEST['eway']) && '0' == $_REQUEST['eway']) {
        echo wpsc_get_customer_meta('eway_message');
    } elseif (isset($_REQUEST['payflow']) && '1' == $_REQUEST['payflow']) {
        echo wpsc_get_customer_meta('payflow_message');
        wpsc_delete_customer_meta('payflow_message');
    }
    $dont_show_transaction_results = false;
    if ($selected_gateway) {
        // Replaces the ugly if else for gateways
        switch ($selected_gateway) {
            case 'paypal_certified':
            case 'wpsc_merchant_paypal_express':
                echo wpsc_get_customer_meta('paypal_express_message');
                $reshash = wpsc_get_customer_meta('paypal_express_reshash');
                if (isset($reshash['PAYMENTINFO_0_TRANSACTIONTYPE']) && in_array($reshash['PAYMENTINFO_0_TRANSACTIONTYPE'], array('expresscheckout', 'cart'))) {
                    $dont_show_transaction_results = false;
                } else {
                    $dont_show_transaction_results = true;
                }
                break;
            case 'dps':
                $sessionid = decrypt_dps_response();
                break;
                //paystation was not updating the purchase logs for successful payment - this is ugly as need to have the databse update done in one place by all gatways on a sucsessful transaction hook not some within the gateway and some within here and some not at all??? This is getting a major overhaul but for here and now it just needs to work for the gold cart people!
            //paystation was not updating the purchase logs for successful payment - this is ugly as need to have the databse update done in one place by all gatways on a sucsessful transaction hook not some within the gateway and some within here and some not at all??? This is getting a major overhaul but for here and now it just needs to work for the gold cart people!
            case 'paystation':
                $ec = $_GET['ec'];
                $result = $_GET['em'];
                if ($result == 'Transaction successful' && $ec == 0) {
                    $processed_id = '3';
                }
                if ($result == 'Insufficient Funds' && $ec == 5) {
                    $processed_id = '6';
                }
                if ($processed_id) {
                    wpsc_update_purchase_log_status($sessionid, $processed_id, 'sessionid');
                }
                break;
            case 'wpsc_merchant_paymentexpress':
                // Payment Express sends back there own session id, which is temporarily stored in the Auth field
                // so just swapping that over here
                $query = "SELECT `sessionid` FROM  `" . WPSC_TABLE_PURCHASE_LOGS . "` WHERE  `authcode` ='" . $sessionid . "'";
                $result = $wpdb->get_var($query);
                if ($result != null) {
                    // just in case they are using an older version old gold cart (pre 2.9.5)
                    $sessionid = $result;
                    $dont_show_transaction_results = true;
                }
                break;
            case 'eway_hosted':
                $sessionid = decrypt_eway_uk_response();
                break;
                //default filter for other payment gateways to use
            //default filter for other payment gateways to use
            default:
                $sessionid = apply_filters('wpsc_previous_selected_gateway_' . $selected_gateway, $sessionid);
                break;
        }
    }
    if (!$dont_show_transaction_results) {
        if (!empty($sessionid)) {
            $cart_log_id = $wpdb->get_var($wpdb->prepare("SELECT `id` FROM `" . WPSC_TABLE_PURCHASE_LOGS . "` WHERE `sessionid`= %s LIMIT 1", $sessionid));
            echo transaction_results($sessionid, true);
        } else {
            printf(__('Sorry your transaction was not accepted.<br /><a href="%1$s">Click here to go back to checkout page</a>.', 'wp-e-commerce'), wpsc_get_checkout_url());
        }
    }
}
开发者ID:benhuson,项目名称:WP-e-Commerce,代码行数:86,代码来源:checkout-results.php


示例8: _wpsc_te2_filter_option_transact_url

/**
 * The 'transact_url' option is still used by other components outside of theme
 * engine (such as payment gateways). To ensure compatibility, we need to point
 * this option to the last step of the checkout process.
 *
 * Action hook: 'pre_option_transact_url'.
 *
 * @access private
 *
 * @since  0.1
 * @param  string $option Value of the 'transact_url' option
 * @return string The new transaction result URL
 */
function _wpsc_te2_filter_option_transact_url($value)
{
    return wpsc_get_checkout_url('results');
}
开发者ID:ashik968,项目名称:digiplot,代码行数:17,代码来源:settings.php


示例9: scripts

 /**
  * Add scripts
  */
 public function scripts()
 {
     if (!wpsc_is_cart() && !wpsc_is_checkout()) {
         return;
     }
     wp_enqueue_style('amazon_payments_advanced', WPSC_MERCHANT_V3_SDKS_URL . '/amazon-payments/assets/css/style.css');
     wp_enqueue_script('amazon_payments_advanced_widgets', WPSC_AMAZON_PA_WIDGETS_URL, '', WPSC_VERSION);
     wp_enqueue_script('amazon_payments_advanced', WPSC_MERCHANT_V3_SDKS_URL . '/amazon-payments/assets/js/amazon-checkout.js', array('amazon_payments_advanced_widgets'), '1.0', true);
     $is_pay_page = _wpsc_get_current_controller_name() == 'checkout' || _wpsc_get_current_controller_name() == 'cart';
     $redirect_page = $is_pay_page ? add_query_arg('amazon_payments_advanced', 'true', wpsc_get_checkout_url('shipping-and-billing')) : esc_url_raw(add_query_arg('amazon_payments_advanced', 'true'));
     wp_localize_script('amazon_payments_advanced', 'amazon_payments_advanced_params', apply_filters('wpsc_amazon_payments_advanced_params', array('seller_id' => $this->setting->get('seller_id'), 'reference_id' => $this->reference_id, 'redirect' => $redirect_page, 'pwa_type' => 'PwA', 'pwa_color' => 'Gold', 'pwa_size' => 'small')));
 }
开发者ID:RJHanson292,项目名称:WP-e-Commerce,代码行数:15,代码来源:amazon-payments.php


示例10: _wpsc_te2_filter_option_shopping_cart_url

/**
 * The 'shopping_cart_url' option is still used by other components outside of theme
 * engine (such as payment gateways). To ensure compatibility, we need to point
 * this option to the last step of the checkout process.
 *
 * Action hook: 'pre_option_shopping_cart_url'.
 *
 * @access private
 *
 * @since  0.1
 * @return string The new shopping cart URL
 */
function _wpsc_te2_filter_option_shopping_cart_url()
{
    return wpsc_get_checkout_url('payment');
}
开发者ID:benhuson,项目名称:WP-e-Commerce,代码行数:16,代码来源:settings.php


示例11: _callback_update_quantity

 public function _callback_update_quantity()
 {
     global $wpsc_cart;
     if (!wp_verify_nonce($_REQUEST['_wp_nonce'], 'wpsc-cart-update')) {
         wp_die(__('Request expired. Please try updating the items in your cart again.', 'wpsc'));
     }
     $changed = 0;
     $has_errors = false;
     extract($_REQUEST, EXTR_SKIP);
     foreach ($wpsc_cart->cart_items as $key => &$item) {
         if (isset($quantity[$key]) && $quantity[$key] != $item->quantity) {
             $product = get_post($item->product_id);
             if (!is_numeric($quantity[$key])) {
                 $message = sprintf(__('Invalid quantity for %s.', 'wpsc'), $product->post_title);
                 $this->message_collection->add($message, 'error');
                 continue;
             }
             if ($quantity[$key] > $item->quantity) {
                 $product = WPSC_Product::get_instance($item->product_id);
                 if (!$product->has_stock) {
                     $message = __("Sorry, all the remaining stock of %s has been claimed. Now you can only checkout with the current number of that item in your cart.", 'wpsc');
                     $this->message_collection->add(sprintf($message, $product->post_title), 'error');
                     $has_errors = true;
                     continue;
                 } elseif ($product->has_limited_stock && $product->stock < $item->quantity) {
                     $message = __('Sorry, but the quantity you just specified is larger than the available stock of %s. Besides the current number of that product in your cart, you can only add %d more.', 'wpsc');
                     $this->message_collection->add(sprintf($message, $product->post_title, $product->stock), 'error');
                     $has_errors = true;
                     continue;
                 }
             }
             $item->quantity = $quantity[$key];
             $item->refresh_item();
             $changed++;
         }
     }
     $wpsc_cart->clear_cache();
     if (!isset($_POST['update_quantity']) && !$has_errors) {
         wp_redirect(wpsc_get_checkout_url());
         exit;
     }
     if ($changed) {
         $message = _n('You just successfully updated the quantity for %d item.', 'You just successfully updated the quantity for %d items.', $changed, 'wpsc');
         $this->message_collection->add(sprintf($message, $changed), 'success');
     }
 }
开发者ID:osuarcher,项目名称:WP-e-Commerce,代码行数:46,代码来源:cart.php


示例12: wpsc_get_checkout_steps

function wpsc_get_checkout_steps()
{
    if (_wpsc_get_current_controller_name() != 'checkout') {
        return '';
    }
    $wizard = WPSC_Checkout_Wizard::get_instance();
    $steps = $wizard->steps;
    $output = '<ul class="wpsc-wizard">';
    $step_count = 1;
    foreach ($steps as $step => $title) {
        $classes = array('wpsc-wizard-step wpsc-wizard-step-' . $step);
        if ($wizard->is_active($step)) {
            $classes[] = 'active';
        }
        if ($wizard->is_disabled($step)) {
            $classes[] = 'disabled';
        } elseif ($wizard->is_completed($step)) {
            $classes[] = 'completed';
        } else {
            $classes[] = 'pending';
        }
        $classes[] = 'split-' . count($steps);
        $output .= '<li class="' . implode(' ', $classes) . '">';
        if (!$wizard->is_completed($step)) {
            $output .= '<span>';
        } else {
            $output .= '<a href="' . wpsc_get_checkout_url($step) . '">';
        }
        $output .= '<span class="step">' . $step_count . '.</span> ' . $title;
        if (!$wizard->is_completed($step)) {
            $output .= '</span>';
        } else {
            $output .= '</a>';
        }
        $output .= '</li>';
        $step_count++;
    }
    $output .= '</ul>';
    return $output;
}
开发者ID:benhuson,项目名称:WP-e-Commerce,代码行数:40,代码来源:general.php


示例13: wpsc_checkout_url

function wpsc_checkout_url($slug = '')
{
    echo esc_url(wpsc_get_checkout_url($slug));
}
开发者ID:ashik968,项目名称:digiplot,代码行数:4,代码来源:url.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wpsc_get_currency_symbol函数代码示例发布时间:2022-05-23
下一篇:
PHP wpsc_get_categorymeta函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap