public function createHash($data)
    {
        $fingerprint = implode(
            '^',
            array(
                $this->getApiLoginId(),
                $data['x_fp_sequence'],
                $data['x_fp_timestamp'],
                $data['x_amount']
            )
        ) . '^';

        // If x_currency_code is specified, then it must follow the final trailing carat.

        if ($this->getCurrency()) {
            $fingerprint .= $this->getCurrency();
        }

        // The md5 hash against the transactionKey is being removed 2019 and
        // replaced with an SHA-512 hash against the signatureKey.

        if ($signatureKey = $this->getSignatureKey()) {
            return hash_hmac('sha512', $fingerprint, hex2bin($signatureKey));
        } else {
            return hash_hmac('md5', $fingerprint, $this->getTransactionKey());
        }
    }
public function createHash($data)
    {
        $fingerprint = implode(
            '^',
            array(
                $this->getApiLoginId(),
                $data['x_fp_sequence'],
                $data['x_fp_timestamp'],
                $data['x_amount']
            )
        ) . '^';

        // If x_currency_code is specified, then it must follow the final trailing carat.

        if ($this->getCurrency()) {
            $fingerprint .= $this->getCurrency();
        }

        // The md5 hash against the transactionKey is being removed 2019 and
        // replaced with an SHA-512 hash against the signatureKey.

        if ($signatureKey = $this->getSignatureKey()) {
            return hash_hmac('sha512', $fingerprint, hex2bin($signatureKey));
        } else {
            return hash_hmac('md5', $fingerprint, $this->getTransactionKey());
        }
    }
public function createHash ( $ data ) { $ fingerprint = implode ( '^' , array ( $ this -> getApiLoginId ( ) , $ data [ 'x_fp_sequence' ] , $ data [ 'x_fp_timestamp' ] , $ data [ 'x_amount' ] ) ) . '^' ; // If x_currency_code is specified, then it must follow the final trailing carat. if ( $ this -> getCurrency ( ) ) { $ fingerprint .= $ this -> getCurrency ( ) ; } // The md5 hash against the transactionKey is being removed 2019 and // replaced with an SHA-512 hash against the signatureKey. if ( $ signatureKey = $ this -> getSignatureKey ( ) ) { return hash_hmac ( 'sha512' , $ fingerprint , hex2bin ( $ signatureKey ) ) ; } else { return hash_hmac ( 'md5' , $ fingerprint , $ this -> getTransactionKey ( ) ) ; } }
This hash is put into the form to confirm the amount has not been
modified en-route.
It uses the TransactionKey, which is a shared secret between the merchant
and Authorize.Net The sequence and timestamp provide additional salt.

@param $data
@return string
This hash is put into the form to confirm the amount has not been modified en - route . It uses the TransactionKey which is a shared secret between the merchant and Authorize . Net The sequence and timestamp provide additional salt .