Hi, I'm building a custom Payment Provider, for a multi-site environment, and I need to be able to provide two instances of the same provider, for use with different sites (in different countries).
The provider in question is eWay, and I need my New Zealand site to use settings appropriate for eWay NZ, and I need my Australian site to use settings appropriate for eWay AUS. The code is all the same, just different API keys, etc.
What would be the best approach to this? I could create two Payment Providers which then use shared code - I can see how to create a custom backoffice dialog to manage settings at a provider level. Or should I use a single provider but have two Payment Methods? I'm unsure how to extend the Add/Edit Payment Method dialog to handle custom settings here. Or are there alternatives?
Whichever approach I take, I'm going to have to add some custom logic so that I can restrict or attach payment providers/methods to a particular site.
Any guidance would be appreciated.
Simon
Update: I should add that I don't need to support multiple payment methods for a provider - it's just going to be credit card payments.
Custom Payment Provider - multiple instances of provider with different settings
Hi, I'm building a custom Payment Provider, for a multi-site environment, and I need to be able to provide two instances of the same provider, for use with different sites (in different countries).
The provider in question is eWay, and I need my New Zealand site to use settings appropriate for eWay NZ, and I need my Australian site to use settings appropriate for eWay AUS. The code is all the same, just different API keys, etc.
What would be the best approach to this? I could create two Payment Providers which then use shared code - I can see how to create a custom backoffice dialog to manage settings at a provider level. Or should I use a single provider but have two Payment Methods? I'm unsure how to extend the Add/Edit Payment Method dialog to handle custom settings here. Or are there alternatives?
Whichever approach I take, I'm going to have to add some custom logic so that I can restrict or attach payment providers/methods to a particular site.
Any guidance would be appreciated.
Simon
Update: I should add that I don't need to support multiple payment methods for a provider - it's just going to be credit card payments.
is working on a reply...