Subversion Repositories SmartDukaan

Rev

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

Rev 507 Rev 517
Line 43... Line 43...
43
import in.shop2020.thrift.clients.ShoppingCartClient;
43
import in.shop2020.thrift.clients.ShoppingCartClient;
44
import in.shop2020.thrift.clients.TransactionServiceClient;
44
import in.shop2020.thrift.clients.TransactionServiceClient;
45
import in.shop2020.thrift.clients.UserContextServiceClient;
45
import in.shop2020.thrift.clients.UserContextServiceClient;
46
import in.shop2020.utils.Logger;
46
import in.shop2020.utils.Logger;
47
 
47
 
48
public class PayresponseController extends BaseController{
48
public class PayResponseController extends BaseController{
49
	public static String AMOUNT = "amount";
49
	public static String AMOUNT = "amount";
50
	public static String TRACKID = "trackid";
50
	public static String TRACKID = "trackid";
51
	public static String TRACKID_CANCELLED = "trackId";
51
	public static String TRACKID_CANCELLED = "trackId";
52
	public static String RESULT = "result";
52
	public static String RESULT = "result";
53
	public static String AUTH = "auth";
53
	public static String AUTH = "auth";
Line 77... Line 77...
77
	long transaction_id = 0;
77
	long transaction_id = 0;
78
	String message = "Unable to process the payment. PLease try Again.";
78
	String message = "Unable to process the payment. PLease try Again.";
79
	
79
	
80
	in.shop2020.payments.Payment pmnt = null;
80
	in.shop2020.payments.Payment pmnt = null;
81
	
81
	
82
	public PayresponseController(){
82
	public PayResponseController(){
83
		super();
83
		super();
84
		try {
84
		try {
85
			pclient = new PaymentServiceClient();
85
			pclient = new PaymentServiceClient();
86
			lsc = new LogisticsServiceClient();
86
			lsc = new LogisticsServiceClient();
87
			cl = new ShoppingCartClient();
87
			cl = new ShoppingCartClient();
Line 134... Line 134...
134
			e.printStackTrace();
134
			e.printStackTrace();
135
		} catch (ShoppingCartException e) {
135
		} catch (ShoppingCartException e) {
136
			// TODO Auto-generated catch block
136
			// TODO Auto-generated catch block
137
			e.printStackTrace();
137
			e.printStackTrace();
138
		}
138
		}
139
		return new DefaultHttpHeaders(result);
139
		return new DefaultHttpHeaders("show");
140
	}
140
	}
141
 
141
 
142
	
142
	
143
	private Transaction getTransaction(){
143
	private Transaction getTransaction(){
144
		try {
144
		try {
Line 290... Line 290...
290
	}
290
	}
291
	return email;
291
	return email;
292
}
292
}
293
 
293
 
294
private Address getAddress(long addressId){
294
private Address getAddress(long addressId){
295
	Set<Address> addresses = null;
295
	List<Address> addresses = null;
296
	try {
296
	try {
297
		addresses = usc.getClient().getPrimaryInfo(pmnt.getUser_id(), false).getAddresses();
297
		addresses = usc.getClient().getPrimaryInfo(pmnt.getUser_id(), false).getAddresses();
298
	} catch (UserContextException e) {
298
	} catch (UserContextException e) {
299
		// TODO Auto-generated catch block
299
		// TODO Auto-generated catch block
300
		e.printStackTrace();
300
		e.printStackTrace();
Line 324... Line 324...
324
		e.printStackTrace();
324
		e.printStackTrace();
325
	}
325
	}
326
 
326
 
327
	String model_name = item.getModelName();
327
	String model_name = item.getModelName();
328
	String model_number = item.getModelNumber();
328
	String model_number = item.getModelNumber();
329
	String brand = item.getManfucturerName();
329
	String brand = item.getManufacturerName();
330
	String sku_id = item.getVendorItemId();
330
	String sku_id = item.getVendorItemId();
331
	double unit_price = item.getSellingPrice();
331
	double unit_price = item.getSellingPrice();
332
	double unit_weight = item.getWeight();
332
	double unit_weight = item.getWeight();
333
	double total_price = item.getSellingPrice();
333
	double total_price = item.getSellingPrice();
334
	double total_weight = item.getWeight();
334
	double total_weight = item.getWeight();