Instant Payment Notification (IPN) is an “interface for handling real-time purchase confirmation”. IPN automatically notifies a defined web page when a PayPal payment has been made to a specific PayPal account and allows your web page to communicate with PayPal’s server to authenticate the validity of that purchase.
How does IPN work?
When a customer makes a payment to you, PayPal will post a notification to your server at a URL you specify in your PayPal account. Included in this notification will be all of your customer's payment details and product details as well as a piece of encrypted code.
When your webpage receives a notification, it will then post the information including the encrypted code back to a secure PayPal URL. PayPal will in turn authenticate the transaction and will respond to the post with a single word, "VERIFIED", "INVALID" or “FAILED”.
Your webpage will need a script to handle this IPN and respond in the way you want it to. Your script can carry out other checks such as making sure that the payment status is complete rather than pending, that the “receiver_email” is your account email and that the price of the product is correct. Once you have completed the above checks, your script may update your database with the IPN data and process the purchase.
The communication between your webpage and PayPal’s server ensures that the IPN comes from PayPal and prevents “spoofing”.
How does IPN work with our MembersPro PayPal script?
A customer selects a membership option that they would like to subscribe to and then fills out the sign up form. The customer then clicks on the payment button and then goes through with their PayPal payment. The IPN process and post back as outlined above occur and provided the payment is verified and successful then the new member will be redirected back to the site’s login page and is instantly sent out an autogenerated password via email.
The new member can then login to their account as an active member. Depending on the membership option that the new member has paid for they will be taken to the members home page for that subscription option.