Credit Card ActiveRecord

4 views
Skip to first unread message

TomRossi7

unread,
Jun 22, 2009, 3:38:30 PM6/22/09
to Active Merchant
Is there a way to set up an Credit Card Active Record object that
inherits all of the Active Merchant Credit Card methods? For example,
it would be great if I could just validate my credit card number on
the model without instantiating an Active Merchant clone of my Active
Record object. Does that make sense?

Thanks,
Tom

Cody Fauser

unread,
Jun 22, 2009, 3:47:56 PM6/22/09
to activem...@googlegroups.com
You can get a lot of functionality from:

class CreditCard < ActiveRecord::Base
include ActiveMerchant::Billing::CreditCardMethods
end

However, I think even more functionality should be available.
--
Cody Fauser
http://shopify.com - e-commerce done right
http://www.codyfauser.com - blog
http://peepcode.com/products/activemerchant-pdf - ActiveMerchant PeepCode
http://www.oreilly.com/catalog/rjsrails - RJS Templates for Rails

tomrossi7

unread,
Jun 22, 2009, 3:54:51 PM6/22/09
to Active Merchant
Cody,

Will that allow me to validate the card number? I see
valid_issue_number, but I'm not sure what that even is.

Thanks!
Tom
Reply all
Reply to author
Forward
0 new messages