fix(pay): 移除支付沙盒模式 v2沙盒模式已下线

This commit is contained in:
xingc
2025-05-06 21:10:22 +08:00
parent 3a49fd1665
commit 4a111fcbdd
2 changed files with 15 additions and 15 deletions

View File

@@ -61,10 +61,10 @@ async def create_order(
request.client.host
)
out_trade_no = generate_order_number()
prepay_id = wechat_pay_api.create_unified_order(
prepay_id = await wechat_pay_api.create_unified_order(
**payload.model_dump(exclude_none=True, exclude={'product_id'}),
out_trade_no=out_trade_no,
spbill_create_ip=client_ip
create_ip=client_ip
)
payment_params = wechat_pay_api.generate_payment_params(prepay_id)
db_crud = CRUD(db_session, Order)
@@ -77,7 +77,7 @@ async def create_order(
'status': base_schema.OrderStatusType.WAIT_PAYMENT
},
filters={
'out_trade_no': out_trade_no,
'order_id': out_trade_no,
}
)
return {'data': {'payment_params': payment_params, 'order_id': order.order_id}}