Class MerchantConfig
4G MDK 設定情報管理クラス
Inheritance
Inherited Members
Namespace: jp.veritrans.tercerog.mdk
Assembly: cg-mdk.dll
Syntax
public class MerchantConfig
Constructors
MerchantConfig(ILogger, FileInfo)
4G MDK 設定情報管理クラスのコンストラクタ
Declaration
public MerchantConfig(ILogger logger, FileInfo file)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | ILoggerインターフェイスを実装したクラスのインスタンス |
FileInfo | file | 3GPSMDK.iniを表すFileInfo型のインスタンス |
MerchantConfig(ILogger, string, string, bool, string, string, uint, uint, bool)
4G MDK 設定情報管理クラスのコンストラクタ
Declaration
public MerchantConfig(ILogger logger, string merchantCcId, string merchantSecret, bool dummyRequest = false, string specialContext = "", string hostUrl = "https://api3.veritrans.co.jp:443", uint connectionTimeout = 30, uint readTimeout = 120, bool mdkErrorMode = false)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | ILoggerインターフェイスを実装したクラスのインスタンス |
string | merchantCcId | マーチャントCCID |
string | merchantSecret | マーチャント認証鍵 |
bool | dummyRequest | ダミーモード指定(trueでダミー取引) |
string | specialContext | 特殊コンテキストパス指定(通常は不要) |
string | hostUrl | 接続先ホストURL(通常は変更不要) |
uint | connectionTimeout | 接続時タイムアウト値 |
uint | readTimeout | 読み取りタイムアウト値 |
bool | mdkErrorMode | MDK固有エラーモード(trueでエラー発生) |
MerchantConfig(ILogger, string, string, string, string, string, bool, string, string, uint, uint, bool)
4G MDK 設定情報管理クラスのコンストラクタ
Declaration
public MerchantConfig(ILogger logger, string merchantCcId, string merchantSecret, string proxyServerUrl, string proxyUserName, string proxyPassword, bool dummyRequest = false, string specialContext = "", string hostUrl = "https://api3.veritrans.co.jp:443", uint connectionTimeout = 30, uint readTimeout = 120, bool mdkErrorMode = false)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | ILoggerインターフェイスを実装したクラスのインスタンス |
string | merchantCcId | マーチャントCCID |
string | merchantSecret | マーチャント認証鍵 |
string | proxyServerUrl | プロキシURL |
string | proxyUserName | プロキシユーザ名 |
string | proxyPassword | プロキシパスワード |
bool | dummyRequest | ダミーモード指定(trueでダミー取引) |
string | specialContext | 特殊コンテキストパス指定(通常は不要) |
string | hostUrl | 接続先ホストURL(通常は変更不要) |
uint | connectionTimeout | 接続時タイムアウト値 |
uint | readTimeout | 読み取りタイムアウト値 |
bool | mdkErrorMode | MDK固有エラーモード(trueでエラー発生) |
MerchantConfig(ILogger, string)
4G MDK 設定情報管理クラスのコンストラクタ
Declaration
public MerchantConfig(ILogger logger, string iniFileContent)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | ILoggerインターフェイスを実装したクラスのインスタンス |
string | iniFileContent | 3GPSMDK.iniの本文 |
Fields
AddUrlPayment
MDK内部設定ファイル.プロパティ名:URLに追加する文字列(決済)
Declaration
public const string AddUrlPayment = "ADD_URL_PAYMENT"
Field Value
Type | Description |
---|---|
string |
AddUrlPaymentVersion
MDK内部設定ファイル.プロパティ名:URLに追加する文字列(決済バージョン)
Declaration
public const string AddUrlPaymentVersion = "ADD_URL_PAYMENT_VERSION"
Field Value
Type | Description |
---|---|
string |
AddUrlVtid
MDK内部設定ファイル.プロパティ名:URLに追加する文字列(VTID)
Declaration
public const string AddUrlVtid = "ADD_URL_VTID"
Field Value
Type | Description |
---|---|
string |
AddUrlVtidVersion
MDK内部設定ファイル.プロパティ名:URLに追加する文字列(VTIDバージョン)
Declaration
public const string AddUrlVtidVersion = "ADD_URL_VTID_VERSION"
Field Value
Type | Description |
---|---|
string |
AllowHttp
Declaration
public const string AllowHttp = "ALLOW_HTTP"
Field Value
Type | Description |
---|---|
string |
CommonItem
MDK内部設定ファイル.プロパティ名:共通項目
Declaration
public const string CommonItem = "COMMON_ITEM"
Field Value
Type | Description |
---|---|
string |
ConnectionTimeout
設定ファイル.プロパティ名:接続時タイムアウト値
Declaration
public const string ConnectionTimeout = "CONNECTION_TIMEOUT"
Field Value
Type | Description |
---|---|
string |
DummyMode
設定ファイル.プロパティ値:ダミー決済モード
Declaration
public const string DummyMode = "1"
Field Value
Type | Description |
---|---|
string |
DummyRequest
設定ファイル.プロパティ名:ダミーモード(テスト時のみ指定)
Declaration
public const string DummyRequest = "DUMMY_REQUEST"
Field Value
Type | Description |
---|---|
string |
HostUrl
設定ファイル.プロパティ名:GWのURL
Declaration
public const string HostUrl = "HOST_URL"
Field Value
Type | Description |
---|---|
string |
Ini3GpsMdk
3GPSMDK.iniファイルのパス
Declaration
public const string Ini3GpsMdk = "3GPSMDK.ini"
Field Value
Type | Description |
---|---|
string |
IniMdkinternal
mdkinternal.iniファイルの名称
Declaration
public const string IniMdkinternal = "mdkinternal.ini"
Field Value
Type | Description |
---|---|
string |
MaskedItems
MASKED_ITEMに紐付く文字列をカンマで区切り配列として保持する変数
Declaration
public string[] MaskedItems
Field Value
Type | Description |
---|---|
string[] |
MaskItem
MDK内部設定ファイル.プロパティ名:マスク項目
Declaration
public const string MaskItem = "MASK_ITEM"
Field Value
Type | Description |
---|---|
string |
MdkDtoVersion
DTO設定ファイル.プロパティ名:MDK_DTO_バージョン
Declaration
public const string MdkDtoVersion = "MDK_DTO_VERSION"
Field Value
Type | Description |
---|---|
string |
MdkErrorMode
設定ファイル.プロパティ名:MDK固有エラーモード(テスト時のみ指定)
Declaration
public const string MdkErrorMode = "MDK_ERROR_MODE"
Field Value
Type | Description |
---|---|
string |
MdkErrorReturn
設定ファイル.プロパティ値:Mdkダイレクトエラー折り返しモード
Declaration
public const string MdkErrorReturn = "1"
Field Value
Type | Description |
---|---|
string |
MdkVersion
MDK内部設定ファイル.プロパティ名:MDKバージョン
Declaration
public const string MdkVersion = "MDK_VERSION"
Field Value
Type | Description |
---|---|
string |
MerchantCcId
設定ファイル.プロパティ名:マーチャントCCID
Declaration
public const string MerchantCcId = "MERCHANT_CC_ID"
Field Value
Type | Description |
---|---|
string |
MerchantSecretKey
設定ファイル.プロパティ名:マーチャント認証鍵
Declaration
public const string MerchantSecretKey = "MERCHANT_SECRET_KEY"
Field Value
Type | Description |
---|---|
string |
PaynowidServiceType
Declaration
public const string PaynowidServiceType = "PAYNOWID_SERVICE_TYPE"
Field Value
Type | Description |
---|---|
string |
ProxyPassword
設定ファイル.プロパティ名:PROXYユーザパスワード
Declaration
public const string ProxyPassword = "PROXY_PASSWORD"
Field Value
Type | Description |
---|---|
string |
ProxyServerUrl
設定ファイル.プロパティ名:PROXYサーバURL
Declaration
public const string ProxyServerUrl = "PROXY_SERVER_URL"
Field Value
Type | Description |
---|---|
string |
ProxyUsername
設定ファイル.プロパティ名:PROXYユーザID
Declaration
public const string ProxyUsername = "PROXY_USERNAME"
Field Value
Type | Description |
---|---|
string |
ReadTimeout
設定ファイル.プロパティ名:読み取りタイムアウト値
Declaration
public const string ReadTimeout = "READ_TIMEOUT"
Field Value
Type | Description |
---|---|
string |
ServerUrl
設定ファイル.プロパティ名:サーバURL
Declaration
public const string ServerUrl = "SERVER_URL"
Field Value
Type | Description |
---|---|
string |
Soap
設定ファイル.プロパティ名:SOAP
Declaration
public const string Soap = "SOAP"
Field Value
Type | Description |
---|---|
string |
SpecialContext
設定ファイル.プロパティ名:URLに特殊なコンテキストパスを設定する場合に利用するプロパティ名(通常は指定不要)
Declaration
public const string SpecialContext = "SPECIAL_CONTEXT"
Field Value
Type | Description |
---|---|
string |
Methods
CheckMerchantConfig()
iniファイルの設定値チェック
Declaration
public void CheckMerchantConfig()
GetIntValue(string)
複数のiniファイル(3GPSMDK.ini、mdkinternal.ini)からキーで数値型の値を取得する
Declaration
public int? GetIntValue(string key)
Parameters
Type | Name | Description |
---|---|---|
string | key | キー |
Returns
Type | Description |
---|---|
int? | キーに紐付く数値型の値 |
GetUserAgent()
User-Agent情報に載せる文字列を取得する。
Declaration
public string GetUserAgent()
Returns
Type | Description |
---|---|
string | User-Agent情報に載せる文字列 |
GetValue(string)
複数のiniファイル(3GPSMDK.ini、mdkinternal.ini)からキーで文字列型の値を取得する
Declaration
public string GetValue(string key)
Parameters
Type | Name | Description |
---|---|---|
string | key | キー |
Returns
Type | Description |
---|---|
string | キーに紐付く文字列型の値 |
IsExparam(string)
N=V文字列変換時に、NAME部に"exparam."を付加する必要があるかチェックする。 付加要否情報は、mdkinternal.propertiesのCOMMON_ITEMに保有している。 ここには、付加不要な項目を、serviceType,serviceCommand,amountのようにカンマ区切りで指定する。
Declaration
public bool IsExparam(string fieldName)
Parameters
Type | Name | Description |
---|---|---|
string | fieldName | name部を示す文字列 |
Returns
Type | Description |
---|---|
bool | true 文字列に対しexparam.付加要 false 付加不要 |
IsMdkErrorReturn()
マーチャントがテストのためのMdkダイレクトエラー折り返しモードであるかを返す。
Declaration
public bool IsMdkErrorReturn()
Returns
Type | Description |
---|---|
bool | true マーチャントがエラーモード |
SetValue(string, string)
複数のiniファイル(3GPSMDK.ini、mdkinternal.ini)からキーで文字列型の値を取得する
Declaration
public void SetValue(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
string | key | キー |
string | value | 値 |
ThroughProxy()
PROXY有無を返す。
Declaration
public bool ThroughProxy()
Returns
Type | Description |
---|---|
bool | true PROXY経由、false PROXYなし |