I am developing a site where users can buy features using paypal. If user’s paypal email is different from the email stored in our site how can i get notified about the user’s payment via IPN?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You tagged your question with C#, so I’m assuming you’re developing an ASP.NET site. And in the absence of more specific information, I’m going to assume you’re using the default SqlMembershipProvider for your site.
So, to identify your user, you should probably use the ProviderUserKey property of the MembershipUser object. Use the following code to get the ProviderUserKey for your currently logged-in user:
Once you have a String containing the ProviderUserKey, you can pass it to PayPal using the custom HTML variable in your form:
When PayPal send the IPN message, it will send back the value that you set for the custom HTML variable. You can get the value from Response.Form and get the corresponding user:
Hope this helps!