vanilophp / demo

Vanilo Demo Application
https://vanilo.io/docs/
190 stars 54 forks source link

How to implement new payment gateways #115

Open component6 opened 1 year ago

component6 commented 1 year ago

Greetings! I have a question about the implementation of new payment gateways

For example: I created a class app/CustomPayPaymentGateway.php that implements the interface PaymentGateway

Where and how can I register a new gateway? I don't understand the line: PaymentGateways::register('paypal', PaypalPaymentGateway::class);

fulopattila122 commented 1 year ago

You need to call the above line in the boot method of your AppServiceProvider class.

For more info, see the gateway skeleton generator: https://github.com/vanilophp/payment-gateway-skeleton