Adapter: taking payments
Wrap a foreign interface in one type that speaks the interface your code expects.
Level Intermediate
What you will see
- A payment SDK that speaks its own language
- The SDK, everywhere
- The interface the shop wants
- The adapter translates
- Translating failures
- When not to use it
Before / after
Base: adapter-base-goView the diff