Subversion Repositories SmartDukaan

Rev

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

Rev 1959 Rev 2159
Line 69... Line 69...
69
			log.error("Unable to get data from config server.");
69
			log.error("Unable to get data from config server.");
70
		}
70
		}
71
	}
71
	}
72
	
72
	
73
	
73
	
74
	public long createPayment(long currentCartId, long userId, long txnId){
74
	public long createPayment(long currentCartId, long userId, long txnId, String paymentOption){
75
		
75
		
76
		CommonPaymentService cps = new CommonPaymentService();
76
		CommonPaymentService cps = new CommonPaymentService();
77
		if(!cps.createPayment(currentCartId, userId, txnId, gatewayId)){
77
		if(!cps.createPayment(currentCartId, userId, txnId, gatewayId)){
78
			log.error("Error while creating the basic payment");
78
			log.error("Error while creating the basic payment");
79
			return PAYMENT_NOT_CREATED;
79
			return PAYMENT_NOT_CREATED;
Line 95... Line 95...
95
		}
95
		}
96
		
96
		
97
		List<Attribute> attributes = null;
97
		List<Attribute> attributes = null;
98
		try {
98
		try {
99
			attributes = getAttributesAndSetUdfs(txnId);
99
			attributes = getAttributesAndSetUdfs(txnId);
-
 
100
			attributes.add(new Attribute(IPaymentService.PAYMENT_METHOD, paymentOption));
100
		} catch (TransactionServiceException e1) {
101
		} catch (TransactionServiceException e1) {
101
			log.error("Error while setting udfs to payment.");
102
			log.error("Error while setting udfs to payment.");
102
			e1.printStackTrace();
103
			e1.printStackTrace();
103
			return PAYMENT_NOT_CREATED;
104
			return PAYMENT_NOT_CREATED;
104
		} catch (TException e1) {
105
		} catch (TException e1) {