Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
428 ashish 1
package in.shop2020.serving.controllers;
2
 
3
import in.shop2020.thrift.clients.PaymentServiceClient;
4
 
5
import org.apache.struts2.rest.DefaultHttpHeaders;
6
import org.apache.struts2.rest.HttpHeaders;
7
 
517 rajveer 8
public class PayErrorController extends BaseController{
428 ashish 9
	public static String AMOUNT = "amount";
10
	public static String TRACKID = "trackid";
11
	public static String TRACKID_CANCELLED = "trackId";
12
	public static String RESULT = "ErrorText";
13
	public static String AUTH = "auth";
14
	public static String TRANID = "tranid";
15
	public static String PAYMENTID = "paymentId";
16
	public static String REF = "ref";
17
	public static String POSTDATE = "postdate";
18
	public static String CANCELED = "CANCELED";
19
	public static String APPROVED = "APPROVED";
20
	public static String CAPTURED = "CAPTURED";
21
 
22
 
23
	String amount;
24
	String trackId;
25
	String result;
26
	String paymentId;
27
 
28
	PaymentServiceClient pclient = null;
29
 
517 rajveer 30
	public PayErrorController(){
428 ashish 31
		try {
32
			pclient = new PaymentServiceClient();
33
		} catch (Exception e) {
34
			// TODO Auto-generated catch block
35
			e.printStackTrace();
36
		}
37
	}
38
 
39
	public HttpHeaders show(){
40
		amount = this.request.getParameter(AMOUNT);
41
		paymentId = this.request.getParameter(PAYMENTID);
42
		trackId = this.request.getParameter(TRACKID);
43
		result = this.request.getParameter(RESULT);
44
 
45
		return new DefaultHttpHeaders("err");
46
	}
47
 
48
	public String getErrorText(){
49
		return result;
50
	}
51
 
52
}