Pleased to announce CreditCard

L

Lucas Carlson

I am pleased to announce a new RubyForge project I call CreditCard (
http://rubyforge.org/projects/creditcard/ ). This is a small hint of
what is to come, a full payment processing gateway for Ruby. To try it
out, type:

gem install creditcard

These subroutines tell you whether a credit card number is
self-consistent using known algorithms for credit card numbers. All
non-integer values are removed from the string before parsing so that
you don’t have to worry about the format of the string.

Here are some example uses.

"5276 4400 6542 1319".creditcard?
=> true

puts 5276440065421319.creditcard_type
=> "mastercard"

"5276440065421319".creditcard? "visa"
=> false

"5276-4400-6542-1319".creditcard? "mastercard"
=> true

-Lucas
http://www.rufy.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top