payum-tw / allpay
Payum 扩展。 欧付宝金流
v1.4.2
2018-02-09 05:20 UTC
Requires
- mobiledetect/mobiledetectlib: ^2.8
- payum-tw/ecpay: ^1.2
- payum/core: ^1.3.6
Requires (Dev)
- mockery/mockery: ~0.9.4|~1.0
- nesbot/carbon: ~1.20
- php-http/guzzle6-adapter: ^1.0
- phpunit/phpunit: ^4.8|^5.4|^6.3|~7.0
README
快速构建新扩展的 Payum 扩展。
- 创建新项目
$ composer create-project payum-tw/allpay
- 将所有出现的
payum
替换为您的供应商名称。可能是您的 GitHub 名称,现在让我们假设您选择:allpay
。 - 将所有出现的
allpay
替换为支付网关名称。例如 Stripe、Paypal 等。现在让我们假设您选择:allpay
。 - 向 Payum 的构建器注册网关工厂并创建网关
<?php use Payum\Core\PayumBuilder; use Payum\Core\GatewayFactoryInterface; $defaultConfig = []; $payum = (new PayumBuilder) ->addGatewayFactory('allpay', function(array $config, GatewayFactoryInterface $coreGatewayFactory) { return new \PayumTW\Allpay\AllpayGatewayFactory($config, $coreGatewayFactory); }) ->addGateway('allpay', [ 'factory' => 'allpay', 'MerchantID' => '2000132', 'HashKey' => '5294y06JbISpM5x9', 'HashIV' => 'v77hoKGq4kWxNNIS', 'sandbox' => true, ]) ->getPayum();
- 在使用网关时实现所有方法,在这些方法中您会得到
未实现
异常
<?php use Payum\Core\Request\Capture; $allpay = $payum->getGateway('allpay'); $model = new \ArrayObject([ // ... ]); $allpay->execute(new Capture($model));
资源
许可证
此框架在 MIT 许可证 下发布。