Knowledge BasePayment Methods and PSP Gateway Introduction

Payment Methods and PSP Gateway Introduction

Data Model

The image below depicts the simple version of the datamodel used by the payment library (SQL Provider). The library will use the Sana Commerce subsystem managers directly and thus can work with different providers, having different data models. But the general concept remains the same.
All payment methods (MasterCard, ideal, bank transfer) are stored in the table 'PaymentMethod'.
Each payment method can have a translation ('PaymentMethodTranslation') and must be linked to a number of countries ('PaymentMethodCounty'). The implementation details and configuration of Payment modules are done in code and 'web.config' respectively.
The 'Order' table will contain the complete calculated order and information about how the order was placed in the field collection. Each line (for example, product ordered, discount, payment costs) will be stored in the 'OrderLine' table. This structure will make it easy to export orders from the system as well as using external custom API's/web services to handle orders if needed.
More information about payment methods and the 'PaymentMethod' table can be found in this chapter.
'System Payment Methods'
It is possible to mark a Payment method as a system payment method in the table 'Paymentmethods'. System payment methods will not be available in the list of payment methods and cannot be selected by the user. While they cannot be selected directly they are still active and can be 'activated' in special circumstances.
An example of this is the zero-order payment method. In code this payment method is selected when the total cost of an order equals zero.
Knowledge BasePayment Methods and PSP Gateway Introduction