Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kitlabs-cn/kitpaybundle
weixin pay & alipay symfony3
https://github.com/kitlabs-cn/kitpaybundle
bundle pay payment symfony
Last synced: about 1 month ago
JSON representation
weixin pay & alipay symfony3
- Host: GitHub
- URL: https://github.com/kitlabs-cn/kitpaybundle
- Owner: kitlabs-cn
- Created: 2017-07-05T03:35:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-12-02T17:25:45.000Z (about 4 years ago)
- Last Synced: 2024-11-15T19:10:33.494Z (about 1 month ago)
- Topics: bundle, pay, payment, symfony
- Language: PHP
- Size: 24.4 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# KitPayBundle
Symfony wrapper for [payment](https://github.com/helei112g/payment).
The KitPayBundle provides a simple integration for your Symfony project.## Installation
### Step 1: Download the Bundle
---------------------------
Open a command console, enter your project directory and execute the
following command to download the latest stable version of this bundle:
$ composer require kitlabs/kit-pay-bundle
This command requires you to have Composer installed globally, as explained
in the [installation chapter](https://getcomposer.org/doc/00-intro.md)
of the Composer documentation.
### Step 2: Enable the Bundle
---------------------------
Then, enable the bundle by adding it to the list of registered bundles
in the `app/AppKernel.php` file of your project:[
'ali_app', // 支付宝app支付
'ali_wap', // 支付宝H5支付
'ali_web', // 支付宝电脑网站支付
'ali_qr', // 支付宝当面付:扫码支付
'ali_bar' // 支付宝当面付:条码支付
],
'weipay' => [
'wx_app', // 微信app支付
'wx_pub', // 微信公众号支付
'wx_qr', // 微信扫码支付
'wx_bar', // 微信刷卡支付
'wx_lite', // 微信小程序支付
'wx_wap' // 微信H5支付
],
'cmbpay' => [
'cmb_app', // 招商一网通app支付
'cmb_wap' // 招商H5支付
]
];/**
* @var \Kit\Bundle\PayBundle\Service\PaymentService $paymentService
*/
$paymentService = $this->get('kit_pay.payment_service');
$paymentService->run($channel, $paytype, $metadata); // $channel one of "alipay","weipay"// 不使用默认配置的商户号支付,添加额外商户号支付
$paymentService->run($channel, $paytype, $metadata,$config); // $config为配置的数组