← Back to scenarios
ScenarioCatalog DB

Legacy payment gateway integration

Translate a legacy payment gateway API into the checkout service interface used by the application.

Problem

The checkout service expects an application-owned payment interface, but the legacy payment gateway exposes an incompatible API contract.

Related patterns

Implementations

Adapter

TypeScriptApplication

Adapter in TypeScript

A TypeScript implementation of the Adapter pattern.

TypeScript
export interface TaskProvider {
  getTask(id: string): Promise<Task>;
}

Associated technologies