<---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.
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 :)
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.
You can also cycle through the variables while testing having them all emailed
or logged so that you can observe the differences.