Skip to content

IPN AKA: Payment Notifications

adamthedeveloper edited this page Dec 7, 2011 · 4 revisions

Checkout Notifications

If you ran rails g wepay_rails:install followed by rake db:migrate, you will have a table called wepay_checkout_records and a corresponding model called WepayCheckoutRecord.

Wepay-rails does all the heavy lifting for you. When you initialize a checkout, a WepayCheckoutRecord is created and when the payment is completed, the WepayCheckoutRecord is updated with the information about the checkout. Wepay will send you notifications when something changes with that checkout.

When a notification comes in, it carries along with it a checkout_id. Wepay-rails will make a request to wepay for information on the checkout and update the corresponding WepayCheckoutRecord in your db.

The IPN call is http://your.domain.com/wepay/ipn?checkout_id=<some checkout id>

You can override the ipn_controller.rb file if you wish to by creating a Wepay::IpnController in your rails controllers directory.