Subversion Repositories SmartDukaan

Rev

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

Rev 2272 Rev 2291
Line 42... Line 42...
42
		return paymentHandler.insertPayment(payment);
42
		return paymentHandler.insertPayment(payment);
43
	}
43
	}
44
 
44
 
45
	@Override
45
	@Override
46
	public List<Payment> getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, TException {
46
	public List<Payment> getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, TException {
-
 
47
		int statusValue = -1;
-
 
48
		if(status != null)
-
 
49
			statusValue = status.getValue();
-
 
50
		else
-
 
51
			statusValue = -1;
47
		return getThriftPayments(paymentHandler.getPaymentsForUser(userId, fromTime, toTime, status.getValue(), gatewayId));
52
		return getThriftPayments(paymentHandler.getPaymentsForUser(userId, fromTime, toTime, statusValue, gatewayId));
48
	}
53
	}
49
 
54
 
50
	@Override
55
	@Override
51
	public List<Payment> getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException,	TException {
56
	public List<Payment> getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException,	TException {
-
 
57
		int statusValue = -1;
-
 
58
		if(status != null)
-
 
59
			statusValue = status.getValue();
-
 
60
		else
-
 
61
			statusValue = -1;
52
		return getThriftPayments(paymentHandler.getPayments(fromTime, toTime, status.getValue(), gatewayId));
62
		return getThriftPayments(paymentHandler.getPayments(fromTime, toTime, statusValue, gatewayId));
53
	}
63
	}
54
 
64
 
55
	@Override
65
	@Override
56
	public PaymentGateway getPaymentGateway(long id) throws PaymentException, TException {
66
	public PaymentGateway getPaymentGateway(long id) throws PaymentException, TException {
57
		//return paymentGatewayHandler.getPaymentGateway(id).getThriftPaymentGateway();
67
		return paymentGatewayHandler.getPaymentGateway(id).getThriftPaymentGateway();
58
		return null;
-
 
59
	}
68
	}
60
 
69
 
61
	@Override
70
	@Override
62
	public Payment getPayment(long id) throws PaymentException, TException {
71
	public Payment getPayment(long id) throws PaymentException, TException {
63
		return paymentHandler.getPayment(id).getThriftPayment();
72
		return paymentHandler.getPayment(id).getThriftPayment();