Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Enable validation of CVV
Browse files Browse the repository at this point in the history
  • Loading branch information
zeantsoi committed Jul 1, 2015
1 parent d0ee6f0 commit a916b22
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions r2/example.ini
Expand Up @@ -676,6 +676,7 @@ default_promote_bid = 50
min_promote_bid = 20
max_promote_bid = 9999
adserver_click_domain =
authnet_validate = true


############################################ TRAFFIC
Expand Down
1 change: 1 addition & 0 deletions r2/r2/lib/app_globals.py
Expand Up @@ -237,6 +237,7 @@ class Globals(object):
'trust_local_proxies',
'shard_link_vote_queues',
'shard_commentstree_queues',
'authnet_validate',
'ENFORCE_RATELIMIT',
'RL_SITEWIDE_ENABLED',
'RL_OAUTH_SITEWIDE_ENABLED',
Expand Down
4 changes: 2 additions & 2 deletions r2/r2/lib/authorize/api.py
Expand Up @@ -356,7 +356,7 @@ def __init__(self, user, address, creditcard, validationMode=None):
CustomerRequest.__init__(self, user,
paymentProfile=PaymentProfile(address,
creditcard),
validationMode=validationMode)
validationMode="liveMode" if g.authnet_validate else None)

def process_response(self, res):
pay_id = int(res.customerpaymentprofileid.contents[0])
Expand Down Expand Up @@ -476,7 +476,7 @@ def __init__(self, user, paymentid, address, creditcard,
paymentProfile=PaymentProfile(address,
creditcard,
paymentid),
validationMode=validationMode)
validationMode="liveMode" if g.authnet_validate else None)

def process_response(self, res):
return self.paymentProfile.customerPaymentProfileId
Expand Down

0 comments on commit a916b22

Please sign in to comment.