Skip to content

Commit 65eafe9

Browse files
committed
[CC-3020] Adjust method naming.
1 parent 7fcb79a commit 65eafe9

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/main/java/com/unzer/payment/Unzer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ public Sca fetchSCA(String paymentId, String scaId) throws HttpCommunicationExce
559559
* @throws HttpCommunicationException if communication fails
560560
*/
561561
public Authorization authorizeSca(String paymentId, Authorization authorization) throws HttpCommunicationException {
562-
return paymentService.authorizeWithSCA(paymentId, authorization);
562+
return paymentService.authorizeSca(paymentId, authorization);
563563
}
564564

565565
/**
@@ -571,7 +571,7 @@ public Authorization authorizeSca(String paymentId, Authorization authorization)
571571
* @throws HttpCommunicationException if communication fails
572572
*/
573573
public Charge chargeSca(String paymentId, Charge charge) throws HttpCommunicationException {
574-
return paymentService.chargeWithSCA(paymentId, charge);
574+
return paymentService.chargeSca(paymentId, charge);
575575
}
576576

577577
/**

src/main/java/com/unzer/payment/service/PaymentService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ public Sca fetchSCA(String paymentId, String scaId) throws HttpCommunicationExce
525525
* Authorize with SCA - returns Authorization object.
526526
* POST /v1/payments/{paymentId}/sca/authorize
527527
*/
528-
public Authorization authorizeWithSCA(String paymentId, Authorization authorization) throws HttpCommunicationException {
528+
public Authorization authorizeSca(String paymentId, Authorization authorization) throws HttpCommunicationException {
529529
authorization.setPaymentId(paymentId);
530530

531531
String url = urlUtil.getRestUrl() + "payments/" + paymentId + "/sca/authorize";
@@ -547,7 +547,7 @@ public Authorization authorizeWithSCA(String paymentId, Authorization authorizat
547547
* Charge with SCA - returns Charge object.
548548
* POST /v1/payments/{paymentId}/sca/charges
549549
*/
550-
public Charge chargeWithSCA(String paymentId, Charge charge) throws HttpCommunicationException {
550+
public Charge chargeSca(String paymentId, Charge charge) throws HttpCommunicationException {
551551
charge.setPaymentId(paymentId);
552552

553553
String url = urlUtil.getRestUrl() + "payments/" + paymentId + "/sca/charges";

src/test/java/com/unzer/payment/business/payment/ScaTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void sca_fetched_successfully() {
7575
}
7676

7777
@Test
78-
void authorizeWithSCA_returns_authorization() {
78+
void authorizeSca_returns_authorization() {
7979
stubFor(post("/v1/payments/s-pay-123/sca/authorize").willReturn(
8080
jsonResponse(getResponse("authorize-with-sca.json"), 200)));
8181
stubFor(get("/v1/payments/s-pay-123").willReturn(
@@ -96,7 +96,7 @@ void authorizeWithSCA_returns_authorization() {
9696
}
9797

9898
@Test
99-
void chargeWithSCA_returns_charge() {
99+
void chargeSca_returns_charge() {
100100
stubFor(post("/v1/payments/s-pay-123/sca/charges").willReturn(
101101
jsonResponse(getResponse("charge-with-sca.json"), 200)));
102102
stubFor(get("/v1/payments/s-pay-123").willReturn(

0 commit comments

Comments
 (0)