Hi folks

I'm doing some work on a project with active_merchant and I keep getting
the following error:

[b][i] TypeError in CheckoutController#place_order
exception class/object expected [/i][/b]

heres the piece of code from my controller that correpsonds:
[cod...@order = Order.new(params[:order])
@order.customer_ip = request.remote_ip
populate_order

#raise "I need to know what values are being sent in the order object"
                                                                                
                   unless
@order.valid?
  return render :action => 'index'
  flash.now[:error] = "error while placing order"
end
 ########## START of AM##########
# ActiveMerchant::Billing::Base.mode = :test #COMMENT OUT / REMOVE FOR
REAL TRANSACTIONS!
# ActiveMerchant accepts all amounts as Integer values in cents
#$10.00
amount = @order.total
#twodig_year = @order.card_expiration_year.sub(/.*(\d{2})$/, '\1')
# twodig_syear = @order.card_start_year.sub(/.*(\d{2})$/, '\1')
credit_card = ActiveMerchant::Billing::CreditCard.new(
:first_name         => @order.first_name,
:last_name          => @order.last_name,
:number             => @order.card_number,
:month              => @order.card_expiration_month,
:year               => @order.card_expiration_year,
:start_month        => @order.card_start_month,
:start_year         => @order.card_start_year,
:issue_number       =>@order.card_issue_no,
:verification_value =>@order.card_verification_value
)
   raise credit_card.errors[/code]
now this error message has only shown since i tried "raise
credit_card.errors"

can anyone help me at least get a better understanding of what is
causing this error?

many thanks

:)
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to