Subversion Repositories SmartDukaan

Rev

Rev 32917 | Rev 32919 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
32916 amit.gupta 1
package com.spice.profitmandi.web.controller;
2
 
32918 amit.gupta 3
import com.spice.profitmandi.service.smartping.model.CallDetailModel;
32916 amit.gupta 4
import com.spice.profitmandi.web.util.MVCResponseSender;
5
import org.apache.logging.log4j.LogManager;
6
import org.apache.logging.log4j.Logger;
7
import org.springframework.beans.factory.annotation.Autowired;
8
import org.springframework.stereotype.Controller;
9
import org.springframework.ui.Model;
10
import org.springframework.web.bind.annotation.RequestMapping;
11
import org.springframework.web.bind.annotation.RequestMethod;
32918 amit.gupta 12
import org.springframework.web.bind.annotation.RequestParam;
32916 amit.gupta 13
 
14
import javax.servlet.http.HttpServletRequest;
15
import javax.transaction.Transactional;
16
 
17
@Controller
18
@Transactional(rollbackOn = Throwable.class)
19
public class WebHookController {
20
 
21
    @Autowired
22
    MVCResponseSender mvcResponseSender;
23
 
24
    private static final Logger LOGGER = LogManager.getLogger(WebHookController.class);
25
 
26
 
32917 amit.gupta 27
    @RequestMapping(value = "/click2call/report-handler", method = RequestMethod.POST)
32918 amit.gupta 28
    public String click2callReportHandlerPost(HttpServletRequest request, Model model, @RequestParam(name = "push_report") CallDetailModel report) throws Exception {
32917 amit.gupta 29
 
30
        LOGGER.info("Report - {}", report);
31
        model.addAttribute("response1", mvcResponseSender.createResponseString("GODBLESSYOU"));
32
        return "response";
33
    }
32916 amit.gupta 34
}