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