Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Point to card payment status api #65

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading