<?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 Re: SHA-512 hash mismatch - Java in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/SHA-512-hash-mismatch-Java/m-p/71592#M44098</link>
    <description>&lt;A href="https://community.developer.authorize.net/t5/Integration-and-Testing/Working-php-sha512-Verification-for-Accented-Characters/m-p/68934#M42047" target="_blank"&gt;https://community.developer.authorize.net/t5/Integration-and-Testing/Working-php-sha512-Verification-for-Accented-Characters/m-p/68934#M42047&lt;/A&gt;</description>
    <pubDate>Thu, 16 Apr 2020 16:06:43 GMT</pubDate>
    <dc:creator>Renaissance</dc:creator>
    <dc:date>2020-04-16T16:06:43Z</dc:date>
    <item>
      <title>SHA-512 hash mismatch - Java</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/SHA-512-hash-mismatch-Java/m-p/71520#M44041</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SHA-512 hash mismatch when we enter special characters in the hosted payment page fields such as Address.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;String xAddress = "712 Savoie �Rd";&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;x_SHA2_Hash=EB4E5F5BED46568B8BD7F7577BEE19DDAC9616B16613E1CFAEA5E606ABA6496A5150289FF8D98AA3FC65F54B85360C3CB0CAB2C7379A965CC841FB135B079495&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Data String to generate hash :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;String data = "^" + xTransId + "^" + xTestRequest + "^" + xResponseCode + "^"&lt;BR /&gt;+ xAuthCode + "^" + xCvv2RespCode + "^" + xCavvResponse + "^" + xAvsCode + "^"&lt;BR /&gt;+ xMethod + "^" + xAccountNumber + "^" + xAmount + "^" + xCompany + "^"&lt;BR /&gt;+ xFirstName + "^" + xLastName + "^" + xAddress + "^" + xCity + "^" + xState&lt;BR /&gt;+ "^" + xZip + "^" + xCountry + "^" + xPhone + "^" + xFax + "^" + xEmail + "^"&lt;BR /&gt;+ xShipToCompany + "^" + xShipToFirstName + "^" + xShipToLastName + "^"&lt;BR /&gt;+ xShipToAddress + "^" + xShipToCity + "^" + xShipToState + "^" + xShipToZip&lt;BR /&gt;+ "^" + xShipToCountry + "^" + xInvoiceNum + "^";&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hash generated:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;F8FFE2918ABC5FCB3D01E878D5A22B51804BE2DCF97DD13D3971344AF7DE5D38F785B5374E396A502B8D8827E661E75B1DAFB359F50EE66B8234531B2A8A9C27&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is an issue with character encoding but we don't know how Auth.net handles the encoding before generating the hash which they send in the response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Will really appreciate any help from the community to resolve this issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 12:01:14 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/SHA-512-hash-mismatch-Java/m-p/71520#M44041</guid>
      <dc:creator>vijayvanga</dc:creator>
      <dc:date>2020-04-13T12:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: SHA-512 hash mismatch - Java</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/SHA-512-hash-mismatch-Java/m-p/71542#M44060</link>
      <description>&lt;P&gt;Hi &lt;A id="link_1" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.developer.authorize.net/t5/user/viewprofilepage/user-id/37329" target="_self"&gt;&lt;SPAN class=""&gt;vijayvanga&lt;/SPAN&gt;&lt;/A&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should only use ISO 8859-1 characters.&amp;nbsp;For more information on how to use the transHashSha2 value, please visit the &lt;A href="https://developer.authorize.net/support/hash_upgrade.html" target="_self"&gt;Transaction Hash Upgrade Guide.&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this is helpful to you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Elaine&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 14:26:06 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/SHA-512-hash-mismatch-Java/m-p/71542#M44060</guid>
      <dc:creator>ElaineM</dc:creator>
      <dc:date>2020-04-14T14:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: SHA-512 hash mismatch - Java</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/SHA-512-hash-mismatch-Java/m-p/71591#M44097</link>
      <description>&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/37329"&gt;@vijayvanga&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;I have tested and working PHP code for this. The below post was modified but should work. You just need to adapt the code to java.&lt;BR /&gt;&lt;BR /&gt;FYI SIM is on the chopping block this year and DPM is probably not too far behind.</description>
      <pubDate>Thu, 16 Apr 2020 16:00:08 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/SHA-512-hash-mismatch-Java/m-p/71591#M44097</guid>
      <dc:creator>Renaissance</dc:creator>
      <dc:date>2020-04-16T16:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: SHA-512 hash mismatch - Java</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/SHA-512-hash-mismatch-Java/m-p/71592#M44098</link>
      <description>&lt;A href="https://community.developer.authorize.net/t5/Integration-and-Testing/Working-php-sha512-Verification-for-Accented-Characters/m-p/68934#M42047" target="_blank"&gt;https://community.developer.authorize.net/t5/Integration-and-Testing/Working-php-sha512-Verification-for-Accented-Characters/m-p/68934#M42047&lt;/A&gt;</description>
      <pubDate>Thu, 16 Apr 2020 16:06:43 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/SHA-512-hash-mismatch-Java/m-p/71592#M44098</guid>
      <dc:creator>Renaissance</dc:creator>
      <dc:date>2020-04-16T16:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: SHA-512 hash mismatch - Java</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/SHA-512-hash-mismatch-Java/m-p/71745#M44206</link>
      <description>&lt;P&gt;I have converted the PHP code to Java, Still I am getting hash mismatch below is code which I have converted to java. Please can you help is there I am missing anything.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;String allString = xTransId + "," + xTestRequest + "," + xResponseCode + "," + xAuthCode + "," + xCvv2RespCode + "," + xCavvResponse + "," + xAvsCode&lt;BR /&gt;+ "," + xMethod + "," + xAccountNumber + "," + xAmount + "," + xCompany + "," + xFirstName + "," + xLastName + "," + xAddress + "," + xCity + "," + xState&lt;BR /&gt;+ "," + xZip + "," + xCountry + "," + xPhone + "," + xFax + "," + xEmail + "," + xShipToCompany + "," + xShipToFirstName + "," + xShipToLastName&lt;BR /&gt;+ "," + xShipToAddress + "," + xShipToCity + "," + xShipToState + "," + xShipToZip&lt;BR /&gt;+ "," + xShipToCountry + "," + xInvoiceNum;&lt;/P&gt;&lt;P&gt;String[] splitString = allString.split(",");&lt;BR /&gt;LinkedList&amp;lt;String&amp;gt; linklist = new LinkedList&amp;lt;String&amp;gt;();&lt;BR /&gt;HashMap&amp;lt;String, String&amp;gt; map = convertSpecialCharcters();&lt;BR /&gt;for(String split : splitString)&lt;BR /&gt;{&lt;BR /&gt;String newSplit = URLEncoder.encode(split, "ISO-8859-1");&lt;BR /&gt;for (Map.Entry&amp;lt;String, String&amp;gt; entry : map.entrySet())&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; newSplit = newSplit.replace(entry.getKey(), entry.getValue());&lt;BR /&gt;}&lt;BR /&gt;String[] explode = newSplit.split("%26");&lt;/P&gt;&lt;P&gt;String explodedValue = "";&lt;BR /&gt;for(String explodeValue : explode)&lt;BR /&gt;{&lt;BR /&gt;int i = explodeValue.indexOf("%3D");&lt;BR /&gt;if(i &amp;gt; 1)&lt;BR /&gt;explodeValue = explodeValue.substring(i);&lt;BR /&gt;explodeValue = explodeValue.replace("%3D", "");&lt;BR /&gt;explodeValue = explodeValue.replace("%2540", "@");&lt;BR /&gt;explodedValue = explodedValue + explodeValue;&lt;BR /&gt;}&lt;BR /&gt;linklist.add(explodedValue);&lt;BR /&gt;}&lt;BR /&gt;String data = "^";&lt;BR /&gt;for (String stringData : linklist)&lt;BR /&gt;{&lt;BR /&gt;data = data + stringData + "^";&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;String value = getHashedValue(data);&lt;BR /&gt;&lt;BR /&gt;System.out.println("Hash ----- " + hash);&lt;BR /&gt;System.out.println("Value ---- " + value.toUpperCase());&lt;BR /&gt;System.out.println(hash.equalsIgnoreCase(value));&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Vijaykumar Vanga&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 10:58:28 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/SHA-512-hash-mismatch-Java/m-p/71745#M44206</guid>
      <dc:creator>vijayvanga</dc:creator>
      <dc:date>2020-04-28T10:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: SHA-512 hash mismatch - Java</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/SHA-512-hash-mismatch-Java/m-p/71949#M44362</link>
      <description>&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/37329"&gt;@vijayvanga&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;To use my script you need to capture url encoded data. Raw post data in url encoded form.</description>
      <pubDate>Thu, 14 May 2020 15:01:34 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/SHA-512-hash-mismatch-Java/m-p/71949#M44362</guid>
      <dc:creator>Renaissance</dc:creator>
      <dc:date>2020-05-14T15:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: SHA-512 hash mismatch - Java</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/SHA-512-hash-mismatch-Java/m-p/72295#M44645</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have tested and working PHP code for &lt;FONT color="#333333"&gt;&lt;A href="https://www.walgreenslistens.mobi/" target="_self"&gt;Official Website&lt;/A&gt;&lt;/FONT&gt; . The below post was modified but should work. You just need to adapt the code to java.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 06:45:00 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/SHA-512-hash-mismatch-Java/m-p/72295#M44645</guid>
      <dc:creator>TerryStevens</dc:creator>
      <dc:date>2020-06-24T06:45:00Z</dc:date>
    </item>
  </channel>
</rss>

