<?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 Fingerprint Testing for Asp Classic in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Fingerprint-Testing-for-Asp-Classic/m-p/35545#M19856</link>
    <description>&lt;P&gt;Need a little help with adding fingerprint code to asp classic (vb and javascript) code.&amp;nbsp; Getting type mismatch error when processing test trans at &lt;A href="http://www.ccgintl2.com/ncmalasb2/" target="_blank"&gt;www.ccgintl2.com/ncmalasb2/&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/A&gt; Processing is in the subroutine which follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;'THis is the subroutine for sending transactons to the Authorize.Net gateway
Private Sub processCCAuthNet()
    On Error Resume Next
    Dim obj
    Dim request_string
    Dim response_string

     Response.Write("Got to ProcessCCAuthNet")
    ' create the PNCOMClient component
'Set client = Server.CreateObject("PFProCOMControl.PFProCOMControl.1")
'Set obj = Server.CreateObject("Microsoft.XMLHTTP")' used for Interland site
Set obj = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") ' used for GoDaddy site
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Error at Set client:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If

'This is the asp for authorize.net

'Create the fingerprint using the MD5 security algorithm
x_login = "4Q69bKsD"
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Login Value: " &amp;amp; x_login &amp;amp; "&amp;lt;br&amp;gt;")
    Response.Write("Error at Login:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
x_fp_sequence = treqnum
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Sequence Value: " &amp;amp; x_fp_sequence &amp;amp; "&amp;lt;br&amp;gt;")
    Response.Write("Error at Sequence Num:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If

x_fp_timestamp = CStr(Now())
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Timestamp Value: " &amp;amp; x_fp_timestamp &amp;amp; "&amp;lt;br&amp;gt;")
    Response.Write("Error at Timestamp:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
x_amount = tordertotal
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Amount Value: " &amp;amp; tordertotal &amp;amp; "&amp;lt;br&amp;gt;")
    Response.Write("Error at Amount" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
x_transkey = "39jJ9aa87JH83f5p"
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Transkey Value: " &amp;amp; x_transkey &amp;amp; "&amp;lt;br&amp;gt;")
    Response.Write("Error at Login:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
fingerprint = HMAC-MD5 ("x_login^x_fp_sequence^x_fp_timestamp^x_amount^","x_transkey")
'Fingerprint = HMAC-MD5 ("authnettest^789^67897654^10.50^","abcdefgh12345678")
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Fingerprint Value:" &amp;amp; fingerprint &amp;amp; "&amp;lt;br&amp;gt;")
    Response.Write("Error at Fingerprint:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
x_fp_hash =  CStr(fingerprint)



    'edit the parameters to be transmitted to assure that they do not exceed the permitted length and are the correct data type
    tempzip=tbillingzip
    tempzip=Replace (tempzip,"-","")
    tempzip=Replace (tempzip," ","")
    If Not IsNumeric(tempzip) Then
        temp = "0"
    End If
    If Len(tempzip) &amp;gt; 9 Then
        tempzip = Left(tempzip,9)
    End If
    If Len(acctname) &amp;gt; 128 Then
        acctname = Left(acctname,128)
    End If
    If Len(tname) &amp;gt; 128 Then
        tname = Left(tname,128)
    End If
    If Len(tbillname) &amp;gt; 128 Then
        tbillname = Left(tbillname,128)
    End If
    If Len(tcompany) &amp;gt; 30 Then
        tcompany = Left(tcompany,30)
    End If
    If Len(tbillingfirstname) &amp;gt; 15 Then
        tbillingfirstname = Left(tbillingfirstname,15)
    End If
    If Len(tbillinglastname) &amp;gt; 15 Then
        tbillinglastname = Left(tbillinglastname,15)
    End If
    If Len(taddr1) &amp;gt; 30 Then
        taddr1 = Left(taddr1,30)
    End If
'build the parameter list, such that we have a sale transaction and
'a credit card tender.
request_string="4Q69bKsD"   'This is the Test API Key
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "39jJ9aa87JH83f5p"  'THis is the Test Transaction Key
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_fp_hash=" &amp;amp; fingerprint
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_first_name=" &amp;amp; tbillingfirstname
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_last_name=" &amp;amp; tbillinglastname
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_address=" &amp;amp; tbillingaddr1
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_city=" &amp;amp; tbillingcity
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_state=" &amp;amp; tbillingstate
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_zip=" &amp;amp; tbillingzip
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_country=US"
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_email=" &amp;amp; temailaddr
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_card_num=" &amp;amp; tccnumber
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_exp_date=" &amp;amp; tccexpiremonth &amp;amp; tccexpireyear
'request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "T_code=01"
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_amount=" &amp;amp; tordertotal



If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Error b4 obj.Open:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
obj.Open "POST","&lt;A href="https://test.authorize.net/gateway/transact.dll?transaction&amp;quot;,False" target="_blank"&gt;https://test.authorize.net/gateway/transact.dll?transaction",False&lt;/A&gt;
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Error after obj.Open:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
obj.Send request_string
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Error after obj.Send:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
response_string=obj.responseText
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Error after response.string=:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
'Response.Write("Full Packet Response=" &amp;amp; response_string &amp;amp; "&amp;lt;br&amp;gt;")

tccresult=mid(response_string,2,1)
'Response.Write("tccresult=" &amp;amp; tccresult &amp;amp; "&amp;lt;br&amp;gt;")
tccrespmsg=mid(response_string,9,32)
'Response.Write("tccrespmsg=" &amp;amp; tccrespmsg &amp;amp; "&amp;lt;br&amp;gt;")
tccpnref=mid(response_string,47,10)
'Response.Write("tccrespmsg=" &amp;amp; tccrespmsg &amp;amp; "&amp;lt;br&amp;gt;")
tccauthcode=mid(response_string,3,6)
 
End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Sep 2013 01:23:49 GMT</pubDate>
    <dc:creator>ccgintl01</dc:creator>
    <dc:date>2013-09-06T01:23:49Z</dc:date>
    <item>
      <title>Fingerprint Testing for Asp Classic</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Fingerprint-Testing-for-Asp-Classic/m-p/35545#M19856</link>
      <description>&lt;P&gt;Need a little help with adding fingerprint code to asp classic (vb and javascript) code.&amp;nbsp; Getting type mismatch error when processing test trans at &lt;A href="http://www.ccgintl2.com/ncmalasb2/" target="_blank"&gt;www.ccgintl2.com/ncmalasb2/&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/A&gt; Processing is in the subroutine which follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;'THis is the subroutine for sending transactons to the Authorize.Net gateway
Private Sub processCCAuthNet()
    On Error Resume Next
    Dim obj
    Dim request_string
    Dim response_string

     Response.Write("Got to ProcessCCAuthNet")
    ' create the PNCOMClient component
'Set client = Server.CreateObject("PFProCOMControl.PFProCOMControl.1")
'Set obj = Server.CreateObject("Microsoft.XMLHTTP")' used for Interland site
Set obj = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") ' used for GoDaddy site
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Error at Set client:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If

'This is the asp for authorize.net

'Create the fingerprint using the MD5 security algorithm
x_login = "4Q69bKsD"
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Login Value: " &amp;amp; x_login &amp;amp; "&amp;lt;br&amp;gt;")
    Response.Write("Error at Login:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
x_fp_sequence = treqnum
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Sequence Value: " &amp;amp; x_fp_sequence &amp;amp; "&amp;lt;br&amp;gt;")
    Response.Write("Error at Sequence Num:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If

x_fp_timestamp = CStr(Now())
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Timestamp Value: " &amp;amp; x_fp_timestamp &amp;amp; "&amp;lt;br&amp;gt;")
    Response.Write("Error at Timestamp:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
x_amount = tordertotal
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Amount Value: " &amp;amp; tordertotal &amp;amp; "&amp;lt;br&amp;gt;")
    Response.Write("Error at Amount" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
x_transkey = "39jJ9aa87JH83f5p"
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Transkey Value: " &amp;amp; x_transkey &amp;amp; "&amp;lt;br&amp;gt;")
    Response.Write("Error at Login:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
fingerprint = HMAC-MD5 ("x_login^x_fp_sequence^x_fp_timestamp^x_amount^","x_transkey")
'Fingerprint = HMAC-MD5 ("authnettest^789^67897654^10.50^","abcdefgh12345678")
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Fingerprint Value:" &amp;amp; fingerprint &amp;amp; "&amp;lt;br&amp;gt;")
    Response.Write("Error at Fingerprint:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
x_fp_hash =  CStr(fingerprint)



    'edit the parameters to be transmitted to assure that they do not exceed the permitted length and are the correct data type
    tempzip=tbillingzip
    tempzip=Replace (tempzip,"-","")
    tempzip=Replace (tempzip," ","")
    If Not IsNumeric(tempzip) Then
        temp = "0"
    End If
    If Len(tempzip) &amp;gt; 9 Then
        tempzip = Left(tempzip,9)
    End If
    If Len(acctname) &amp;gt; 128 Then
        acctname = Left(acctname,128)
    End If
    If Len(tname) &amp;gt; 128 Then
        tname = Left(tname,128)
    End If
    If Len(tbillname) &amp;gt; 128 Then
        tbillname = Left(tbillname,128)
    End If
    If Len(tcompany) &amp;gt; 30 Then
        tcompany = Left(tcompany,30)
    End If
    If Len(tbillingfirstname) &amp;gt; 15 Then
        tbillingfirstname = Left(tbillingfirstname,15)
    End If
    If Len(tbillinglastname) &amp;gt; 15 Then
        tbillinglastname = Left(tbillinglastname,15)
    End If
    If Len(taddr1) &amp;gt; 30 Then
        taddr1 = Left(taddr1,30)
    End If
'build the parameter list, such that we have a sale transaction and
'a credit card tender.
request_string="4Q69bKsD"   'This is the Test API Key
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "39jJ9aa87JH83f5p"  'THis is the Test Transaction Key
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_fp_hash=" &amp;amp; fingerprint
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_first_name=" &amp;amp; tbillingfirstname
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_last_name=" &amp;amp; tbillinglastname
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_address=" &amp;amp; tbillingaddr1
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_city=" &amp;amp; tbillingcity
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_state=" &amp;amp; tbillingstate
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_zip=" &amp;amp; tbillingzip
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_country=US"
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_email=" &amp;amp; temailaddr
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_card_num=" &amp;amp; tccnumber
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_exp_date=" &amp;amp; tccexpiremonth &amp;amp; tccexpireyear
'request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "T_code=01"
request_string=request_string &amp;amp; "&amp;amp;" &amp;amp; "x_amount=" &amp;amp; tordertotal



If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Error b4 obj.Open:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
obj.Open "POST","&lt;A href="https://test.authorize.net/gateway/transact.dll?transaction&amp;quot;,False" target="_blank"&gt;https://test.authorize.net/gateway/transact.dll?transaction",False&lt;/A&gt;
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Error after obj.Open:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
obj.Send request_string
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Error after obj.Send:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
response_string=obj.responseText
If Err.Description &amp;lt;&amp;gt; "" Then
    Response.Write("Error after response.string=:" &amp;amp; Err.Description &amp;amp; "&amp;lt;br&amp;gt;")
End If
'Response.Write("Full Packet Response=" &amp;amp; response_string &amp;amp; "&amp;lt;br&amp;gt;")

tccresult=mid(response_string,2,1)
'Response.Write("tccresult=" &amp;amp; tccresult &amp;amp; "&amp;lt;br&amp;gt;")
tccrespmsg=mid(response_string,9,32)
'Response.Write("tccrespmsg=" &amp;amp; tccrespmsg &amp;amp; "&amp;lt;br&amp;gt;")
tccpnref=mid(response_string,47,10)
'Response.Write("tccrespmsg=" &amp;amp; tccrespmsg &amp;amp; "&amp;lt;br&amp;gt;")
tccauthcode=mid(response_string,3,6)
 
End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2013 01:23:49 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Fingerprint-Testing-for-Asp-Classic/m-p/35545#M19856</guid>
      <dc:creator>ccgintl01</dc:creator>
      <dc:date>2013-09-06T01:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Fingerprint Testing for Asp Classic</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Fingerprint-Testing-for-Asp-Classic/m-p/35585#M19875</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="ColorBandedcontent" style="position: relative; padding-bottom: 0px; padding-left: 3px; padding-right: 3px; clear: both; padding-top: 0px;"&gt;
&lt;DIV id="imcontent" style="margin-left: 12px;"&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We do provide legacy sample code for ASP classic on our &lt;A href="http://developer.authorize.net/downloads/samplecode/" target="_blank"&gt;download page&lt;/A&gt;, but we are no longer updating this sample. I would recommend taking a look to see if it works for you or gives you a hint about solving the type error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Joy&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 09 Sep 2013 19:54:21 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Fingerprint-Testing-for-Asp-Classic/m-p/35585#M19875</guid>
      <dc:creator>Joy</dc:creator>
      <dc:date>2013-09-09T19:54:21Z</dc:date>
    </item>
  </channel>
</rss>

