lang 3 жил өмнө
parent
commit
b4e3c46eca

+ 8 - 1
Controller/CloudStorage.py

@@ -27,6 +27,7 @@ import threading
 import calendar
 import datetime
 import logging
+import sys
 from aliyunsdkcore import client
 from aliyunsdksts.request.v20150401 import AssumeRoleRequest
 from boto3.session import Session
@@ -767,7 +768,7 @@ class CloudStorageView(View):
 
                 nowTime = int(time.time())
                 order_list = order_qs.values("UID", "channel", "commodity_code", "rank", "isSelectDiscounts",
-                                             "userID__userID", "userID__username")
+                                             "userID__userID", "userID__username","coupon_id")
                 userid = order_list[0]['userID__userID']
                 username = order_list[0]['userID__username']
                 UID = order_list[0]['UID']
@@ -852,6 +853,7 @@ class CloudStorageView(View):
         except Exception as e:
             logger.info('-----ali---notify')
             logger.info(repr(e))
+            logger.info(sys.exc_info())
             if order_qs:
                 order_qs.update(status=10, promotion_rule_id=promotion_rule_id)
             redisObj.del_data(key=orderID + 'do_notify')
@@ -987,6 +989,11 @@ class CloudStorageView(View):
                 return HttpResponseRedirect(red_url)
         except Exception as e:
             print(repr(e))
+            logger = logging.getLogger('info')
+            logger.info('-------------------paypal----notify')
+            logger.info(repr(e))
+            logger.info(sys.exc_info())
+
             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)