Showing results for 
Search instead for 
Did you mean: 

Anyone implemented DPM in Perl?

I have a client who has been doing AIM for many years, implemented on a Red Hat 5 box using Perl, specifically using the Business-OnlinePayment-AuthorizeNet module.  They want to convert to DPM to reduce their PCI requirements.  I see provides DPM APIs for several other languages, but not for Perl.  Has anyone implemented DPM in Perl?  I barely know enough PHP to be dangerous, so I can't spelunk the PHP API to see what's going on under the hood.

Absent that, can someone provide me with the lower-level requirements for the DPM conversation?  I don't have to have a Perl module to do this.  I can leverage the existing XML, LWP, and whatever else I need to do the job.

Thanks for your help.


Interesting idea. As it so happens, I use Perl and am fairly fluent with the PHP API, so I could probably figure out how to do that. Just a matter of translating the fingerprint formula, which I've cleaned up here from the one in the PHP AuthorizeNetSIM.php lib file (DPM layers on top of SIM):


public static function getFingerprint($api_login_id, $transaction_key, $amount, $fp_sequence, $fp_timestamp) {
    $api_login_id =
        ($api_login_id ? $api_login_id :

    $transaction_key =
        ($transaction_key ? $transaction_key :
    $raw = "{$api_login_id}^{$fp_sequence}^{$fp_timestamp}^{$amount}^{$transaction_key}";

    return (function_exists('hash_hmac') ?
        hash_hmac('md5', $raw) :
        bin2hex(mhash(MHASH_MD5, $raw)));

And then parsing the response, which I believe comes back as POST variables in this case. Just follow the code as best you can and replicate it. (PHP SDK - see the DPM, SIM lib files)


This actually sounds like something that would be right up my alley and interesting to do, so if you want to just pay me a couple hundred dollars, I can hack together an adaptation for you and then all you'll have to do is add the surface stuff like extra fields and your client's site design. You can PM me here or contact me by phone or through my contact form if you're interested: