Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Authorize.net : The underlying connection was closed

I am working on a project where I am using Authorize.Net for payment processing.

It was working fine, but today I am continuously getting an error "The underlying connection was closed: An unexpected error occurred on a send." while calling any API function. Is this issue belong to authorize.net side?

I am working on test mode using sandbox account.

like image 347
Sunil Chaudhary Avatar asked Dec 03 '25 14:12

Sunil Chaudhary


1 Answers

Add this line at the very beginning of your code

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
like image 97
Harshit Tailor Avatar answered Dec 07 '25 14:12

Harshit Tailor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!