Every provider sits behind a single payment contract. Each integration adapts its own API — different auth, field names and error shapes — into normalized request and response objects, so the rest of the platform charges, refunds or voids without knowing which processor is on the other side.
Selection and behaviour are decoupled through design patterns: a Factory resolves which integration to build, Strategy lets each provider carry its own behaviour behind the shared contract, Adapters absorb the per-API differences, a Builder assembles the more complex provider requests, and a Repository keeps transaction persistence out of the payment logic. Routing is configuration, not code — active provider and priority chain per product — with automatic failover when the active one fails or rejects. Five processors integrated end to end (PayPal, Payeezy, DLocal, Stripe, Shift4) with 3DS, refunds, voids, Apple Pay, Google Pay and in-house card tokenization.