File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
main/java/com/github/binarywang/wxpay/bean/request
test/java/com/github/binarywang/wxpay/service/impl Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 44import com .github .binarywang .wxpay .constant .WxPayConstants .TradeType ;
55import com .github .binarywang .wxpay .exception .WxPayException ;
66import com .thoughtworks .xstream .annotations .XStreamAlias ;
7+ import com .thoughtworks .xstream .annotations .XStreamConverter ;
78import lombok .*;
89import lombok .experimental .Accessors ;
910import me .chanjar .weixin .common .annotation .Required ;
11+ import me .chanjar .weixin .common .util .xml .XStreamCDataConverter ;
1012import org .apache .commons .lang3 .StringUtils ;
1113
1214import java .util .Map ;
@@ -111,6 +113,7 @@ public class WxPayUnifiedOrderRequest extends BaseWxPayRequest {
111113 * </pre>
112114 */
113115 @ XStreamAlias ("detail" )
116+ @ XStreamConverter (value = XStreamCDataConverter .class )
114117 private String detail ;
115118
116119 /**
@@ -124,6 +127,7 @@ public class WxPayUnifiedOrderRequest extends BaseWxPayRequest {
124127 * </pre>
125128 */
126129 @ XStreamAlias ("attach" )
130+ @ XStreamConverter (value = XStreamCDataConverter .class )
127131 private String attach ;
128132
129133 /**
Original file line number Diff line number Diff line change @@ -63,12 +63,13 @@ public void testUnifiedOrder() throws WxPayException {
6363 .notifyUrl ("111111" )
6464 .tradeType (TradeType .JSAPI )
6565 .openid (((XmlWxPayConfig ) this .payService .getConfig ()).getOpenid ())
66- .outTradeNo ("1111112" )
66+ .outTradeNo ("111111826" )
67+ .attach ("#*#{\" pn\" :\" 粤B87965\" ,\" aid\" :\" wx123\" }#*#" )
6768 .build ();
6869 request .setSignType (SignType .HMAC_SHA256 );
6970 WxPayUnifiedOrderResult result = this .payService .unifiedOrder (request );
7071 log .info (result .toString ());
71- log .warn (this .payService .getWxApiData ().toString ());
72+ // log.warn(this.payService.getWxApiData().toString());
7273 }
7374
7475 /**
You can’t perform that action at this time.
0 commit comments