Skip to content

Commit

Permalink
Fix success scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwok-he-Chu committed Nov 16, 2023
1 parent 9badbaa commit 1c43965
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,10 @@ public String result(@PathVariable String type, @PathVariable(required = false)
model.addAttribute("refusalReason", refusalReason);
return "result";
}

@GetMapping("/result/{type}")
public String result(@PathVariable String type, Model model) {
model.addAttribute("type", type);
return "result";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<img th:if="${type == 'success'}" src="/images/thank-you.svg" class="status-image" alt="">

<p class="status-message">
<span th:if="${type == 'success' }">Thank you!</span>
<span th:if="${type == 'success' }">Success!</span>
<span th:if="${type == 'failure' }" th:text="${refusalReason}"></span>
<span th:if="${type == 'failure' }">
Learn how to resolve Terminal API errors and handle declined payments in
Expand Down

0 comments on commit 1c43965

Please sign in to comment.