Subversion Repositories SmartDukaan

Rev

Rev 20427 | Rev 20530 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20427 Rev 20529
Line 1... Line 1...
1
package com.hotspotstore.controllers;
1
package com.hotspotstore.controllers;
2
 
2
 
-
 
3
import java.io.IOException;
-
 
4
 
-
 
5
import com.hotspotstore.services.VerifyRecaptcha;
3
import com.hotspotstore.storage.Mongo;
6
import com.hotspotstore.storage.Mongo;
4
 
7
 
5
 
8
 
6
public class ContactUsController extends BaseController{
9
public class ContactUsController extends BaseController{
7
 
10
 
8
	/**
11
	/**
9
	 * 
12
	 * 
10
	 */
13
	 */
11
	private static final long serialVersionUID = 1L;
14
	private static final long serialVersionUID = 1L;
12
	private String result;
15
	private String result;
-
 
16
	private String gRecaptchaResponse;
-
 
17
 
-
 
18
 
-
 
19
	public String getgRecaptchaResponse() {
-
 
20
		return gRecaptchaResponse;
-
 
21
	}
13
 
22
 
-
 
23
	public void setgRecaptchaResponse(String gRecaptchaResponse) {
-
 
24
		this.gRecaptchaResponse = gRecaptchaResponse;
-
 
25
	}
14
 
26
 
15
	public String getResult() {
27
	public String getResult() {
16
		return result;
28
		return result;
17
	}
29
	}
18
 
30
 
Line 23... Line 35...
23
	public String index(){
35
	public String index(){
24
		return "index";
36
		return "index";
25
	}
37
	}
26
	
38
	
27
	public String create(){
39
	public String create(){
-
 
40
		try {
-
 
41
			boolean verify = VerifyRecaptcha.verify(gRecaptchaResponse);
-
 
42
			if (verify){
28
		return "index";
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
		
29
	}
52
	}
30
 
53
 
31
 
54
 
32
}
55
}
33
56