Class ActiveMerchant::Billing::Check
In: lib/active_merchant/billing/check.rb
Parent: Object

The Check object is a plain old Ruby object, similar to CreditCard. It supports validation of necessary attributes such as checkholder‘s name, routing and account numbers, but it is not backed by any database.

You may use Check in place of CreditCard with any gateway that supports it. Currently, only BrainTreeGateway supports the Check object.

Methods

Included Modules

Validateable

Attributes

account_holder_type  [RW] 
account_number  [RW] 
account_type  [RW] 
first_name  [RW] 
institution_number  [RW]  Used for Canadian bank accounts
last_name  [RW] 
number  [RW] 
routing_number  [RW] 
transit_number  [RW]  Used for Canadian bank accounts

Public Instance methods

Routing numbers may be validated by calculating a checksum and dividing it by 10. The formula is:

  (3(d1 + d4 + d7) + 7(d2 + d5 + d8) + 1(d3 + d6 + d9))mod 10 = 0

See en.wikipedia.org/wiki/Routing_transit_number#Internal_checksums

[Validate]