internal override void ConfigureContainer(ConfiguredServices services) { base.ConfigureContainer(services); if (string.IsNullOrEmpty(ServiceUrl)) { if (Environment.Equals(Entities.Environment.TEST)) { ServiceUrl = ServiceEndpoints.TRANSIT_MULTIPASS_TEST; } else { ServiceUrl = ServiceEndpoints.TRANSIT_MULTIPASS_PRODUCTION; } } var gateway = new TransitConnector() { AcceptorConfig = AcceptorConfig, DeveloperId = DeveloperId, DeviceId = DeviceId, MerchantId = MerchantId, TransactionKey = TransactionKey, ServiceUrl = ServiceUrl, Timeout = Timeout, RequestLogger = RequestLogger }; services.GatewayConnector = gateway; }
internal override void ConfigureContainer(ConfiguredServices services) { base.ConfigureContainer(services); if (string.IsNullOrEmpty(ServiceUrl)) { if (Environment.Equals(Entities.Environment.TEST)) { ServiceUrl = ServiceEndpoints.GENIUS_API_TEST; } else { ServiceUrl = ServiceEndpoints.GENIUS_API_PRODUCTION; } } var gateway = new GeniusConnector() { MerchantName = MerchantName, MerchantSiteId = MerchantSiteId, MerchantKey = MerchantKey, RegisterNumber = RegisterNumber, TerminalId = TerminalId, Timeout = Timeout, ServiceUrl = ServiceUrl, RequestLogger = RequestLogger, WebProxy = WebProxy }; services.GatewayConnector = gateway; }
internal override void ConfigureContainer(ConfiguredServices services) { if (string.IsNullOrEmpty(ServiceUrl)) { if (Environment.Equals(Entities.Environment.TEST)) { ServiceUrl = ServiceEndpoints.GP_API_TEST; } else { ServiceUrl = ServiceEndpoints.GP_API_PRODUCTION; } } var gateway = new GpApiConnector { AppId = AppId, AppKey = AppKey, Nonce = Nonce, SecondsToExpire = SecondsToExpire, IntervalToExpire = IntervalToExpire, Channel = Channel, Language = Language, ServiceUrl = ServiceUrl, Timeout = Timeout }; services.GatewayConnector = gateway; services.ReportingService = gateway; }
internal override void ConfigureContainer(ConfiguredServices services) { if (TableServiceProvider == TableServiceProviders.FreshTxt) { services.TableServiceConnector = new TableServiceConnector { ServiceUrl = "https://www.freshtxt.com/api31/", Timeout = Timeout }; } }
internal override void ConfigureContainer(ConfiguredServices services) { services.PayrollConnector = new Gateways.PayrollConnector { Username = Username, Password = Password, ApiKey = ApiKey, ServiceUrl = ServiceUrl, Timeout = Timeout }; }
private void AddConfiguration(string configName, ConfiguredServices config) { if (_configurations.ContainsKey(configName)) { _configurations[configName] = config; } else if (!_configurations.TryAdd(configName, config)) { throw new ConfigurationException($"Failed to add configuration: {configName}."); } }
internal void removeConfiguration(String configName) { if (_configurations.ContainsKey(configName)) { ConfiguredServices config = new ConfiguredServices(); if (!_configurations.TryRemove(configName, out config)) { throw new ConfigurationException($"Failed to remove configuration: {configName}."); } } }
private void AddConfiguration(string configName, ConfiguredServices config) { if (_configurations.ContainsKey(configName)) { _configurations[configName] = config; } else { _configurations.Add(configName, config); } }
internal override void ConfigureContainer(ConfiguredServices services) { var reportingService = new DataServicesConnector { ClientId = DataClientId, ClientSecret = DataClientSecret, UserId = DataClientUserId, ServiceUrl = DataClientSeviceUrl ?? "https://globalpay-test.apigee.net/apis/reporting/", Timeout = Timeout }; services.ReportingService = reportingService; }
internal override void ConfigureContainer(ConfiguredServices services) { base.ConfigureContainer(services); if (string.IsNullOrEmpty(ServiceUrl)) { if (Environment.Equals(Entities.Environment.TEST)) { ServiceUrl = ServiceEndpoints.PORTICO_TEST; } else { ServiceUrl = ServiceEndpoints.PORTICO_PRODUCTION; } } var gateway = new PorticoConnector { SiteId = SiteId, LicenseId = LicenseId, DeviceId = DeviceId, Username = Username, Password = Password, SecretApiKey = SecretApiKey, DeveloperId = DeveloperId, VersionNumber = VersionNumber, Timeout = Timeout, ServiceUrl = ServiceUrl + "/Hps.Exchange.PosGateway/PosGatewayService.asmx", UniqueDeviceId = UniqueDeviceId, RequestLogger = RequestLogger }; services.GatewayConnector = gateway; // no data connector if (string.IsNullOrEmpty(DataClientId)) { services.ReportingService = gateway; } var payplan = new PayPlanConnector { SecretApiKey = SecretApiKey, Timeout = Timeout, ServiceUrl = ServiceUrl + PayPlanEndpoint, RequestLogger = RequestLogger }; services.RecurringConnector = payplan; }
internal override void ConfigureContainer(ConfiguredServices services) { if (string.IsNullOrEmpty(ServiceUrl)) { if (Environment.Equals(Entities.Environment.TEST)) { ServiceUrl = ServiceEndpoints.GP_API_TEST; } else { ServiceUrl = ServiceEndpoints.GP_API_PRODUCTION; } } var gpApiConfig = new GpApiConfig { AppId = AppId, AppKey = AppKey, SecondsToExpire = SecondsToExpire, IntervalToExpire = IntervalToExpire, Channel = Channel, Language = Language, Country = Country, ServiceUrl = ServiceUrl, Timeout = Timeout, Permissions = Permissions, MethodNotificationUrl = MethodNotificationUrl, RequestLogger = RequestLogger, MerchantContactUrl = MerchantContactUrl, ChallengeNotificationUrl = ChallengeNotificationUrl, WebProxy = WebProxy, DynamicHeaders = DynamicHeaders, MerchantId = MerchantId, AccessTokenInfo = AccessTokenInfo, }; var gateway = new GpApiConnector(gpApiConfig); services.GatewayConnector = gateway; services.ReportingService = gateway; services.SetSecure3dProvider(Secure3dVersion.One, gateway); services.SetSecure3dProvider(Secure3dVersion.Two, gateway); }
internal override void ConfigureContainer(ConfiguredServices services) { if (_gatewayType == NetworkGatewayType.NWS) { gateway = new NWSConnector(); } //else if(_gatewayType == NetworkGatewayType.VAPS) { // gateway = new VapsConnector(); //} // connection fields gateway.PrimaryEndpoint = ServiceUrl; gateway.PrimaryPort = PrimaryPort; gateway.SecondaryEndpoint = SecondaryEndpoint; gateway.SecondaryPort = SecondaryPort; gateway.Timeout = Timeout; gateway.EnableLogging = EnableLogging; gateway.ForceGatewayTimeout = ForceGatewayTimeout; // other fields gateway.CompanyId = CompanyId; gateway.ConnectionType = connectionType; gateway.MessageType = messageType; gateway.NodeIdentification = NodeIdentification; gateway.ProtocolType = protocolType; gateway.TerminalId = TerminalId; gateway.MerchantType = MerchantType; gateway.EWICMerchantId = EWICMerchantID; gateway.UniqueDeviceId = UniqueDeviceId; // acceptor config if (AcceptorConfig == null) { AcceptorConfig = new AcceptorConfig(); } gateway.AcceptorConfig = AcceptorConfig; // stan provider gateway.StanProvider = StanProvider; // batch provider gateway.BatchProvider = BatchProvider; services.GatewayConnector = gateway; }
internal override void ConfigureContainer(ConfiguredServices services) { var gateway = new BillPayProvider() { Credentials = new Entities.Billing.Credentials { UserName = Username, Password = Password, ApiKey = ApiKey, MerchantName = MerchantName }, ServiceUrl = ServiceUrl ?? ServiceEndpoints.BILLPAY_PRODUCTION, Timeout = Timeout, IsBillDataHosted = UseBillRecordlookup }; services.GatewayConnector = gateway; services.BillingProvider = gateway; services.RecurringConnector = gateway; }
internal override void ConfigureContainer(ConfiguredServices services) { if (string.IsNullOrEmpty(ServiceUrl)) { if (Environment.Equals(Entities.Environment.TEST)) { ServiceUrl = ServiceEndpoints.GP_API_TEST; } else { ServiceUrl = ServiceEndpoints.GP_API_PRODUCTION; } } var gateway = new GpApiConnector { AppId = AppId, AppKey = AppKey, SecondsToExpire = SecondsToExpire, IntervalToExpire = IntervalToExpire, Channel = Channel, Language = Language, Country = Country, ServiceUrl = ServiceUrl, Timeout = Timeout, Permissions = Permissions, AccessToken = AccessTokenInfo?.Token, DataAccountName = AccessTokenInfo?.DataAccountName, DisputeManagementAccountName = AccessTokenInfo?.DisputeManagementAccountName, TokenizationAccountName = AccessTokenInfo?.TokenizationAccountName, TransactionProcessingAccountName = AccessTokenInfo?.TransactionProcessingAccountName, ChallengeNotificationUrl = ChallengeNotificationUrl, MethodNotificationUrl = MethodNotificationUrl, RequestLogger = RequestLogger, WebProxy = WebProxy, }; services.GatewayConnector = gateway; services.ReportingService = gateway; services.SetSecure3dProvider(Secure3dVersion.One, gateway); services.SetSecure3dProvider(Secure3dVersion.Two, gateway); }
internal override void ConfigureContainer(ConfiguredServices services) { if (!string.IsNullOrEmpty(MerchantId)) { var gateway = new RealexConnector { AccountId = AccountId, Channel = Channel, MerchantId = MerchantId, RebatePassword = RebatePassword, RefundPassword = RefundPassword, SharedSecret = SharedSecret, Timeout = Timeout, ServiceUrl = ServiceUrl, HostedPaymentConfig = HostedPaymentConfig }; services.GatewayConnector = gateway; services.RecurringConnector = gateway; } else { var gateway = new PorticoConnector { SiteId = SiteId, LicenseId = LicenseId, DeviceId = DeviceId, Username = Username, Password = Password, SecretApiKey = SecretApiKey, DeveloperId = DeveloperId, VersionNumber = VersionNumber, Timeout = Timeout, ServiceUrl = ServiceUrl + "/Hps.Exchange.PosGateway/PosGatewayService.asmx" }; services.GatewayConnector = gateway; var payplan = new PayPlanConnector { SecretApiKey = SecretApiKey, Timeout = Timeout, ServiceUrl = ServiceUrl + "/Portico.PayPlan.v2/" }; services.RecurringConnector = payplan; } }
internal override void ConfigureContainer(ConfiguredServices services) { services.BoardingConnector = new OnlineBoardingConnector { Portal = Portal }; }
internal override void ConfigureContainer(ConfiguredServices services) { if (!string.IsNullOrEmpty(MerchantId)) { if (string.IsNullOrEmpty(ServiceUrl)) { if (Environment.Equals(Entities.Environment.TEST)) { ServiceUrl = ServiceEndpoints.GLOBAL_ECOM_TEST; } else { ServiceUrl = ServiceEndpoints.GLOBAL_ECOM_PRODUCTION; } } var gateway = new RealexConnector { AccountId = AccountId, Channel = Channel, MerchantId = MerchantId, RebatePassword = RebatePassword, RefundPassword = RefundPassword, SharedSecret = SharedSecret, Timeout = Timeout, ServiceUrl = ServiceUrl, HostedPaymentConfig = HostedPaymentConfig }; services.GatewayConnector = gateway; services.RecurringConnector = gateway; var reportingService = new DataServicesConnector { ClientId = DataClientId, ClientSecret = DataClientSecret, UserId = DataClientUserId, ServiceUrl = DataClientSeviceUrl ?? "https://globalpay-test.apigee.net/apis/reporting/", Timeout = Timeout }; services.ReportingService = reportingService; // set default if (Secure3dVersion == null) { Secure3dVersion = Entities.Secure3dVersion.One; } // secure 3d v1 if (Secure3dVersion.Equals(Entities.Secure3dVersion.One) || Secure3dVersion.Equals(Entities.Secure3dVersion.Any)) { services.SetSecure3dProvider(Entities.Secure3dVersion.One, gateway); } // secure 3d v2 if (Secure3dVersion.Equals(Entities.Secure3dVersion.Two) || Secure3dVersion.Equals(Entities.Secure3dVersion.Any)) { Gp3DSProvider secure3d2 = new Gp3DSProvider { MerchantId = MerchantId, AccountId = AccountId, SharedSecret = SharedSecret, ServiceUrl = Environment.Equals(Entities.Environment.TEST) ? ServiceEndpoints.THREE_DS_AUTH_TEST : ServiceEndpoints.THREE_DS_AUTH_PRODUCTION, MerchantContactUrl = MerchantContactUrl, MethodNotificationUrl = MethodNotificationUrl, ChallengeNotificationUrl = ChallengeNotificationUrl, Timeout = Timeout //secure3d2.EnableLogging = EnableLogging }; services.SetSecure3dProvider(Entities.Secure3dVersion.Two, secure3d2); } } else { if (string.IsNullOrEmpty(ServiceUrl)) { if (Environment.Equals(Entities.Environment.TEST)) { ServiceUrl = ServiceEndpoints.PORTICO_TEST; } else { ServiceUrl = ServiceEndpoints.PORTICO_PRODUCTION; } } var gateway = new PorticoConnector { SiteId = SiteId, LicenseId = LicenseId, DeviceId = DeviceId, Username = Username, Password = Password, SecretApiKey = SecretApiKey, DeveloperId = DeveloperId, VersionNumber = VersionNumber, Timeout = Timeout, ServiceUrl = ServiceUrl + "/Hps.Exchange.PosGateway/PosGatewayService.asmx", UniqueDeviceId = UniqueDeviceId }; services.GatewayConnector = gateway; if (!string.IsNullOrEmpty(DataClientId)) { services.ReportingService = new DataServicesConnector { ClientId = DataClientId, ClientSecret = DataClientSecret, UserId = DataClientUserId, ServiceUrl = DataClientSeviceUrl ?? "https://globalpay-test.apigee.net/apis/reporting/", Timeout = Timeout }; } else { services.ReportingService = gateway; } var payplan = new PayPlanConnector { SecretApiKey = SecretApiKey, Timeout = Timeout, ServiceUrl = ServiceUrl + getPayPlanEndpoint(SecretApiKey) }; services.RecurringConnector = payplan; } }
internal override void ConfigureContainer(ConfiguredServices services) { base.ConfigureContainer(services); if (string.IsNullOrEmpty(ServiceUrl)) { if (Environment.Equals(Entities.Environment.TEST)) { ServiceUrl = ServiceEndpoints.GLOBAL_ECOM_TEST; } else { ServiceUrl = ServiceEndpoints.GLOBAL_ECOM_PRODUCTION; } } var gateway = new GpEcomConnector { AccountId = AccountId, Channel = Channel, MerchantId = MerchantId, RebatePassword = RebatePassword, RefundPassword = RefundPassword, SharedSecret = SharedSecret, Timeout = Timeout, ServiceUrl = ServiceUrl, HostedPaymentConfig = HostedPaymentConfig, RequestLogger = RequestLogger, WebProxy = WebProxy }; services.GatewayConnector = gateway; services.RecurringConnector = gateway; // set reporting gateway if (!UseDataReportingService) { services.ReportingService = gateway; } // set default if (Secure3dVersion == null) { Secure3dVersion = Entities.Secure3dVersion.One; } // secure 3d v1 if (Secure3dVersion.Equals(Entities.Secure3dVersion.One) || Secure3dVersion.Equals(Entities.Secure3dVersion.Any)) { services.SetSecure3dProvider(Entities.Secure3dVersion.One, gateway); } // secure 3d v2 if (Secure3dVersion.Equals(Entities.Secure3dVersion.Two) || Secure3dVersion.Equals(Entities.Secure3dVersion.Any)) { Gp3DSProvider secure3d2 = new Gp3DSProvider { MerchantId = MerchantId, AccountId = AccountId, SharedSecret = SharedSecret, ServiceUrl = Environment.Equals(Entities.Environment.TEST) ? ServiceEndpoints.THREE_DS_AUTH_TEST : ServiceEndpoints.THREE_DS_AUTH_PRODUCTION, MerchantContactUrl = MerchantContactUrl, MethodNotificationUrl = MethodNotificationUrl, ChallengeNotificationUrl = ChallengeNotificationUrl, Timeout = Timeout, RequestLogger = RequestLogger, WebProxy = WebProxy //secure3d2.EnableLogging = EnableLogging }; services.SetSecure3dProvider(Entities.Secure3dVersion.Two, secure3d2); } }
internal abstract void ConfigureContainer(ConfiguredServices services);
internal override void ConfigureContainer(ConfiguredServices services) { base.ConfigureContainer(services); if (string.IsNullOrEmpty(ServiceUrl)) { if (Environment.Equals(Entities.Environment.TEST)) { ServiceUrl = ServiceEndpoints.PORTICO_TEST; } else { ServiceUrl = ServiceEndpoints.PORTICO_PRODUCTION; } } var gateway = new PorticoConnector { SiteId = SiteId, LicenseId = LicenseId, DeviceId = DeviceId, Username = Username, Password = Password, SecretApiKey = SecretApiKey, DeveloperId = DeveloperId, VersionNumber = VersionNumber, Timeout = Timeout, ServiceUrl = ServiceUrl + "/Hps.Exchange.PosGateway/PosGatewayService.asmx", UniqueDeviceId = UniqueDeviceId, RequestLogger = RequestLogger }; services.GatewayConnector = gateway; // no data connector if (string.IsNullOrEmpty(DataClientId)) { services.ReportingService = gateway; } var payplan = new PayPlanConnector { SecretApiKey = SecretApiKey, Timeout = Timeout, ServiceUrl = ServiceUrl + PayPlanEndpoint, RequestLogger = RequestLogger }; services.RecurringConnector = payplan; // ProPay Connector if (CertificationStr != null && CertificationStr.Length > 0) { if (Environment == Entities.Environment.TEST) { ServiceUrl = ProPayUS ? ServiceEndpoints.PROPAY_TEST : ServiceEndpoints.PROPAY_TEST_CANADIAN; } else { ServiceUrl = ProPayUS ? ServiceEndpoints.PROPAY_PRODUCTION : ServiceEndpoints.PROPAY_PRODUCTION_CANADIAN; } var payFac = new ProPayConnector() { CertStr = CertificationStr, TermID = TerminalID, Timeout = Timeout, ServiceUrl = ServiceUrl, X509CertPath = X509CertificatePath }; services.PayFacProvider = payFac; } }
internal override void ConfigureContainer(ConfiguredServices services) { if (!string.IsNullOrEmpty(MerchantId)) { var gateway = new RealexConnector { AccountId = AccountId, Channel = Channel, MerchantId = MerchantId, RebatePassword = RebatePassword, RefundPassword = RefundPassword, SharedSecret = SharedSecret, Timeout = Timeout, ServiceUrl = ServiceUrl, HostedPaymentConfig = HostedPaymentConfig, OpenPathApiKey = OpenPathApiKey, OpenPathApiUrl = OpenPathApiUrl }; services.GatewayConnector = gateway; services.RecurringConnector = gateway; var reportingService = new DataServicesConnector { ClientId = DataClientId, ClientSecret = DataClientSecret, UserId = DataClientUserId, ServiceUrl = DataClientSeviceUrl ?? "https://globalpay-test.apigee.net/apis/reporting/", Timeout = Timeout }; services.ReportingService = reportingService; } else { var gateway = new PorticoConnector { SiteId = SiteId, LicenseId = LicenseId, DeviceId = DeviceId, Username = Username, Password = Password, SecretApiKey = SecretApiKey, DeveloperId = DeveloperId, VersionNumber = VersionNumber, Timeout = Timeout, ServiceUrl = ServiceUrl + "/Hps.Exchange.PosGateway/PosGatewayService.asmx", UniqueDeviceId = UniqueDeviceId, OpenPathApiKey = OpenPathApiKey, OpenPathApiUrl = OpenPathApiUrl }; services.GatewayConnector = gateway; if (!string.IsNullOrEmpty(DataClientId)) { services.ReportingService = new DataServicesConnector { ClientId = DataClientId, ClientSecret = DataClientSecret, UserId = DataClientUserId, ServiceUrl = DataClientSeviceUrl ?? "https://globalpay-test.apigee.net/apis/reporting/", Timeout = Timeout }; } else { services.ReportingService = gateway; } var payplan = new PayPlanConnector { SecretApiKey = SecretApiKey, Timeout = Timeout, ServiceUrl = ServiceUrl + getPayPlanEndpoint(SecretApiKey) }; services.RecurringConnector = payplan; } }