Skip to content

Instantly share code, notes, and snippets.

@NajeebArif
Created June 10, 2021 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NajeebArif/84d37618ebdf87982d74269e8855147e to your computer and use it in GitHub Desktop.
Save NajeebArif/84d37618ebdf87982d74269e8855147e to your computer and use it in GitHub Desktop.
//...
@PostMapping
public String placeOrder(@RequestParam Double totalAmount, HttpServletRequest request){
final URI returnUrl = buildReturnUrl(request);
CreatedOrder createdOrder = paymentService.createOrder(totalAmount, returnUrl);
return "redirect:"+createdOrder.getApprovalLink();
}
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment