Skip to content

Commit

Permalink
设置,获取商户的联系方式 (#658)
Browse files Browse the repository at this point in the history
* 设置,获取商户的联系方式

商户获取授权链接之前,需要先设置商户的联系方式

* 修正帮助链接

修正帮助链接

* 格式化代码

Co-authored-by: 山西清水欧度信息技术有限公司 <lin.jun@odooqs.com>
  • Loading branch information
sum1201 and 山西清水欧度信息技术有限公司 committed Aug 8, 2021
1 parent 7f6be81 commit d35fd21
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions wechatpy/client/api/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,43 @@ def update_status(self, card_id, code, reimburse_status):
},
)

def set_contact(self, phone, time_out):
"""
商户获取授权链接之前,需要先设置商户的联系方式
详情请参考
https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Vendor_API_List.html#17
:param phone: 联系电话
:param time_out: 开票超时时间
"""
return self._post(
"setbizattr",
params={
"action": "set_contact",
},
data={
"contact": {
"phone": phone,
"time_out": time_out,
},
},
)

def get_contact(self):
"""
商户获取授权链接之前,需要先设置商户的联系方式
详情请参考
https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/E_Invoice/Vendor_API_List.html#17
"""
return self._post(
"setbizattr",
params={
"action": "get_contact",
},
data={},
)

def set_pay_mch(self, mchid, s_pappid):
"""
关联商户号与开票平台,设置支付后开票
Expand Down

0 comments on commit d35fd21

Please sign in to comment.