Integrating ASP.NET with PayPal
I have an ASP.NET website that allows users to subscribe to a service.开发者_如何学运维 When a user decides to pay for their subscription, they are redirected to the PayPal site. Please note, I have a website payments standard account. Regardless, they are redirected to a URL that looks like the following:
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=MYID&item_name=Service Subscription&a3=12&p3=1&t3=Y&src=1&srt=1&no_note=1&return=https://www.mysite.com/confirmation.aspx?id=b67e1f4d-35fa-40f7-812b-2f32b87a3d15
Interestingly, the ID in my query string of the URL is removed. I really want to pass a variable from my site to paypal, and then from paypal back to my site. The purpose of this variable is associate the subscription with the user. Is there a way to do this with website payments standard account?
Thank you!
You need to set up profiles with your membership system. You can then associate a variable with a particular subscriber.
http://www.codersbarn.com/post/2008/07/10/ASPNET-PayPal-Subscriptions-IPN.aspx
Profiles are available out-of-the-box with the website template. If you're using the WAP template, then it requires some extra work (worth the effort).
As regards passing a custom variable, you can do this by using the appropriate PayPal variable and getting it back via IPN.
精彩评论