Wechat Handler 微信回调处理引擎
The Wechat Handler engine handles the Wechat event & message notifications. 微信回调处理引擎处理微信服务器发出的事件通知和消息通知。
Usage in Gemfile
gem 'wechat-handler'
Include the controller concern
include ::Wechat::Handler::Concerns::Dispatcher
def on_event(pairs)
{ 'MsgType' => 'text', 'Content' => 'Aloha!' }
end
The Dispatcher handles the ToUserName, the FromUserName, and the CreateTime automatically.