1 Star 0 Fork 0

xzncit / wechat

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

PHP Wechat Development Framework

如果本PHP WeChat 开发包对您有所帮助,您可以点右上角 "Star" 支持一下 谢谢!

环境要求

  • PHP >= 7.2.5
  • Composer
  • Openssl PHP Extension
  • MBstring PHP Extension
  • FileInfo PHP Extension

安装

composer require "xzncit/wechat:^0.3"

基本使用

include "vendor/autoload.php";

use xzncit\Factory;

try {
    // wechat 
    $app = Factory::Wechat([
        "token"=>"omJNpZEhZ5VFbk1HeHj1ZxFECKkP48BP",
        "appid"=>"wxa02e77d8a507d608",
        "appsecret"=>"3396f50c1f55c2089f4316b6f7c9f71b"
    ]);
    
    // 创建自定义菜单
    $response = $app->menu->create([
        // ...
    ]);
    
    // 返回信息
    var_dump($response);
}catch (\Exception $ex){
    echo("error: ".$ex->getMessage());
}

try {
    // mini
    $app = Factory::MiniProgram([
        "appid"=>"wxa02e77d8a507d608",
        "appsecret"=>"3396f50c1f55c2089f4316b6f7c9f71b"
    ]);
    
    // 登录凭证校验
    $response = $app->oauth->code2Session("31f55c2089f4316b6");
    
    // 返回信息
    var_dump($response);
}catch (\Exception $ex){
    echo("error: ".$ex->getMessage());
}

文档

文档整理中...

bug反馈

如果您使用过程中发现BUG或者其他问题都欢迎大家提交Issue,或者发送邮件给我 158373108@qq.com,我们将及时修复并更新。

Comments ( 0 )

Sign in for post a comment

About

Wechat Development Framework spread retract
PHP
GPL-3.0
Cancel

Releases

No release

Contributors

All

Activities

load more
can not load any more
PHP
1
https://gitee.com/xzncit/wechat.git
git@gitee.com:xzncit/wechat.git
xzncit
wechat
wechat
master

Search