Subversion Repositories SmartDukaan

Rev

Rev 20427 | Rev 20530 | 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;
import com.hotspotstore.storage.Mongo;


public class ContactUsController extends BaseController{

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


        public String getgRecaptchaResponse() {
                return gRecaptchaResponse;
        }

        public void setgRecaptchaResponse(String gRecaptchaResponse) {
                this.gRecaptchaResponse = gRecaptchaResponse;
        }

        public String getResult() {
                return result;
        }

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

        public String index(){
                return "index";
        }
        
        public String create(){
                try {
                        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";
                }
                
        }


}