<---Go Back

This is part of a response to that I have made to many in emails that I hope will shed some light on the subject...  Please let me know if this helps or not.

You can never view the page in your browser to test it.  It runs completely behind the scenes.  You need a better understanding of PayPal IPN in order to use this file.  It is intended for people who understand PayPal IPN and completely simplifies their work.  I receive tons of positive feedback all the time but I often get developers who thought IPN was something different and I think that's the problem your having.  Let me try to explain it to you a little better so that you can understand and also; you should be testing this in the PayPal's Sandbox. 
 
Here's a quick overlay of how PayPal IPN works and how my preset web pages and the IPN.dll will help you.
 
First... You must have a PayPal account online.  In your profile you must set the Instant Payment Notifiation (IPN) link to the location of the preset webpages you purchased.  Example: www.mysite.com/VB_PayPalIPN_Verification.aspx 
 
Second... setup your PayPal sandbox account and do the same.
 
Now on to the goods.  Whether you are utilizing the sandbox or going live with the purchase the links will be the same.  The only difference would be how you declare the PayPal IPN.DLL in your code. 
Example: Public WithEvents IPN As New PayPal.IPN("SerialKey", True) 'if your using the sandbox and False if you are not. If you enter just the serial key this makes the file live by default.
 
So now you have the links associated with your PayPal account online and you also have the page stored on your site and setup to operate in either the Sandbox or Live.
 
Here's how to make it work....
 
Add a payment option to your site, a page that a viewer will come to.  A donate button or a buy now button ect... (Login at PayPal.com to build the button and then copy and paste the html into your site.)
 
When a user clicks on the button from your site they will be transfered to a secure page (https) located at paypal.com NOT your site.  This is where the user will either log in to their paypal account and make a payment or use other standard methods.
 
When the user finishes the purchase they will be given a link (a Thank You Page on your site also added in your PayPal Profile) that they will navigate back to.  This link should only say something like, thank you for your purchase you will receive an email with further details ect....
 
THATS IT!  Nothing else happens on the clients side. This is what alot of people miss. 
 
So now what happens is paypal.com processes the payment and then sends a receipt (behind the scenes) to the IPN link you supplied earlier, www.mysite.com/VB_PayPalIPN_Verification.aspx 
 
This receipt could be a REAL receipt from paypal or a fake one from a hacker.  This is where the PayPal.IPN.DLL kicks in. 
 
The page that receives the receipt simply hands the receipt to the PayPal.IPN and the PayPal.IPN verifies the receipt with paypal.com.
 
If the receipt is real the Verified Event is fired on the web page if it is fake the Unverified Event is fired. 
 
Now, you need to add your database code, emailing features, etc to the verified event.  You can check status of the payment, who made the payment, the currency, and the list goes on simply by calling properties from with the PayPal.IPN.DLL
 
This is how my site works when I sell GPCS 2007.  I would use how I send the PayPal.IPN but its much simpler and I want you to experience some database activity.
 
The user purchases a serial key.  They receieve a thank you page and are prompted to wait for an email! End of story for the end user as far as viewing the site.
 
In the Verified Event I add code to add the user to my database ( PV.AddNewRegisteredMember(IPN.BasicInformation.payer_email))   'AddNewRegisteredMember is a custom written functiont that takes the buyers email address and adds it to my database.
 
That same function also emails the user their username and password after successfully adding them to the database.
 
The user then gets an email with the information to go log in and obtain their serial key.
 
The PayPal.IPN works completely behind the scenes and is not associated with the client in any way.  There should not be anything visual added to the page b/c it simply handshakes with PayPal.com and that's it. 
 
I hope this clears up how this works and helps you some more :)
 
<---Go Back
I also keep getting the question about Subscriptions and finding using buyer variables. Here is another short reply to a customer that may or may not help on the matter.
 

  The variables being passed back are the default values that you get on every receipt. You can retrieve other variables by choosing using the AllInformation Property.  Example: IPN.AllInformation("username") will retrieve the username, given that variable exists on that receipt.

 

 

You can also cycle through the variables while testing having them all emailed or logged so that you can observe the differences.

 

  Dim SB As New StringBuilder 'StringBuilder will save and write back our variables

        For Each S As String In IPN.AllInformation.AllKeys 'All keys will return all the variable names stores 'ie userName or payer_email etc...

            SB.AppendLine(String.Format("Variable Key: {0}   |  Variable Value: {1}", S, IPN.AllInformation(S))) 'Ex: S is the Key or variable name (username),  IPN.AllInformation(S) is the value (John Doe)

        Next

  Email.SendMailToMe(SB.ToString, String.Format("IPN Variables {0}, {1}", Date.Now.ToShortDateString, Date.Now.ToShortTimeString)) 'Runs custom code to email myself the results via (Body, then Subject)

<---Go Back