Browse Source

周期付款app_type赋值

locky 10 months ago
parent
commit
ba0de7de73
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Controller/PaymentCycle.py

+ 2 - 0
Controller/PaymentCycle.py

@@ -409,6 +409,7 @@ class PaypalCycleNotify(View):
                 response = paypalrestsdk.WebhookEvent.verify(
                 response = paypalrestsdk.WebhookEvent.verify(
                     transmission_id, transmission_time, PAYPAL_WEB_HOOK_ID, json_agreement_str, cert_url,
                     transmission_id, transmission_time, PAYPAL_WEB_HOOK_ID, json_agreement_str, cert_url,
                     transmission_sig, auth_algo)
                     transmission_sig, auth_algo)
+                app_type = 1
                 if not response:
                 if not response:
                     paypalrestsdk.configure(PAYPAL_CRD['Vsees'])
                     paypalrestsdk.configure(PAYPAL_CRD['Vsees'])
                     response = paypalrestsdk.WebhookEvent.verify(
                     response = paypalrestsdk.WebhookEvent.verify(
@@ -417,6 +418,7 @@ class PaypalCycleNotify(View):
                     if not response:
                     if not response:
                         PAY_LOGGER.info('PayPal周期扣款失败---签名验证失败')
                         PAY_LOGGER.info('PayPal周期扣款失败---签名验证失败')
                         return HttpResponse('Fail', status=500)
                         return HttpResponse('Fail', status=500)
+                    app_type = 2
             else:
             else:
                 PAY_LOGGER.info('PayPal周期扣款失败,付款状态有误,resource_type:{},state:{}----'.
                 PAY_LOGGER.info('PayPal周期扣款失败,付款状态有误,resource_type:{},state:{}----'.
                                 format(resource_type, paypal_body.get('state')))
                                 format(resource_type, paypal_body.get('state')))