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