I am attempting to arise an interface to be used by opposite remuneration
processor coupling implementations, such as stripe, paypal, etc., that can
be injected into another class. The problem we am controlling into is
that it is definitely illusory that any doing competence need opposite
pieces of information to slight a remuneration so origination a common
interface opposing implementations difficult. Is this a unfolding where
it would make some-more clarity to emanate an interface specific to any
form of processor and settlement a receiving category to design a specific
interface? While this seems cleanest and keeps things testable it would
need some re-development of a receiving category to exercise a new
processor.I'd like to prevaricate formulating lifeless interfaces or have
an interface with methods for any form of processor and have any doing
pitch not implemented exceptions on a methods it doesn't need. The other
choice is to have common methods such as "ChargeCard" that accept an
object, that would enclose a information indispensable by any doing though
that doesn't feel right either. Thanks in lay for any assistance or
suggestions.
No comments:
Post a Comment