How to implement an offisite payment (Mollie) in the ShopAPI?

What is a best-practice to add the payment redirection when reaching complete_checkout endpoint? I’m trying to work this out with the Mollie plugin for Sylius.

I’m trying to somehow obtain a token, redirect to Mollie payment page and get back with a response but I have no idea how to achieve this in the API.

Can anyone help me?

Hello,

you will have to run similar logic to this https://github.com/Sylius/Sylius/blob/master/src/Sylius/Bundle/PayumBundle/Controller/PayumController.php#L86 and return the URL to redirect in response API https://github.com/Sylius/Sylius/blob/master/src/Sylius/Bundle/PayumBundle/Controller/PayumController.php#L108

and you’ll need to change the redirect URL here https://github.com/mollie/sylius/blob/master/src/Action/CaptureAction.php#L101