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;

  • 相关阅读:
    HDU
    POJ
    快速幂运算
    RocketMQ集群
    RocketMQ角色介绍
    RocketMQ初探
    MySQL 串行隔离级别小记
    分布式事务笔记
    MySQL分库分表篇
    MySQL主从篇
  • 原文地址:https://www.cnblogs.com/qiufeng2014/p/6920535.html
Copyright © 2011-2022 走看看