Browse Source

Merge branch 'test' of http://192.168.136.99:3000/servers/ASJServer

locky 3 years ago
parent
commit
9d8313f447
2 changed files with 15 additions and 3 deletions
  1. 6 0
      Controller/CloudStorage.py
  2. 9 3
      Controller/PaymentCycle.py

+ 6 - 0
Controller/CloudStorage.py

@@ -921,6 +921,9 @@ class CloudStorageView(View):
             logger.info('alipay----notify---------')
             logger.info(repr(e))
             logger.info(sys.exc_info())
+            logger.info('alipay支付失败:----')
+            logger.info("错误行数:{errLine}".format(errLine=e.__traceback__.tb_lineno))
+            logger.info(repr(e))
             if order_qs:
                 order_qs.update(status=10, promotion_rule_id=promotion_rule_id)
             redisObj.del_data(key=orderID + 'do_notify')
@@ -1198,6 +1201,9 @@ class CloudStorageView(View):
                 order_qs.update(status=10, promotion_rule_id=promotion_rule_id)
             return HttpResponse(pay.xml_to_dict({'return_code': 'FAIL', 'return_msg': '参数格式校验错误'}))
         except Exception as e:
+            logger.info('wechat支付失败:----')
+            logger.info("错误行数:{errLine}".format(errLine=e.__traceback__.tb_lineno))
+            logger.info(repr(e))
             if order_qs:
                 order_qs.update(status=10, promotion_rule_id=promotion_rule_id)
             redisObj.del_data(key=orderID + 'do_notify')

+ 9 - 3
Controller/PaymentCycle.py

@@ -265,7 +265,7 @@ class PaypalCycleNotify(View):
                 sys_msg_text_list = ['温馨提示:尊敬的客户,您的' + device_name + '设备在' + datetime + '已成功订阅云存套餐',
                                      'Dear customer,you already subscribed the cloud storage package successfully for device ' + device_name + ' on ' + time.strftime(
                                          "%b %dth,%Y", time.localtime())]
-                CloudStorage.CloudStorageView.do_vod_msg_Notice(UID, channel, userid, lang, sys_msg_text_list, 'SMS_219738485')
+                CloudStorage.CloudStorageView.do_vod_msg_Notice(self, UID, channel, userid, lang, sys_msg_text_list, 'SMS_219738485')
 
                 # return response.json(0)
                 red_url = "{SERVER_DOMAIN_SSL}web/paid2/success.html".format(SERVER_DOMAIN_SSL=SERVER_DOMAIN_SSL)
@@ -274,6 +274,9 @@ class PaypalCycleNotify(View):
                 return HttpResponseRedirect(red_url)
         except Exception as e:
             print(repr(e))
+            logger.info('do_paypal_cycle_return支付失败:----')
+            logger.info("错误行数:{errLine}".format(errLine=e.__traceback__.tb_lineno))
+            logger.info(repr(e))
             if order_qs:
                 order_qs.update(status=10, promotion_rule_id=promotion_rule_id)
             red_url = "{SERVER_DOMAIN_SSL}web/paid2/fail.html".format(SERVER_DOMAIN_SSL=SERVER_DOMAIN_SSL)
@@ -439,7 +442,7 @@ class PaypalCycleNotify(View):
                             lang = 'en'
                         else:
                             lang = 'cn'
-                        CloudStorage.CloudStorageView.do_vod_msg_Notice(UID, channel, userid, lang,
+                        CloudStorage.CloudStorageView.do_vod_msg_Notice(self, UID, channel, userid, lang,
                                                                         sys_msg_text_list, 'SMS_219738485')
                         logger.info('-----------------------result')
                         logger.info('success')
@@ -461,6 +464,9 @@ class PaypalCycleNotify(View):
                     print(e)
                     logger.info('-----------------------paypal异步回调失败')
                     logger.info(e)
+                    logger.info('do_paypal_webhook_notify支付失败:----')
+                    logger.info("错误行数:{errLine}".format(errLine=e.__traceback__.tb_lineno))
+                    logger.info(repr(e))
                     return HttpResponse('fail')
         return HttpResponse('fail')
 
@@ -610,7 +616,7 @@ class PaypalCycleNotify(View):
                             lang = 'en'
                         else:
                             lang = 'cn'
-                        CloudStorage.CloudStorageView.do_vod_msg_Notice(UID, channel, userid, lang,
+                        CloudStorage.CloudStorageView.do_vod_msg_Notice(self, UID, channel, userid, lang,
                                                                         sys_msg_text_list, 'SMS_219738485')
                         return HttpResponse('success')
                 except Exception as e: