| @@ -12,18 +12,11 @@ | |||||
| <artifactId>weixin-java-pay</artifactId> | <artifactId>weixin-java-pay</artifactId> | ||||
| <name>WxJava - PAY Java SDK</name> | <name>WxJava - PAY Java SDK</name> | ||||
| <description>微信支付 Java SDK</description> | <description>微信支付 Java SDK</description> | ||||
| <build> | |||||
| <plugins> | |||||
| <plugin> | |||||
| <groupId>org.apache.maven.plugins</groupId> | |||||
| <artifactId>maven-compiler-plugin</artifactId> | |||||
| <configuration> | |||||
| <source>8</source> | |||||
| <target>8</target> | |||||
| </configuration> | |||||
| </plugin> | |||||
| </plugins> | |||||
| </build> | |||||
| <properties> | |||||
| <maven.compiler.source>1.8</maven.compiler.source> | |||||
| <maven.compiler.target>1.8</maven.compiler.target> | |||||
| </properties> | |||||
| <dependencies> | <dependencies> | ||||
| <dependency> | <dependency> | ||||
| @@ -1,8 +1,11 @@ | |||||
| package com.github.binarywang.wxpay.bean.payscore; | package com.github.binarywang.wxpay.bean.payscore; | ||||
| import com.google.gson.annotations.SerializedName; | import com.google.gson.annotations.SerializedName; | ||||
| import lombok.AllArgsConstructor; | |||||
| import lombok.Builder; | |||||
| import lombok.Data; | import lombok.Data; | ||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||
| import lombok.experimental.Accessors; | |||||
| import java.io.Serializable; | import java.io.Serializable; | ||||
| import java.util.List; | import java.util.List; | ||||
| @@ -11,8 +14,11 @@ import java.util.List; | |||||
| * @author doger.wang | * @author doger.wang | ||||
| * @date 2020/5/12 16:36 | * @date 2020/5/12 16:36 | ||||
| */ | */ | ||||
| @NoArgsConstructor | |||||
| @Data | @Data | ||||
| @Builder | |||||
| @NoArgsConstructor | |||||
| @AllArgsConstructor | |||||
| @Accessors(chain = true) | |||||
| public class WxPayScoreRequest implements Serializable { | public class WxPayScoreRequest implements Serializable { | ||||
| private static final long serialVersionUID = 364764508076146082L; | private static final long serialVersionUID = 364764508076146082L; | ||||
| @@ -144,11 +144,11 @@ public class WxPayServiceApacheHttpImpl extends BaseWxPayServiceImpl { | |||||
| } | } | ||||
| private CloseableHttpClient createApiV3HttpClient() throws WxPayException { | private CloseableHttpClient createApiV3HttpClient() throws WxPayException { | ||||
| CloseableHttpClient apiv3HttpClient = this.getConfig().getApiV3HttpClient(); | |||||
| if (null == apiv3HttpClient) { | |||||
| CloseableHttpClient apiV3HttpClient = this.getConfig().getApiV3HttpClient(); | |||||
| if (null == apiV3HttpClient) { | |||||
| return this.getConfig().initApiV3HttpClient(); | return this.getConfig().initApiV3HttpClient(); | ||||
| } | } | ||||
| return apiv3HttpClient; | |||||
| return apiV3HttpClient; | |||||
| } | } | ||||
| private StringEntity createEntry(String requestStr) { | private StringEntity createEntry(String requestStr) { | ||||
| @@ -1,46 +1,55 @@ | |||||
| package com.github.binarywang.wxpay.service.impl; | package com.github.binarywang.wxpay.service.impl; | ||||
| import com.github.binarywang.wxpay.bean.payscore.WxPayScoreRequest; | |||||
| 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 org.testng.annotations.Guice; | |||||
| import org.testng.annotations.Test; | import org.testng.annotations.Test; | ||||
| import static org.testng.Assert.*; | |||||
| /** | /** | ||||
| * 测试代码,待补充完善. | * 测试代码,待补充完善. | ||||
| * | * | ||||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | * @author <a href="https://github.com/binarywang">Binary Wang</a> | ||||
| * @date 2020-05-19 | * @date 2020-05-19 | ||||
| */ | */ | ||||
| @Test | |||||
| @Guice(modules = ApiTestModule.class) | |||||
| public class PayScoreServiceImplTest { | public class PayScoreServiceImplTest { | ||||
| @Inject | |||||
| private WxPayService payService; | |||||
| @Test | |||||
| public void testCreateServiceOrder() { | |||||
| } | |||||
| @Test | |||||
| public void testCreateServiceOrder() throws WxPayException { | |||||
| this.payService.getPayScoreService().createServiceOrder(WxPayScoreRequest.builder().build()); | |||||
| } | |||||
| @Test | |||||
| public void testQueryServiceOrder() { | |||||
| } | |||||
| @Test | |||||
| public void testQueryServiceOrder() { | |||||
| } | |||||
| @Test | |||||
| public void testCancelServiceOrder() { | |||||
| } | |||||
| @Test | |||||
| public void testCancelServiceOrder() { | |||||
| } | |||||
| @Test | |||||
| public void testModifyServiceOrder() { | |||||
| } | |||||
| @Test | |||||
| public void testModifyServiceOrder() { | |||||
| } | |||||
| @Test | |||||
| public void testCompleteServiceOrder() { | |||||
| } | |||||
| @Test | |||||
| public void testCompleteServiceOrder() { | |||||
| } | |||||
| @Test | |||||
| public void testPayServiceOrder() { | |||||
| } | |||||
| @Test | |||||
| public void testPayServiceOrder() { | |||||
| } | |||||
| @Test | |||||
| public void testSyncServiceOrder() { | |||||
| } | |||||
| @Test | |||||
| public void testSyncServiceOrder() { | |||||
| } | |||||
| @Test | |||||
| public void testDecryptNotifyData() { | |||||
| } | |||||
| @Test | |||||
| public void testDecryptNotifyData() { | |||||
| } | |||||
| } | } | ||||