Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I need some instruction on how I may be able to create a secure form post to a PayPal site to allow a customer to complete their transaction. For the past 4 days I have been Google'ing articles on form post security and PayPal integration (this site has many good PayPal articles), but I am not understanding the big picture. I am having a bit of a disconnect in connecting the dots. Here are a couple of concerns I have and don't know how to overcome them.

1. How do I ensure that the transaction was initiated on the seller's site? Such that it was not on a person's local machine by copying the form post and making adjustments to the form post i.e. decrease price amount to a negative value and purchase the product?

2. Is there a way that the server side can handle the form post by the client giving an id of the product they want and have the server send them to a PayPal site with all the information about the product i.e. product description, price, quantity, etc? Maybe by an Ajax call?

Currently, I am able to go through the developer tools (F12) and modify my form values and PayPal is accepting the modified values. I don't want this. What do I need to do to create a secure form post?

Can someone point me in the proper direction? If you need me to clarify anything just let me know. Thanks in advance.
Posted

1 solution

As soon as I submitted this question I came across this article. I think the best bet is to avoid having all the info in a form post and utilize the PayPal API: https://devtools-paypal.com/guide/expresscheckout?interactive=ON&env=sandbox[^]

This will allow the server to fill in the information about the product and redirect the user to PayPal.

I think this is what I want to do. Going to test it out. Hopefully, this will prevent the client from modifying the price amount of the product.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900