payum-tw/mypay
Composer 安装命令:
composer create-project payum-tw/mypay
包简介
The Payum extension. MyPay金流
README 文档
README
The Payum extension to rapidly build new extensions.
- Create new project
$ composer create-project payum-tw/mypay
- Replace all occurrences of
payumwith your vendor name. It may be your github name, for now let's say you choose:acme. - Replace all occurrences of
mypaywith a payment gateway name. For example Stripe, Paypal etc. For now let's say you choose:mypay. - Register a gateway factory to the payum's builder and create a gateway:
<?php use Payum\Core\PayumBuilder; use Payum\Core\GatewayFactoryInterface; $defaultConfig = []; $payum = (new PayumBuilder) ->addGatewayFactory('mypay', function(array $config, GatewayFactoryInterface $coreGatewayFactory) { return new \PayumTW\Allpay\AllpayGatewayFactory($config, $coreGatewayFactory); }) ->addGateway('mypay', [ 'factory' => 'mypay', 'MerCode' => null, 'MerKey' => null, 'MerName' => null, 'Account' => null, 'sandbox' => true, ]) ->getPayum() ;
- While using the gateway implement all method where you get
Not implementedexception:
<?php use Payum\Core\Request\Capture; $mypay = $payum->getGateway('mypay'); $model = new \ArrayObject([ // ... ]); $mypay->execute(new Capture($model));
Resources
License
Skeleton is released under the MIT License.
统计信息
- 总下载量: 548
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2016-09-11