Blesta Addons Posted May 13, 2018 Report Posted May 13, 2018 it would perfect if the gateways manager can make a country filter, or the order form, the idea is to provide gateway X to a specific users in country X . or to provide the gateways to all countries .this will not override the currency supported in gateway. let say we have paypal that we will use for the curency USD. so now any users has usd as default currency can pay with paypal if selected in order form, now let say we want to prohibit users that are in pakistan, iran, irak, xxxx from using the paypal gateway even if they have usd as default currency, and allow only gateway X to be used . it's a great features that will allow us to use specific gateways in some cases . i think we have talked this option before but not sure where, but i have opened a new feature request https://requests.blesta.com/topic/option-to-showhide-payments-gateways-per-country if blesta has a event for GatewayManager.getAll(), that can return values , we can use a custom plugin with the new events created getAll(), something like in the Gatewaymanager $this->Events->register('GatewayManager.getAll', ['EventsGatewayManagerCallback', 'getAll']); $gateways_filtered = $this->Events->trigger(new EventObject('GatewayManager.getAll', ['gateways' => $gateways])); // return data if the event ahs a data to return if (!empty($gateways_filtered)) { return $gateways_filtered; } return $gateways; if blesta found the logic is pretty good, they can do it in so many others events like getAllInstalledNonmerchant() or in other models . activa 1 Quote
activa Posted May 14, 2018 Report Posted May 14, 2018 Nice and great idea. This even if whmxx has not this option and is highly requested there if so many votes has in thier request features. If blesta add it it will another plus of blesta . Quote
Tyson Posted May 30, 2018 Report Posted May 30, 2018 A configurable white/black-list would probably be nice to have for filtering what clients can see and use certain gateways. We've had requests not only for filtering by country/state/province, but also for specific clients themselves, or for specific packages. This filtering can be a little difficult to manage though, since you may create order forms that many clients are unable to use to make payments because all the gateways have been disabled. We'd have to display that better in some location. Based on your example, the expectation when calling GatewayManager::getAll is to retrieve all gateways, so it's unlikely we would update this to allow filtering by event. Having a separate method, like GatewayManager::search($options), would be better. Blesta Addons 1 Quote
Blesta Addons Posted May 31, 2018 Author Report Posted May 31, 2018 On 5/30/2018 at 5:08 PM, Tyson said: Based on your example, the expectation when calling GatewayManager::getAll is to retrieve all gateways, so it's unlikely we would update this to allow filtering by event. Having a separate method, like GatewayManager::search($options), would be better. doesn't matter for me the way, but the result is the goal . so any other method/way to achieve the task are welcome . Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.