banking online payment service with multiple bank gateway?

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Ahmad
Posts: 72
Joined: 05 Jul 2017, 15:19

banking online payment service with multiple bank gateway?

Post by Ahmad » 31 Dec 2017, 17:29

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
Attachments
This is what I want
This is what I want
2017-12-31_20-02-49.jpg (19.3 KiB) Viewed 2339 times

Travin
Posts: 70
Joined: 18 Dec 2017, 03:12

Re: banking online payment service with multiple bank gatewa

Post by Travin » 31 Dec 2017, 17:48

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. :?
Laravel 6.18.19 | php 7.4.7 | Xubuntu | Aimeos Laravel 2019.10.5

User avatar
aimeos
Administrator
Posts: 7858
Joined: 01 Jan 1970, 00:00

Re: banking online payment service with multiple bank gatewa

Post by aimeos » 02 Jan 2018, 00:03

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!
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Ahmad
Posts: 72
Joined: 05 Jul 2017, 15:19

Re: banking online payment service with multiple bank gatewa

Post by Ahmad » 02 Jan 2018, 07:58

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?
Attachments
2017-12-31_20-02-49.jpg
2017-12-31_20-02-49.jpg (19.3 KiB) Viewed 2327 times

User avatar
aimeos
Administrator
Posts: 7858
Joined: 01 Jan 1970, 00:00

Re: banking online payment service with multiple bank gatewa

Post by aimeos » 03 Jan 2018, 12:09

You can implement all options into one service provider but we suggest to create one for each payment getway API.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply