Rev 822 | Rev 2087 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package in.shop2020.serving.controllers;import java.io.IOException;import java.util.HashMap;import java.util.List;import java.util.Map;import org.apache.struts2.convention.annotation.InterceptorRef;import org.apache.struts2.convention.annotation.InterceptorRefs;import org.apache.struts2.convention.annotation.Result;import org.apache.struts2.convention.annotation.Results;import org.apache.thrift.TException;import in.shop2020.model.v1.order.Order;import in.shop2020.model.v1.order.TransactionServiceException;import in.shop2020.payments.PaymentException;import in.shop2020.thrift.clients.PaymentServiceClient;import in.shop2020.thrift.clients.TransactionServiceClient;import in.shop2020.thrift.clients.UserContextServiceClient;import in.shop2020.utils.Logger;@InterceptorRefs({@InterceptorRef("myDefault"),@InterceptorRef("login")})public class PayErrorController extends BaseController{private static final long serialVersionUID = 1L;PaymentServiceClient pclient = null;TransactionServiceClient tsc = null;UserContextServiceClient usc = null;long merchantPaymentId;List<Order> orders = null;String message = null;public PayErrorController(){super();try {pclient = new PaymentServiceClient();tsc = new TransactionServiceClient();usc = new UserContextServiceClient();} catch (Exception e) {Logger.log("Could not initialize the paymentservice client", this);}}public String index() throws IOException, SecurityException, PaymentException, TException, TransactionServiceException{this.message = "Payment failed at the payment gateway. Please pay again.";merchantPaymentId = Long.parseLong(this.request.getParameter("paymentId"));return "index";}public String getMessage(){return this.message;}}