Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing WebProxy option for all HttpClient consumers #46

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/GlobalPayments.Api/Gateways/BillPayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using GlobalPayments.Api.Entities;
using GlobalPayments.Api.Entities.Billing;
using GlobalPayments.Api.Gateways.BillPay;
using System.Net;

namespace GlobalPayments.Api.Gateways {
internal class BillPayProvider: IBillingProvider, IPaymentGateway, IRecurringService {
Expand All @@ -19,6 +20,8 @@ internal class BillPayProvider: IBillingProvider, IPaymentGateway, IRecurringSer

public string ServiceUrl { get; set; }

public IWebProxy WebProxy { get; set; }

/// <summary>
/// Invokes a request against the BillPay gateway using the AuthorizationBuilder
/// </summary>
Expand Down
3 changes: 2 additions & 1 deletion src/GlobalPayments.Api/ServiceConfigs/BillPayConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ internal override void ConfigureContainer(ConfiguredServices services) {
},
ServiceUrl = ServiceUrl ?? ServiceEndpoints.BILLPAY_PRODUCTION,
Timeout = Timeout,
IsBillDataHosted = UseBillRecordlookup
IsBillDataHosted = UseBillRecordlookup,
WebProxy = WebProxy
};

services.GatewayConnector = gateway;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ internal override void ConfigureContainer(ConfiguredServices services) {
RegisterNumber = RegisterNumber,
TerminalId = TerminalId,
Timeout = Timeout,
ServiceUrl = ServiceUrl
ServiceUrl = ServiceUrl,
WebProxy = WebProxy
};

services.GatewayConnector = gateway;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ internal override void ConfigureContainer(ConfiguredServices services) {
SharedSecret = SharedSecret,
Timeout = Timeout,
ServiceUrl = ServiceUrl,
HostedPaymentConfig = HostedPaymentConfig
HostedPaymentConfig = HostedPaymentConfig,
WebProxy = WebProxy
};
services.GatewayConnector = gateway;
services.RecurringConnector = gateway;
Expand All @@ -98,7 +99,8 @@ internal override void ConfigureContainer(ConfiguredServices services) {
MerchantContactUrl = MerchantContactUrl,
MethodNotificationUrl = MethodNotificationUrl,
ChallengeNotificationUrl = ChallengeNotificationUrl,
Timeout = Timeout
Timeout = Timeout,
WebProxy = WebProxy
//secure3d2.EnableLogging = EnableLogging
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ internal override void ConfigureContainer(ConfiguredServices services) {
Timeout = Timeout,
ServiceUrl = ServiceUrl + "/Hps.Exchange.PosGateway/PosGatewayService.asmx",
UniqueDeviceId = UniqueDeviceId,
RequestLogger = RequestLogger
RequestLogger = RequestLogger,
WebProxy = WebProxy
};
services.GatewayConnector = gateway;

Expand All @@ -123,7 +124,8 @@ internal override void ConfigureContainer(ConfiguredServices services) {
SecretApiKey = SecretApiKey,
Timeout = Timeout,
ServiceUrl = ServiceUrl + PayPlanEndpoint,
RequestLogger = RequestLogger
RequestLogger = RequestLogger,
WebProxy = WebProxy
};
services.RecurringConnector = payplan;

Expand All @@ -142,7 +144,8 @@ internal override void ConfigureContainer(ConfiguredServices services) {
TermID = TerminalID,
Timeout = Timeout,
ServiceUrl = ServiceUrl,
X509CertPath = X509CertificatePath
X509CertPath = X509CertificatePath,
WebProxy = WebProxy
};

services.PayFacProvider = payFac;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ internal override void ConfigureContainer(ConfiguredServices services) {
TransactionKey = TransactionKey,
ServiceUrl = ServiceUrl,
Timeout = Timeout,
RequestLogger = RequestLogger
RequestLogger = RequestLogger,
WebProxy = WebProxy
};

services.GatewayConnector = gateway;
Expand Down