From e44cb99704959a7107d3033d5a04500268e49e72 Mon Sep 17 00:00:00 2001 From: minibear <321983@qq.com> Date: Thu, 10 Oct 2024 09:25:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=8A=95=E8=AF=89=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0mini=5Fprogram=5Fj?= =?UTF-8?q?ump=5Finfo=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/CHANGELOG.md | 6 ++++++ setup.py | 2 +- wechatpayv3/complaint.py | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 2adb6ac..e8945aa 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [1.2.53] - 2024-10-10 + +### Added + +- 提交投诉回复接口添加mini_program_jump_info参数 + ## [1.2.52] - 2024-05-22 ### Fixed diff --git a/setup.py b/setup.py index babf995..7f5086f 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name="wechatpayv3", - version="1.2.52", + version="1.2.53", author="minibear", description="微信支付 API v3 Python SDK(python sdk for wechatpay v3)", long_description=long_description, diff --git a/wechatpayv3/complaint.py b/wechatpayv3/complaint.py index 4f1ab19..3dd333d 100644 --- a/wechatpayv3/complaint.py +++ b/wechatpayv3/complaint.py @@ -91,13 +91,14 @@ def complaint_notification_delete(self): return self._core.request(path, method=RequestType.DELETE) -def complaint_response(self, complaint_id, response_content, response_images=None, jump_url=None, jump_url_text=None): +def complaint_response(self, complaint_id, response_content, response_images=None, jump_url=None, jump_url_text=None, mini_program_jump_info=None): """提交投诉回复 :param complaint_id: 投诉单对应的投诉单号。示例值:'200201820200101080076610000' :param response_content: 回复内容,具体的投诉处理方案,限制200个字符以内。示例值:'已与用户沟通解决' :param response_images: 回复图片,传入调用商户上传反馈图片接口返回的media_id,最多上传4张图片凭证。示例值:['file23578_21798531.jpg', 'file23578_21798532.jpg'] :param jump_url: 跳转链接,附加跳转链接,引导用户跳转至商户客诉处理页面,链接需满足https格式。示例值:"https://www.xxx.com/notify" :param jump_url_text: 转链接文案,展示给用户的文案,附在回复内容之后。用户点击文案,即可进行跳转。示例值:"查看订单详情" + :mini_program_jump_info: 跳转小程序信息,商户可在回复中附加小程序信息,引导用户跳转至商户客诉处理小程序。示例值:{"appid" : "example_appid","path" : "example_path","text" : "example_text"} """ params = {} if not complaint_id: @@ -113,6 +114,8 @@ def complaint_response(self, complaint_id, response_content, response_images=Non params.update({'jump_url': jump_url}) if jump_url_text: params.update({'jump_url_text': jump_url_text}) + if mini_program_jump_info: + params.update({'mini_program_jump_info': mini_program_jump_info}) path = '/v3/merchant-service/complaints-v2/%s/response' % complaint_id return self._core.request(path, method=RequestType.POST, data=params)