🐛 修复微信服务商支付分实现部分接口请求地址错误的问题

This commit is contained in:
尹兴明1 2023-07-03 08:14:23 +00:00 committed by Binary Wang
parent 9203f78f50
commit 6cce17cb2e
2 changed files with 8 additions and 2 deletions

View File

@ -35,6 +35,12 @@ public class WxPartnerPayScoreRequest extends WxPayScoreRequest {
@SerializedName("sub_mchid") @SerializedName("sub_mchid")
private String subMchid; private String subMchid;
/**
* 子商户公众号下的用户表示sub_openid
*/
@SerializedName("sub_openid")
private String subOpenid;
/** /**
* [收付通子商户申请绑定支付分服务]的商户系统内部服务订单号 * [收付通子商户申请绑定支付分服务]的商户系统内部服务订单号
*/ */

View File

@ -105,7 +105,7 @@ public class PartnerPayScoreServiceImpl implements PartnerPayScoreService {
if (StringUtils.isBlank(subMchid)) { if (StringUtils.isBlank(subMchid)) {
throw new WxPayException("sub_mchid不允许都为空"); throw new WxPayException("sub_mchid不允许都为空");
} }
String url = String.format("%s/v3/payscore/partner/permissions/openid/%s", this.payService.getPayBaseUrl(), openId); String url = String.format("%s/v3/payscore/partner/permissions/search?", this.payService.getPayBaseUrl(), openId);
URIBuilder uriBuilder; URIBuilder uriBuilder;
try { try {
uriBuilder = new URIBuilder(url); uriBuilder = new URIBuilder(url);
@ -140,7 +140,7 @@ public class PartnerPayScoreServiceImpl implements PartnerPayScoreService {
if (StringUtils.isAllEmpty(openId, subOpenid) || !StringUtils.isAnyEmpty(openId, subOpenid)) { if (StringUtils.isAllEmpty(openId, subOpenid) || !StringUtils.isAnyEmpty(openId, subOpenid)) {
throw new WxPayException("open_id,sub_openid不允许都填写或都不填写"); throw new WxPayException("open_id,sub_openid不允许都填写或都不填写");
} }
String url = String.format("%s/v3/payscore/partner/permissions/openid/%s/terminate", this.payService.getPayBaseUrl(), openId); String url = String.format("%s/v3/payscore/partner/permissions/terminate", this.payService.getPayBaseUrl(), openId);
Map<String, Object> map = new HashMap<>(4); Map<String, Object> map = new HashMap<>(4);
map.put("appid", appId); map.put("appid", appId);
map.put("sub_appid", subAppid); map.put("sub_appid", subAppid);