| Line 654... |
Line 654... |
| 654 |
} else {
|
654 |
} else {
|
| 655 |
// Success
|
655 |
// Success
|
| 656 |
logger.info("Refund attempt successful for HDFC payment with id: " + merchantPaymentId);
|
656 |
logger.info("Refund attempt successful for HDFC payment with id: " + merchantPaymentId);
|
| 657 |
payment.setDescription("Payment Refunded");
|
657 |
payment.setDescription("Payment Refunded");
|
| 658 |
payment.setGatewayTxnStatus(gatewayStatus);
|
658 |
payment.setGatewayTxnStatus(gatewayStatus);
|
| 659 |
payment.setStatus(PaymentStatus.REFUNDED.getValue());
|
659 |
payment.setStatus(PaymentStatus.REFUNDED.getValue());
|
| - |
|
660 |
payment.setRefundAmount(amount);
|
| 660 |
|
661 |
|
| 661 |
attrMap.put(IPaymentHandler.REFUND_TXN_ID, refundResult.get(IPaymentHandler.REFUND_TXN_ID));
|
662 |
attrMap.put(IPaymentHandler.REFUND_TXN_ID, refundResult.get(IPaymentHandler.REFUND_TXN_ID));
|
| 662 |
attrMap.put(IPaymentHandler.REFUND_REF_ID, refundResult.get(IPaymentHandler.REFUND_REF_ID));
|
663 |
attrMap.put(IPaymentHandler.REFUND_REF_ID, refundResult.get(IPaymentHandler.REFUND_REF_ID));
|
| 663 |
attrMap.put(IPaymentHandler.REFUND_AUTH_ID, refundResult.get(IPaymentHandler.REFUND_AUTH_ID));
|
664 |
attrMap.put(IPaymentHandler.REFUND_AUTH_ID, refundResult.get(IPaymentHandler.REFUND_AUTH_ID));
|
| - |
|
665 |
attrMap.put(IPaymentHandler.REFUND_AMNT, refundResult.get(IPaymentHandler.REFUND_AMNT));
|
| 664 |
|
666 |
|
| 665 |
SimpleDateFormat captureTimeDateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
667 |
SimpleDateFormat captureTimeDateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
| 666 |
attrMap.put(HdfcPaymentHandler.REFUND_TIME, captureTimeDateFormatter.format(new Date()));
|
668 |
attrMap.put(HdfcPaymentHandler.REFUND_TIME, captureTimeDateFormatter.format(new Date()));
|
| 667 |
|
669 |
|
| 668 |
paymentHandler.updatePayment(payment, attrMap);
|
670 |
paymentHandler.updatePayment(payment, attrMap);
|
| 669 |
return true;
|
671 |
return true;
|
| Line 716... |
Line 718... |
| 716 |
// Success
|
718 |
// Success
|
| 717 |
logger.info("Refund attempt successful for HDFC payment with id: " + merchantPaymentId);
|
719 |
logger.info("Refund attempt successful for HDFC payment with id: " + merchantPaymentId);
|
| 718 |
payment.setDescription("Payment Refunded");
|
720 |
payment.setDescription("Payment Refunded");
|
| 719 |
payment.setGatewayTxnStatus(gatewayStatus);
|
721 |
payment.setGatewayTxnStatus(gatewayStatus);
|
| 720 |
payment.setStatus(PaymentStatus.REFUNDED.getValue());
|
722 |
payment.setStatus(PaymentStatus.REFUNDED.getValue());
|
| - |
|
723 |
payment.setRefundAmount(amount);
|
| 721 |
|
724 |
|
| 722 |
attrMap.put(IPaymentHandler.REFUND_TXN_ID, refundResult.get(IPaymentHandler.REFUND_TXN_ID));
|
725 |
attrMap.put(IPaymentHandler.REFUND_TXN_ID, refundResult.get(IPaymentHandler.REFUND_TXN_ID));
|
| 723 |
attrMap.put(IPaymentHandler.REFUND_REF_ID, refundResult.get(IPaymentHandler.REFUND_REF_ID));
|
726 |
attrMap.put(IPaymentHandler.REFUND_REF_ID, refundResult.get(IPaymentHandler.REFUND_REF_ID));
|
| 724 |
attrMap.put(IPaymentHandler.REFUND_AUTH_ID, refundResult.get(IPaymentHandler.REFUND_AUTH_ID));
|
727 |
attrMap.put(IPaymentHandler.REFUND_AUTH_ID, refundResult.get(IPaymentHandler.REFUND_AUTH_ID));
|
| - |
|
728 |
attrMap.put(IPaymentHandler.REFUND_AMNT, refundResult.get(IPaymentHandler.REFUND_AMNT));
|
| 725 |
|
729 |
|
| 726 |
SimpleDateFormat captureTimeDateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
730 |
SimpleDateFormat captureTimeDateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
| 727 |
attrMap.put(HdfcPaymentHandler.REFUND_TIME, captureTimeDateFormatter.format(new Date()));
|
731 |
attrMap.put(HdfcPaymentHandler.REFUND_TIME, captureTimeDateFormatter.format(new Date()));
|
| 728 |
|
732 |
|
| 729 |
paymentHandler.updatePayment(payment, attrMap);
|
733 |
paymentHandler.updatePayment(payment, attrMap);
|
| 730 |
return true;
|
734 |
return true;
|
| Line 771... |
Line 775... |
| 771 |
}else{
|
775 |
}else{
|
| 772 |
//Success
|
776 |
//Success
|
| 773 |
logger.info("Refund attempt successful for EBS payment with id: " + payment.getId());
|
777 |
logger.info("Refund attempt successful for EBS payment with id: " + payment.getId());
|
| 774 |
payment.setGatewayTxnStatus(refundStatus);
|
778 |
payment.setGatewayTxnStatus(refundStatus);
|
| 775 |
payment.setStatus(PaymentStatus.REFUNDED.getValue());
|
779 |
payment.setStatus(PaymentStatus.REFUNDED.getValue());
|
| - |
|
780 |
payment.setRefundAmount(amount);
|
| 776 |
|
781 |
|
| 777 |
attrMap.put(IPaymentHandler.REFUND_TXN_ID, refundResult.get(IPaymentHandler.REFUND_TXN_ID));
|
782 |
attrMap.put(IPaymentHandler.REFUND_TXN_ID, refundResult.get(IPaymentHandler.REFUND_TXN_ID));
|
| 778 |
attrMap.put(IPaymentHandler.REFUND_TIME, refundResult.get(IPaymentHandler.REFUND_TIME));
|
783 |
attrMap.put(IPaymentHandler.REFUND_TIME, refundResult.get(IPaymentHandler.REFUND_TIME));
|
| 779 |
paymentHandler.updatePayment(payment, attrMap);
|
784 |
paymentHandler.updatePayment(payment, attrMap);
|
| 780 |
return true;
|
785 |
return true;
|