后台接收方法
@RequestMapping(value="/cp/returnstatus") @ResponseBody public String returnstatus(@RequestBody JSONObject object){ String appid = callback(object); backString = PhoneChong.backString("1"); System.out.println("backString:"+backString); return backString; } public String callback(JSONObject object){ JSONObject HEADER=JSONObject.fromObject(object.get("HEADER")); Object version = HEADER.get("VERSION"); Object times = HEADER.get("TIMESTAMP"); Object seqno = HEADER.get("SEQNO"); Object appid = HEADER.get("APPID"); Object secertkey = HEADER.get("SECERTKEY"); JSONObject MSGBODY=JSONObject.fromObject(object.get("MSGBODY")); JSONObject CONTENT=JSONObject.fromObject(MSGBODY.get("CONTENT")); Object RCODE=CONTENT.get("CODE"); Object ORDERID=CONTENT.get("ORDERID"); Object EXTORDER=CONTENT.get("EXTORDER"); Object CHECKTIME=CONTENT.get("CHECKTIME"); Object PRICE=CONTENT.get("PRICE"); Object STATUS=CONTENT.get("STATUS"); return “”; }
原文地址:https://www.cnblogs.com/dztHome/p/10031687.html
时间: 2024-10-18 11:04:26