Skip to content

Commit

Permalink
提交投诉回复接口添加mini_program_jump_info参数
Browse files Browse the repository at this point in the history
  • Loading branch information
minibear2021 committed Oct 10, 2024
1 parent 4a5faaf commit e44cb99
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [1.2.53] - 2024-10-10

### Added

- 提交投诉回复接口添加mini_program_jump_info参数

## [1.2.52] - 2024-05-22

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 4 additions & 1 deletion wechatpayv3/complaint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)

Expand Down

0 comments on commit e44cb99

Please sign in to comment.