fix(pay): 支付校验参数错误以及后台任务
This commit is contained in:
@@ -129,13 +129,13 @@ async def wechat_notify(
|
||||
'status': base_schema.OrderStatusType.OK
|
||||
})
|
||||
result = {'status': 200, 'message': 'OK'}
|
||||
background_tasks.add_task(actions_after_payment, notify_params=params)
|
||||
background_tasks.add_task(actions_after_payment, notify_params=params, db_session=db_session)
|
||||
else:
|
||||
result = {'status': 400, 'message': '支付失败'}
|
||||
record.update({
|
||||
'status': base_schema.OrderStatusType.FAIL,
|
||||
})
|
||||
|
||||
await db_crud.update(data=record, filters={'order_id': record['out_trade_no']})
|
||||
await db_crud.update(data=record, filters={'order_id': record['order_id']})
|
||||
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user