|
@@ -57,17 +57,18 @@ public class WeixinPayController extends Controller {
|
|
|
String xmlResult = PaymentApi.pushOrder(params);
|
|
|
|
|
|
System.out.println(xmlResult);
|
|
|
+
|
|
|
Map<String, String> result = PaymentKit.xmlToMap(xmlResult);
|
|
|
|
|
|
String return_code = result.get("return_code");
|
|
|
String return_msg = result.get("return_msg");
|
|
|
if (StrKit.isBlank(return_code) || !"SUCCESS".equals(return_code)) {
|
|
|
- renderText(return_msg+"&return_code error"+return_code);
|
|
|
+ renderText(xmlResult);
|
|
|
return;
|
|
|
}
|
|
|
String result_code = result.get("result_code");
|
|
|
if (StrKit.isBlank(result_code) || !"SUCCESS".equals(result_code)) {
|
|
|
- renderText(return_msg+"&return_code error"+result_code);
|
|
|
+ renderText(xmlResult);
|
|
|
return;
|
|
|
}
|
|
|
// 以下字段在return_code 和result_code都为SUCCESS的时候有返回
|