Subversion Repositories SmartDukaan

Rev

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

Rev 2689 Rev 2708
Line 205... Line 205...
205
		}
205
		}
206
		return redirectURL;
206
		return redirectURL;
207
	}
207
	}
208
	
208
	
209
	@Override
209
	@Override
210
	public Map<String, String> captureHdfcPayment(long merchantPaymentId){
210
	public Map<String, String> captureHdfcPayment(long merchantPaymentId) throws PaymentException, TException {
211
		in.shop2020.payment.domain.Payment payment = paymentHandler.getPayment(merchantPaymentId);
211
		in.shop2020.payment.domain.Payment payment = paymentHandler.getPayment(merchantPaymentId);
212
		return HdfcPaymentHandler.capturePayment(payment);
212
		return HdfcPaymentHandler.capturePayment(payment);
213
	}
213
	}
214
	
214
	
215
	@Override
215
	@Override
-
 
216
	public Map<String, String> captureEbsPayment(long merchantPaymentId) throws PaymentException, TException {
-
 
217
		in.shop2020.payment.domain.Payment payment = paymentHandler.getPayment(merchantPaymentId);
-
 
218
		return EbsPaymentHandler.capturePayment(payment.getAmount(), payment.getGatewayPaymentId());
-
 
219
	}
-
 
220
	
-
 
221
	@Override
216
    public long createRefund(long orderId, long merchantTxnId, double amount) throws PaymentException, TException{
222
    public long createRefund(long orderId, long merchantTxnId, double amount) throws PaymentException, TException{
217
		List<in.shop2020.payment.domain.Payment> payments = paymentHandler.getPaymentForTxn(merchantTxnId);
223
		List<in.shop2020.payment.domain.Payment> payments = paymentHandler.getPaymentForTxn(merchantTxnId);
218
		in.shop2020.payment.domain.Payment payment = null;
224
		in.shop2020.payment.domain.Payment payment = null;
219
		if(payments ==null || payments.isEmpty())
225
		if(payments ==null || payments.isEmpty())
220
			throw new PaymentException(104, "No payments found corresponding to the merchant txn " + merchantTxnId);
226
			throw new PaymentException(104, "No payments found corresponding to the merchant txn " + merchantTxnId);