Sha256: 2ad706755fb0a57cca588886fdf529f99dc17b29b1033fc4ddd9e4f68a5db405

Contents?: true

Size: 670 Bytes

Versions: 7

Compression:

Stored size: 670 Bytes

Contents

class Wepay::CheckoutController < Wepay::ApplicationController
  def index
    record = WepayCheckoutRecord.find_by_checkout_id_and_security_token(params[:checkout_id],params[:security_token])

    if record.present?
      wepay_gateway = WepayRails::Payments::Gateway.new
      checkout = wepay_gateway.lookup_checkout(record.checkout_id)
      record.update_attributes(checkout)
      redirect_to "#{wepay_gateway.configuration[:after_checkout_redirect_uri]}?checkout_id=#{params[:checkout_id]}"
    else
      raise StandardError.new("Wepay IPN: No record found for checkout_id #{params[:checkout_id]} and security_token #{params[:security_token]}")
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wepay-rails-2.2.9 app/controllers/wepay/checkout_controller.rb
wepay-rails-2.2.5 app/controllers/wepay/checkout_controller.rb
wepay-rails-2.2.4 app/controllers/wepay/checkout_controller.rb
wepay-rails-2.2.3 app/controllers/wepay/checkout_controller.rb
wepay-rails-2.2.2 app/controllers/wepay/checkout_controller.rb
wepay-rails-2.2.1 app/controllers/wepay/checkout_controller.rb
wepay-rails-2.2.0 app/controllers/wepay/checkout_controller.rb