Hey everyone we put up a C# class to use with PayPal's IPN feature. We all know there isn't that much great documentation on how to efficiently use PayPal's IPN feature. Rememeber to use the class at your own risk and the code is provided AS IS. However, we do use the class on our own website. And we also know that it doesn't pull every field, but it does account for alot of them that you would need....hence why we are putting the class out there so you can modify the code for your needs! We hope the class is simple enough, but if not we are always up for suggestions. Below is a code sample of what we put in our page load that handles the IPN post back:
PPIPN objPP = new PPIPN("LIVE");
//PPIPN objPP = new PPIPN("TEST");
//PPIPN objPP = new PPIPN("ELITE");
objPP.FromEmail = "email@yourdomain.com"; //email address your smtp server will accept
objPP.FromEmailPassword = "yourpassword"; //password for the email address above
objPP.SmtpHost = "yourSMTPHost";
objPP.SmtpPort = "SMTPHostPort";
objPP.ToEmail = "youremailatPayPal@domain.com";//this needs to be your business/email you have registered with PayPal
objPP.MakeHttpPost();
objPP.CheckStatus();
That's about it..the class handles everything else including emailing you details!
Word of caution..it's best to disable the email functions when using the SandBox environment since they are bogus emails anyway.
This link is the link to the details page on our site.
http://www.xdevsoftware.com/PPIPNDesc.aspx
Hopefully this makes your PayPal IPN experience a bit easier in ASP.NET. Oh yea...this is meant for ASP.NET 2.0!
Currently rated 4.5 by 2 people
- Currently 4.5/5 Stars.
- 1
- 2
- 3
- 4
- 5