unigui驗證微信服務器的有效性
阿新 • • 發佈:2019-01-08
地址 inf con serve tin .html response check seinfo
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;
https://www.cnblogs.com/qiufeng2014/p/6920535.html
unigui驗證微信服務器的有效性