🎨 【微信支付】重构分账相关接口,重命名接口方法和请求实体,合并分账v2、v3实现类,方便同时使用
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.github.binarywang.wxpay.bean.profitsharing;
|
||||
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.result.ProfitSharingQueryResult;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package com.github.binarywang.wxpay.bean.profitsharing;
|
||||
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.result.ProfitSharingResult;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class ProfitSharingResultTest {
|
||||
public class ProfitSharingV3ResultTest {
|
||||
|
||||
@Test
|
||||
public void testGetReceiverList() {
|
||||
@@ -1,6 +1,11 @@
|
||||
package com.github.binarywang.wxpay.service.impl;
|
||||
|
||||
import com.github.binarywang.wxpay.bean.notify.SignatureHeader;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.*;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.request.*;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.result.ProfitSharingMerchantRatioQueryResult;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.result.ProfitSharingOrderAmountQueryResult;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.result.ProfitSharingQueryResult;
|
||||
import com.github.binarywang.wxpay.constant.WxPayConstants;
|
||||
import com.github.binarywang.wxpay.exception.WxPayException;
|
||||
import com.github.binarywang.wxpay.service.WxPayService;
|
||||
@@ -52,7 +57,7 @@ public class ProfitSharingServiceImplTest {
|
||||
|
||||
@Test
|
||||
public void testProfitSharingFinish() throws WxPayException {
|
||||
ProfitSharingFinishRequest request = ProfitSharingFinishRequest
|
||||
ProfitSharingUnfreezeRequest request = ProfitSharingUnfreezeRequest
|
||||
.newBuilder()
|
||||
.outOrderNo("20191023103251431856285")
|
||||
.transactionId("4200000441201910238267278073")
|
||||
@@ -140,4 +145,15 @@ public class ProfitSharingServiceImplTest {
|
||||
log.info(this.payService.getProfitSharingService().profitSharingReturnQuery(request).toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testProfitSharingNotifyData() throws WxPayException {
|
||||
SignatureHeader header = new SignatureHeader();
|
||||
header.setSerial("Wechatpay-Serial");
|
||||
header.setTimeStamp("Wechatpay-Timestamp");
|
||||
header.setNonce("Wechatpay-Nonce");
|
||||
header.setSignature("Wechatpay-Signature");
|
||||
String data = "body";
|
||||
log.info(this.payService.getProfitSharingService().parseProfitSharingNotifyResult(data,header).toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
package com.github.binarywang.wxpay.service.impl;
|
||||
|
||||
import com.github.binarywang.wxpay.bean.notify.SignatureHeader;
|
||||
import com.github.binarywang.wxpay.exception.WxPayException;
|
||||
import com.github.binarywang.wxpay.service.WxPayService;
|
||||
import com.github.binarywang.wxpay.testbase.ApiTestModule;
|
||||
import com.google.inject.Inject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.testng.annotations.Guice;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
* 测试类
|
||||
*
|
||||
* @author yuanbo
|
||||
* @since 2022-04-26-22:33 PM
|
||||
*/
|
||||
@Test
|
||||
@Slf4j
|
||||
@Guice(modules = ApiTestModule.class)
|
||||
public class ProfitSharingV3ServiceImplTest {
|
||||
@Inject
|
||||
private WxPayService payService;
|
||||
|
||||
@Test
|
||||
public void testProfitSharingNotifyData() throws WxPayException {
|
||||
SignatureHeader header = new SignatureHeader();
|
||||
header.setSerial("Wechatpay-Serial");
|
||||
header.setTimeStamp("Wechatpay-Timestamp");
|
||||
header.setNonce("Wechatpay-Nonce");
|
||||
header.setSignature("Wechatpay-Signature");
|
||||
String data = "body";
|
||||
log.info(this.payService.getProfitSharingV3Service().getProfitSharingNotifyResult(data,header).toString());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user