Subversion Repositories SmartDukaan

Rev

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

Rev 6475 Rev 6546
Line 46... Line 46...
46
	private FormattingUtils formattingUtils = new FormattingUtils();
46
	private FormattingUtils formattingUtils = new FormattingUtils();
47
    
47
    
48
	private boolean isShooglooAff  = false;
48
	private boolean isShooglooAff  = false;
49
	
49
	
50
	long merchantPaymentId;
50
	long merchantPaymentId;
-
 
51
	long txnId;
51
	List<Order> orders = null;
52
	List<Order> orders = null;
52
	String message = null;
53
	String message = null;
53
	
54
	
54
	public PaySuccessController(){
55
	public PaySuccessController(){
55
		super();
56
		super();
Line 71... Line 72...
71
		}
72
		}
72
		
73
		
73
	
74
	
74
		merchantPaymentId = Long.parseLong(this.request.getParameter("paymentId"));
75
		merchantPaymentId = Long.parseLong(this.request.getParameter("paymentId"));
75
		
76
		
76
		long txnId;
77
		
77
		try {
78
		try {
78
			txnId = paymentServiceClient.getClient().getPayment(merchantPaymentId).getMerchantTxnId();
79
			txnId = paymentServiceClient.getClient().getPayment(merchantPaymentId).getMerchantTxnId();
79
			orders = transactionServiceClient.getClient().getOrdersForTransaction(txnId, userinfo.getUserId());
80
			orders = transactionServiceClient.getClient().getOrdersForTransaction(txnId, userinfo.getUserId());
80
			Cart cart = userServiceClient.getClient().getCart(userinfo.getCartId());
81
			Cart cart = userServiceClient.getClient().getCart(userinfo.getCartId());
81
			if(cart != null){
82
			if(cart != null){
Line 146... Line 147...
146
	
147
	
147
	public long getMerchantPaymentId() {
148
	public long getMerchantPaymentId() {
148
	    return merchantPaymentId;
149
	    return merchantPaymentId;
149
	}
150
	}
150
	
151
	
-
 
152
	public long getTxnId() {
-
 
153
	    return txnId;
-
 
154
	}
-
 
155
 
151
	public static String formatDate(long timestamp){
156
	public static String formatDate(long timestamp){
152
		SimpleDateFormat dateformat = new SimpleDateFormat("dd MMMM yyyy");
157
		SimpleDateFormat dateformat = new SimpleDateFormat("dd MMMM yyyy");
153
		return dateformat.format(new Date(timestamp));	
158
		return dateformat.format(new Date(timestamp));	
154
	}
159
	}
155
	
160