Reply
Member
Posts: 8
Registered: ‎06-05-2012
Accepted Solution

DPM PHP - Verifying user form data before submitting to Authorize.net

[ Edited ]

I'm using the sample PHP code for ANet in which the form submits directly to: https://test.authorize.net/gateway/transact.dll

 

Everything works fine, but I want to perform validation on the form fields before submitting them to ANet. This is important because in the sample code, the amount the user will be charged is simply shown in the HTML which makes it easy for the client to modify the value charged. I can do client-side validation with Javascript, but this isn't a safe/ideal option either.

 

Basically, I would like to submit the form values to a PHP page that performs server-side validation and then submits the data to https://test.authorize.net/gateway/transact.dll. How can I accomplish this? I believe I need to use cURL, but I'm not exactly sure if that's correct or how to approach it.

 

Any help would be much appreciated!


Accepted Solutions
Highlighted
Solution
Accepted by topic author js2393
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: DPM PHP - Verifying user form data before submitting to Authorize.net

If you server-side validation and then submits the data, you are doing AIM not DPM anymore.

 

the amount the user will be charged is simply shown in the HTML which makes it easy for the client to modify the value charged. 

That is what the x_fp_hash is use for.

View solution in original post


All Replies
Highlighted
Solution
Accepted by topic author js2393
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: DPM PHP - Verifying user form data before submitting to Authorize.net

If you server-side validation and then submits the data, you are doing AIM not DPM anymore.

 

the amount the user will be charged is simply shown in the HTML which makes it easy for the client to modify the value charged. 

That is what the x_fp_hash is use for.