Asynchronous Payment Provider Implementation Pattern
March 17th, 2009 by Trilobyte
Today at Liones I started working on the integration of a payment service provider (PSP) for a web shop implementation. While I was thinking about the architecture I discovered that it is actually very straightforward and that most of the application flow is reusable in different implementations with other PSPs.
Take a look at the UML diagram below; you will notice that there are actually two flows:
- One synchronous, which guides the user trough the payment screen
- One asynchronous, which notifies when the payment state changed (payment is confirmed or canceled)