Adding Configuration - Kount/kount-ris-dotnet-core-sdk GitHub Wiki
It's important to configure the SDK with your credentials, and other information.
Configuration prerequisites and requirements
Before you make your RIS call, you need to have received (or created) the following data from Kount:
- Merchant ID, 6-digit integer, referenced as
Ris.MerchantIdin code snippets - URL for (test) RIS calls as
Ris.Url - API key, a Alpha/Numeric key used for authentication,
Ris.API.Key - An additional configuration key used within the SDK,
Ris.Config.Key
:warning: If characters like ", \``, or '` are present in the configuration key value, those need to be escaped on the command line.
Instructions
In your appsettings.json file you should add basic configuration settings under ConnectionStrings section
for the Kount RIS .NET Core SDK. Please make sure to set the Merchant ID and the RIS URL
correctly before using the SDK. A sample file is shown below and an template of appsettings.json
is also included in KountRisCoreSDK project.
{
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Warning"
}
},
"ConnectionStrings": {
"Ris.MerchantId": "999666",
"Ris.API.Key": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI5MDA0MzIiLCJhdWQiOiJLb3VudC4xIiwiaWF0IjoxNTU0MTg2NjQzLCJzY3AiOnsia2EiOm51bGwsImtjIjpudWxsLCJhcGkiOnRydWUsInJpcyI6dHJ1ZX19.77HC9SUe19_wv7mSSvNwZ94N5TekGjR_xDhR3d9u69g",
"Ris.Config.Key": "",
"Ris.Url": "",
"Ris.Version": "0695",
"Ris.CertificateFile": "",
"Ris.PrivateKeyPassword": "",
"Ris.Connect.Timeout": "10000",
"LOG.LOGGER": "SIMPLE",
"LOG.SIMPLE.LEVEL": "DEBUG",
"LOG.SIMPLE.FILE": "Kount-Ris-DotNet-SDK.log",
"LOG.SIMPLE.PATH": "D:\\Logs",
"LOG.SIMPLE.ELAPSED": "ON"
}
}
The table below describes the required static settings found in the SDK:
| Data | Size | Description | Example |
|---|---|---|---|
Ris.MerchantId |
6 | Six digit identifier issued by Kount. | 999666 |
Ris.Url |
na | HTTPS URL path to the company’s servers provided in boarding documentation from Kount. | https://risk.beta.kount.net |
Ris.API.Key |
Varies | API Key value copied from clipboard - originating from API Key page within Agent Web Console. | Alpha/Numeric hashed value provided by Kount |
Ris.Config.Key |
Varies | Config Key used in hashing method. | String key provided by Kount |
Ris.Connect.Timeout |
Varies | RIS connect timeout value measured in milliseconds. | 30000 |
LOG.LOGGER |
na | Specifies which logger to use: SIMPLE or NOP. | SIMPLE |
LOG.SIMPLE.LEVEL |
na | If SIMPLE logging is enabled, this lists logging levels in order of decreasing severity: FATAL, ERROR, WARN, INFO, DEBUG | WARN |
LOG.SIMPLE.FILE |
na | Name of the log file for SIMPLE logging. | Kount-Ris-DotNet-SDK.log |
LOG.SIMPLE.PATH |
na | SimpleLogger log path. This is the directory where the log file will be located. | C:\Logs |
LOG.SIMPLE.ELAPSED |
na | When is ON and SIMPLE logging is enabled, measure overall client request time in milliseconds and logging result. |
ON |
:information_source: If
LOG.SIMPLE.PATHlog path not exist, it'll be created dynamically.