Skip to content

Adding Configuration

pleykov edited this page Sep 11, 2017 · 21 revisions

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.MerchantId in 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

⚠️ If characters like ", \``, or '` are present in the configuration key value, those need to be escaped on the command line.

Instructions

In your .config file (an App.config or Web.config) you should add basic configuration settings under appSettings section for the Kount RIS .NET 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 App.config is also included in KountRisSDK project.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>

    <add key="Ris.MerchantId" value="999666" />
     
    <add key="Ris.Url" value="https://risk.test.kount.net" />

    <add key="Ris.API.Key" value="zI1NiJ9.eyJpc3MiOiI5OTk2NjYiLCJhdWQiOiJLb3VudC4xIiwiaWF0IjoxNDg4NTYzMzgzLCJz" />
    <!--
    Confing Key used in hashing method
    -->
    <add key="Ris.Config.Key" value="Confing Key set here" />
    <!--
    RIS connect timeout value  measured in milliseconds. Recommended value
    is 30000 (30 seconds).
    -->
    <add key="Ris.Connect.Timeout" value="10000" />

    <add key="LOG.LOGGER" value="SIMPLE" />
    <!--
    Logging level for SimpleLogger if it is enabled.
    Acceptable logging levels in order of decreasing severity are FATAL,
    ERROR, WARN, INFO, and DEBUG.
    -->
    <add key="LOG.SIMPLE.LEVEL" value="DEBUG" />
    <!--
    Specify the file name where the SimpleLogger will log messages to.
    -->
    <add key="LOG.SIMPLE.FILE" value="Kount-Ris-DotNet-SDK.log" />
    <!--
    SimpleLogger log path. This is the directory where the log file will be
    located. This directory must already exist.
    -->
    <add key="LOG.SIMPLE.PATH" value="C:\Logs" />
    <!--
    Optional setting. When is `ON` and SIMPLE logging is enabled, measure overall client 
    request elapsed time in milliseconds and logging result. Default value is `OFF`.
    -->
    <add key="LOG.SIMPLE.ELAPSED" value="ON" />
  </appSettings>
</configuration>

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

ℹ️ If LOG.SIMPLE.PATH log path not exist, it'll be created dynamically.

Next Step