feat: 分俱乐部付呗收款通道,默认仍走微信直连
小程序前端仍传 wechat;后台可切换 wechat/fubei,支持配置多套付呗并退款按原通道路由。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1035,6 +1035,8 @@ class CreateOrderView(APIView):
|
||||
调用微信支付统一下单接口,生成支付参数
|
||||
"""
|
||||
try:
|
||||
from jituan.constants import FUBEI_BIZ_ORDER
|
||||
from jituan.services.mini_pay_router import maybe_create_fubei_jsapi_params
|
||||
from jituan.services.wechat_pay import get_wechat_v2_config
|
||||
pay_cfg = get_wechat_v2_config(club_id)
|
||||
APPID = pay_cfg['appid']
|
||||
@@ -1042,6 +1044,18 @@ class CreateOrderView(APIView):
|
||||
KEY = pay_cfg['key']
|
||||
NOTIFY_URL = getattr(settings, 'WEIXIN_NOTIFY_URL', '')
|
||||
|
||||
fb_params = maybe_create_fubei_jsapi_params(
|
||||
club_id=club_id,
|
||||
out_trade_no=dingdanid,
|
||||
amount_yuan=jine,
|
||||
body=beizhu,
|
||||
openid=openid,
|
||||
notify_url=NOTIFY_URL,
|
||||
biz_type=FUBEI_BIZ_ORDER,
|
||||
)
|
||||
if fb_params is not None:
|
||||
return fb_params
|
||||
|
||||
# NOAUTH 诊断日志:打印生效的 club_id / appid / mchid / openid 指纹
|
||||
_oid_preview = (openid or '')[:6] + '...' + (openid or '')[-4:] if (openid or '') else '(empty)'
|
||||
logger.warning(
|
||||
|
||||
Reference in New Issue
Block a user