Skip to content

Commit

Permalink
[PPANTT-81] feat: Updated CreditorInstitutionService, CreditorInstitu…
Browse files Browse the repository at this point in the history
…tionServiceTest, Station
  • Loading branch information
alessio-cialini committed Sep 13, 2024
1 parent 088544a commit 4123e84
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class Station {
@JsonProperty("verify_payment_option_enabled")
private Boolean verifyPaymentOptionEnabled = false;

@JsonProperty("verify_payment_option_endpoint")
private String verifyPaymentOptionEndpoint;
@JsonProperty("rest_endpoint")
private String restEndpoint;

}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public PaymentOptionsResponse getPaymentOptions(

String endpoint = getEndpoint(station);

if (station.getVerifyPaymentOptionEndpoint() == null) {
if (station.getRestEndpoint() == null) {
throw new PaymentOptionsException(AppErrorCodeEnum.ODP_SEMANTICA,
"[Payment Options] Station new verify endpoint not provided");
}
Expand All @@ -65,7 +65,7 @@ public PaymentOptionsResponse getPaymentOptions(
String targetPath;
try {
String[] verifyEndpointParts =
station.getVerifyPaymentOptionEndpoint().split("/", 4);
station.getRestEndpoint().split("/", 4);
targetHost = verifyEndpointParts[0] + verifyEndpointParts[2];
String[] hostSplit = verifyEndpointParts[2].split(":");
targetPort = hostSplit.length > 1 ?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void getPaymentOptionsShouldReturnData() throws MalformedURLException {
.port(8082L)
.build()
)
.verifyPaymentOptionEndpoint("http://localhost:8080/test")
.restEndpoint("http://localhost:8080/test")
.verifyPaymentOptionEnabled(true)
.build()
));
Expand All @@ -77,7 +77,7 @@ void getPaymentOptionsShouldReturnExceptionOnMalformed() throws MalformedURLExce
.port(8082L)
.build()
)
.verifyPaymentOptionEndpoint("http://localhost:8080/test")
.restEndpoint("http://localhost:8080/test")
.verifyPaymentOptionEnabled(true)
.build()
));
Expand All @@ -101,7 +101,7 @@ void getPaymentOptionsShouldReturnExceptionOnMissingEndpoint() throws MalformedU
.port(8082L)
.build()
)
.verifyPaymentOptionEndpoint(null)
.restEndpoint(null)
.verifyPaymentOptionEnabled(true)
.build()
));
Expand All @@ -123,7 +123,7 @@ void getPaymentOptionsShouldReturnExceptionOnBrokerServiceUrl() throws Malformed
.port(8082L)
.build()
)
.verifyPaymentOptionEndpoint(":8080")
.restEndpoint(":8080")
.verifyPaymentOptionEnabled(true)
.build()
));
Expand Down

0 comments on commit 4123e84

Please sign in to comment.