timeshow / laravel-pay
payment for laravel
v0.2.0
2023-09-22 06:35 UTC
Requires
- illuminate/contracts: ^8.0 || ^9.0 || ^10.0
- illuminate/support: ^8.0 || ^9.0 || ^10.0
- yansongda/pay: ~3.5.0
Requires (Dev)
- laravel/framework: ^8.0 || ^9.0 || ^10.0
README
依赖
- php >= 8.0
- composer
- laravel >= 9.0
安装
composer require yansongda/laravel-pay:~3.5.0
laravel 用户
配置文件
php artisan vendor:publish --provider="TimeShow\LaravelPay\PayServiceProvider" --tag=laravel-pay
使用方法
支付宝
use Pay; $order = [ 'out_trade_no' => time(), 'total_amount' => '1', 'subject' => 'test subject - 测试', ]; return Pay::alipay()->web($order); // 下面这个方法也可以 // return Pay::web($order);
微信
use Pay; $order = [ 'out_trade_no' => time(), 'body' => 'subject-测试', 'total_fee' => '1', 'openid' => 'onkVf1FjWS5SBIixxxxxxxxx', ]; $result = Pay::wechat()->mp($order);
具体使用说明请传送至 https://github.com/yansongda/pay
License
MIT