Nabeel-DG-BS
Raja Nabeel 1 year ago
parent 9ae91d1a2f
commit d1594cc07a

@ -32,7 +32,7 @@ public class NotificationService {
String otp = otpRequest.isOtpRequired() ? otpService.generateOtp() : "123456"; String otp = otpRequest.isOtpRequired() ? otpService.generateOtp() : "123456";
Pin pin = new Pin(); Pin pin = new Pin();
final LocalDateTime createDate = LocalDateTime.now(); final LocalDateTime createDate = LocalDateTime.now();
final LocalDateTime expiryDate = LocalDateTime.now().plusMinutes(5); final LocalDateTime expiryDate = LocalDateTime.now().plusMinutes(1);
pin.setPinCreatedate(createDate); pin.setPinCreatedate(createDate);
pin.setPinExpirydate(expiryDate); pin.setPinExpirydate(expiryDate);
pin.setChannelCode(otpRequest.getChannelCode()); pin.setChannelCode(otpRequest.getChannelCode());
@ -44,7 +44,7 @@ public class NotificationService {
pin.setPinstatus("Unverified"); pin.setPinstatus("Unverified");
pin.setUserName(otpRequest.getEmail()); pin.setUserName(otpRequest.getEmail());
pinRepository.save(pin); pinRepository.save(pin);
webClient.post().uri("/notification/otp/email").bodyValue(Map.of("email", otpRequest.getEmail(), "subject", otpRequest.getSubject(), "otp", otp, "userName", otpRequest.getUsername())).retrieve() webClient.post().uri("/notification/otp/email").bodyValue(Map.of("email", otpRequest.getEmail(), "subject", otpRequest.getSubject(), "otp", otp, "userName", otpRequest.getUsername(),"phoneNumber",otpRequest.getPhone())).retrieve()
.onStatus(status -> status.is4xxClientError() || status.is5xxServerError(), clientResponse .onStatus(status -> status.is4xxClientError() || status.is5xxServerError(), clientResponse
-> Mono.error(new RuntimeException("Response has error status."))).bodyToMono(String.class).block(); -> Mono.error(new RuntimeException("Response has error status."))).bodyToMono(String.class).block();
return pin.getPinserial(); return pin.getPinserial();

@ -322,7 +322,7 @@ public class TransactionService {
} }
public Object reverseTransacion(String porOrgacode, String nodeId, String sgtGntrnumber) { public Object reverseTransacion(String porOrgacode, String nodeId, String sgtGntrnumber) {
Object reponse = webClientDepositService.postTransaction(CoreReverseTransaction.builder().sgtGntrtranlink(sgtGntrnumber).nodeId(nodeId).sgtGntrcreateat("2003").build(), UCOURI.CORE_REVERSE_TRANSACTION, porOrgacode); Object reponse = webClientDepositService.postTransaction(CoreReverseTransaction.builder().porOrgacode(porOrgacode).sgtGntrtranlink(sgtGntrnumber).nodeId(nodeId).sgtGntrcreateat("2003").build(), UCOURI.CORE_REVERSE_TRANSACTION, porOrgacode);
TransactionTrail trail = transactionTrailRepository.findByPorOrgacodeAndSgtSentNodeIdAndSgtSentGntrnumber(porOrgacode,nodeId,sgtGntrnumber); TransactionTrail trail = transactionTrailRepository.findByPorOrgacodeAndSgtSentNodeIdAndSgtSentGntrnumber(porOrgacode,nodeId,sgtGntrnumber);
trail.setBatAcnttranReversed(true); trail.setBatAcnttranReversed(true);
trail.setBatAcnttranReceived(true); trail.setBatAcnttranReceived(true);

Loading…
Cancel
Save