feat: 分俱乐部付呗收款通道,默认仍走微信直连
小程序前端仍传 wechat;后台可切换 wechat/fubei,支持配置多套付呗并退款按原通道路由。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -453,6 +453,8 @@ class ClubManageView(APIView):
|
||||
'name', 'status', 'wx_appid', 'wx_secret',
|
||||
# 收款商户
|
||||
'mch_id', 'pay_app_id', 'mch_key', 'pay_cert_path', 'pay_key_path',
|
||||
# 小程序收款通道:wechat / fubei
|
||||
'mini_pay_channel',
|
||||
# 提现商户
|
||||
'withdraw_mch_id', 'api_v3_key',
|
||||
'cert_serial_no', 'private_key_path', 'platform_cert_dir',
|
||||
@@ -549,6 +551,7 @@ class ClubManageView(APIView):
|
||||
'mch_id': club.mch_id,
|
||||
'pay_app_id': club.pay_app_id,
|
||||
'withdraw_mch_id': getattr(club, 'withdraw_mch_id', '') or '',
|
||||
'mini_pay_channel': getattr(club, 'mini_pay_channel', None) or 'wechat',
|
||||
'goeasy_appkey': club.goeasy_appkey,
|
||||
'template_id': club.template_id,
|
||||
'sort_order': club.sort_order,
|
||||
@@ -611,6 +614,10 @@ class ClubManageView(APIView):
|
||||
val = request.data[field]
|
||||
if field in ('mch_key', 'api_v3_key', 'wx_secret'):
|
||||
val = (val or '').strip()
|
||||
if field == 'mini_pay_channel':
|
||||
val = (val or 'wechat').strip().lower()
|
||||
if val not in ('wechat', 'fubei'):
|
||||
return Response({'code': 400, 'msg': 'mini_pay_channel 仅支持 wechat/fubei'})
|
||||
setattr(club, field, val)
|
||||
update_fields.append(field)
|
||||
if 'mch_key' in request.data:
|
||||
|
||||
Reference in New Issue
Block a user