Omnipay-wechat is the omnipay payment gateway extension that provides payment interfaces based on the Omnipay payment framework.
Installation
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:
$ curl-s Http://getcomposer.org/installer | php$ PHP Composer.phar Update
Basic Usage
The following gateways is provided by this package:
- WeChat Express (WeChat JSAPI)
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 the URL for We Chat OAuth And$wechat_express-->getopenid ($code) in callback page to get OpenID.
p.s. The URL for WeChat OAuth must is opened in WeChat In-app Broswer, can Usestrpos ($_server[' http_user_agent '), ' Mic Romessenger ') = = = Falseto Check if the page were not opened in it, and generate a QR code for user.
All methods for WeChat OAuth would be removed in next stable version and I'll publish a WeChat MP library package for compo Ser.
Project home:http://www.open-open.com/lib/view/home/1439890446520