omnipay-wechat 是 omnipay 的微信支付网关扩展,提供基于 omnipay 支付框架的微信支付接口。
Omnipay is installed via Composer. To install, simply add it to yourcomposer.jsonfile:
{ "require": { "labs7in0/omnipay-wechat": "dev-master" }}
And run composer to update your dependencies:
立即学习“PHP免费学习笔记(深入)”;
$ curl -s http://getcomposer.org/installer | php$ php composer.phar update
The following gateways are provided by this package:
For general usage instructions, please see the main Omnipay repository.
WeChat JSAPI require OAuth openid to submit a new order, use$WeChat_Express->getAuthCode($callback)to get an url for WeChat OAuth and$WeChat_Express-->getOpenid($code)in callback page to get openid.
p.s. the url for WeChat OAuth must be opened in WeChat In-App broswer, you can usestrpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') === falseto check if the page were not opened in it, and generate a QR code for user.
All methods for WeChat OAuth will be removed in next stable version and I'll publish a WeChat MP library package for composer.
项目主页:http://www.open-open.com/lib/view/home/1439890446520
微信是一款手机通信软件,支持通过手机网络发送语音短信、视频、图片和文字。微信可以单聊及群聊,还能根据地理位置找到附近的人,带给大家全新的移动沟通体验,有需要的小伙伴快来保存下载体验吧!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号