Sha256: ff6def0749fe2cf0ca8ba45000cf49f4bb62db790883a5342698761d7b99a700

Contents?: true

Size: 473 Bytes

Versions: 12

Compression:

Stored size: 473 Bytes

Contents

class Wepay::IpnController < Wepay::ApplicationController
  def index

    record = WepayCheckoutRecord.find_by_checkout_id(params[:checkout_id])

    if record.present?
      wepay_gateway.access_token(record)
      checkout = wepay_gateway.lookup_checkout(record.checkout_id)
      record.update_attributes(checkout)
      render :text => 'ok'
    else
      raise StandardError.new("Wepay IPN: No record found for checkout_id #{params[:checkout_id]}")
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
wepay-rails-0.2.0 app/controllers/wepay/ipn_controller.rb
wepay-rails-0.1.116 app/controllers/wepay/ipn_controller.rb
wepay-rails-0.1.115 app/controllers/wepay/ipn_controller.rb
wepay-rails-0.1.114 app/controllers/wepay/ipn_controller.rb
wepay-rails-0.1.113 app/controllers/wepay/ipn_controller.rb
wepay-rails-0.1.112 app/controllers/wepay/ipn_controller.rb
wepay-rails-0.1.111 app/controllers/wepay/ipn_controller.rb
wepay-rails-0.1.110 app/controllers/wepay/ipn_controller.rb
wepay-rails-0.1.109 app/controllers/wepay/ipn_controller.rb
wepay-rails-0.1.108 app/controllers/wepay/ipn_controller.rb
wepay-rails-0.1.107 app/controllers/wepay/ipn_controller.rb
wepay-rails-0.1.106 app/controllers/wepay/ipn_controller.rb