ConfigurationPayments

Payments

Sana Commerce 8.2
Your provider

Configure Payment Methods

Sana Commerce allows to configure payment methods which are used during the payment process. General configuration is done using the 'SQL Server Management Studio':

Step 1: Open 'SQL Server Management Studio'.

Step 2: Locate the Sana Commerce SQL database.

Step 3: Open the 'PaymentMethods' table:


The 'PaymentMethods' Table 

In this table the base configuration options are provided:
 
Field Description
WebsiteId The identification number of a website (see the table 'Websites').
Name The default name of the payment method.
PaymentModuleId Maps to the payment module in 'web.config' which implements the payment method. You can read about payment modules in the next chapter.
SortNo Specifies the order in which the payment methods are shown in a webshop.
IsDefault Specifies if this payment method is chosen as default in the payment method list on the 'Order Overview' page.
ImagePath Specifies the image icon for the payment method.
Active The setting which enables or disables the payment method.
IsSystemPaymentMethod When this setting is set to 'True' then the payment method will not be shown to a user though it can still be used by a developer. This feature is useful when the standard Microsoft Dynamics NAV payment method needs to be used during the ordering process.
IsExternalPaymentMethod Specifies whether a payment method is external.
ExternalParameter Allows the use of external parameters for sending and receiving the payment provider specific data. For more information please read your PSP documentation.
 
The 'PaymentMethodCountries' table specifies which payment methods are available for the selected country:
 
The 'PaymentMethodCountries' Table 
 
If the 'CountryId' field for a payment method is 'NULL' then this payment method will be available for all countries.
If there is no record for a payment method in the 'PaymentMethodCountries' table then this payment method will not be available.
 
Another thing can be configured when using an external PSP is the mapping between the statuses used in the PSP provider and the statuses used in the Sana Commerce system. Sana Commerce supports a wide selection of payment methods which will all have their own statuses. This mapping can be defined in the 'PaymentStatusesLookup' table:
 
 
The 'PaymentStatusesLookup' Table 
 
This table has the following fields:
 
PaymentModuleId
The name of the payment module as defined in the 'web.config' file. The mapping for each PSP will be stored in the same table.
 
PSPStatus
The status as defined by the PSP. This will differ for each PSP, please refer to the documentation of the PSP for the correct names of these statuses.
 
PaymentStatus
The payment status in Sana Commerce the PSP status should map to.
The following 4 statuses are possible in Sana Commerce:
 
Status Description
New Order is newly created; order is not yet in the payment flow. This status can never be set by the PSP but only when the order is initially created.
In Progress Payment of the order is in progress. The user has not paid yet.
Paid Order is paid.
Cancelled Order is cancelled by the user or something went wrong in the payment process.
 
If a status changes in the PSP it can be changed in this table without requiring a deployment of the code. 
ConfigurationPayments