Subversion Repositories SmartDukaan

Rev

Go to most recent revision | 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
			e.printStackTrace();
35
		}
36
	}
37
 
693 rajveer 38
	public String index(){
428 ashish 39
		amount = this.request.getParameter(AMOUNT);
40
		paymentId = this.request.getParameter(PAYMENTID);
41
		trackId = this.request.getParameter(TRACKID);
42
		result = this.request.getParameter(RESULT);
43
 
693 rajveer 44
		return "";
428 ashish 45
	}
46
 
47
	public String getErrorText(){
48
		return result;
49
	}
50
 
51
}