Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Member
Posts: 4
Registered: ‎10-05-2011

Can I generate my own value for x_fp_hash using the DPM API?

Howdy!

 

I'm using the DPM API, but instead of using the DPM function to generate the credit card form, I'm building it out myself.

 

For the hidden form field x_fp_hash, is there a way that I can generate this myself? I know it's a combined hash of several items, I'm just not sure how it could be created from scratch.

 

I'm using PHP on the back end. I have access to all of the variables that go into this hash, I'm just not sure of the correct order or method to generate it.

 

Thanks for your time,

Steve

Member
Posts: 4
Registered: ‎10-05-2011

Re: Can I generate my own value for x_fp_hash using the DPM API?

I think I just found the answer to my own question. I can use the getFingerprint function in the SIM api file to generate this on my own.

 

Unfortunately I don't have mhash as part of my PHP compile. Anyone know of any quick ways to add that, or alternative solutions?

 

Steve

Posts: 1,609
Topics: 15
Kudos: 209
Solutions: 121
Registered: ‎06-23-2011

Re: Can I generate my own value for x_fp_hash using the DPM API?

It's expecting the fingerprint to be encrypted with those functions, so if you don't have them, you're up a creek without a paddle (unless you're a mathematician and capable of recreating them somehow - but an interpreted version is going to be very inefficient). That leaves recompiling PHP, which is definitely a non-trivial task, and something you shouldn't attempt unless you have experience as a server admin or can get specific instructions from one for your OS and web manager (Apache?) Have you considered a third option, just moving the site to hosting that does have mhash already?