<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Error on creditcard processing in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-on-creditcard-processing/m-p/62004#M36390</link>
    <description>&lt;P&gt;Hi I am using Asp.net 3.5 framework, I had implemented Authorize.net work for credit card processing which was working fine last month but now It stopped working, I tried to debug code and getting this error&lt;/P&gt;&lt;P&gt;The underlying connection was closed: An unexpected error occurred on a send.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is code I am using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim ApiLogin As String =&amp;nbsp;"ABCD"&lt;BR /&gt;Dim TransactionKey As String =&amp;nbsp;"1234"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Dim post_url As [String] = "&lt;A href="https://secure2.authorize.net/gateway/transact.dll" target="_blank"&gt;https://secure2.authorize.net/gateway/transact.dll&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;lblGrandTotal.Text = "1"&lt;BR /&gt;ExpDate = Regex.Split(hidExpDate.Value, "/")&lt;BR /&gt;If ExpDate.Length &amp;gt; 0 Then&lt;BR /&gt;Month = ExpDate(0)&lt;BR /&gt;Year = ExpDate(1).Remove(0, 2)&lt;BR /&gt;End If&lt;BR /&gt;'curExpDate = Month + "" + Year&lt;/P&gt;&lt;P&gt;Dim post_values As New Dictionary(Of String, String)()&lt;/P&gt;&lt;P&gt;post_values.Add("x_login", ApiLogin)&lt;BR /&gt;post_values.Add("x_tran_key", TransactionKey)&lt;BR /&gt;post_values.Add("x_delim_data", "TRUE")&lt;BR /&gt;post_values.Add("x_delim_char", "|")&lt;BR /&gt;post_values.Add("x_relay_response", "FALSE")&lt;/P&gt;&lt;P&gt;post_values.Add("x_type", "AUTH_CAPTURE")&lt;BR /&gt;post_values.Add("x_method", "CC")&lt;BR /&gt;post_values.Add("x_card_num", lblCC.Text)&lt;BR /&gt;'post_values.Add("x_card_num", "12345")&lt;BR /&gt;post_values.Add("x_card_code", lblAuth_Code.Text)&lt;BR /&gt;'post_values.Add("x_card_code", "027")&lt;BR /&gt;post_values.Add("x_exp_date", Month + "" + Year)&lt;/P&gt;&lt;P&gt;post_values.Add("x_amount", "2000")&lt;BR /&gt;post_values.Add("x_description", "")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;post_values.Add("x_first_name", hidFName.Value)&lt;BR /&gt;post_values.Add("x_last_name", hidLName.Value)&lt;BR /&gt;post_values.Add("x_company", hidCompanyName.Value)&lt;/P&gt;&lt;P&gt;post_values.Add("x_address", lblAdd.Text)&lt;BR /&gt;post_values.Add("x_state", lblState.Text)&lt;BR /&gt;post_values.Add("x_zip", lblZipCode.Text)&lt;BR /&gt;post_values.Add("x_city", lblCity.Text)&lt;BR /&gt;post_values.Add("x_country", lblCntry.Text)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Dim post_string As [String] = ""&lt;/P&gt;&lt;P&gt;For Each post_value As KeyValuePair(Of String, String) In post_values&lt;BR /&gt;post_string += post_value.Key + "=" + HttpUtility.UrlEncode(post_value.Value) + "&amp;amp;"&lt;BR /&gt;Next&lt;BR /&gt;post_string = post_string.TrimEnd("&amp;amp;"c)&lt;/P&gt;&lt;P&gt;'Create an HttpWebRequest object to communicate with Authorize.net&lt;BR /&gt;Dim objRequest As HttpWebRequest = DirectCast(WebRequest.Create(post_url), HttpWebRequest)&lt;BR /&gt;objRequest.Method = "POST"&lt;BR /&gt;objRequest.ContentLength = post_string.Length&lt;BR /&gt;objRequest.ContentType = post_url&lt;/P&gt;&lt;P&gt;'post data is sent as a stream&lt;BR /&gt;Dim myWriter As StreamWriter = Nothing&lt;BR /&gt;myWriter = New StreamWriter(objRequest.GetRequestStream())&lt;BR /&gt;myWriter.Write(post_string)&lt;BR /&gt;myWriter.Close()&lt;/P&gt;&lt;P&gt;System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls&lt;/P&gt;&lt;P&gt;'returned values are returned as a stream, then read into a string&lt;BR /&gt;Dim post_response As [String]&lt;BR /&gt;Dim objResponse As HttpWebResponse = DirectCast(objRequest.GetResponse(), HttpWebResponse)&lt;BR /&gt;Using responseStream As New StreamReader(objResponse.GetResponseStream())&lt;BR /&gt;post_response = responseStream.ReadToEnd()&lt;BR /&gt;responseStream.Close()&lt;BR /&gt;End Using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Please help me as i am getting this issue on Production.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Mar 2018 10:39:12 GMT</pubDate>
    <dc:creator>smandola</dc:creator>
    <dc:date>2018-03-06T10:39:12Z</dc:date>
    <item>
      <title>Error on creditcard processing</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-on-creditcard-processing/m-p/62004#M36390</link>
      <description>&lt;P&gt;Hi I am using Asp.net 3.5 framework, I had implemented Authorize.net work for credit card processing which was working fine last month but now It stopped working, I tried to debug code and getting this error&lt;/P&gt;&lt;P&gt;The underlying connection was closed: An unexpected error occurred on a send.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is code I am using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim ApiLogin As String =&amp;nbsp;"ABCD"&lt;BR /&gt;Dim TransactionKey As String =&amp;nbsp;"1234"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Dim post_url As [String] = "&lt;A href="https://secure2.authorize.net/gateway/transact.dll" target="_blank"&gt;https://secure2.authorize.net/gateway/transact.dll&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;lblGrandTotal.Text = "1"&lt;BR /&gt;ExpDate = Regex.Split(hidExpDate.Value, "/")&lt;BR /&gt;If ExpDate.Length &amp;gt; 0 Then&lt;BR /&gt;Month = ExpDate(0)&lt;BR /&gt;Year = ExpDate(1).Remove(0, 2)&lt;BR /&gt;End If&lt;BR /&gt;'curExpDate = Month + "" + Year&lt;/P&gt;&lt;P&gt;Dim post_values As New Dictionary(Of String, String)()&lt;/P&gt;&lt;P&gt;post_values.Add("x_login", ApiLogin)&lt;BR /&gt;post_values.Add("x_tran_key", TransactionKey)&lt;BR /&gt;post_values.Add("x_delim_data", "TRUE")&lt;BR /&gt;post_values.Add("x_delim_char", "|")&lt;BR /&gt;post_values.Add("x_relay_response", "FALSE")&lt;/P&gt;&lt;P&gt;post_values.Add("x_type", "AUTH_CAPTURE")&lt;BR /&gt;post_values.Add("x_method", "CC")&lt;BR /&gt;post_values.Add("x_card_num", lblCC.Text)&lt;BR /&gt;'post_values.Add("x_card_num", "12345")&lt;BR /&gt;post_values.Add("x_card_code", lblAuth_Code.Text)&lt;BR /&gt;'post_values.Add("x_card_code", "027")&lt;BR /&gt;post_values.Add("x_exp_date", Month + "" + Year)&lt;/P&gt;&lt;P&gt;post_values.Add("x_amount", "2000")&lt;BR /&gt;post_values.Add("x_description", "")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;post_values.Add("x_first_name", hidFName.Value)&lt;BR /&gt;post_values.Add("x_last_name", hidLName.Value)&lt;BR /&gt;post_values.Add("x_company", hidCompanyName.Value)&lt;/P&gt;&lt;P&gt;post_values.Add("x_address", lblAdd.Text)&lt;BR /&gt;post_values.Add("x_state", lblState.Text)&lt;BR /&gt;post_values.Add("x_zip", lblZipCode.Text)&lt;BR /&gt;post_values.Add("x_city", lblCity.Text)&lt;BR /&gt;post_values.Add("x_country", lblCntry.Text)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Dim post_string As [String] = ""&lt;/P&gt;&lt;P&gt;For Each post_value As KeyValuePair(Of String, String) In post_values&lt;BR /&gt;post_string += post_value.Key + "=" + HttpUtility.UrlEncode(post_value.Value) + "&amp;amp;"&lt;BR /&gt;Next&lt;BR /&gt;post_string = post_string.TrimEnd("&amp;amp;"c)&lt;/P&gt;&lt;P&gt;'Create an HttpWebRequest object to communicate with Authorize.net&lt;BR /&gt;Dim objRequest As HttpWebRequest = DirectCast(WebRequest.Create(post_url), HttpWebRequest)&lt;BR /&gt;objRequest.Method = "POST"&lt;BR /&gt;objRequest.ContentLength = post_string.Length&lt;BR /&gt;objRequest.ContentType = post_url&lt;/P&gt;&lt;P&gt;'post data is sent as a stream&lt;BR /&gt;Dim myWriter As StreamWriter = Nothing&lt;BR /&gt;myWriter = New StreamWriter(objRequest.GetRequestStream())&lt;BR /&gt;myWriter.Write(post_string)&lt;BR /&gt;myWriter.Close()&lt;/P&gt;&lt;P&gt;System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls&lt;/P&gt;&lt;P&gt;'returned values are returned as a stream, then read into a string&lt;BR /&gt;Dim post_response As [String]&lt;BR /&gt;Dim objResponse As HttpWebResponse = DirectCast(objRequest.GetResponse(), HttpWebResponse)&lt;BR /&gt;Using responseStream As New StreamReader(objResponse.GetResponseStream())&lt;BR /&gt;post_response = responseStream.ReadToEnd()&lt;BR /&gt;responseStream.Close()&lt;BR /&gt;End Using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Please help me as i am getting this issue on Production.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 10:39:12 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-on-creditcard-processing/m-p/62004#M36390</guid>
      <dc:creator>smandola</dc:creator>
      <dc:date>2018-03-06T10:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error on creditcard processing</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-on-creditcard-processing/m-p/62010#M36396</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/23624"&gt;@smandola&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will need to upgrade your platform to support TLS 1.2.&amp;nbsp; Another developer provided detailed instructions for asp.net here:&amp;nbsp;&lt;A href="https://community.developer.authorize.net/t5/Integration-and-Testing/TLS-1-2-Issue-in-Classic-ASP-environment/m-p/62009#M36395" target="_blank"&gt;https://community.developer.authorize.net/t5/Integration-and-Testing/TLS-1-2-Issue-in-Classic-ASP-environment/m-p/62009#M36395&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Richard&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 17:17:07 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-on-creditcard-processing/m-p/62010#M36396</guid>
      <dc:creator>RichardH</dc:creator>
      <dc:date>2018-03-06T17:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error on creditcard processing</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-on-creditcard-processing/m-p/62039#M36423</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am getting below error&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The underlying connection was closed: An unexpected error occurred on a receive.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually I made successful transaction after fixing issue on my windows7 machine, I added this line in authorize.net code&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ServicePointManager.SecurityProtocol = DirectCast(3072, SecurityProtocolType)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and I changed my .net code framework to 4.0 and I have installed framework 4.6 and then my processing for credit card worked fine, BUT today when I tried to move that code on server,we are using Windows server 2008 Standard, I did same settings which I did on my windows7 machine but It's not working there, I am getting above error. I checked that updates were installed 1 week before in that server, Please help me with right solution asap as OUR PRODUCTION IS DOWN because of this issue.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 18:43:49 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-on-creditcard-processing/m-p/62039#M36423</guid>
      <dc:creator>smandola</dc:creator>
      <dc:date>2018-03-08T18:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Error on creditcard processing</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-on-creditcard-processing/m-p/62043#M36427</link>
      <description>&lt;P&gt;I followed same instruction but stll it's not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 19:50:32 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Error-on-creditcard-processing/m-p/62043#M36427</guid>
      <dc:creator>smandola</dc:creator>
      <dc:date>2018-03-08T19:50:32Z</dc:date>
    </item>
  </channel>
</rss>

