cancel
Showing results for 
Search instead for 
Did you mean: 

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);

 
tholomacro
Member
2 REPLIES 2

That should work.

TJPride
Expert

I should point out that you should be using the transaction ID, not the transaction key. The idea is to check the MD5 hash for a given transaction, which means you'd want to specify which transaction.

 

I'd suggest the following:

require_once 'anet_php_sdk/AuthorizeNet.php'; // The SDK    

$url = 'http://mylink';

$api_login_id = 'sdfsdfdfsdfs';    

$transaction_id = '123456789';    

$md5_setting = 'apple'; // Your MD5 Setting    

$amount = "5.99";    

AuthorizeNetDPM::directPostDemo($url, $api_login_id, $transaction_id, $amount, $md5_setting);

--
"Move fast and break things," out. "Move carefully and fix what you break," in.
Lilith
Administrator Administrator
Administrator