jemoker/wxpay
微信支付SDK在Laravel5封装包。
35
Larablocks Analysis
jemoker/wxpay has no release yet to check Laravel compatibility against.
Recommendation checks
Use with careUse with care: meets 0 of 3 checks.
- No dated releases
- 0 downloads a month (needs 10,000)
- 0 GitHub stars (needs 100)
Data from Packagist and GitHub, checked by Larablocks on Dec 2, 2026.
| Install | |
|---|---|
composer require jemoker/wxpay:dev-master |
|
| PHP: | >=5.4.0 |
| License: | MIT |
| Last Updated: | Sep 21, 2018 |
| Links: | GitHub · Packagist |
Maintainer: jemoker
wxpay
自用 WeiXin Payment
###Install
- 修改composer.json文件,加入
"jemoker/wxpay": "dev-master"
"require": {
"jemoker/wxpay": "dev-master"
}
- 修改app/config/app.php
'providers' => array(
'Jemoker\Wxpay\WxpayServiceProvider'
)
'aliases' => array(
'Wxpay' => 'Jemoker\Wxpay\Facades\WxpayFacade'
)
- 运行
composer update命令 - 运行
php artisan config:publish jemoker/wxpay - 如有必要修改支付页面,运行
php 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';
}