|
@@ -1280,8 +1280,8 @@ class CronComparedDataView(View):
|
|
if not order_qs.exists():
|
|
if not order_qs.exists():
|
|
transaction_subject = item['transaction_info'].get('transaction_subject', '')
|
|
transaction_subject = item['transaction_info'].get('transaction_subject', '')
|
|
agreement_id = item['transaction_info'].get('paypal_reference_id', '')
|
|
agreement_id = item['transaction_info'].get('paypal_reference_id', '')
|
|
- pay_time = datetime.datetime.strptime(item['transaction_info']['transaction_initiation_date'],
|
|
|
|
- "%Y-%m-%dT%H:%M:%S%z").timestamp()
|
|
|
|
|
|
+ pay_time = int(datetime.datetime.strptime(item['transaction_info']['transaction_initiation_date'],
|
|
|
|
+ "%Y-%m-%dT%H:%M:%S%z").timestamp())
|
|
order_dict = {
|
|
order_dict = {
|
|
'trade_no': trade_no,
|
|
'trade_no': trade_no,
|
|
'agreement_id': agreement_id,
|
|
'agreement_id': agreement_id,
|
|
@@ -1297,7 +1297,7 @@ class CronComparedDataView(View):
|
|
order_dict['pay_type'] = 0
|
|
order_dict['pay_type'] = 0
|
|
order_dict['meal_name'] = 'paypal_cycle'
|
|
order_dict['meal_name'] = 'paypal_cycle'
|
|
order_dict['order_id'] = transaction_subject
|
|
order_dict['order_id'] = transaction_subject
|
|
- params = {'trade_no': trade_no}
|
|
|
|
|
|
+ params = {'trade_no': trade_no, 'pay_time': pay_time}
|
|
response = requests.get('https://www.zositeche.com/testApi/checkOrderExist', params=params)
|
|
response = requests.get('https://www.zositeche.com/testApi/checkOrderExist', params=params)
|
|
if response.status_code != 200:
|
|
if response.status_code != 200:
|
|
# 如果响应失败,记录在数据库
|
|
# 如果响应失败,记录在数据库
|