IPN AKA: Payment Notifications
Clone this wiki locally
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.