WeChat/jsPay.aspx.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LitJson;
using EKETEAM.Tencent.WeChat;
using EKETEAM.FrameWork;

namespace eFrameWork.WeChat
{
    public partial class jsPay : System.Web.UI.Page
    {
        public string UserArea = "Application";    
        public eUser user;        
        private static string _wxJsApiParam = "";
        public static string wxJsApiParam
        {
            get { return _wxJsApiParam; }
            set { _wxJsApiParam = value; }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            
            user = new eUser(UserArea);

            string act = eParameters.QueryString("act");

            if (act == "getpayinfo")
            {
                double je = Convert.ToDouble(eParameters.Form("je"));
                je = je * 100;
                string openid = user["openid"].ToString();
                string total_fee = je.ToString();

                JsApiPay jsApiPay = new JsApiPay(this);
                
                jsApiPay.openid = openid;
                jsApiPay.total_fee = int.Parse(total_fee);

                try
                {
                    string _orderid = Guid.NewGuid().ToString();
                    if (eParameters.QueryString("orderid").Length > 0) _orderid = eParameters.QueryString("orderid");
                    string attach = user.ID + "," + _orderid + "," + "id";
                    WxPayData unifiedOrderResult = jsApiPay.GetUnifiedOrderResult(attach);
                    wxJsApiParam = jsApiPay.GetJsApiParameters(); 

                    JsonData json = JsonMapper.ToObject(wxJsApiParam);
                    json["orderid"] = _orderid;
                    Response.Write(json.ToJson().ToString());

                }
                catch( Exception ex)
                {
                    JsonData json = new JsonData();
                    json["msg"] = ex.Message;
                    Response.Write(json.ToJson().ToString());
                }
                Response.End();
后面还有 5 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。