Files
server-core/wechatpayv3/async_/merchantrisk.py
T
Pine f1147dced3 feat(pay): 微信支付V3子应用与算力充值
- app/pay 独立支付子应用(config/wxpay/models/repository/service/routers),便于后期拆分微服务
- 充值订单表 0026_compute_recharge;套餐支持折扣(discount)与上架开关(enabled),DB system_configs 优先、env 兜底
- 统一小程序支付:桌面端出小程序码→扫码进小程序确认页按 openid 发起 JSAPI→回调幂等到账(引擎 adjust_user_quota+镜像回写)
- 内嵌 wechatpayv3(含 async_),响应验签失败降级告警;新增 aiofiles 依赖

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-30 22:29:44 +08:00

40 lines
1.3 KiB
Python

# -*- coding: utf-8 -*-
from .type import RequestType
async def merchantrisk_callback_create(self, notify_url=None):
"""创建商户违规通知回调地址
:param notify_url: 通知地址,示例值:'https://www.weixin.qq.com/wxpay/pay.php'
"""
params = {}
if notify_url:
params.update({'notify_url': notify_url})
path = '/v3/merchant-risk-manage/violation-notifications'
return await self._core.request(path, method=RequestType.POST, data=params)
async def merchantrisk_callback_query(self):
"""查询商户违规通知回调地址
"""
path = '/v3/merchant-risk-manage/violation-notifications'
return await self._core.request(path)
async def merchantrisk_callback_update(self, notify_url=None):
"""修改商户违规通知回调地址
:param notify_url: 通知地址,示例值:'https://www.weixin.qq.com/wxpay/pay.php'
"""
params = {}
if notify_url:
params.update({'notify_url': notify_url})
path = '/v3/merchant-risk-manage/violation-notifications'
return await self._core.request(path, method=RequestType.PUT, data=params)
async def merchantrisk_callback_delete(self):
"""查询商户违规通知回调地址
"""
path = '/v3/merchant-risk-manage/violation-notifications'
return await self._core.request(path, method=RequestType.DELETE)