Subversion Repositories SmartDukaan

Rev

Rev 517 | Rev 719 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package in.shop2020.serving.controllers;

import in.shop2020.thrift.clients.PaymentServiceClient;

import org.apache.struts2.rest.DefaultHttpHeaders;
import org.apache.struts2.rest.HttpHeaders;

public class PayErrorController extends BaseController{
        public static String AMOUNT = "amount";
        public static String TRACKID = "trackid";
        public static String TRACKID_CANCELLED = "trackId";
        public static String RESULT = "ErrorText";
        public static String AUTH = "auth";
        public static String TRANID = "tranid";
        public static String PAYMENTID = "paymentId";
        public static String REF = "ref";
        public static String POSTDATE = "postdate";
        public static String CANCELED = "CANCELED";
        public static String APPROVED = "APPROVED";
        public static String CAPTURED = "CAPTURED";
        
        
        String amount;
        String trackId;
        String result;
        String paymentId;
        
        PaymentServiceClient pclient = null;
        
        public PayErrorController(){
                try {
                        pclient = new PaymentServiceClient();
                } catch (Exception e) {
                        e.printStackTrace();
                }
        }
        
        public String index(){
                amount = this.request.getParameter(AMOUNT);
                paymentId = this.request.getParameter(PAYMENTID);
                trackId = this.request.getParameter(TRACKID);
                result = this.request.getParameter(RESULT);
                
                return "";
        }
        
        public String getErrorText(){
                return result;
        }

}