jemoker/wxpay is a Laravel package for 微信支付sdk在laravel5封装包。.
It currently has 0 GitHub stars and 35 downloads on Packagist.
Install it with composer require jemoker/wxpay.
Discover more Laravel packages by jemoker
or browse all Laravel packages to compare alternatives.
Last updated
自用 WeiXin Payment
###Install
"jemoker/wxpay": "dev-master" "require": {
"jemoker/wxpay": "dev-master"
}
'providers' => array(
'Jemoker\Wxpay\WxpayServiceProvider'
)
'aliases' => array(
'Wxpay' => 'Jemoker\Wxpay\Facades\WxpayFacade'
)
composer update 命令php artisan config:publish jemoker/wxpayphp artisan view:publish jemoker/wxpay###Usage
支付调用
$wxpay = app('wxpay');
$params = array(
'body' => 'xxx',
'total_fee' => 'xxx',
'out_trade_no' => 'xxx',
'notify_url' => 'xxx',
'call_back_url' => 'xxx'
);
$wxpay->setParams($params);
支付回调
$wxpay = app('wxpay');
$notify = $wxpay->verifyNotify();
if($notify){
//业务逻辑
switch ($wxpay->data['result_code']) {
...
}
return 'success';
}else{
//业务逻辑
return 'fail';
}