Hi,
I am implementing a payment gateway with Payum but I feel like it's quite difficult to implement.
Could anyone show me the workflow ?
Thank you in advance
Are you using the complete package, or just some of the individual bundles?
If you're using the complete package i also had alot of problems trying to understand how to do it.
I'll see if i can remember and document it here
To begin, add the following to your config.yml
# Add Payum Paypal details
payum:
gateways:
paypal_express_checkout:
factory: paypal_express_checkout
payum.http_client: @sylius.payum.http_client
username: %paypal.express_checkout.username%
password: %paypal.express_checkout.password%
signature: %paypal.express_checkout.signature%
sandbox: %paypal.express_checkout.sandbox%
sylius_payment:
gateways:
paypal_express_checkout: Paypal Express Checkout
Then, you need to add a Payment Method in the Admin area. The paypal option should appear in the dropdown after adding the above config.
Once you've added a possibly Payment method, then you need to add it to the Channel. This is done in the sylius admin area too. Go to Channels -> Edit the applicable entry and select the payment method.
I think that's enough to get it to appear in the checkout. Good luck
@bretto36 I think your answer should go to the docs of Sylius. @TheMadeleine what do you think about it?
Thanks a lot for your advice.
However, could you give me more examples about how to setup custom gateway factory which haven't existed in Payum yet ?
@bretto36
If it doesn't exist in Payum, then you'll need to create a payum module for it.
What is the payment gateway you are trying to use?
You can create a custom gateway using payum/skeleton package: https://github.com/Payum/Payum/blob/master/src/Payum/Core/Resources/docs/develop-gateway-with-payum.md
later you can register the factory like this https://github.com/makasim/PayumBundleSandbox/blob/master/app/config/payum.yml#L206
and to integrate with sylius you have to implement some actions like: capture , getStatus and ConvertPaymentAction. https://github.com/Payum/Payum/tree/master/src/Payum/Skeleton/Action. These are for sure and may be some others.
Looks like resolved. Thanks for support guys! @oatto if you still need help please post the question on stackoverflow under "sylius" tag.
Most helpful comment
You can create a custom gateway using payum/skeleton package: https://github.com/Payum/Payum/blob/master/src/Payum/Core/Resources/docs/develop-gateway-with-payum.md
later you can register the factory like this https://github.com/makasim/PayumBundleSandbox/blob/master/app/config/payum.yml#L206
and to integrate with sylius you have to implement some actions like: capture , getStatus and ConvertPaymentAction. https://github.com/Payum/Payum/tree/master/src/Payum/Skeleton/Action. These are for sure and may be some others.