leslie/wx_token

v1.0 2019-01-20 13:33 UTC

This package is auto-updated.

Last update: 2024-10-21 23:44:21 UTC


README

微信分享token

使用方法:


composer require leslie/wx_token


use Leslie\WxToken\GetWxToken;
require ('vendor/autoload.php');

$appId = "xxxxxxxxxx";
$secret = "xxxxxxxxxxxxxxxxx";
$url = "xxxxxxxxxxxxxxxxxxxxxxxxx";
$timestamp = time();
$nonceStr = GetWxToken::getAccessToken($appId,$secret);
$access = $nonceStr->access_token;
$getTicket = GetWxToken::getTicket($access);
$ticket = $getTicket->ticket;
$res =  GetWxToken::getSignature($url,$ticket);
var_dump($res);