zoukankan      html  css  js  c++  java
  • unigui验证微信服务器的有效性

    UNIGUI验证微信服务器的有效性:

    ////////////////////////////////////////////

    //UniGUIServerModuleHTTPCommand

    //公众平台验证服务器地址的有效性

    ////////////////////////////////////////////

    procedure TUniServerModule.UniGUIServerModuleHTTPCommand(

      ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo;

      var Handled: Boolean);

    begin

        if CheckSignature(ARequestInfo) then//微信验证服务器地址的有效性

        begin

          if ARequestInfo.Params.Values['echostr']<>'' then

          begin

            Handled := true;

            AResponseInfo.CharSet := 'UTF-8';

            AResponseInfo.ContentType := 'UTF-8';

            AResponseInfo.ContentText :=ARequestInfo.Params.Values['echostr'];//签名比较成功后返回echostr的内容就可以。

          end;

        end;

     end;

  • 相关阅读:
    【BZOJ2138】stone
    【ARC076F】 Exhausted
    [SDOI2018]战略游戏
    CF536D Tavas in Kansas
    [JSOI2018]战争
    ###学习《C++ Primer》- 5
    ###学习《C++ Primer》- 4
    ###Linux基础
    ###Linux基础
    ###Linux基础
  • 原文地址:https://www.cnblogs.com/qiufeng2014/p/6920535.html
Copyright © 2011-2022 走看看