You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One use case that I've come across recently is where there is the need for multiple configurations for the same payment gateway. For example, using the Paystation_Hosted gateway with a specific config set for payments that are donations, but using a different Paystation_Hosted gateway config for fundraising. This could happen in the real world if different parts of a business have separate payment gateway accounts.
Currently this isn't possible as the YAML configuration for Omnipay uses the name of the gateway to then pull in the class, for example:
GatewayInfo.php functon niceTitle will call create() on GatewayFactory (omnipay common).
Is there a way to support using multiple of the same gateways, was thinking the ability to pass an optional parameter to the yaml to use that instead of forcing it to use the name for both the gateway attached to the payment and the class that gets instantiated:
Thought about this, too. For now I have to subclass the gateway and set the parameters manually.
Maybe it's possible to use injector to initialise the gateway? Or some kind of "GatewayInjector"?
Then we could add params as we need and reuse the same php class for this.
One use case that I've come across recently is where there is the need for multiple configurations for the same payment gateway. For example, using the Paystation_Hosted gateway with a specific config set for payments that are donations, but using a different Paystation_Hosted gateway config for fundraising. This could happen in the real world if different parts of a business have separate payment gateway accounts.
Currently this isn't possible as the YAML configuration for Omnipay uses the name of the gateway to then pull in the class, for example:
GatewayInfo.php functon niceTitle will call create() on GatewayFactory (omnipay common).
Is there a way to support using multiple of the same gateways, was thinking the ability to pass an optional parameter to the yaml to use that instead of forcing it to use the name for both the gateway attached to the payment and the class that gets instantiated:
Might not work, there's a tonne of abstraction to follow in the code, but thought I would see if anyone has had to solve this problem before?
The text was updated successfully, but these errors were encountered: