Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
20427 kshitij.so 1
package com.hotspotstore.controllers;
2
 
20529 kshitij.so 3
import java.io.IOException;
4
 
5
import com.hotspotstore.services.VerifyRecaptcha;
20427 kshitij.so 6
import com.hotspotstore.storage.Mongo;
7
 
8
 
9
public class ContactUsController extends BaseController{
10
 
11
	/**
12
	 * 
13
	 */
14
	private static final long serialVersionUID = 1L;
15
	private String result;
20529 kshitij.so 16
	private String gRecaptchaResponse;
20427 kshitij.so 17
 
18
 
20529 kshitij.so 19
	public String getgRecaptchaResponse() {
20
		return gRecaptchaResponse;
21
	}
22
 
23
	public void setgRecaptchaResponse(String gRecaptchaResponse) {
24
		this.gRecaptchaResponse = gRecaptchaResponse;
25
	}
26
 
20427 kshitij.so 27
	public String getResult() {
28
		return result;
29
	}
30
 
31
	public void setResult(String result) {
32
		this.result = result;
33
	}
34
 
35
	public String index(){
36
		return "index";
37
	}
38
 
39
	public String create(){
20529 kshitij.so 40
		try {
41
			boolean verify = VerifyRecaptcha.verify(gRecaptchaResponse);
42
			if (verify){
43
				return "contact-us-success";
44
			}
45
			return "contact-us-failure";
46
 
47
		} catch (IOException e) {
48
			// TODO Auto-generated catch block
49
			return "contact-us-failure";
50
		}
51
 
20427 kshitij.so 52
	}
53
 
54
 
55
}