Skip to content

Commit

Permalink
ePay: Check if it looks like a credit card instead of if it actually …
Browse files Browse the repository at this point in the history
…is a credit card object
  • Loading branch information
titanous authored and Soleone committed Dec 13, 2010
1 parent b426805 commit 8f9ab56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/active_merchant/billing/gateways/epay.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def add_creditcard(post, credit_card)
end

def add_creditcard_or_reference(post, credit_card_or_reference)
if credit_card_or_reference.is_a?(CreditCard)
if credit_card_or_reference.respond_to?(:number)
add_creditcard(post, credit_card_or_reference)
else
add_reference(post, credit_card_or_reference.to_s)
Expand Down

0 comments on commit 8f9ab56

Please sign in to comment.