coopcycle / coopcycle-web

Logistics & marketplace platform. Only for worker-owned business.
https://coopcycle.org
Other
565 stars 128 forks source link

Implement PayGreen - WEB #3042

Open alexsegura opened 2 years ago

alexsegura commented 2 years ago

What we want is to be able to use Stripe OR PayGreen. For each restaurant, we need to add a property that allows to choose between Stripe and PayGreen.

See libs

See examples

See docs

alexsegura commented 2 years ago

I think a good example can be found in this piece of code in PayGreen/sylius-paygreen-plugin.

https://github.com/PayGreen/sylius-paygreen-plugin/blob/95efa63a560bd1ce096758c15bf62ec1b7be66ad/src/Payum/Action/CaptureAction.php#L65-L96

It creates a payment using paygreen/paygreen-php and redirects the user to a payment page. Should be quite the same when using an iframe.

// Redirect the customer to the PayGreen payment page
throw new HttpPostRedirect($url);
Paul-Eraman-CoopCycle commented 1 year ago

Having multiple payment platforms is a giant issue to assess, and has a large number of negative consequences in regards to adding exponential complexity in a number of different ways.