mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🐛 #2338 【微信支付】营销代金券接口修复pause和restart实现的问题
This commit is contained in:
@@ -187,10 +187,10 @@ public interface MarketingFavorService {
|
||||
* </pre>
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @return FavorCallbacksSaveResult 微信返回的结果信息。
|
||||
* @return FavorStocksPauseResult 微信返回的结果信息。
|
||||
* @throws WxPayException the wx pay exception
|
||||
*/
|
||||
FavorStocksStartResult pauseFavorStocksV3(String stockId, FavorStocksSetRequest request) throws WxPayException;
|
||||
FavorStocksPauseResult pauseFavorStocksV3(String stockId, FavorStocksSetRequest request) throws WxPayException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
@@ -200,10 +200,10 @@ public interface MarketingFavorService {
|
||||
* </pre>
|
||||
*
|
||||
* @param request 请求对象
|
||||
* @return FavorCallbacksSaveResult 微信返回的结果信息。
|
||||
* @return FavorStocksRestartResult 微信返回的结果信息。
|
||||
* @throws WxPayException the wx pay exception
|
||||
*/
|
||||
FavorStocksStartResult restartFavorStocksV3(String stockId, FavorStocksSetRequest request) throws WxPayException;
|
||||
FavorStocksRestartResult restartFavorStocksV3(String stockId, FavorStocksSetRequest request) throws WxPayException;
|
||||
|
||||
UseNotifyData parseNotifyData(String data, SignatureHeader header) throws WxPayException;
|
||||
|
||||
|
||||
@@ -154,19 +154,19 @@ public class MarketingFavorServiceImpl implements MarketingFavorService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public FavorStocksStartResult pauseFavorStocksV3(String stockId, FavorStocksSetRequest request) throws WxPayException {
|
||||
String url = String.format("%s/v3/marketing/favor/stocks/%s/start", this.payService.getPayBaseUrl(), stockId);
|
||||
public FavorStocksPauseResult pauseFavorStocksV3(String stockId, FavorStocksSetRequest request) throws WxPayException {
|
||||
String url = String.format("%s/v3/marketing/favor/stocks/%s/pause", this.payService.getPayBaseUrl(), stockId);
|
||||
RsaCryptoUtil.encryptFields(request, this.payService.getConfig().getVerifier().getValidCertificate());
|
||||
String result = this.payService.postV3WithWechatpaySerial(url, GSON.toJson(request));
|
||||
return GSON.fromJson(result, FavorStocksStartResult.class);
|
||||
return GSON.fromJson(result, FavorStocksPauseResult.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FavorStocksStartResult restartFavorStocksV3(String stockId, FavorStocksSetRequest request) throws WxPayException {
|
||||
String url = String.format("%s/v3/marketing/favor/stocks/%s/start", this.payService.getPayBaseUrl(), stockId);
|
||||
public FavorStocksRestartResult restartFavorStocksV3(String stockId, FavorStocksSetRequest request) throws WxPayException {
|
||||
String url = String.format("%s/v3/marketing/favor/stocks/%s/restart", this.payService.getPayBaseUrl(), stockId);
|
||||
RsaCryptoUtil.encryptFields(request, this.payService.getConfig().getVerifier().getValidCertificate());
|
||||
String result = this.payService.postV3WithWechatpaySerial(url, GSON.toJson(request));
|
||||
return GSON.fromJson(result, FavorStocksStartResult.class);
|
||||
return GSON.fromJson(result, FavorStocksRestartResult.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user