This commit is contained in:
xiafang
2020-12-10 11:18:45 +08:00
parent e5615ad80f
commit 0c6129140f
10 changed files with 146 additions and 94 deletions

View File

@@ -51,27 +51,5 @@ public class WechatPayProperties {
* your pay server domain
*/
private String domain;
/**
* app in winxin open platform
*/
private App app;
}
/**
* wechat mp for send coupons and notification.
*/
@Data
public static class App {
/**
* app id
*/
private String appId;
/**
* app secret
*/
private String appSecret;
}
}

View File

@@ -95,6 +95,8 @@ public class WechatDirectPayApi extends AbstractApi {
WechatPayProperties.V3 v3 = this.wechatMetaBean().getV3();
payParams.setAppid(v3.getAppId());
payParams.setMchid(v3.getMchId());
String notifyUrl = v3.getDomain().concat(payParams.getNotifyUrl());
payParams.setNotifyUrl(notifyUrl);
URI uri = UriComponentsBuilder.fromHttpUrl(type.uri(WeChatServer.CHINA))
.build()
.toUri();