Module: Testopia::ActiveMerchant
- Defined in:
- lib/testopia/active_merchant.rb
Instance Method Summary collapse
- #address(options = {}) ⇒ Object
- #credit_card(options = {}) ⇒ Object
- #credit_card_hash(options = {}) ⇒ Object
Instance Method Details
#address(options = {}) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/testopia/active_merchant.rb', line 21 def address( = {}) { :name => "John Doe", :address1 => "2500 Oak Mills Road", :address2 => "Suite 1000", :city => "Beverly Hills", :state => "CA", :country => "US", :zip => '90210' }.update() end |
#credit_card(options = {}) ⇒ Object
17 18 19 |
# File 'lib/testopia/active_merchant.rb', line 17 def credit_card( = {}) ::ActiveMerchant::Billing::CreditCard.new( credit_card_hash() ) end |
#credit_card_hash(options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/testopia/active_merchant.rb', line 5 def credit_card_hash( = {}) { :number => '1', :first_name => 'John', :last_name => 'Doe', :month => '8', :year => "#{Time.now.year + 1}", :verification_value => '123', :type => 'visa' }.update() end |