فهرست منبع

更改取消订阅成功状态码

lang 3 سال پیش
والد
کامیت
9221192838
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      Controller/PaymentCycle.py

+ 2 - 2
Controller/PaymentCycle.py

@@ -627,11 +627,11 @@ class payCycle(View):
         try:
         try:
             billing_agreement = paypalrestsdk.BillingAgreement.find(BILLING_AGREEMENT_ID)
             billing_agreement = paypalrestsdk.BillingAgreement.find(BILLING_AGREEMENT_ID)
             if billing_agreement.state != 'Active':
             if billing_agreement.state != 'Active':
-                return response.json(10051)
+                return response.json(0)
             cancel_note = {"note": "Canceling the agreement"}
             cancel_note = {"note": "Canceling the agreement"}
             if billing_agreement.cancel(cancel_note):
             if billing_agreement.cancel(cancel_note):
                 Order_Model.objects.filter(agreement_id=BILLING_AGREEMENT_ID).update(agreement_id='')
                 Order_Model.objects.filter(agreement_id=BILLING_AGREEMENT_ID).update(agreement_id='')
-                return response.json(10051)
+                return response.json(0)
             else:
             else:
                 return response.json(10052)
                 return response.json(10052)
         except Exception as e:
         except Exception as e: