|
@@ -1454,12 +1454,13 @@ class CronComparedDataView(View):
|
|
if item['transaction_info']['transaction_event_code'] == 'T1107':
|
|
if item['transaction_info']['transaction_event_code'] == 'T1107':
|
|
trade_no = item['transaction_info']['paypal_reference_id']
|
|
trade_no = item['transaction_info']['paypal_reference_id']
|
|
more_order_list.append(trade_no)
|
|
more_order_list.append(trade_no)
|
|
|
|
+ pay_time = int(datetime.datetime.strptime(item['transaction_info']['transaction_updated_date'],
|
|
|
|
+ "%Y-%m-%dT%H:%M:%S%z").timestamp())
|
|
order_qs = Order_Model.objects.filter(trade_no=trade_no, payType=1)
|
|
order_qs = Order_Model.objects.filter(trade_no=trade_no, payType=1)
|
|
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 = int(datetime.datetime.strptime(item['transaction_info']['transaction_updated_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,
|
|
@@ -1485,6 +1486,8 @@ class CronComparedDataView(View):
|
|
if result['result_code'] != 0 or not result['result']['is_exist']:
|
|
if result['result_code'] != 0 or not result['result']['is_exist']:
|
|
# 如果响应结果为空,记录在数据库
|
|
# 如果响应结果为空,记录在数据库
|
|
AbnormalOrder.objects.create(**order_dict)
|
|
AbnormalOrder.objects.create(**order_dict)
|
|
|
|
+ else:
|
|
|
|
+ order_qs.update(payTime=pay_time)
|
|
total = round(total, 2)
|
|
total = round(total, 2)
|
|
daily_reconciliation = DailyReconciliation.objects.filter(time=timestamp)
|
|
daily_reconciliation = DailyReconciliation.objects.filter(time=timestamp)
|
|
if daily_reconciliation.exists():
|
|
if daily_reconciliation.exists():
|