diff --git a/r2/r2/controllers/ipn.py b/r2/r2/controllers/ipn.py index 6267e6a73..9d41c1570 100644 --- a/r2/r2/controllers/ipn.py +++ b/r2/r2/controllers/ipn.py @@ -627,11 +627,6 @@ class IpnController(RedditController): # and "custom", just in case we need to debug it later or something secret = payment_blob['goldtype'] + "-" + custom - if payment_blob['goldtype'] == 'autorenew': - existing = existing_subscription(subscr_id, paying_id, custom) - if existing: - secret = None - if instagift: status="instagift" else: @@ -845,6 +840,10 @@ class GoldPaymentController(RedditController): message = ("see the details of your subscription on " "[your userpage](/u/%s)" % buyer.name) + if payment_blob['goldtype'] == 'autorenew': + if existing_subscription(subscr_id, paying_id, custom): + secret = None + elif goldtype == 'creddits': buyer._incr('gold_creddits', months) subject = "thanks for buying creddits!"