|
|
|
@@ -23,10 +23,7 @@ import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.ResponseBody; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import java.util.HashMap; |
|
|
|
@@ -73,15 +70,15 @@ public class TtPayController extends BaseController { |
|
|
|
*/ |
|
|
|
@PostMapping(value = "/orderPay") |
|
|
|
@ResponseBody |
|
|
|
public Map<String,Object> createOrder( HttpServletRequest request){ |
|
|
|
public Map<String,Object> createOrder( @RequestBody Map<String, Object> parameterMap){ |
|
|
|
logger.debug("[" + getIpAddr() + "] TtOrderCallbackController::createOrder"); |
|
|
|
Map<String,Object> resultMap = new HashMap<>(); |
|
|
|
|
|
|
|
String body = ((BodyReaderHttpServletRequestWrapper) request).getBody(); |
|
|
|
logger.info("抖音支付通知-----body{}"+body); |
|
|
|
// String body = ((BodyReaderHttpServletRequestWrapper) request).getBody(); |
|
|
|
logger.info("抖音支付通知-----body{}"+parameterMap); |
|
|
|
try { |
|
|
|
|
|
|
|
Map<String, Object> parameterMap = JSONObject.parseObject(body, Map.class); |
|
|
|
// Map<String, Object> parameterMap = JSONObject.parseObject(body, Map.class); |
|
|
|
|
|
|
|
String timestamp = (String) parameterMap.get("timestamp"); |
|
|
|
String nonce = (String) parameterMap.get("nonce"); |
|
|
|
|