Jump to content

Authorize.net & hash error


Recommended Posts

Anyone know why I would be getting this error:

Fatal error: Call to undefined function mhash() in /home/virtual/site16/fst/var/www/html/modules/gateway/Authorize/transfer.inc.php on line 125

I think I have authorize.net set up right and the merchant id, Transaction Key and Relay Response URL appear to be right in the CC3 admin setup for Authorize.net. The MD5 hash value is not set on my authorize.net account (because I don't know what the value would be to put in there). This is my first merchant / shopping cart site so I am kind of finding my way by bumping into walls in the dark. Any help would be appreciated.

Link to comment
Share on other sites

Guest disneyalumni

I am getting the same error.

Mine actually says:

Fatal error: Call to undefined function: mhash() in /ftp/pub/rosehavenpublishing/modules/gateway/Authorize/transfer.inc.php on line 125

Then, in the transfer.inc.php file on line 125, I have:

return (bin2hex (mhash(MHASH_MD5, $data, $key)));

(I have not modified this, I just posted it for convenience).

Above that, on line 122, there is a comment:

// Uses PHP mhash extension. Pl sure to enable the extension

Am I supposed to do something to enable the extension?

And I, too, am a newbie to the whole payment gateway setup--so I may be missing something quite minor.

Currently, only two gateways are activated. Authorize.net and 'Print Order Form.' The print option works just fine.

Any help would be greatly appreciated! We are trying to finish testing and "go live" this weekend. :)


Link to comment
Share on other sites

Guest trendyhats

I had the same issue and this answer is going to be a little vague because i forget the exact fix but here goes. It has something to do with your host supporting this mhash on their servers. I use godaddy and they would not enable it and i was able to switch hosts but then i found a post on here from a long time ago which will make it work. There is some code that needs to be changed. Go to search and type authorize or hash or something along those lines and you should find something. Anyway it solved the problem

Link to comment
Share on other sites

  • 8 months later...

Can anyone help me understand this please. I'm not very "up" with php.

I've installed cubecart on a godaddy server and one of the authorize.net returns the following error :

Fatal error: Call to undefined function: mhash() in /home/content/d/j/f/djfitch/html/store/modules/gateway/Authorize/transfer.inc.php on line 125

when I try to test it.

I installed the authorize fix posted yesterday and now when I get to the payment page and click go after filling in card details it freezees the site and then eventually I get a blank page come up.

If anyone could explain what to do with all these scripts that are talked about above I'd be really grateful.

I've only just purchased the hosting and ssl certificate so don't really want to change hosting.


Link to comment
Share on other sites

  • 4 weeks later...
Guest TrueCHoJiN

Doesn't matter who is your service provider and/or if you host yourself.

You need to uncommet, OR ASK YOUR HOST to activate the php_mhash.dll extension in the php.ini file to get rid of the CubeCart error:

Fatal error: Call to undefined function mhash() in "xxxxxx" on line 125

Snapshot of my php.ini file before modification:






Snapshot of my php.ini file after modification:





I'm running Apache (2.2.3), MySQL (5.0.24a), PHP (4.4.4 and 5.1.6), OpenSSL (0.9.8c), Windows (2000 SP4) and CubeCart (3.0.12)

Link to comment
Share on other sites

  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...