-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Roadmap] RFC: Future of Payum (payments) in Sylius #12521
Comments
@pierredup has recently taken up a maintainer position of Payum. He has already done good progress on moving Payum forward. @pierredup wdyt? |
I'll share some info on the roadmap for Payum in the coming days on the Payum repository, but the development pace should start to pick up a bit in the following weeks. @pjedrzejewski If there are any specific requirements for Sylius or something you would like to see in Payum, let me know and I'll look into it. |
any updates? |
From Payum's perspective, we are busy working on a V2 release, which will include a lot of internal changes to the library (adding more strict types, dropping support for PHP 7.x etc). You can follow some of the discussions and plans at Payum/Payum#928 and Payum/PayumBundle#539 Unfortunately, I don't have any definitive timelines on when V2 will be released, but it will be at least in a couple of months, since there are a lot of cleanup and changes that we want to add. I hope this can fit in with the Sylius roadmap, but I'm also open to any input or feedback from the Sylius team |
@pjedrzejewski , recently, I tried to integrate a new gateway into an existing Sylius project using Payum. So, my experience should be valuable. There are a couple of observations of poor DX that would be great to resolve by evolving Payum or replacing it with any other solutions:
To conclude, payment gateway companies usually provide plugins for more popular e-commerce frameworks like WooCommerce, PrestaShop, Magento, etc. In this sense, it would be great if Sylius could give the simplest way to integrate the payment solution, which would follow some standard patterns. |
@dbalabka hello ! Sylius core team is working on an approche called Payment request you can found more info in this PR #15502 and test it using this branch https://github.com/Sylius/Sylius/tree/payment-request Creating the PR, I tried to allow Payum to work with this new approach but like you pointed out it's no so easy to do, however the current branch is allowing the old Payum PayPal gateway to work using API calls and normally other gateways can work without any changes in the gateway. |
@Prometee , thanks for the update. I spend a small amount of time reading the code and discussions in the PR to understand it. Could you please shed some light on how these improvements change the current approach and improve the developers' experience to integrate new payment gateways and understand the existing integrations? |
@Prometee I'm busy working on Payum V2 which will include significant changes to how the payment processing works. If there is anything I can add in Payum to help make it work with this new approach, let me know and I will gladly include it in the next version
@dbalabka It's definitely possible to integrate Payum with a SPA or using a REST API, as I have done it multiple times before. But I agree it's not very straightforward to implement. This is one of the things I would like to address and make it work better in V2 |
@pierredup what I've done to support Payum using this new concept of PaymentRequest is to create those two actions :
I identified those two input/output points in Payum where I can easily interact with, only if the action is run during an identified API context. On an upper level, any Capture/Refund/Notify/etc Payum requests are run using this Processor : https://github.com/Sylius/Sylius/blob/payment-request/src/Sylius/Bundle/CoreBundle/PaymentRequest/Processor/Payum/RequestProcessor.php#L37. |
@dbalabka it will simply allows you to decide what your gateway is doing when a PaymentRequest is requested. services:
app.sylius.payment_request.command_provider.my_gateway:
class: Sylius\Bundle\CoreBundle\PaymentRequest\CommandProvider\ActionsCommandProvider
public: true
arguments:
- !tagged_locator { tag: 'app.payment_request.command_provider.my_gateway', index_by: 'type' }
tags:
- name: 'sylius.payment_request.command_provider'
gateway-factory: 'my_gateway'
app.sylius.payment_request.command_provider.my_gateway.capture:
class: App\PaymentRequest\CommandProvider\MyGateway\CapturePaymentRequestCommandProvider
public: true
tags:
- name: 'app.payment_request.command_provider.my_gateway'
type: 'capture'
app.sylius.payment_request.command_provider.my_gateway.status:
class: App\PaymentRequest\CommandProvider\MyGateway\StatusPaymentRequestCommandProvider
public: true
tags:
- name: 'app.payment_request.command_provider.my_gateway'
type: 'status' The first service is a gateway actions provider to your 2 possible actions: Doing this you will be in control of every thing needed for your gateway. If you want to add an existing Paym gateway you can follow these examples : |
Helloes. 馃槃
From time to time the topic of Payum and Sylius integration pops inside of Sylius organization and I'd like to pick the community's brain on this. To frame it a bit:
I see a couple of options that we discussed internally:
There are pros and cons to all of these options, so I'd like to hear the community's voice before we make any decision on that. :) Thanks!
Open Questions:
The text was updated successfully, but these errors were encountered: