cancel
Showing results for 
Search instead for 
Did you mean: 

Generating a fingerprint with a currency code

I am getting a 99 error when I include x_currency_code. This fingerprint checkerhas the option I submit a currency code with my transactions. 

When I uncheck that option it generates the same code as AuthorizeNetSIM_Form::getFingerprint.

With it checked it produces a different hash.

The function getFingerprint in the class AuthorizeNetSIM doesn't cater for this and I can't find any reference to it in the docs.

 

Can anyone tell me how to generate a fingerprint that includes x_currency_code?

nigelhill
Member
2 REPLIES 2

https://developer.authorize.net/guides/SIM/wwhelp/wwhimpl/js/html/wwhelp.htm#href=SIM_Submitting_tra...

 

Please note the required trailing “^” character. If you specify x_currency_code, then the value (for example, LVL) must be placed after the trailing caret.

 Example Fingerprint input with currency code specified
"authnettest^789^67897654^10.50^LVL"

 

by the way which currency code are you going to use? authorize.net don't really support anything other then USD.

RaynorC1emen7
Expert

I figured it out by trial and error.

 

getFingerprint($api_login_id, $transaction_key, $amount, $fp_sequence, $fp_timestamp)

returns

hash_hmac("md5", $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^", $transaction_key);

 

By not using this function and appending the currency with no trailing ^ to the data, hash_hmac produces the same key as that using the fingerprint checker.

 

hash_hmac("md5", $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^" . $currency, $transaction_key);

 

Using USD but also will be using GBP - I was told by Authorize.net that they would be taking payments in GBP soon.

nigelhill
Member