Design patterns · interview question
Stripe changes its request schema, but checkout already depends only on PaymentGateway. Where should the primary code change occur?
Multiple choiceMediumchapter-13-curatedpremiumdesign-patternsadapter-pattern
Answer and explanation
Correct answer
D. Inside the Stripe adapter at the integration boundary
Why
If checkout talks to a stable business interface, vendor-specific request and response changes should be absorbed by the adapter. That keeps the core flow isolated from third-party API volatility.
Test yourself on Design patterns
A free test with instant, explained results. No account needed.
More Design patterns questions
- How can the Strategy Pattern help in reducing the complexity of a checkout system?
- If an e-commerce platform needs to switch between different inventory management algorithms depending on the region,…
- How would you implement a Proxy pattern to control access to a remote service that calculates tax rates in an…
- Which pattern should you use to provide a consistent API for multiple e-commerce payment providers?
- Which of the following is a key characteristic of the Proxy pattern in Java?
- What should a payment adapter own when integrating a vendor SDK?