Skip to content

Commit

Permalink
Point to card payment status api
Browse files Browse the repository at this point in the history
  • Loading branch information
dharmendrak committed Dec 13, 2023
1 parent e1e0169 commit 25de75e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ PaymentDto retrieveCardPayment(
@RequestHeader("ServiceAuthorization") String serviceAuthorization
);

@GetMapping("/card-payments/{paymentReference}/statuses")
PaymentDto retrieveCardPaymentStatus(
@PathVariable("paymentReference") String paymentReference,
@RequestHeader("Authorization") String authorization,
@RequestHeader("ServiceAuthorization") String serviceAuthorization
);

@PostMapping(value = "/card-payments/{paymentReference}/cancel")
void cancelCardPayment(
@PathVariable("paymentReference") String paymentReference,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ public CardPaymentServiceRequestResponse createGovPayCardPaymentRequest(
}

public PaymentDto getGovPayCardPaymentStatus(String paymentReference, String authorization) {
return paymentsApi.getGovPayCardPaymentStatus(paymentReference, authorization, authTokenGenerator.generate());
return paymentsApi.retrieveCardPaymentStatus(paymentReference, authorization, authTokenGenerator.generate());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void createGovPayCardPaymentRequest() {
void getGovPayCardPaymentStatus() {
client.getGovPayCardPaymentStatus("payment-reference", "authorisation");
verify(paymentsApi)
.getGovPayCardPaymentStatus("payment-reference", "authorisation", "auth token");
.retrieveCardPaymentStatus("payment-reference", "authorisation", "auth token");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id" : "f4db6fd2-dea4-4a3a-80df-643b2cf1344d",
"name" : "card-payments_rc-1701-0909-0602-0418",
"request" : {
"url" : "/payments/RC-1701-0909-0602-0418",
"url" : "/card-payments/RC-1701-0909-0602-0418/statuses",
"method" : "GET"
},
"response" : {
Expand Down

0 comments on commit 25de75e

Please sign in to comment.