微信支付增加获取微信的请求和响应数据的方法getWxApiData(),方便使用者获取使用该数据

This commit is contained in:
Binary Wang
2017-08-25 15:08:30 +08:00
committed by Binary Wang
parent bdf7f796e7
commit 077e44534c
7 changed files with 123 additions and 5 deletions

View File

@ -53,6 +53,7 @@ public class WxPayServiceAbstractImplTest {
.outTradeNo("1111112")
.build());
this.logger.info(result.toString());
this.logger.warn(this.payService.getWxApiData().toString());
}
@Test

View File

@ -12,11 +12,16 @@ import java.io.IOException;
import java.io.InputStream;
public class ApiTestModule implements Module {
private static final String TEST_CONFIG_XML = "test-config.xml";
@Override
public void configure(Binder binder) {
try (InputStream is1 = ClassLoader.getSystemResourceAsStream("test-config.xml")) {
XmlWxPayConfig config = this.fromXml(XmlWxPayConfig.class, is1);
try (InputStream inputStream = ClassLoader.getSystemResourceAsStream(TEST_CONFIG_XML)) {
if (inputStream == null) {
throw new RuntimeException("测试配置文件【" + TEST_CONFIG_XML + "】未找到");
}
XmlWxPayConfig config = this.fromXml(XmlWxPayConfig.class, inputStream);
WxPayService wxService = new WxPayServiceImpl();
wxService.setConfig(config);