| Line 279... |
Line 279... |
| 279 |
}
|
279 |
}
|
| 280 |
|
280 |
|
| 281 |
@Override
|
281 |
@Override
|
| 282 |
public synchronized boolean refundPayment(long merchantTxnId, double amount, boolean isDigital) throws PaymentException, TException {
|
282 |
public synchronized boolean refundPayment(long merchantTxnId, double amount, boolean isDigital) throws PaymentException, TException {
|
| 283 |
logger.info("Attempting to refund payment of amount " + amount + " corresponding to our transaction " + merchantTxnId);
|
283 |
logger.info("Attempting to refund payment of amount " + amount + " corresponding to our transaction " + merchantTxnId);
|
| - |
|
284 |
List<in.shop2020.payment.domain.Payment> payments;
|
| - |
|
285 |
if(isDigital){
|
| - |
|
286 |
payments = paymentHandler.getPaymentForRechargeTxn(merchantTxnId);
|
| - |
|
287 |
}else{
|
| 284 |
List<in.shop2020.payment.domain.Payment> payments = paymentHandler.getPaymentForTxn(merchantTxnId);
|
288 |
payments = paymentHandler.getPaymentForTxn(merchantTxnId);
|
| - |
|
289 |
}
|
| 285 |
if(payments ==null || payments.isEmpty())
|
290 |
if(payments ==null || payments.isEmpty())
|
| 286 |
throw new PaymentException(104, "No payments found corresponding to the merchant txn " + merchantTxnId);
|
291 |
throw new PaymentException(104, "No payments found corresponding to the merchant txn " + merchantTxnId);
|
| 287 |
|
292 |
|
| 288 |
if(payments ==null || payments.isEmpty())
|
293 |
if(payments ==null || payments.isEmpty())
|
| 289 |
throw new PaymentException(104, "No payments found corresponding to the merchant txn " + merchantTxnId);
|
294 |
throw new PaymentException(104, "No payments found corresponding to the merchant txn " + merchantTxnId);
|