Migrated repository
Go to file
2017-08-14 21:58:24 +08:00
src 增加 WeChat 支付网关,优化 支付宝 2017-08-14 21:58:24 +08:00
.gitignore 优化代码 2017-08-12 16:33:41 +08:00
composer.json i 2017-08-10 09:06:42 +08:00
composer.lock i 2017-08-10 09:06:42 +08:00
LICENSE i 2017-08-10 09:06:42 +08:00
README.md 增加 WeChat 支付网关,优化 支付宝 2017-08-14 21:58:24 +08:00

Pay

安装

composer required yansongda/pay

使用方法

1、支付宝

use Yansongda\Pay\Pay;

$config = [
    'alipay' => [
        'app_id' => '',
        'notify_url' => '',
        'return_url' => '',
        'ali_public_key' => '',
        'private_key' => '',
    ],
];
$config_biz = [
    'out_trade_no' => '',
    'total_amount' => '',
    'subject' => '',
];

$pay = new Pay($config);
return $pay->dirver('alipay')->gateway('web')->pay($config_biz);

2、微信

use Yansongda\Pay\Pay;

$config = [
    'wechat' => [
        'app_id' => '',
        'mch_id' => '',
        'notify_url' => '',
    ],
];
$config_biz = [
    'out_trade_no' => '',
    'total_fee' => '',
    'body' => '',
    'spbill_create_ip' => '',
];

$pay = new Pay($config);
return $pay->dirver('wechat')->gateway('js')->pay($config_biz);

LICENSE

MIT