cancel
Showing results for 
Search instead for 
Did you mean: 

createTransactionRequest using track1 returns null

I am using the "Authorize.Net .NET SDK" to make a card present transaction, that was working just fine before the TLS 1.2 change, then it start giving a TLS connection error so I added the following code to fix it:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

 

Now the following code returns null response:

createTransactionRequest request = new createTransactionRequest() { transactionRequest = transactionRequest };
createTransactionController controller = new createTransactionController(request);
controller.Execute();
return controller.GetApiResponse();

I re-downloaded and rebuilded the latest .NET SDK code but the GetApiResponse() still returns null!
The credit card number charge request still works fine but only sending either track1/track2 doesn't work anymore.

wael101
Member
2 REPLIES 2

Hi wael101,

 

The API endpoint for keyed in and card present(Track 1 and Track 2) are same and if your're keyed in is working there shouldn't be any issue with TLS.

 

Can you tell us where you have placed the TLS setting line code you mentioned?

 

Also it would be great if you are using the latest SDK can you try removing :

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

and try the keyed in transaction.

 

Can you please share the SDK logs which will help us to get more detials on the issue?

 

 

maninderp
Authorize.Net Developer Authorize.Net Developer
Authorize.Net Developer

Hi maninderp

 

Thank you for taking time to reply to me.

I tried again what you suggest by commenting the "ServicePointManager.SecurityProtocol" line, and it throwing the same TLS error again (The request was aborted: Could not create SSL/TLS secure channel).

I don't know where the SDK stores the log files, but I created an example project so you can see what I am talking about.

The same code used to be working before about 2-3 months, then I noticed the SSL/TLS error so I added that line to enforce the TLS 1.2, and that fixed the credit card not present charge request, the card present (with using either track1 or track2) always returns null, I also tried with two different test accounts.

Please check out this example project

 

Thank you,

Wael