Browse Source

支付日志打印

zhangdongming 2 năm trước cách đây
mục cha
commit
1ce698139d
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      Controller/UnicomCombo/UnicomComboController.py

+ 3 - 0
Controller/UnicomCombo/UnicomComboController.py

@@ -469,6 +469,7 @@ class UnicomComboView(View):
         购买联通套餐
         @return:
         """
+        logger = logging.getLogger('info')
         try:
             with transaction.atomic():
                 iccid = request_dict.get('iccid', None)
@@ -507,6 +508,7 @@ class UnicomComboView(View):
                               }
 
                 params = 'lang=cn' + '&activateType=' + activate_type
+                logger.info('激活类型:{}'.format(activate_type))
                 result = {'result_code': 0, 'reason': 'success', 'error_code': 0}
                 if pay_type == 2:  # 支付宝
                     pay_price = PayService.get_two_float(price, 2)
@@ -717,6 +719,7 @@ class UnicomComboView(View):
                             zero_today, end_time = cls.get_data_time(days)
                             combo_order_data['activation_time'] = now_time
                             combo_order_data['expire_time'] = end_time
+                        logger.info('激活类型{}'.format(activate_type))
                     # 调用联通API查询物联卡是否已激活,未激活则修改为激活状态
                     unicom_api = UnicomObjeect()
                     if status == 1: