ColdFusion payment processing library makes plumbing e-commerce apps easy. Charging credit cards has never been easier. Inspired by Ruby's ActiveMerchant.
Other
90
stars
54
forks
source link
Hardcoded path to gateway subdirectory makes extending gateways impossible #35
There are circumstances where you want to extend a gateway to override a particular method, like perhaps for error messages or custom response additions, etc. We have a working build with this instead:
The current gateway instantiation looks like:
<cfset variables.instance.gateway = createObject("component", "gateway.#lCase(variables.instance.config.path)#").init(config = variables.instance.config, service = this) />
There are circumstances where you want to extend a gateway to override a particular method, like perhaps for error messages or custom response additions, etc. We have a working build with this instead:
<cfset variables.instance.gateway = createObject("component", variables.instance.config.path).init(config = variables.instance.config, service = this) />
That allows configuration like (coldspring example):
`
But
gateway.stripe.stripe
could also bemodel.payment.customstripe
which defines an alternative response.