Skip to content

Commit

Permalink
🐛 #1161 微信支付修复EntPayRequest类的toString方法问题
Browse files Browse the repository at this point in the history
  • Loading branch information
binarywang committed Aug 18, 2019
1 parent d2fc782 commit 5420e57
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
@AllArgsConstructor
@XStreamAlias("xml")
public class EntPayRequest extends BaseWxPayRequest {
private static final long serialVersionUID = 8647710192770447579L;

/**
* <pre>
* 字段名:公众账号appid.
Expand Down Expand Up @@ -189,11 +191,6 @@ public void setMchId(String mchId) {
this.mchId = mchId;
}

@Override
public String toString() {
return WxGsonBuilder.create().toJson(this);
}

@Override
protected String[] getIgnoredParamsForSign() {
return new String[]{"sign_type"};
Expand Down
Original file line number Diff line number Diff line change
@@ -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());
}
}

0 comments on commit 5420e57

Please sign in to comment.