2017 © Pedro Peláez
 

library laravel-pay

专注 Alipay 和 WeChat 的 laravel 支付扩展包

image

yansongda/laravel-pay

专注 Alipay 和 WeChat 的 laravel 支付扩展包

  • Friday, June 29, 2018
  • by yansongda
  • Repository
  • 15 Watchers
  • 286 Stars
  • 9,949 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 50 Forks
  • 2 Open issues
  • 7 Versions
  • 63 % Grown

The README.md

Pay

依赖

  • php >= 8.0
  • composer
  • laravel || lumen >= 8.0

安装

composer require yansongda/laravel-pay:~3.7.0

laravel 用户

配置文件

php artisan vendor:publish --provider="Yansongda\LaravelPay\PayServiceProvider" --tag=laravel-pay

lumen 用户

配置文件

请手动复制配置文件, (*1)

service provider

$app->register(Yansongda\LaravelPay\PayServiceProvider::class);

使用方法

支付宝

use Yansongda\LaravelPay\Facades\Pay;

$order = [
    'out_trade_no' => time(),
    'total_amount' => '1',
    'subject' => 'test subject - 测试',
];

return Pay::alipay()->web($order);

// 下面这个方法也可以
// return Pay::web($order);

微信

use Yansongda\LaravelPay\Facades\Pay;

$order = [
    'out_trade_no' => time(),
    'body' => 'subject-测试',
    'total_fee'      => '1',
    'openid' => 'onkVf1FjWS5SBIixxxxxxxxx',
];

$result = Pay::wechat()->mp($order);

抖音支付

use Yansongda\LaravelPay\Facades\Pay;

$order = [
    'out_order_no' => date('YmdHis').mt_rand(1000, 9999),
    'total_amount' => 1,
    'subject' => '闫嵩达 - test - subject - 01',
    'body' => '闫嵩达 - test - body - 01',
    'valid_time' => 600,
    'expand_order_info' => json_encode([
        'original_delivery_fee' => 15,
        'actual_delivery_fee' => 10
    ])
];

$result = Pay::douyin()->mini($order);

江苏银行(e融支付)

use Yansongda\LaravelPay\Facades\Pay;

$order = [
    'outTradeNo' => time().'',
    'proInfo' => 'subject-测试',
    'totalFee'=> 1,
];

$result = Pay::jsb()->scan($order);

具体使用说明请传送至 https://github.com/yansongda/pay, (*2)

License

MIT, (*3)

The Versions

29/06 2018

dev-master

9999999-dev

专注 Alipay 和 WeChat 的 laravel 支付扩展包

  Sources   Download

MIT

The Requires

 

by Avatar yansongda

laravel pay alipay package wechat

29/06 2018

v2.0.1

2.0.1.0

专注 Alipay 和 WeChat 的 laravel 支付扩展包

  Sources   Download

MIT

The Requires

 

by Avatar yansongda

laravel pay alipay package wechat

27/12 2017

v2.0.0

2.0.0.0

专注 Alipay 和 WeChat 的 laravel 支付扩展包

  Sources   Download

MIT

The Requires

 

by Avatar yansongda

laravel pay alipay package wechat

05/09 2017

v1.0.3

1.0.3.0

专注 Alipay 和 WeChat 的 laravel 支付扩展包

  Sources   Download

MIT

The Requires

 

by Avatar yansongda

laravel pay alipay package wechat

25/08 2017

v1.0.2

1.0.2.0

专注 Alipay 和 WeChat 的 laravel 支付扩展包

  Sources   Download

MIT

The Requires

 

by Avatar yansongda

laravel pay alipay package wechat

20/08 2017

v1.0.1

1.0.1.0

专注 Alipay 和 WeChat 的 laravel 支付扩展包

  Sources   Download

MIT

The Requires

 

by Avatar yansongda

laravel pay alipay package wechat

20/08 2017

v1.0.0

1.0.0.0

专注 Alipay 和 WeChat 的 laravel 支付扩展包

  Sources   Download

MIT

The Requires

 

by Avatar yansongda

laravel pay alipay package wechat