2

Does anyone have any experience with how to allow multiple payment methods so that more payment methods can be added in the future thus creating a scalable design?

I have implmented Paypal express checkout using Activemerchant in my application, however I didn't make it an abstracted design so that future payment methods could be added with ease.

Please point me to any example / existing project that may have such design or provide any insight to this problem. Thanks in advance!

P.S. This is regarding to the design and the relationships of the classes, rather than how to implement the payment gateway.

0

1 Answer 1

1

I'd recommend ActiveMerchant: http://activemerchant.org For building integrated, multi-payment systems in rails.

Even if you want to roll your own, you an get the source code for this project and see how they did it to get some ideas.

Sign up to request clarification or add additional context in comments.

2 Comments

Sorry I should've been more clear and mentioned that I've already implemented Paypal express using Activemerchant, my question is more to how to best design your application with multiple methods in mind (in terms of design and class abstraction)
That's why I suggested you look at ActiveMerchant. I wasn't suggesting you install it, but take a look at the class architecture because it's the classic example of allowing multiple payment types. :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.