🐛 #1161 微信支付修复EntPayRequest类的toString方法问题

This commit is contained in:
Binary Wang 2019-08-18 10:13:13 +08:00
parent d1586aec25
commit ecc407a6e9
2 changed files with 21 additions and 5 deletions

View File

@ -25,6 +25,8 @@ import me.chanjar.weixin.common.util.json.WxGsonBuilder;
@AllArgsConstructor @AllArgsConstructor
@XStreamAlias("xml") @XStreamAlias("xml")
public class EntPayRequest extends BaseWxPayRequest { public class EntPayRequest extends BaseWxPayRequest {
private static final long serialVersionUID = 8647710192770447579L;
/** /**
* <pre> * <pre>
* 字段名公众账号appid. * 字段名公众账号appid.
@ -189,11 +191,6 @@ public class EntPayRequest extends BaseWxPayRequest {
this.mchId = mchId; this.mchId = mchId;
} }
@Override
public String toString() {
return WxGsonBuilder.create().toJson(this);
}
@Override @Override
protected String[] getIgnoredParamsForSign() { protected String[] getIgnoredParamsForSign() {
return new String[]{"sign_type"}; return new String[]{"sign_type"};

View File

@ -0,0 +1,19 @@
package com.github.binarywang.wxpay.bean.entpay;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
/**
* .
*
* @author <a href="https://github.com/binarywang">Binary Wang</a>
* @date 2019-08-18
*/
public class EntPayRequestTest {
@Test
public void testToString() {
System.out.println(EntPayRequest.newBuilder().mchId("123").build().toString());
}
}