Sha256: 93a07dd72dd6a015508dbdff75b0aefc6376e78a2d0e45835cea8a236e15309b
Contents?: true
Size: 1.02 KB
Versions: 19
Compression:
Stored size: 1.02 KB
Contents
class IntegratedPaymentController < ApplicationController before_filter :disallow_if_payment_is_hosted before_filter :get_cart_order before_filter :require_addresses_for_checkout def billing @user = current_user @page_title = "Pay Securely Online WIth Your Credit Card" end def pay processor = Forge::CreditCardProcessor.new(@cart_order) processor.create_credit_card( :number => params[:credit_card][:number], :verification_value => params[:credit_card][:verification_value], :month => params[:date][:month], :year => params[:date][:year] ) if processor.pay(@cart_order) flash[:notice] = processor.message redirect_to paid_order_path(@cart_order, :key => @cart_order.key) else flash[:warning] = processor.message render :action => "billing" and return end end private def disallow_if_payment_is_hosted if Forge.config.ecommerce.payments == :hosted redirect_to "/hosted_payment/billing" and return false end end end
Version data entries
19 entries across 19 versions & 1 rubygems