Wednesday, December 30th, 2009
Integrating PayPal Into a Shopping Cart Checkout System
Integrating PayPal into a checkout system can be done in a variety of ways. One of the most effective ways is to implement IPN.
Instant Payment Notification (IPN) is a message service that notifies you of events related to PayPal transactions. You can use it to automate back-office and administrative functions, such as fulfilling orders, tracking customers, and providing status and other information related to a transaction.
What is IPN?
IPN notifies you when an event occurs that affects a transaction. Typically, these events represent various kinds of payments; however, the events may also represent authorizations, Fraud Management Filter actions and other actions, such as refunds, disputes, and chargebacks.
IPN is a message service that PayPal uses to notify you about events. These events include the following:
Instant payments, including Express Checkout and direct credit card payments
eCheck payments and associated status, such as pending, completed, or denied
Payments that may be pending for other reasons, such as those being reviewed for potential fraud
Events related to recurring payments and subscriptions
Authorizations, which indicate a sale whose payment has not yet been collected
Chargebacks, which are initiated by a credit card processor; for example, when a customer disputes a charge
Disputes, which are initiated by a buyer using the PayPal resolution process
Reversals, which occur when you win a dispute or a chargeback is canceled
Refunds, which you may choose to give
In many cases, the action that causes the event, such as a payment, occurs on your website; however, your website is not the only source of events. In many cases, events can be generated by Website Payment Standard buttons, the PayPal API, or by PayPal itself.
You detect and process IPN messages with a listener, sometimes called a handler, which is a script or program that you write. It waits for messages and passes them to various back-end or administrative processes that respond the messages. PayPal provides sample code that you can modify to implement a listener that detects IPN messages.
The actions to take when your listener is notified of an event are specific to your needs. Examples of the kinds of actions you might take when your listener receives an IPN message include the following:
Trigger order fulfillment or enable media downloads when a check clears or a payment is made
Update your list of customers
Update accounting records
Create specialized “to do” lists based on the kind of event
We have done this on some of our shopping cart sites.