test/test_helper.rb in active_merchant-epsilon-0.7.0 vs test/test_helper.rb in active_merchant-epsilon-0.7.1
- old
+ new
@@ -35,10 +35,21 @@
month: '10',
year: Time.now.year + 1,
)
end
+ def tokenized_credit_card
+ ActiveMerchant::Billing::CreditCard.require_verification_value = false
+ ActiveMerchant::Billing::CreditCard.new(
+ first_name: 'TARO',
+ last_name: 'YAMADA',
+ number: '',
+ month: '',
+ year: '',
+ )
+ end
+
def valid_credit_card_with_verification_value
ActiveMerchant::Billing::CreditCard.require_verification_value = true
ActiveMerchant::Billing::CreditCard.new(
first_name: 'TARO',
last_name: 'YAMADA',
@@ -80,9 +91,22 @@
item_code: 'ITEM001',
item_name: 'Greate Product',
order_number: "O#{now.sec}#{now.usec}",
memo1: 'memo1',
memo2: 'memo2',
+ }
+ end
+
+ def purchase_detail_with_token
+ now = Time.now
+ {
+ user_id: "U#{Time.now.to_i}",
+ user_name: 'YAMADA Taro',
+ user_email: 'yamada-taro@example.com',
+ item_code: 'ITEM001',
+ item_name: 'Greate Product',
+ order_number: "O#{now.sec}#{now.usec}",
+ token: '4ee16d6784077b5c3c67605db2a06d8b8ef7e8325deb5ceb9794451da1bb8c5f',
}
end
def installment_purchase_detail
now = Time.now