public void Merge(MethodSettings otherSettings) { foreach (KeyValuePair <string, string> kv in otherSettings) { this.AddOrUpdate(kv.Key, kv.Value); } }
public void PaymentSettingsSet(string methodId, MerchantTribe.Payment.MethodSettings settings) { string json = MerchantTribe.Web.Json.ObjectToJson(settings); string key = MerchantTribe.Web.Cryptography.KeyManager.GetKey(0); string encrypted = MerchantTribe.Web.Cryptography.AesEncryption.Encode(json, key); SetProp("paysettings" + methodId, encrypted); }
public MerchantTribe.Payment.Method PaymentCurrentCreditCardProcessor() { MerchantTribe.Payment.Method m = new MerchantTribe.Payment.Methods.TestGateway(); string gatewayId = this.PaymentCreditCardGateway; m = MerchantTribe.Payment.Methods.AvailableMethod.Create(gatewayId); if (m != null) { MerchantTribe.Payment.MethodSettings settings = this.PaymentSettingsGet(gatewayId); m.BaseSettings.Merge(settings); } else { m = new MerchantTribe.Payment.Methods.TestGateway(); } return(m); }