jean553/wechat-bundle
A Symfony/PHP bundle for integrating WeChat (Weixin) services into applications. It provides configuration and service wiring for common WeChat API, authentication, and messaging tasks, helping developers add WeChat support without building integration plumbing from scratch.
composer require the package, then publish its config (php artisan vendor:publish --tag=wechat-config or the tag shown in the package README) so credentials live outside vendor code.WECHAT_APPID, WECHAT_SECRET, and any token/cache settings to .env. Start by reading the published config file — it is the fastest map of what the package can do.redirect_uri and scope, handle the callback route, exchange code for an OAuth2 token, then fetch user information.wx.config.snsapi_base (silent, openid only) or snsapi_userinfo (prompts for profile). Store a random state in the session before redirecting and verify it on callback.code for an OAuth2 token, read openid, then either look up a local user or call the user-info endpoint and create/update one. Keep this in a dedicated service or action class rather than the controller.appId, timestamp, nonceStr, signature to the view, then call wx.config. Cache the JS ticket, not the signature (signatures are URL-specific).snsapi_base does not return profile fields. If you call the user-info endpoint after a base-scope flow, expect failure — choose scope deliberately at redirect time.state and open redirects: always validate state, and never redirect to an unvalidated redirect_uri.invalid signature in wx.config with little detail.How can I help you explore Laravel packages today?