Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

Commit

Permalink
Link to the homepage after payment
Browse files Browse the repository at this point in the history
  • Loading branch information
BojanStipic committed Feb 7, 2019
1 parent 909eba9 commit 5e4f94d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ public class TransactionController {
private ArticleService articleService;
@Autowired
RestTemplate restClientSelfSigned;
@Value("${server.url}")
private String serverUrl;
@Value("${gateway.url}")
private String gatewayUrl;

Expand Down Expand Up @@ -67,7 +65,8 @@ public ResponseEntity<?> finalizeTransaction(@PathVariable String token) {
return new ResponseEntity<>(HttpStatus.NOT_FOUND);

transactionService.finalizeArticleTransaction(transaction);
return new ResponseEntity<>("Payment successful. Return to the website: " + serverUrl, HttpStatus.OK);
return new ResponseEntity<>(
"Payment successful. Return to the <a href=\"/\">homepage</a>", HttpStatus.OK);
}

@GetMapping("/error/{token}")
Expand All @@ -77,7 +76,8 @@ public ResponseEntity<?> removeTransaction(@PathVariable String token) {
return new ResponseEntity<>(HttpStatus.NOT_FOUND);

transactionService.removeArticleTransaction(transaction);
return new ResponseEntity<>("Payment unsuccessful. Return to the website: " + serverUrl, HttpStatus.OK);
return new ResponseEntity<>(
"Payment unsuccessful. Return to the <a href=\"/\">homepage</a>", HttpStatus.OK);
}

}

0 comments on commit 5e4f94d

Please sign in to comment.