Sha256: 22d21f192894460ced33ae94f57612c9cf1b3d8f019b5527d40c734dfd9d875c

Contents?: true

Size: 493 Bytes

Versions: 3

Compression:

Stored size: 493 Bytes

Contents

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

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

    if record.present?
      wepay_gateway.wepay_access_token = record.access_token
      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

3 entries across 3 versions & 1 rubygems

Version Path
wepay-rails-1.1.0 app/controllers/wepay/ipn_controller.rb
wepay-rails-1.0.0 app/controllers/wepay/ipn_controller.rb
wepay-rails-0.2.2 app/controllers/wepay/ipn_controller.rb