ConfigurationPayments

Payments

Configure a Payment Module

A payment module is the code needed to implement a given payment method. This can either be an internal payment method (handled by the shop itself) or an external payment method (using a payment service provider). A payment module can be created by inheriting from the 'IPaymentModule' interface found in the 'Sana.Commerce.Payment' assembly.
 
In order to link a payment module to a payment you will need to register it in the 'web.config' file of the Sana Commerce Starter Site project. Modules are added to the <payment-configuration> node in the <sanaCommerceLive> section. For example:
 
<payment-configuration>
    <module name="DocData" type="Sana.Commerce.CustomModule, Sana.Commerce.Payment">
        <settings>
            <clear />
            <add name="parameter" value="1" isRequestParameter="false" />
        </settings>
    </module>
</payment-configuration>
 
 
The example shows a single payment module with the Id 'DocData' that has a single configuration value called 'parameter'. The following two properties exist:
 
Name the Id of the payment module. This is used to link the module to a payment method in the PaymentMethod table. To link the module this name should be the same as the 'PaymentModuleId' field in the 'PaymentMethod' table (read this chapter for more information).
Type the class (and containing assembly) that implements the payment module. This class should implement either the 'IPaymentModule' interface or inherit from the 'ExternalPaymentModule' class or any other existing payment modules.
 
All other configuration can be added to the </settings> node. Possible settings and the way to add settings are explained below.
 
ConfigurationPayments