예제 #1
0
 protected EPayBamboraClientConfig GetBamboraClientConfig(EPayBamboraSettingsBase settings)
 {
     EPayBamboraClientConfig config;
     if (settings.TestMode)
     {
         config = new EPayBamboraClientConfig
         {
             WebservicePassword = settings.WebservicePassword,
             MerchantNumber = settings.TestMerchantNumber,
             MD5Key = settings.Md5Key
         };
     }
     else
     {
         config = new EPayBamboraClientConfig
         {
             WebservicePassword = settings.WebservicePassword,
             MerchantNumber = settings.LiveMerchantNumber,
             MD5Key = settings.Md5Key
         };
     }
     var apiKey = GenerateApiKey(config.WebservicePassword, config.MerchantNumber, config.SecretKey);
     config.Authorization = "Basic " + apiKey;
     return config;
 }
 public EPayBamboraClient(EPayBamboraClientConfig config)
 {
     _config = config;
 }