Giter VIP home page Giter VIP logo

console's Introduction

EasyWeChat Console Tool

A command line for EasyWeChat Application.

Installing

$ composer require easywechat/console -vvv

Or install it globally:

$ composer global require easywechat/console -vvv

Usage

$ ./vendor/bin/easywechat list

# globally install
$ easywechat list

Get payment RSA public key.

https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=24_7

$ ./vendor/bin/easywechat payment:rsa_public_key \
    --mch_id=14339221228 \
    --api_key=36YTbDmLgyQ52noqdxgwGiYy \
    --cert_path=/Users/overtrue/www/demo/apiclient_cert.pem \
    --key_path=/Users/overtrue/www/demo/apiclient_key.pem 
    
# Public key of mch_id:14339221228 saved as ./public-14339221228.pem

List, Create, Delete Official Account menu structure.

https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141013
https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141014
https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141015

$ ./vendor/bin/easywechat menus:list_menus \
    --app_id=14339221228 \
    --secret=36YTbDmLgyQ52noqdxgwGiYy \
    --token=mytoken \
    --aes_key=0xp26B0rqlKFZPWbr5lQs4SVaugBnFjE0H1xE9rfePX
    --file_output=/Users/overtrue/www/demo/menus.json 
    
# JSON menu structure of the Official Account output in /Users/overtrue/www/demo/menus.json
$ ./vendor/bin/easywechat menus:create_menus \
    --app_id=14339221228 \
    --secret=36YTbDmLgyQ52noqdxgwGiYy \
    --token=mytoken \
    --aes_key=0xp26B0rqlKFZPWbr5lQs4SVaugBnFjE0H1xE9rfePX
    --file=/Users/overtrue/www/demo/menus.json 
    
# Menu structure of the Official Account created/updated
$ ./vendor/bin/easywechat menus:delete_menus \
    --app_id=14339221228 \
    --secret=36YTbDmLgyQ52noqdxgwGiYy \
    --token=mytoken \
    --aes_key=0xp26B0rqlKFZPWbr5lQs4SVaugBnFjE0H1xE9rfePX
    --save=/Users/overtrue/www/demo/menus.json 
    
# Menu structure of the Official Account deleted
# JSON menu structure saved as /Users/overtrue/www/demo/menus.json

License

MIT

console's People

Contributors

froger-me avatar overtrue avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.