active merchant and rails 2.1.0

6 views
Skip to first unread message

john

unread,
Jun 12, 2008, 11:29:54 AM6/12/08
to Active Merchant
Hi,
does anybody have active merchant working with vendor/rails 2.1.0? I
have the dependency gems setup in the rails initializer like so:

Rails::Initializer.run do |config|
config.gem "money", :version => '1.7.1'
config.gem "uuidtools"

and AM set up as a git submodule plugin in:

/vendor/plugins/active_merchant

I can't get the creditcard.valid? method to work. In script/console if
I :

cc = ActiveMerchant::Billing::CreditCard.new(:type => 'visa')
cc.valid?

will always return: => false.

Likewise:

cc = ActiveMerchant::Billing::CreditCard.new(:number =>
'my_valid_number')
cc.valid?

also always returns false...

Where should I go from here?

many thanks,

John
KidSafe





Benjamin Curtis

unread,
Jun 12, 2008, 12:42:24 PM6/12/08
to activem...@googlegroups.com
I have it running with Rails 2.1 -- not in vendor/rails, though.  Remember that you need to include the CVV for the validation to pass.

-- 
Benjamin Curtis
http://railskits.com/ - Ready-made Rails code
http://catchthebest.com/ - Team-powered recruiting
http://www.bencurtis.com/ - Personal blog

John Ward

unread,
Jun 13, 2008, 4:28:07 AM6/13/08
to activem...@googlegroups.com
Or turn CVV validation off

ActiveMerchant::Billing::CreditCard.require_verification_value = false

john

unread,
Jun 13, 2008, 10:31:43 AM6/13/08
to Active Merchant
Hi Guys,
many thanks. All working. After looking in the source my problem was
glaringly obvious. Start month needs to be a single digit, after
fixing that everything is working nicely.

regards,
St.john

On Jun 13, 9:28 am, "John Ward" <john.w...@cengal.com> wrote:
> Or turn CVV validation off
>
> ActiveMerchant::Billing::CreditCard.require_verification_value = false
>
> On Thu, Jun 12, 2008 at 5:42 PM, Benjamin Curtis <benjamin.cur...@gmail.com>
> wrote:
>
> > I have it running with Rails 2.1 -- not in vendor/rails, though. Remember
> > that you need to include the CVV for the validation to pass.
> > --
> > Benjamin Curtis
> >http://railskits.com/- Ready-made Rails code
> >http://catchthebest.com/- Team-powered recruiting
> >http://www.bencurtis.com/- Personal blog
Reply all
Reply to author
Forward
0 new messages