Subversion Repositories SmartDukaan

Rev

Rev 20529 | Rev 20531 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.hotspotstore.controllers;

import java.io.IOException;

import com.hotspotstore.services.VerifyRecaptcha;


public class ContactUsController extends BaseController{

        /**
         * 
         */
        private static final long serialVersionUID = 1L;
        private String result;
        private String gRecaptchaResponse;

        public String getResult() {
                return result;
        }

        public void setResult(String result) {
                this.result = result;
        }

        public String index(){
                return "index";
        }
        
        public String create(){
                try {
                        String gRecaptchaResponse = request.getParameter("g-recaptcha-response");
                        boolean verify = VerifyRecaptcha.verify(gRecaptchaResponse);
                        if (verify){
                                return "contact-us-success";
                        }
                        return "contact-us-failure";
                        
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        return "contact-us-failure";
                }
                
        }


}