Reply
Highlighted
Member
Posts: 1
Registered: ‎08-08-2011

MD5 how-to

I have been reading the documentation about MD5 implementation but I am confused.

 

For example, if I enter, say "apple" (not that I would, but that's a readable example) in my MD5 settings under my account setting, do I just use:

 

    require_once 'anet_php_sdk/AuthorizeNet.php'; // The SDK
    $url = "http://mylink
    $api_login_id = 'sdfsdfdfsdfs';
    $transaction_key = 'asdadfsds';
    $md5_setting = 'apple'; // Your MD5 Setting
    $amount = "5.99";
    AuthorizeNetDPM::directPostDemo($url, $api_login_id, $transaction_key, $amount, $md5_setting);

Highlighted
Administrator
Posts: 591
Registered: ‎08-21-2009

Re: MD5 how-to

That appears to be correct usage of the directPostDemo function.  If you are encountering errors with this, I would simply recommend re-entering your md5 key into the Authorize.Net interface.  Be sure that there is no extra white space entered accidentally along with the key value.