payum / payum-bundle
Payum 已下载一百万次!Payum 提供您处理支付所需的一切。访问网站查看更多。
2.6.0
2024-05-01 16:54 UTC
Requires
- php: ^7.4 || ^8.0
- payum/core: ^1.7.2
- symfony/dependency-injection: ^4.4 || ^5.4 || ^6.4 || ^7.0
- symfony/form: ^4.4.20 || ^5.4 || ^6.0 || ^7.0
- symfony/framework-bundle: ^4.4 || ^5.4 || ^6.0 || ^7.0
- symfony/polyfill-php80: ^1.26
- symfony/security-csrf: ^4.4 || ^5.4 || ^6.0 || ^7.0
- symfony/validator: ^4.4 || ^5.4 || ^6.0 || ^7.0
Requires (Dev)
- defuse/php-encryption: ^2
- doctrine/orm: ^2.8 || ^3.0
- omnipay/common: ^3@dev
- omnipay/dummy: ^3@alpha
- omnipay/paypal: ^3@dev
- payum/offline: ^1.7
- payum/omnipay-v3-bridge: dev-master
- payum/paypal-express-checkout-nvp: ^1.7
- payum/stripe: ^1.7
- php-http/guzzle7-adapter: ^1.0
- phpunit/phpunit: ^9.5
- psr/log: ^1 || ^2 || ^3
- stripe/stripe-php: ~7.0
- symfony/browser-kit: ^4.4 || ^5.4 || ^6.0 || ^7.0
- symfony/expression-language: ^4.4 || ^5.4 || ^6.0 || ^7.0
- symfony/phpunit-bridge: ^4.4 || ^5.4 || ^6.0 || ^7.0
- symfony/templating: ^4.4 || ^5.4 || ^6.0 || ^7.0
- symfony/twig-bundle: ^4.4 || ^5.4 || ^6.0 || ^7.0
- symfony/web-profiler-bundle: ^4.4 || ^5.4 || ^6.0 || ^7.0
- symfony/yaml: ^4.4 || ^5.4 || ^6.0 || ^7.0
- twig/twig: ^2.0 || ^3.0
Suggests
- sonata-project/admin-bundle: ^3 If you want to configure payments in the backend.
- 2.6.0
- dev-master / 2.5.x-dev
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.x-dev
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.1
- 2.2.0
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.1
- 2.0.0
- 1.x-dev
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.0.x-dev
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 1.0.0-BETA2
- 1.0.0-BETA1
- 0.15.x-dev
- 0.15.0
- 0.14.x-dev
- 0.14.4
- 0.14.3
- 0.14.2
- 0.14.1
- 0.14.0
- 0.13.x-dev
- 0.13.0
- 0.12.x-dev
- 0.12.4
- 0.12.3
- 0.12.2
- 0.12.1
- 0.12.0
- 0.11.x-dev
- 0.11.0
- 0.10.x-dev
- 0.10.1
- 0.10.0
- 0.9.x-dev
- 0.9.1
- 0.9.0
- 0.8.x-dev
- 0.8.5
- 0.8.4
- 0.8.3
- 0.8.2
- 0.8.1
- 0.8.0
- 0.7.x-dev
- 0.7.3
- 0.7.1
- 0.7.0
- 0.6.x-dev
- 0.6.2
- 0.6.1
- 0.6.0
- 0.5.x-dev
- 0.5.7
- 0.5.6
- 0.5.5
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.x-dev
- 0.4.1
- 0.4.0
- 0.3.0
- 0.2.x-dev
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.x-dev
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-feature/support-symfony6
This package is auto-updated.
Last update: 2024-09-09 11:43:43 UTC
README
Payum 是一个 MIT 许可的开源项目,其持续开发完全得益于社区和客户的支持。如果您想加入他们,请考虑
PayumBundle
该捆绑包将 payum 集成到 symfony 框架中。它已支持 +35 个网关。提供良好的配置层,安全的捕获控制器,存储集成和更多功能。
Sylius,一个开源的无头电子商务平台,在其支付解决方案的基础上构建了该捆绑包。
资源
示例
配置
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
注意如果您使用的是 Symfony 4+,则创建一个包含上述内容的 config/packages/payum.yaml
文件。
购买
<?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('[email protected]'); $gateway = $this->get('payum')->getGateway('offline'); $gateway->execute(new Capture($payment));
获取状态
<?php use Payum\Core\Request\GetHumanStatus; $gateway->execute($status = new GetHumanStatus($payment)); echo $status->getValue();
其他操作。
<?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));
贡献
PayumBundle 是一个开源的、社区驱动的项目。非常欢迎拉取请求。
喜欢它吗?传播一下!
在 GitHub 或 packagist 上星标 PayumBundle。
许可证
该捆绑包在 MIT 许可证 下发布。