Subversion Repositories SmartDukaan

Rev

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

Rev 6390 Rev 8942
Line 36... Line 36...
36
		paymentId = cps.getPaymentId();
36
		paymentId = cps.getPaymentId();
37
		
37
		
38
		if(paymentOption != null){
38
		if(paymentOption != null){
39
			List<Attribute> attributes = new ArrayList<Attribute>();
39
			List<Attribute> attributes = new ArrayList<Attribute>();
40
			attributes.add(new Attribute(IPaymentService.PAYMENT_METHOD, paymentOption));
40
			attributes.add(new Attribute(IPaymentService.PAYMENT_METHOD, paymentOption));
-
 
41
			double emiAmount = CommonPaymentService.calculateEmiAmount(paymentOption, cps.getAmount());
-
 
42
	        if(emiAmount > 0){
-
 
43
	        	attributes.add(new Attribute(IPaymentService.EMI_AMOUNT, ""+emiAmount));
41
			
44
	        }			
42
			try {
45
			try {
43
				PaymentClient paymentServiceClient = new PaymentClient();
46
				PaymentClient paymentServiceClient = new PaymentClient();
44
				paymentServiceClient.getClient().updatePaymentDetails(paymentId, null, null, null, null, null, null, null, null, PaymentStatus.INIT, null, attributes);
47
				paymentServiceClient.getClient().updatePaymentDetails(paymentId, null, null, null, null, null, null, null, null, PaymentStatus.INIT, null, attributes);
45
			} catch (Exception e) {
48
			} catch (Exception e) {
46
				log.error("Error while saving payment option attribute", e);
49
				log.error("Error while saving payment option attribute", e);