Skip to content

Commit a03a355

Browse files
committed
add is_valid fake method to enable beanstream credit cards
1 parent c404912 commit a03a355

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

billing/gateways/beanstream_gateway.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ def convert_cc(self, credit_card, validate=True):
9595
credit_card.number,
9696
credit_card.month, credit_card.year,
9797
credit_card.verification_value)
98+
if not hasattr(card, 'is_valid'):
99+
# there is no is_valid on the beanstream credit card object
100+
def is_valid():
101+
return True
102+
card.is_valid = is_valid
98103
if validate:
99104
self.validate_card(card)
100105
return card

0 commit comments

Comments
 (0)