Created
June 10, 2021 21:25
-
-
Save NajeebArif/6ef797df5263ecb4a6d39c1dfabb0cda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//... | |
private String orderId = ""; | |
@GetMapping | |
public String orderPage(Model model){ | |
model.addAttribute("orderId",orderId); | |
return "order"; | |
} | |
@GetMapping("/capture") | |
public String captureOrder(@RequestParam String token){ | |
//FIXME(Never Do this either put it in proper scope or in DB) | |
orderId = token; | |
paymentService.captureOrder(token); | |
return "redirect:/orders"; | |
} | |
//... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment