lang 3 år sedan
förälder
incheckning
2eda4b7437
2 ändrade filer med 1 tillägg och 18 borttagningar
  1. 1 15
      Controller/CloudStorage.py
  2. 0 3
      Controller/PaymentCycle.py

+ 1 - 15
Controller/CloudStorage.py

@@ -1115,7 +1115,6 @@ class CloudStorageView(View):
             return HttpResponse(pay.xml_to_dict({'return_code': 'FAIL', 'return_msg': repr(e)}))
 
     def do_create_pay_order(self, request_dict, userID, ip, response):  # 创建支付订单
-        logger = logging.getLogger('info')
         uid = request_dict.get('uid', None)
         channel = request_dict.get('channel', None)
         pay_type = int(request_dict.get('pay_type', None))
@@ -1180,29 +1179,16 @@ class CloudStorageView(View):
             couponQuery = couponObj.values("id", "type", "coupon_discount")
             if not couponQuery.exists():
                 return response.json(10049)
-            logger.info(price)
-            logger.info(type(price))
             price = Decimal(price)
-            logger.info(price)
-            logger.info(type(price))
             coupon_discount = Decimal(couponQuery[0]['coupon_discount'])
-            logger.info(couponQuery[0]['coupon_discount'])
-            logger.info(type(couponQuery[0]['coupon_discount']))
-            logger.info(coupon_discount)
-            logger.info(type(coupon_discount))
             if couponQuery[0]['type'] == 1:  #折扣
                 price = coupon_discount/10 * price
             elif couponQuery[0]['type'] == 2:  #抵扣
                 price = price - coupon_discount
             if price < 0:
                 return response.json(10049)
-            logger.info("------------------coupon_price")
-            logger.info(price)
-            price = float(price)
-            logger.info("--------float----------coupon_price")
-            logger.info(price)
-            price = round(price,2)
 
+        price = round(float(price), 2)
         if pay_type == 1:
             # 订阅周期扣款
             if(smqs[0]['cycle_config_id']):

+ 0 - 3
Controller/PaymentCycle.py

@@ -32,7 +32,6 @@ class Paypal:
 
 
     def subscriptions(store_info,lang,orderID,price):
-        logger = logging.getLogger('info')
         cycle_config = PayCycleConfigModel.objects.filter(id=store_info['cycle_config_id']).values()
         if not cycle_config:
             return False
@@ -83,8 +82,6 @@ class Paypal:
             ],
             "type": "INFINITE",
         }
-        logger.info('-------------sub.list')
-        logger.info(BillingPlan)
         paypalrestsdk.configure(PAYPAL_CRD)
         billing_plan = paypalrestsdk.BillingPlan(BillingPlan)
         if billing_plan.create():