Sha256: 97543b521c16113eed76f04cb28162c2a442d21a3f7014c857fbc9881e78e74d
Contents?: true
Size: 585 Bytes
Versions: 4
Compression:
Stored size: 585 Bytes
Contents
class Wepay::IpnController < Wepay::ApplicationController def index raise StandardError.new("A model needs to exist to trap the IPN messages from Wepay. Please create a model (eg. WepayCheckoutRecord) and set the class name in your wepay.yml, wepay_checkout_model directive") if @config[:wepay_checkout_model].blank? klass = @config[:wepay_checkout_model] record = klass.find_by_checkout_id(params[:checkout_id]) if record.present? record.update_attributes(params) else model = klass.new model.save! end render :text => 'ok' end end
Version data entries
4 entries across 4 versions & 1 rubygems