Configure
Instructions on NetsEasy configuration
Start filling you NetsEasy account information in the Litium.AddOns.NetsEasy.dll.config file:
-
Applies to all accounts
- paymentProviderName - Do not change!
- webHookToken - Choose your own string to be compared on webhook callbacks.
- orderCarrierDiscCacheCleanTime - Time in minutes when OrderCarrier folder gets cleaned of unnecessary stored OrderCarriers. Default 5 hours (300 min). This depends on how many orders the merchant has per day and sometimes for assurence one would like to keep the OrderCarriers quite longer but if too many OrderCarriers in the same folder then performance could be affected.
- webHookDiscCacheCleanTime - Time in minutes when stored callback webhooks folder gets cleaned of unnecessary stored webhooks. Default is five minutes.
-
Individual accounts
- accountId - Should not contain spaces and should be Unique. Identifier to select the account.
This value will be prefixed to the payment method name.
The first word of the payment method will be paymentaccount identifier.
- merchantNumber - Account number received from Nets which indicates the merchants account with Nets.
- defaultConsumerType - We separate the B2B or B2C accounts in Litium implementation.
- supportedConsumerTypes - We separate the B2B or B2C accounts in Litium implementation.
- prefillCompanyConsumerInfo - When true company stored addresses will appear in Checkout page and we prefill the address information on the widget.
- merchantHandlesShippingCost - If free shipping cost for consumer.
- shippingCountryCodes - Supported shipping countries, comma separated list of countries in (ISO) three letter country codes, if no countries added then all available countries will be listed in checkout widget.
- useTestMode - Set to true when testing the application.
- secretKey - Encryption API key or CRUD operations acquired from Nets portal.
- checkoutKey - Encryption checkout widget API key acquired from Nets portal.
- secretKeyTest - Test environment Encryption API key or CRUD operations acquired from Nets portal.
- checkoutKeyTest - Test environment Encryption checkout widget API key acquired from Nets portal.
Web.Config
Add these two lines of codes inside scheduledTasks:
<scheduledTask type="Litium.AddOns.NetsEasy.Tasks.WebHookTask, Litium.AddOns.NetsEasy" startTime="00:00" interval="5m" />
<scheduledTask type="Litium.AddOns.NetsEasy.Tasks.OrderCarrierTask, Litium.AddOns.NetsEasy" startTime="00:00" interval="6h" />
These lines will clear the WebHookPayment and OrderCarrier files inside the ..Files/NetsEasyCheckout folder with background tasks.
WebHookTask is set to every five minutes and it clears all files older than two minutes. This functionality is just an extra check on that payment has been received successfully and placed in Litium by PaymentCompletedConfirmation method, otherwise it will be re-tried.
OrderCarrierTask is set to every six hours and it deletes files older than five hours (default), since the last received WebHook call is set to 2+5+10+15+20+25+30+40+50+60 = 257 minutes by Nets (Info from Nets support team).
Next step
Choose the NetsEasy PaymentProvider in Litium backoffice/Settings/Channels and chosen Litium channel and add both B2B and B2C to the channel.