lib/active_merchant/billing/gateways/card_stream.rb in activemerchant-1.3.1 vs lib/active_merchant/billing/gateways/card_stream.rb in activemerchant-1.3.2
- old
+ new
@@ -132,11 +132,11 @@
def add_invoice(post, money, credit_card, options)
add_pair(post, :TransactionUnique, options[:order_id], :required => true)
add_pair(post, :OrderDesc, options[:description] || options[:order_id], :required => true)
- if [ 'american_express', 'diners_club' ].include?(credit_card.type.to_s)
+ if [ 'american_express', 'diners_club' ].include?(card_brand(credit_card).to_s)
add_pair(post, :AEIT1Quantity, 1)
add_pair(post, :AEIT1Description, (options[:description] || options[:order_id]).slice(0, 15))
add_pair(post, :AEIT1GrossValue, amount(money))
end
end
@@ -157,10 +157,10 @@
add_pair(post, :CV2, credit_card.verification_value)
end
def format_issue_number(credit_card)
- credit_card.type.to_s == 'solo' ? format(credit_card.issue_number, :two_digits) : credit_card.issue_number
+ card_brand(credit_card).to_s == 'solo' ? format(credit_card.issue_number, :two_digits) : credit_card.issue_number
end
def commit(action, parameters)
response = parse( ssl_post(test? ? TEST_URL : LIVE_URL, post_data(action, parameters)) )