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);

  • 相关阅读:
    基于KNN的newsgroup 18828文本分类器的Python实现
    基于Bayes和KNN的newsgroup 18828文本分类器的Python实现
    C++笔试题
    一号店笔试题
    最长递增子序列
    雅虎2015校招--研究工程师
    百度2013校园招聘笔试题(答案整理) – 机器学习/数据挖掘工程师
    windows下Python shell代码自动补全
    windows下scrapy安装
    实验四
  • 原文地址:https://www.cnblogs.com/zhaojianwei/p/5482814.html
Copyright © 2011-2022 走看看