Subversion Repositories SmartDukaan

Rev

Rev 1128 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1128 Rev 3126
Line 20... Line 20...
20
import in.shop2020.model.v1.user.Line;
20
import in.shop2020.model.v1.user.Line;
21
import in.shop2020.model.v1.user.ShoppingCartException;
21
import in.shop2020.model.v1.user.ShoppingCartException;
22
import in.shop2020.payments.Attribute;
22
import in.shop2020.payments.Attribute;
23
import in.shop2020.payments.PaymentStatus;
23
import in.shop2020.payments.PaymentStatus;
24
import in.shop2020.serving.utils.Utils;
24
import in.shop2020.serving.utils.Utils;
25
import in.shop2020.thrift.clients.PaymentServiceClient;
25
import in.shop2020.thrift.clients.PaymentClient;
26
import in.shop2020.thrift.clients.TransactionServiceClient;
26
import in.shop2020.thrift.clients.TransactionClient;
27
import in.shop2020.thrift.clients.UserContextServiceClient;
27
import in.shop2020.thrift.clients.UserClient;
28
import in.shop2020.thrift.clients.config.ConfigClient;
28
import in.shop2020.thrift.clients.config.ConfigClient;
29
 
29
 
30
 
30
 
31
 
31
 
32
import com.aciworldwide.commerce.gateway.plugins.NotEnoughDataException;
32
import com.aciworldwide.commerce.gateway.plugins.NotEnoughDataException;
Line 89... Line 89...
89
			addActionError("We are experiencing some problems. Please try later.");
89
			addActionError("We are experiencing some problems. Please try later.");
90
			log.error("Merchant payment is null. It should not have reached here.");
90
			log.error("Merchant payment is null. It should not have reached here.");
91
			return "shipping-redirect";
91
			return "shipping-redirect";
92
		}
92
		}
93
		
93
		
94
		PaymentServiceClient paymentServiceClient = null;
94
		PaymentClient paymentServiceClient = null;
95
		try {
95
		try {
96
			paymentServiceClient = new PaymentServiceClient();
96
			paymentServiceClient = new PaymentClient();
97
		} catch (Exception e) {
97
		} catch (Exception e) {
98
			e.printStackTrace();
98
			e.printStackTrace();
99
		}
99
		}
100
		
100
		
101
		try {
101
		try {
Line 166... Line 166...
166
	
166
	
167
	
167
	
168
	private double getPaymentAmount(long cartId) throws ShoppingCartException, TException{
168
	private double getPaymentAmount(long cartId) throws ShoppingCartException, TException{
169
		double totalAmount = 0;
169
		double totalAmount = 0;
170
		Cart cart;
170
		Cart cart;
171
		UserContextServiceClient userContextServiceClient = null;
171
		UserClient userContextServiceClient = null;
172
		try {
172
		try {
173
			userContextServiceClient = new UserContextServiceClient();
173
			userContextServiceClient = new UserClient();
174
		} catch (Exception e) {
174
		} catch (Exception e) {
175
			e.printStackTrace();
175
			e.printStackTrace();
176
		}
176
		}
177
		in.shop2020.model.v1.user.UserContextService.Client userClient = userContextServiceClient.getClient();
177
		in.shop2020.model.v1.user.UserContextService.Client userClient = userContextServiceClient.getClient();
178
		cart = userClient.getCart(cartId);
178
		cart = userClient.getCart(cartId);
Line 194... Line 194...
194
		String email = "";
194
		String email = "";
195
		String contactNumber = "";
195
		String contactNumber = "";
196
		
196
		
197
		//get udfs
197
		//get udfs
198
		Transaction transaction;
198
		Transaction transaction;
199
		TransactionServiceClient transactionServiceClient = null;
199
		TransactionClient transactionServiceClient = null;
200
		try {
200
		try {
201
			transactionServiceClient = new TransactionServiceClient();
201
			transactionServiceClient = new TransactionClient();
202
		} catch (Exception e) {
202
		} catch (Exception e) {
203
			// TODO Auto-generated catch block
203
			// TODO Auto-generated catch block
204
			e.printStackTrace();
204
			e.printStackTrace();
205
		}
205
		}
206
		
206