Subversion Repositories SmartDukaan

Rev

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

Rev 6108 Rev 6110
Line 16... Line 16...
16
import in.shop2020.thrift.clients.UserClient;
16
import in.shop2020.thrift.clients.UserClient;
17
import in.shop2020.utils.DataLogger;
17
import in.shop2020.utils.DataLogger;
18
 
18
 
19
import java.text.SimpleDateFormat;
19
import java.text.SimpleDateFormat;
20
import java.util.Date;
20
import java.util.Date;
21
import java.util.HashMap;
-
 
22
import java.util.Map;
21
import java.util.Map;
23
 
22
 
24
import org.apache.log4j.Logger;
23
import org.apache.log4j.Logger;
25
import org.apache.struts2.convention.annotation.InterceptorRef;
-
 
26
import org.apache.struts2.convention.annotation.InterceptorRefs;
-
 
27
import org.apache.thrift.TException;
24
import org.apache.thrift.TException;
28
import org.apache.thrift.transport.TTransportException;
25
import org.apache.thrift.transport.TTransportException;
29
 
26
 
30
public class RechargeResultController extends BaseController {
27
public class RechargeResultController extends BaseController {
31
    private static final long serialVersionUID = 1L;
28
    private static final long serialVersionUID = 1L;
Line 71... Line 68...
71
            log.error("Unable to initialize the client for either payment or transaction or user service", e1);
68
            log.error("Unable to initialize the client for either payment or transaction or user service", e1);
72
        }
69
        }
73
 
70
 
74
 
71
 
75
        merchantPaymentId = Long.parseLong(this.request.getParameter("paymentId"));
72
        merchantPaymentId = Long.parseLong(this.request.getParameter("paymentId"));
76
        String operator = "";
-
 
77
        long txnId;
73
        long txnId;
78
        try {
74
        try {
79
            txnId = paymentServiceClient.getClient().getPayment(merchantPaymentId).getMerchantTxnId();
75
            txnId = paymentServiceClient.getClient().getPayment(merchantPaymentId).getMerchantTxnId();
80
            rechargeOrder = transactionServiceClient.getClient().getRechargeOrdersForTransaction(txnId);
76
            rechargeOrder = transactionServiceClient.getClient().getRechargeOrdersForTransaction(txnId);
81
 
77
 
Line 99... Line 95...
99
            log.error("Transaction service exception. Payment id is" + merchantPaymentId, e);
95
            log.error("Transaction service exception. Payment id is" + merchantPaymentId, e);
100
        } catch (UserAffiliateException e) {
96
        } catch (UserAffiliateException e) {
101
            log.error("Affiliate service exception. Payment id is" + merchantPaymentId, e);
97
            log.error("Affiliate service exception. Payment id is" + merchantPaymentId, e);
102
        }
98
        }
103
 
99
 
104
//        DataLogger.logData(EventType.PAYMENT_SUCCESS, getSessionId(), userinfo.getUserId(), 
-
 
105
//                userinfo.getEmail(), Long.toString(merchantPaymentId), Utils.getItemIdStringFromOrders(orders));
-
 
106
 
-
 
107
        return "index";
100
        return "index";
108
    }
101
    }
109
 
102
 
110
    public String formatPrice(double price)    {
103
    public String formatPrice(double price)    {
111
        return formattingUtils.formatPrice(price);
104
        return formattingUtils.formatPrice(price);