WebUI/Api/payment/alipay/return_url.aspx.cs

(开头部分) 7KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Com.Alipay;
using Common;
using System.Collections.Specialized;
using HModel;
using Bll;
using WebBase;

namespace WebUI.Api.payment.alipay
{
    public partial class return_url : System.Web.UI.Page
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            SortedDictionary<string, string> sPara = GetRequestGet();

            if (sPara.Count > 0)//判断是否有带返回参数
            {
                Notify aliNotify = new Notify();
                bool verifyResult = aliNotify.Verify(sPara, Request.QueryString["notify_id"], Request.QueryString["sign"]);

                if (verifyResult)//验证成功
                {
                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    //请在这里加上商户的业务逻辑程序代码


                    //——请根据您的业务逻辑来编写程序(以下代码仅作参考)——
                    //获取支付宝的通知返回参数,可参考技术文档中页面跳转同步通知参数列表
                    //   string trade_no = EKRequest.GetString("trade_no");              //支付宝交易号
                    string order_no = EKRequest.GetString("out_trade_no");	        //获取订单号
                    string total_fee = EKRequest.GetString("total_fee");            //获取总金额
                    //   string subject = EKRequest.GetString("subject");                //商品名称、订单名称
                    //   string body = EKRequest.GetString("body");                      //商品描述、订单备注、描述
                    //   string buyer_email = EKRequest.GetString("buyer_email");        //买家支付宝账号
                    //   string trade_status = EKRequest.GetString("trade_status");      //交易状态
                    //   string order_type = EKRequest.GetString("extra_common_param");  //订单交易类别

                    string state=EKRequest.GetString("trade_status");
 
                    //那么担保交易接口状态:
                    //WAIT_BUYER_PAY 交易创建
                    //WAIT_SELLER_SEND_GOODS  买家已付款,等待卖家发货
                    //WAIT_BUYER_CONFIRM_GOODS 卖家已发货,等待买家确认收货 
                    //TRADE_FINISHED 交易成功
                    //TRADE_SUCCESS 交易成功

                    if (state == "WAIT_SELLER_SEND_GOODS" || state == "TRADE_FINISHED" || state == "TRADE_SUCCESS" || state == "WAIT_BUYER_CONFIRM_GOODS")
                    {
                        //付款成功,但卖家没有发货
                        ek_orders model = Bll_ek_orders.GetEntityById(order_no);

                        if (model == null)
                        {
后面还有 115 行代码,购买后查看完整代码

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

AI 解读 AI

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

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