- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
โ01-07-2013 07:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
โ01-07-2013 08:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
โ01-07-2013 08:07 AM - edited โ01-07-2013 08:10 AM