Sha256: 0e264d60c4fb99ee5541556f93669728959fa53e80495104b0c0c4eec86c50a0

Contents?: true

Size: 489 Bytes

Versions: 2

Compression:

Stored size: 489 Bytes

Contents

class Wepay::IpnController < Wepay::ApplicationController
  def create

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

    if record.present?
      wepay_gateway = WepayRails::Payments::Gateway.new
      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

2 entries across 2 versions & 1 rubygems

Version Path
wepay-rails-2.1.0 app/controllers/wepay/ipn_controller.rb
wepay-rails-2.0.0 app/controllers/wepay/ipn_controller.rb