zoukankan      html  css  js  c++  java
  • 回调的使用,记的加post

    [HttpPost]
    public void notify_url()
    {
    SortedDictionary<string, string> sPara = GetRequestPost();
    System.IO.File.AppendAllText(Server.MapPath("~/App_Data/log.txt"), " rateCount: " + "米亚回调"+DateTime.Now.ToString());
    if (sPara.Count > 0)//判断是否有带返回参数
    {
    Notify aliNotify = new Notify();
    bool verifyResult = aliNotify.Verify(sPara, Request.Form["notify_id"], Request.Form["sign"]);

    if (verifyResult)//验证成功
    {
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //请在这里加上商户的业务逻辑程序代码
    int rateCount = 0;
    System.IO.File.AppendAllText(Server.MapPath("~/App_Data/log.txt"), " rateCount: " + rateCount);
    System.IO.File.AppendAllText(Server.MapPath("~/App_Data/log.txt"), " productReviews.Count: " + "什么情况呢");
    System.IO.File.AppendAllText(Server.MapPath("~/App_Data/log.txt"), " rateMean: " + rateCount);

    //——请根据您的业务逻辑来编写程序(以下代码仅作参考)——
    //获取支付宝的通知返回参数,可参考技术文档中服务器异步通知参数列表

    //商户订单号

    string out_trade_no = Request.Form["out_trade_no"];

    var targetUsert = _RegistrationInformationService.GetAllRegistrationInformations().Where(p => p.OrderNumber == out_trade_no).FirstOrDefault();
    targetUsert.IsPayed = true;
    _RegistrationInformationService.UpdateRegistrationInformation(targetUsert);

  • 相关阅读:
    用户模板和用户场景
    移动端疫情展示
    数据爬取
    全国疫情统计可视化地图-第二、三阶段
    学习进度条-第三周
    学习进度条-第二周
    软件工程第二周开课博客
    返回一个整数数组中最大子数组的和
    JavaWeb选课系统(2)
    JavaWeb选课系统
  • 原文地址:https://www.cnblogs.com/zhaojianwei/p/5482814.html
Copyright © 2011-2022 走看看