Subversion Repositories SmartDukaan

Rev

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

Rev 682 Rev 693
Line 61... Line 61...
61
		String email = "";
61
		String email = "";
62
		String contactNumber = "";
62
		String contactNumber = "";
63
		String billingAddress = "";
63
		String billingAddress = "";
64
		String merchantInfo = "";
64
		String merchantInfo = "";
65
		String amount;
65
		String amount;
66
		
66
		long txnId;
67
		try{
67
		try{
68
			amount = request.getParameter("amount");
68
			amount = request.getParameter("amount");
69
		}catch(Exception e){
69
		}catch(Exception e){
70
			amount = (new Double(Utils.getPaymentAmount(userinfo.getCartId()))).toString();
70
			amount = (new Double(Utils.getPaymentAmount(userinfo.getCartId()))).toString();
71
		}
71
		}
-
 
72
		txnId = Long.parseLong(request.getParameter("tranid"));
72
		
73
		
73
		// May be we can use some utils function to get the prices in cart but it is better to get price from post form
74
		// May be we can use some utils function to get the prices in cart but it is better to get price from post form
74
		
75
		
75
		long paymentId = 0;
76
		long paymentId = 0;
76
		in.shop2020.payments.PaymentService.Client client = paymentServiceClient.getClient();
77
		in.shop2020.payments.PaymentService.Client client = paymentServiceClient.getClient();
77
	
78
	
78
		
79
		
79
		try {
80
		try {
-
 
81
			
80
			paymentId = client.createPayment(userinfo.getUserId(), userinfo.getCartId(), Double.parseDouble(amount), 1);
82
			paymentId = client.createPayment(userinfo.getUserId(), Double.parseDouble(amount), 1, txnId);
81
		} catch (NumberFormatException e1) {
83
		} catch (NumberFormatException e1) {
82
			// TODO Auto-generated catch block
84
			// TODO Auto-generated catch block
83
			e1.printStackTrace();
85
			e1.printStackTrace();
84
		} catch (PaymentException e1) {
86
		} catch (PaymentException e1) {
85
			// TODO Auto-generated catch block
87
			// TODO Auto-generated catch block