feat: 分俱乐部付呗收款通道,默认仍走微信直连

小程序前端仍传 wechat;后台可切换 wechat/fubei,支持配置多套付呗并退款按原通道路由。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-07-21 20:02:24 +08:00
parent f36db77f6b
commit 5762f00d40
20 changed files with 1105 additions and 0 deletions

View File

@@ -200,6 +200,15 @@ class ShopRefundView(APIView):
# ========== 微信退款 ==========
def _call_wechat_refund(self, order):
"""调用微信支付退款接口"""
from jituan.services.pay_refund_router import try_fubei_refund
fb = try_fubei_refund(
out_trade_no=order.OrderID,
amount_yuan=order.Amount or 0,
club_id=getattr(order, 'ClubID', None),
)
if fb is not None:
return fb
appid = getattr(settings, 'WEIXIN_APPID', '')
mch_id = getattr(settings, 'WEIXIN_MCHID', '')
key = getattr(settings, 'WEIXIN_SHANGHUMIYAO', '')