quickwx/crypt

wechat open platform Third party Platforms API SDK

Maintainers

Details

github.com/quickwx/crypt

Source

Issues

Installs: 46

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/quickwx/crypt

v1.0.6 2021-09-02 14:04 UTC

This package is auto-updated.

Last update: 2025-11-29 02:50:08 UTC


README

use quickwx\wxTool;

$component_appid = ''; //第三方平台app_id
$component_secret = ''; //第三方平台的APPSECRET
$token = ''; //消息校验Token
$encodingAesKey = ''; //消息加解密Key

$wx = new wxTool($component_appid,$component_secret,$token,$encodingAesKey);


// 微信开放平台推送到第三方平台的消息

$msgSignature = ''; //消息签名
$timestamp = ''; //随机时间戳
$nonce = '';  //随机字符串
$postXml = ''; //报文


// 解密消息
$dec = $wx->decryptMsg($msgSignature,$timestamp,$nonce,$postXml,$msg);
if($dec == 0){
    echo $msg;
}


//获取令牌
$ret = $wx->component_token($component_verify_ticket);
echo $ret;


//快速创建小程序