1
0
mirror of synced 2025-12-24 02:57:55 +08:00

#629 修复WxPayOrderNotifyResult解析xml报错问题

This commit is contained in:
Binary Wang
2018-06-20 00:00:02 +08:00
parent ba7905a205
commit a10007a68e
2 changed files with 21 additions and 17 deletions

View File

@@ -12,7 +12,7 @@ import org.testng.annotations.*;
*/
public class WxPayOrderNotifyResultTest {
@Test
public void testFromXML() throws Exception {
public void testFromXML() {
String xmlString = "<xml>\n" +
" <appid><![CDATA[wx2421b1c4370ec43b]]></appid>\n" +
" <attach><![CDATA[支付测试]]></attach>\n" +
@@ -32,12 +32,12 @@ public class WxPayOrderNotifyResultTest {
" <trade_type><![CDATA[JSAPI]]></trade_type>\n" +
" <transaction_id><![CDATA[1004400740201409030005092168]]></transaction_id>\n" +
" <coupon_count>2</coupon_count>\n" +
" <coupon_type_0><![CDATA[CASH]]></coupon_type_0>\n" +
" <coupon_id_0>10000</coupon_id_0>\n" +
" <coupon_fee_0>100</coupon_fee_0>\n" +
" <coupon_type_1><![CDATA[NO_CASH]]></coupon_type_1>\n" +
" <coupon_id_1>10001</coupon_id_1>\n" +
" <coupon_fee_1>200</coupon_fee_1>\n" +
" <coupon_type_0><![CDATA[CASH]]></coupon_type_0>\n" +
" <coupon_id_0>10000</coupon_id_0>\n" +
" <coupon_fee_0>100</coupon_fee_0>\n" +
"</xml>";
WxPayOrderNotifyResult result = WxPayOrderNotifyResult.fromXML(xmlString);