Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello,

I'm updating an application built in ASP.Net 3.5

I need to integrate a paypal payment gateway.

What I have on the page is a textbox. The user will fill the amount in that textbox and hit Pay button.

The user should now be redirected to paypal. If his payment is successful, he should return back to a success page of the application. Here, I need the paypal transaction id and other details to put into my db table.

If I use a session variable to store username, will it be retained when the user comes back from paypal?

Please help me with a solution or any link with a solution.

My table has the following fields: username, amount, paypaltransID, paymentdate, paypalnotes, status(yes or not for payment transaction ok or not)

What I have tried:

I have checked a lot of tutorials here and everyone is doing static amount.
Posted
Updated 15-Jul-17 2:46am
Comments
Mr_cool 15-Jul-17 5:38am    
I don't need a cart system as well.

1 solution

Never, ever, accept code from a insecure website to handle anything to do with real money.
You do not know who is giving you the code, you do not know what it does, you do not know that it places the monies correctly into the appropriate account, without passing the details to any third parties.

Only get such code from Paypal themselves - the scope for fraud otherwise is far too large. And remember, you personally could be liable for any monies lost if your action is seen to be negligent - which getting your code from a public forum would most certainly be!

Contact them - they are pretty good, pretty helpful - and can help you set up a sandbox for testing as well which means no real money get used (or lost if you make a mistake and send it to my bank account instead of yours).
 
Share this answer
 
Comments
Mr_cool 15-Jul-17 8:52am    
Hi, first of all, thanks for replying my questions again. I just need an idea on how to do it. I haven't ever dealt with payment processing stuff. A tutorial will be appreciated if you have one. The requirements are too simple and you must have an idea on how to do it. Also, I understand your concern regarding the fraud. But, still a chunk of code will help me to achieve my goals.
OriginalGriff 15-Jul-17 9:07am    
Seriously, go and talk to paypal - they are used to it and have loads of material to help you. Remember, they don't get paid until you start getting money - so it's in their interest to help you as much as possible.
Mr_cool 15-Jul-17 9:09am    
I see. Let me check with them on Monday.
Mr_cool 6-Oct-17 9:50am    
I tried to communicate with them a lot of times but no success. They're not supporting Indian customers for technical issues.

What to do?
Mr_cool 31-Jan-18 4:19am    
Anyone here to help on this?

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