Skip to content

Commit 292dc38

Browse files
authored
Merge pull request #254 from AuthorizeNet/future
Future
2 parents 5f429d7 + c0c275e commit 292dc38

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed

Authorize.NET/Api/Controllers/getCustomerPaymentProfileNonceController.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@
77
#pragma warning disable 1591
88
public class getCustomerPaymentProfileNonceController : ApiOperationBase<getCustomerPaymentProfileNonceRequest, getCustomerPaymentProfileNonceResponse> {
99

10-
public getCustomerPaymentProfileNonceController(getCustomerPaymentProfileNonceRequest apiRequest) : base(apiRequest) {
11-
}
10+
public getCustomerPaymentProfileNonceController(getCustomerPaymentProfileNonceRequest apiRequest) : base(apiRequest) {
11+
}
1212

13-
override protected void ValidateRequest() {
13+
override protected void ValidateRequest() {
1414
var request = GetApiRequest();
15-
16-
//validate required fields
17-
//if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null");
18-
//if ( null == request.Paging) throw new ArgumentException("Paging cannot be null");
19-
20-
//validate not-required fields
21-
}
15+
16+
//validate required fields
17+
//if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null");
18+
//if ( null == request.Paging) throw new ArgumentException("Paging cannot be null");
19+
20+
//validate not-required fields
21+
}
2222

2323
protected override void BeforeExecute()
2424
{
2525
var request = GetApiRequest();
26-
// RequestFactoryWithSpecified.getCustomerPaymentProfileNonceType(request);
26+
// RequestFactoryWithSpecified.getCustomerPaymentProfileNonceType(request);
2727
}
2828
}
2929
#pragma warning restore 1591

Authorize.NET/AuthorizeNET.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
<Compile Include="Api\Controllers\getBatchStatisticsController.cs" />
8181
<Compile Include="Api\Controllers\getCustomerPaymentProfileController.cs" />
8282
<Compile Include="Api\Controllers\getCustomerPaymentProfileListController.cs" />
83+
<Compile Include="Api\Controllers\getCustomerPaymentProfileNonceController.cs" />
8384
<Compile Include="Api\Controllers\getCustomerProfileController.cs" />
8485
<Compile Include="Api\Controllers\getCustomerProfileIdsController.cs" />
8586
<Compile Include="Api\Controllers\getCustomerShippingAddressController.cs" />

Authorize.NET/Util/HttpUtility.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@ public static ANetApiResponse PostData<TQ, TS>(AuthorizeNet.Environment env, TQ
3939
throw new ArgumentNullException("request");
4040
}
4141
//Logger.debug(string.Format("MerchantInfo->LoginId/TransactionKey: '{0}':'{1}'->{2}",
42-
//request.merchantAuthentication.name, request.merchantAuthentication.ItemElementName, request.merchantAuthentication.Item));
43-
44-
var postUrl = GetPostUrl(env);
42+
//request.merchantAuthentication.name, request.merchantAuthentication.ItemElementName, request.merchantAuthentication.Item));
43+
44+
// Set Tls to Tls1.2
45+
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
46+
47+
var postUrl = GetPostUrl(env);
4548
var webRequest = (HttpWebRequest) WebRequest.Create(postUrl);
4649
webRequest.Method = "POST";
4750
webRequest.ContentType = "text/xml";
@@ -67,9 +70,6 @@ public static ANetApiResponse PostData<TQ, TS>(AuthorizeNet.Environment env, TQ
6770
String responseAsString = null;
6871
Logger.debug(string.Format("Retreiving Response from Url: '{0}'", postUrl));
6972

70-
// Set Tls to Tls1.2
71-
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
72-
7373
using (var webResponse = webRequest.GetResponse())
7474
{
7575
Logger.debug(string.Format("Received Response: '{0}'", webResponse));

Authorize.NET/Utility/HttpXmlUtility.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ public ANetApiResponse Send(ANetApiRequest apiRequest) {
4141
//Authenticate it
4242
AuthenticateRequest(apiRequest);
4343

44+
// Set Tls to Tls1.2
45+
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
46+
4447
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(_serviceUrl);
4548
webRequest.Method = "POST";
4649
webRequest.ContentType = "text/xml";
@@ -61,9 +64,6 @@ public ANetApiResponse Send(ANetApiRequest apiRequest) {
6164
serializer.Serialize(writer, apiRequest);
6265
writer.Close();
6366

64-
// Set Tls to Tls1.2
65-
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
66-
6767
// Get the response
6868
WebResponse webResponse = webRequest.GetResponse();
6969

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy