Question

How to deal with multiple payment gateway

I want to integrate multiple payment integrations with my Hotel management System.How can i do this?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

When using multiple payment gateways it may be helpful to abstract a bit by creating a payments class within your codebase. This class or library could pull in multiple payment gateway libraries for the language you are working in and include functions to process a payment that allow for “gateway” to be one of the variables sent to it.

This function could then use the gateway variable to determine which logic to employ to complete the payment.

If this is not a custom codebase and is a product you are purchasing from a 3rd party your best option is to contact the vendor for their recommendations.