Here is my solution. I'm posting this again. Did not see me first post. Sorry if I didn't post correctly (newbie).
Here are the changes I made when posting to authorize.net:
#use Digest::HMAC_MD5 qw(hmac_md5_hex); # commented out
use Digest::SHA qw(hmac_sha512_hex); # added this line
$hmac_data = $x_login."^".$x_fp_sequence."^".$x_fp_timestamp."^".$x_amount."^"; # no change
### assigned my new transaction key from authorize.net to $transaction_key here
$transaction_key = pack("H*", $transaction_key); # added this line
# $x_fp_hash = hmac_md5_hex($hmac_data, $transaction_key); # commented out MD5 hash
$x_fp_hash = hmac_sha512_hex($hmac_data,$transaction_key); # added this line
Processing response from authorize.net:
I Did not change the following method of processing variables:
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); ### Note: do not load "use CGI"
@pairs = split(/&/, $buffer);
%response=();
$x=0;
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$response{$name}=$value;
}
Commented out the following old md5 lines below...
# use Digest::MD5 qw(md5 md5_hex md5_base64);
# $data = $md5_key.$api_login_id.$response{x_trans_id}.$response{x_amount};
# $loc_MD5_hash = md5_hex($data);
# $loc_MD5_hash = uc($loc_MD5_hash);
Added the following...
use Digest::SHA qw(hmac_sha512_hex);
# assigned my new transaction key from authorize.net to $transaction_key here
$keyx = pack("H*", $transaction_key);
$data=qq~^$response{x_trans_id}^$response{x_test_request}^$response{x_response_code}^$response{x_auth_code}^$response{x_cvv2_resp_code}^$response{x_cavv_response}^$response{x_avs_code}^$response{x_method}^$response{x_account_number}^$response{x_amount}^$response{x_company}^$response{x_first_name}^$response{x_last_name}^$response{x_address}^$response{x_city}^$response{x_state}^$response{x_zip}^$response{x_country}^$response{x_phone}^$response{x_fax}^$response{x_email}^$response{x_ship_to_company}^$response{x_ship_to_first_name}^$response{x_ship_to_last_name}^$response{x_ship_to_address}^$response{x_ship_to_city}^$response{x_ship_to_state}^$response{x_ship_to_zip}^$response{x_ship_to_country}^$response{x_invoice_num}^~;
$hash = hmac_sha512_hex($data,$transaction_key);
$hash = uc($hash);
Finished processing as before...
Hope this helps.