prolix/payum-bundle
Composer 安装命令:
composer require prolix/payum-bundle
包简介
Rich payment solutions for symfony2. Paypal, payex, authorize.net, be2bill, omnipay, recurring payments, instant notifications and many more
关键字:
README 文档
README
The bundle integrate payum into symfony framework. It already supports +35 gateways. Provide nice configuration layer, secured capture controller, storages integration and lots of more features.
Sylius e-commerce platform base its payment solutions on top of the bundle.
Resources
Examples
Configure:
payum: storages: Payum\Core\Model\Payment: filesystem: storage_dir: %kernel.root_dir%/Resources/payments id_property: number security: token_storage: Payum\Core\Model\Token: filesystem: storage_dir: %kernel.root_dir%/Resources/gateways id_property: hash gateways: offline: factory: offline
Purchase
<?php use Payum\Core\Model\Payment; use Payum\Core\Reply\HttpRedirect; use Payum\Core\Reply\HttpResponse; use Payum\Core\Request\Capture; $payment = new Payment; $payment->setNumber(uniqid()); $payment->setCurrencyCode('EUR'); $payment->setTotalAmount(123); // 1.23 EUR $payment->setDescription('A description'); $payment->setClientId('anId'); $payment->setClientEmail('foo@example.com'); $gateway = $this->get('payum')->getGateway('offline'); $gateway->execute(new Capture($payment));
Get status
<?php use Payum\Core\Request\GetHumanStatus; $gateway->execute($status = new GetHumanStatus($payment)); echo $status->getValue();
Other operations.
<?php use Payum\Core\Request\Authorize; use Payum\Core\Request\Cancel; use Payum\Core\Request\Refund; $gateway->execute(new Authorize($payment)); $gateway->execute(new Refund($payment)); $gateway->execute(new Cancel($payment));
Contributing
PayumBundle is an open source, community-driven project. Pull requests are very welcome.
Like it? Spread the word!
Star PayumBundle on github or packagist.
Donate
License
The bundle is released under the MIT License.
统计信息
- 总下载量: 60
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-06-27