Subversion Repositories SmartDukaan

Rev

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

Rev 4141 Rev 4253
Line 235... Line 235...
235
		refund.setAttempts(0);
235
		refund.setAttempts(0);
236
		return refundHandler.createRefund(refund);
236
		return refundHandler.createRefund(refund);
237
    }
237
    }
238
	
238
	
239
    @Override
239
    @Override
240
    public boolean capturePayment(long merchantTxnId) throws PaymentException, TException {
240
    public synchronized boolean capturePayment(long merchantTxnId) throws PaymentException, TException {
241
        logger.info("Attempting to capture payment corresponding to our transaction " + merchantTxnId);
241
        logger.info("Attempting to capture payment corresponding to our transaction " + merchantTxnId);
242
        List<in.shop2020.payment.domain.Payment> payments = paymentHandler.getPaymentForTxn(merchantTxnId);
242
        List<in.shop2020.payment.domain.Payment> payments = paymentHandler.getPaymentForTxn(merchantTxnId);
243
        if(payments ==null || payments.isEmpty())
243
        if(payments ==null || payments.isEmpty())
244
            throw new PaymentException(104, "No payments found corresponding to the merchant txn " + merchantTxnId);
244
            throw new PaymentException(104, "No payments found corresponding to the merchant txn " + merchantTxnId);
245
        
245