ConfigurationPayments

Payments

Configure Payment Methods

SC allows a developer to configure payment methods which are used during the payment process (You can find more information about the payment methods and PSP in the 'Payment methods and PSP gateway introduction' chapter in the 'Knowledge base' section). General configuration is done using the 'SQL Server Management Studio':
  • Open 'SQL Server Management Studio'.
  • Locate the SC SQL database.
  • Open the 'PaymentMethod' table:

     
    'PaymentMethod' Table 
 In this table the base configuration options are stored:
 
WebsiteId is the identification number of a website (see table 'Websites').
Name is the default name of the payment method. If no translation is available, it is shown in the 'PaymentMethodTranslation' table (see later).
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 method is displayed on a webshop.
Cost specifies the amount of money which is added to the order (see 'Payment costs' on the 'Order Overview' page).
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 is a 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.
ExternalParameter allows the use of external parameters for sending and receiving the payment provider specific data. For more information please read your PSP documentation.
VatRateId refers to the VAT rate that is added to the payment method cost (VAT rates are specified in the 'VatRate' table).
 
'PaymentMethodCountry' table specifies which payment methods are available for the selected country:
 
 
'PaymentMethodCountry' 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 'PaymentMethodCountry' table then this payment method is not at all available.
 
'PaymentMethodTranslation' table consists of translations of payment method names to the different languages. For example:
 
'PaymentMethodTranslation' Table 
 
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 PaymentStatusLookup table. For example:
 
'PaymentStatusLookup' Table 
 
 This table has the following fields:
 
PaymentModuleId
The name of the payment module as defined in the web.config. 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:
 
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.
 
Configure Payment Methods for Sana Commerce - NAV Connector 
 
In order to configure payment methods for Sana Commerce - NAV Connector G/L Account No. is used. G/L Account No. can be selected from the 'G/L Account List' window:
 
 
'G/L Account' Settings 
 
In order to G/L Account No. worked several properties should be specified on the G/L Account Card: 
  • 'Account type' should be set to 'Posting'. 
  • 'Direct Posting' should be selected. 
Also you can setup VAT Posting Groups on the G/L Account Card (tab 'Posting').
 
When user selects a payment method on a website corresponding sales line with type 'G/L Account' is created; its number is specified in the 'Options' window in NAV.
 
 
Sales Line 'G/L Account' in the Order 
 
You should specify Payment Method Code on the 'Options' window. This code will be used during the on-line order payment, and will be automatically assigned to the 'Payment Method Code' field on the 'Sales Header' window.
 
 
'Payment Method Code' Field on the 'Options' Window
 
ConfigurationPayments