atomixdesign / nodepay

A payment gateway abstraction layer written in Typescript, taking inspiration from Omnipay & Active Merchant
https://github.com/atomixdesign/nodepay
MIT License
6 stars 0 forks source link

:fire: Refactor settings manager into an instance member #51

Closed maurocolella closed 3 years ago

maurocolella commented 3 years ago

See https://github.com/typestack/routing-controllers/issues/642

Change in typedi ^0.9.0 appears to break the detection of services registered in nodepay-core. Issue is not addressed with even the @Service decorator on every participating class, hinting at a possible issue with the mechanism, ie. a bug in typedi.

As a workaround, this PR converts the settings manager into a base gateway instance member, rendering it available to each gateway strategy separately. Dependency injection is still preferred, and should be investigated separately.