From c600a3b76e9503ac99df1fc1e49ca6edf3e44638 Mon Sep 17 00:00:00 2001 From: xiafang Date: Wed, 9 Dec 2020 14:56:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=94=AF=E4=BB=98=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +---- .../felord/payment/wechat/v3/WechatMarketingFavorApi.java | 8 ++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6d76d12..56978d2 100644 --- a/README.md +++ b/README.md @@ -47,10 +47,7 @@ wechat: domain: https://xxxx.xxx.com # 商户 api 证书 必填 cert-path: apiclient_cert.p12 -# 微信服务号 优惠券必须 - mp: - app-id: xxxxxxxxx - app-secret: xxxxxxxxxxxxxxxxxxx + ``` 然后启用`@EnableWechatPay`注解: ```java diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatMarketingFavorApi.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatMarketingFavorApi.java index 427efa2..f393efd 100644 --- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatMarketingFavorApi.java +++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatMarketingFavorApi.java @@ -103,7 +103,7 @@ public class WechatMarketingFavorApi extends AbstractApi { private RequestEntity sendStocksFunction(WechatPayV3Type type, StocksSendParams params) { WechatPayProperties.V3 v3 = this.wechatMetaBean().getV3(); - params.setAppid(v3.getApp().getAppId()); + params.setAppid(v3.getAppId()); params.setStockCreatorMchid(v3.getMchId()); URI uri = UriComponentsBuilder.fromHttpUrl(type.uri(WeChatServer.CHINA)) .build() @@ -265,7 +265,7 @@ public class WechatMarketingFavorApi extends AbstractApi { WechatPayProperties.V3 v3 = this.wechatMetaBean().getV3(); MultiValueMap queryParams = new LinkedMultiValueMap<>(); - queryParams.add("appid", v3.getApp().getAppId()); + queryParams.add("appid", v3.getAppId()); MultiValueMap pathParams = new LinkedMultiValueMap<>(); pathParams.add("openid", params.getOpenId()); @@ -331,7 +331,7 @@ public class WechatMarketingFavorApi extends AbstractApi { WechatPayProperties.V3 v3 = this.wechatMetaBean().getV3(); MultiValueMap queryParams = new LinkedMultiValueMap<>(); - queryParams.add("appid", v3.getApp().getAppId()); + queryParams.add("appid", v3.getAppId()); queryParams.add("creator_mchid", v3.getMchId()); String senderMchId = params.getSenderMchId(); if (StringUtils.hasText(senderMchId)) { @@ -451,7 +451,7 @@ public class WechatMarketingFavorApi extends AbstractApi { * * @param notifyUrl the notify url * @return the wechat response entity - * @see WechatPayCallback#wechatPayCouponCallback(String, ResponseSignVerifyParams, Consumer) WechatPayCallback#wechatPayCouponCallback(ResponseSignVerifyParams, Consumer) + * @see WechatPayCallback#couponCallback(ResponseSignVerifyParams, Consumer) */ public WechatResponseEntity setMarketingFavorCallback(String notifyUrl) { WechatResponseEntity wechatResponseEntity = new WechatResponseEntity<>();