Page 1 of 1

banking online payment service with multiple bank gateway?

Posted: 31 Dec 2017, 17:29
by Ahmad
I want to add a payment service like Paypal for banking online payments with multiple gateways (i have different bank gateway online payment providers)
The scenario is this customer can between Cash On Delivery or Online Payment, but for chose Online Payment service, customer must also choose through which bank payment port (gateway) wants to pay
Please see the attached photo to understand me.


the payment process is the same for each bank (Bank A, Bank B,...) but each one has different configs such as terminalId, userName, password, callbackUrl and for the payment request, each dedicated Web service must be called

I want to implement this in the correct way, please help me

Re: banking online payment service with multiple bank gatewa

Posted: 31 Dec 2017, 17:48
by Travin
I think you should do only one Payment Provider for all banks. You can create <select> at the view and if user chose one or another Bank, you will change hidden fields with terminalId, userName, password, callbackUrl data by JS and so on. Or you can change just one field and another data will be changed by backend, or it may be text fields, not hidden. :?

Re: banking online payment service with multiple bank gatewa

Posted: 02 Jan 2018, 00:03
by aimeos
If you want to add decorators to the payment provider implementation, you should implement each one as single service provider (especially as you've said the implementation is totally different). Otherwise, you need to implement them into one service provider, add three configurations for that and select the config and implementation based on the selected value of the customer. The first option is definitively easier and more flexible.

The suggestion by Travin has one major problem: If you use hidden fields for the config options in the frontend, you allow attackers to change this values like they want!

Re: banking online payment service with multiple bank gatewa

Posted: 02 Jan 2018, 07:58
by Ahmad
aimeos wrote:If you want to add decorators to the payment provider implementation, you should implement each one as single service provider (especially as you've said the implementation is totally different). Otherwise, you need to implement them into one service provider, add three configurations for that and select the config and implementation based on the selected value of the customer. The first option is definitively easier and more flexible.

The suggestion by Travin has one major problem: If you use hidden fields for the config options in the frontend, you allow attackers to change this values like they want!
aimeos wrote:If you want to add decorators to the payment provider implementation, you should implement each one as single service provider (especially as you've said the implementation is totally different). Otherwise, you need to implement them into one service provider, add three configurations for that and select the config and implementation based on the selected value of the customer. The first option is definitively easier and more flexible.

The suggestion by Travin has one major problem: If you use hidden fields for the config options in the frontend, you allow attackers to change this values like they want!
I did not understand your description, What do you mean by decorators?
my payment process functions are similar each of banks payment APIs, but one bank payment request Url is different of another bank,

Is it possible that I add just one Service with type payment with the name "Online Payment" and provider OnlinePayment, and add choosable banks options?

Should I have added a Service with name: Bank A, type: payment, provider: OnilePayment, and another Service with name: Bank B, type: payment, provider: OnlinePayment, and another Service with name: Bank C, type: payment, provider: OnlinePayment?
or add just one Service with name: Online Payment, type: payment, provider OnlinePayment and add Bank A, Bank B, Bank C in options?

Consider this as I want to end up, have a picture similar to the picture that I attached below?
How should I act?

Re: banking online payment service with multiple bank gatewa

Posted: 03 Jan 2018, 12:09
by aimeos
You can implement all options into one service provider but we suggest to create one for each payment getway API.