<%@ WebHandler Language="C#" Class="DTcms.Web.dev.wxnetpayreceive" %>
//上面这个wxnetpayreceive 可以自定义
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.SessionState;
using System.IO;
using System.Text;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using DTcms.Common;
using DTcms.DBUtility;
using NetWing.Common.Data.SQLServer;
using NetWing.Common.Request;
using DTcms.API.Payment.wxpay;//必须引入微信支付类
namespace DTcms.Web.dev
{
/// <summary>
/// 支付展会定金 的摘要说明
/// </summary>
//wxnetpayreceive 这个类可以自定义 必须和上面保持一致
public class wxnetpayreceive : IHttpHandler, IRequiresSessionState
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text / plain";
WxPayData notifyData = NativePay.GetNotifyData();
string transaction_id = notifyData.GetValue("transaction_id").ToString(); //微信支付订单号
//获取订单信息
string order_no = notifyData.GetValue("out_trade_no").ToString(); //商户订单号
string total_fee = notifyData.GetValue("total_fee").ToString(); //获取总金额
//这里写支付成功或失败业务逻辑
//这里写支付成功或失败业务逻辑
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
Copyright © 2004-2024 Ynicp.com 版权所有 法律顾问:建纬(昆明)律师事务所 昆明市网翼通科技有限公司 滇ICP备08002592号-4