Protecting paypal payment info variables?

Go To StackoverFlow.com

1

I have a webform that posts to paypal all the paypal variables for user payment :

<input type="hidden" name="item_name" value="Digital Download" />
<input type="hidden" name="amount" value="9.99" />
<input type="hidden" name="on0" value="Payment For" />
<input type="hidden" name="os0" value="My Product Description" />

and many more. However, the user can very easily modify these variables and the data sent to paypal would be wrong.

I know I can still check the IPN response for whether the payment does match or not, but I would like to be able to also protect the user from tampering with these variables.

From what I can see, paypal has a "create a buy now button" form on their site which does the same thing, but generates an encrypted form data which is then decrypted at paypal.

Is it possible for me to somehow use this encryption and decryption in the data I send to paypal ?

2012-04-05 02:14
by Yash Desai
PayPal doesn't have "correct practices" and "security consideration" documentation? Shame on them - NoName 2012-04-05 02:28


0

You can enrypt the buttons yourself using php, while it takes a bit of work it definatly does the job.

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_encryptedwebpayments#id08A3I0P017Q

2012-04-05 03:57
by John V.


0

You can check their documentation for using their NVP API (Name Value Pair) to generate secure buttons.

While generating encrypted buttons still works, it requires far more work, this approach is simpler and provides also security.

2012-04-05 05:09
by StormByte
Ads