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;

     

     

     

  • 相关阅读:
    设计模式
    显示WiFi密码
    05-变量
    04-杂谈
    03-杂谈
    02-杂谈
    01-linux介绍、命令
    14-python--inner
    13-python--bibao
    11-python-iterator
  • 原文地址:https://www.cnblogs.com/hnxxcxg/p/9380568.html
Copyright © 2011-2022 走看看