@Test void validateTAN() { when(paymentRestClient.authorizeCancelPayment(PMT_ID, AUTH_ID, TAN)).thenReturn(getResponse(ScaStatusTO.FINALISED, TransactionStatusTO.CANC, true, true, NO_CONTENT)); when(cmsPsuPisService.updatePaymentStatus(PMT_ID, TransactionStatus.CANC, DEFAULT_SERVICE_INSTANCE_ID)).thenReturn(true); ResponseEntity<Void> result = controller.validateTAN(PMT_ID, AUTH_ID, TAN); assertEquals(ResponseEntity.noContent().build(), result); }
@Override public ResponseEntity<Void> validateTAN(String paymentId, String cancellationId, String authCode) { SCAPaymentResponseTO response = paymentRestClient.authorizeCancelPayment(paymentId, cancellationId, authCode).getBody(); HttpStatus status = resolveStatus(paymentId, response); return new ResponseEntity<>(status); }
ObaCancellationController implements ObaCancellationApi { @Override public ResponseEntity<Void> validateTAN(String paymentId, String cancellationId, String authCode) { SCAPaymentResponseTO response = paymentRestClient.authorizeCancelPayment(paymentId, cancellationId, authCode).getBody(); HttpStatus status = resolveStatus(paymentId, response); return new ResponseEntity<>(status); } }
ObaCancellationController implements ObaCancellationApi { @Override public ResponseEntity<Void> validateTAN(String paymentId, String cancellationId, String authCode) { SCAPaymentResponseTO response = paymentRestClient.authorizeCancelPayment(paymentId, cancellationId, authCode).getBody(); HttpStatus status = resolveStatus(paymentId, response); return new ResponseEntity<>(status); }  }
ObaCancellationController implements ObaCancellationApi { @Override public ResponseEntity<Void> validateTAN(String paymentId, String cancellationId, String authCode) { SCAPaymentResponseTO response = paymentRestClient.authorizeCancelPayment(paymentId, cancellationId, authCode).getBody(); HttpStatus status = resolveStatus(paymentId, response); return new ResponseEntity<>(status); }  @Override ResponseEntity<SCAPaymentResponseTO> initCancellation(String paymentId); @Override ResponseEntity<SCAPaymentResponseTO> selectSca(String paymentId, String cancellationId, String scaMethodId); @Override ResponseEntity<Void> validateTAN(String paymentId, String cancellationId, String authCode); }
ObaCancellationController implements ObaCancellationApi { @Override public ResponseEntity<Void> validateTAN(String paymentId, String cancellationId, String authCode) { SCAPaymentResponseTO response = paymentRestClient.authorizeCancelPayment(paymentId, cancellationId, authCode).getBody(); HttpStatus status = resolveStatus(paymentId, response); return new ResponseEntity<>(status); }  @Override ResponseEntity<SCAPaymentResponseTO> initCancellation(String paymentId); @Override ResponseEntity<SCAPaymentResponseTO> selectSca(String paymentId, String cancellationId, String scaMethodId); @Override ResponseEntity<Void> validateTAN(String paymentId, String cancellationId, String authCode);  }