improving reference logging between bank & us
This commit is contained in:
@@ -57,6 +57,7 @@ public class Transaction extends BaseEntity {
|
|||||||
private String billClientId;
|
private String billClientId;
|
||||||
private String clientSecret;
|
private String clientSecret;
|
||||||
private String aggregatorId;
|
private String aggregatorId;
|
||||||
|
private String paymentProcessorRef;
|
||||||
private String billName;
|
private String billName;
|
||||||
private String billProductName;
|
private String billProductName;
|
||||||
private String paymentProcessorName;
|
private String paymentProcessorName;
|
||||||
|
|||||||
@@ -97,7 +97,20 @@ public class EcocashRemotePaymentProcessor implements TransactionProcessorInterf
|
|||||||
transaction.setResponseCode("00");
|
transaction.setResponseCode("00");
|
||||||
|
|
||||||
LinkedHashMap transactionData = (LinkedHashMap) body.get("transaction");
|
LinkedHashMap transactionData = (LinkedHashMap) body.get("transaction");
|
||||||
transaction.setDebitRef((String) transactionData.get("debitReference"));
|
transaction.setPaymentProcessorRef((String) transactionData.get("debitReference"));
|
||||||
|
|
||||||
|
// getting omni channel rrn from additional data
|
||||||
|
java.util.List<LinkedHashMap> additionalData =
|
||||||
|
(java.util.List<LinkedHashMap>) transactionData.get("additionalData");
|
||||||
|
if (additionalData != null) {
|
||||||
|
for (LinkedHashMap dataItem : additionalData) {
|
||||||
|
if ("Transaction Reference".equals(dataItem.get("name"))) {
|
||||||
|
transaction.setDebitRef((String) dataItem.get("value"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
transactionService.save(transaction);
|
transactionService.save(transaction);
|
||||||
}else{
|
}else{
|
||||||
transaction.setStatus(Status.FAILED);
|
transaction.setStatus(Status.FAILED);
|
||||||
@@ -146,7 +159,19 @@ public class EcocashRemotePaymentProcessor implements TransactionProcessorInterf
|
|||||||
transaction.setTargetUrl((String) body.get("targetUrl"));
|
transaction.setTargetUrl((String) body.get("targetUrl"));
|
||||||
|
|
||||||
LinkedHashMap transactionData = (LinkedHashMap) body.get("transaction");
|
LinkedHashMap transactionData = (LinkedHashMap) body.get("transaction");
|
||||||
transaction.setDebitRef((String) transactionData.get("debitReference"));
|
transaction.setPaymentProcessorRef((String) transactionData.get("debitReference"));
|
||||||
|
|
||||||
|
// getting omni channel rrn from additional data
|
||||||
|
java.util.List<LinkedHashMap> additionalData =
|
||||||
|
(java.util.List<LinkedHashMap>) transactionData.get("additionalData");
|
||||||
|
if (additionalData != null) {
|
||||||
|
for (LinkedHashMap dataItem : additionalData) {
|
||||||
|
if ("Transaction Reference".equals(dataItem.get("name"))) {
|
||||||
|
transaction.setDebitRef((String) dataItem.get("value"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
transactionService.save(transaction);
|
transactionService.save(transaction);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ public class MPGSWebPaymentProcessor implements TransactionProcessorInterface {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
LinkedHashMap transactionData = (LinkedHashMap) body.get("transaction");
|
LinkedHashMap transactionData = (LinkedHashMap) body.get("transaction");
|
||||||
transaction.setDebitRef((String) transactionData.get("creditReference"));
|
transaction.setDebitRef((String) transactionData.get("debitReference"));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.info("Notification not yet posted at the bank");
|
logger.info("Notification not yet posted at the bank");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user