cancel
Showing results for 
Search instead for 
Did you mean: 

IS THIS HASH CORRECT SHA512

DATA [^^TRUE^^^^^^CC^^122.50^^Kenneth^Hammond^800 Shoreline Rd ^Kernes^TX^75144^US
A^903 574 4957^^maggtex@aol.com^^^^^^^^^33:39073:71870^]

 

SIG KEY [312DB4F3973FA6BDE46ACB84E563FE6DD03AECFA26DBEADF231D8B322CBA66FD7CB
EB8031F9EA621152718235C7FB060C4A44EE6F03F3C70A3107554CC332430]

 

GENERATED HASH:

 

SHA512 [1D1123B59416D611DB6CFACC6FF262A7906BC35C1D7C307559940C9A11D30FCE7B9
DD10CC5FBA23E3EBAF86875495B559D9C060E54A9A7FC060F54C81D863307]

 

 


function hmac ($data) { //--------------------------------------------------- // compute // Uses PHP mhash extension. Please be sure to enable the extension //--------------------------------------------------- if($this->DEBUG){ $this->logEvent("INFO: HMAC DATA [".$data."]");} //----------------------------------------------------------- //GET KEY FROM TABLE authorize_net //----------------------------------------------------------- $anobj = new authorize_net($this->test_or_prod); //TEST=1 PROD=2 //----------------------------------------------------------- // //----------------------------------------------------------- $nkey = $anobj->get_field('signature_key'); if($this->DEBUG){ $this->logEvent("INFO: HMAC SIG KEY [".$nkey."]");} if ($data != null && $nkey != null) { $sig = hash_hmac('SHA512', $data, hex2bin($nkey)); if($this->DEBUG) { $this->logEvent("INFO: Computed SHA512 Hash: " . $sig); } return($sig); } else { $this->logEvent("ERROR: SIG KEY[".$nkey."]"); $this->logEvent("ERROR: DATA [".$data."]"); return(null); } }

 

jmd804500
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

Solution Found:

The code in this post was correct. The issue was when we generate the Finger Print and then submit the form, the form was missing x_currency_cod='USD'.

 

This requirement was hidden really well in the docs

 

Jim

 

Thanks to those who helped resolve this issue

View solution in original post

jmd804500
Contributor
4 REPLIES 4

@jmd804500 

 

Yes

 

 

Renaissance
All Star

Renaissance,

 

Thanks.

I wonder why  I keep getting 99 response code from authorize.net instead of payment page?

 

any ideas of things I could check

Maybe I have misunderstood the model here, 

 

When I post a request to the SIM server with the SHA512 hash do I create the hash with

 

cc_authorize->CalculateFP(491)-INFO: loginid [5kBLZFWp34N8]

cc_authorize->CalculateFP(492)-INFO: sequence[39076]

cc_authorize->CalculateFP(493)-INFO: tstamp  [1560427287]

cc_authorize->CalculateFP(494)-INFO: amount  [122.50]

cc_authorize->CalculateFP(495)-INFO: currency[USD]

 

cc_authorize->CalculateFP(496)-INFO: data    [5kBLZFWp34N8^39076^1560427287^122.50^USD]

 

Generating x_fp_hash[ 592f5f13f1af02431333d35d7a833a14d01a592b2c7194ab62c35114209de7d902
38f5840e3c5a003dd1d1d0bfcebe3759db3b4e1ff8697ed4f7f415de7dfd1f ]

SIG KEY [ 312DB4F3973FA6BDE46ACB84E563FE6DD03AECFA26DBEADF231D8B322CBA66FD7CBEB8031F
9EA621152718235C7FB060C4A44EE6F03F3C70A3107554CC332430 ]

 

Then in my x_relay_url I check with it with the decoding of the fields outlined on page 73 of the SIM manual?

 

When I do the above I get: 

 

The following errors have occurred.
(99) This transaction cannot be accepted.

 

 

 

 

 

 

Solution Found:

The code in this post was correct. The issue was when we generate the Finger Print and then submit the form, the form was missing x_currency_cod='USD'.

 

This requirement was hidden really well in the docs

 

Jim

 

Thanks to those who helped resolve this issue

jmd804500
Contributor