Subversion Repositories SmartDukaan

Rev

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

Rev 3126 Rev 3561
Line 22... Line 22...
22
	
22
	
23
	public HdfcPaymentService() {
23
	public HdfcPaymentService() {
24
	
24
	
25
	}
25
	}
26
	
26
	
27
	public long createPayment(long currentCartId, long userId, long txnId, String paymentOption){
27
	public long createPayment(long currentCartId, long userId, long txnId, String paymentOption, long sourceId){
28
		log.info("Creating payment for the txn#: " + txnId + " for the user: " + userId + " for processing through HDFC");
28
		log.info("Creating payment for the txn#: " + txnId + " for the user: " + userId + " for processing through HDFC");
29
		CommonPaymentService cps = new CommonPaymentService();
29
		CommonPaymentService cps = new CommonPaymentService();
30
		if(!cps.createPayment(currentCartId, userId, txnId, gatewayId)){
30
		if(!cps.createPayment(currentCartId, userId, txnId, gatewayId, sourceId)){
31
			log.error("Error while creating the basic payment");
31
			log.error("Error while creating the basic payment");
32
			return PAYMENT_NOT_CREATED;
32
			return PAYMENT_NOT_CREATED;
33
		}else{
33
		}else{
34
			return initializePayment(cps.getPaymentId(), paymentOption);
34
			return initializePayment(cps.getPaymentId(), paymentOption);
35
		}
35
		}