Browse Source

修改报错

zhangdongming 2 years ago
parent
commit
241523e31d
1 changed files with 0 additions and 7 deletions
  1. 0 7
      Controller/PaymentCycle.py

+ 0 - 7
Controller/PaymentCycle.py

@@ -306,12 +306,6 @@ class PaypalCycleNotify(View):
                 red_url = "{SERVER_DOMAIN_SSL}web/paid2/en_fail.html".format(SERVER_DOMAIN_SSL=SERVER_DOMAIN_SSL)
             return HttpResponseRedirect(red_url)
 
-    @staticmethod
-    def paypal_webhook_log(sub_id, **params):
-        params['agreement_id'] = sub_id
-        params['agreement_desc'] = 'webhook'
-        PaypalWebHookEvent.objects.create(**params)
-
     def do_paypal_webhook_notify(self, request_dict, request, response):
         logger = logging.getLogger('pay')
         logger.info('--------进入周期扣款钩子--------')
@@ -344,7 +338,6 @@ class PaypalCycleNotify(View):
                 'resource': json_agreement_str,
                 'created_time': int(time.time()),
             }
-            self.paypal_webhook_log(billing_agreement_id, **PaypalWebHookEventInsert)
             if event_type != 'PAYMENT.SALE.COMPLETED':
                 logger.info('----钩子异常----')
             self.find_subscription_transactions(billing_agreement_id)