DTcms.Web/api/payment/alipaypc/notify_url.aspx.cs
(开头部分) 11KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DTcms.API.Payment.alipaypc;
using DTcms.Common;
namespace DTcms.Web.api.payment.alipaypc
{
public partial class notify_url : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
SortedDictionary<string, string> sPara = GetRequestPost();
if (sPara.Count > 0)//判断是否有带返回参数
{
Notify aliNotify = new Notify();
bool verifyResult = aliNotify.Verify(sPara, DTRequest.GetString("notify_id"), DTRequest.GetString("sign"));
if (verifyResult)//验证成功
{
string trade_no = DTRequest.GetString("trade_no"); //支付宝交易号
string order_no = DTRequest.GetString("out_trade_no").ToUpper(); //获取订单号
string total_fee = DTRequest.GetString("total_fee"); //获取总金额
string trade_status = DTRequest.GetString("trade_status"); //交易状态
if (Config.Type == "1") //即时到帐接口处理方法
{
if (trade_status == "TRADE_FINISHED" || trade_status == "TRADE_SUCCESS")
{
if (order_no.StartsWith("R")) //充值订单
{
BLL.user_recharge bll = new BLL.user_recharge();
Model.user_recharge model = bll.GetModel(order_no);
if (model == null)
{
Response.Write("该订单号不存在");
return;
}
if (model.status == 1) //已成功
{
Response.Write("success");
return;
}
if (model.amount != decimal.Parse(total_fee))
{
Response.Write("订单金额和支付金额不相符");
return;
}
bool result = bll.Confirm(order_no);
if (!result)
{
Response.Write("修改订单状态失败");
return;
}
}
后面还有 174 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。