ppstandardcheckout.ascx.cs

来自「一个网上购物系统」· CS 代码 · 共 48 行

CS
48
字号
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;

public partial class Modules_PPStandardCheckout : System.Web.UI.UserControl {
    public string ShippingMethod = "";
    public double ShippingAmount = 0;
    public double TaxAmount = 0;
    public double Subtotal = 0;

    
    
    protected void Page_Load(object sender, EventArgs e) {

    }

    int InitOrder() {
        string shipSummary = Profile.Commerce.ShipFirst + " " + Profile.Commerce.ShipLast + "<br>" + Profile.Commerce.ShipAddress1 +
            "<br>" + Profile.Commerce.ShipAddress2 + "<br>" + Profile.Commerce.ShipCity +
            ", " + Profile.Commerce.ShipState + " " + Profile.Commerce.ShipZip + "<br>" + Profile.Commerce.ShipCountry;

       return OrdersManager.InitializeOrder(Page.User.Identity.Name,
            shipSummary,
            ShippingMethod, Subtotal,
            ShippingAmount,
            TaxAmount,
            Profile.Commerce.ShipZip,
            "PayPal Payments Standard");

    }

    protected void btnContinue_Click(object sender, EventArgs e) {
        
        int orderID = InitOrder();
        string sUrl = PayPalHelper.GetUploadCartUrl(TaxAmount,Subtotal,ShippingAmount);
        Response.Redirect(sUrl + "&custom=" + orderID.ToString());

    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?