加入积分系统,将充值与积分关联
This commit is contained in:
@@ -30,9 +30,9 @@ public class PayPalCheckoutController {
|
||||
private CallBackService callBackService;
|
||||
|
||||
@ApiOperation(value = "创建订单")
|
||||
@PostMapping(value = "/trade/{productId}")
|
||||
public Response<HashMap<String, String>> createOrder(@PathVariable Long productId,@RequestParam String returnUrl) throws SerializeException {
|
||||
HashMap<String, String> approvalUrl = payPalCheckoutService.createOrder(productId,returnUrl);
|
||||
@PostMapping(value = "/trade/{amount}")
|
||||
public Response<HashMap<String, String>> createOrder(@PathVariable Integer amount, @RequestParam String returnUrl) throws SerializeException {
|
||||
HashMap<String, String> approvalUrl = payPalCheckoutService.createOrder(amount,returnUrl);
|
||||
return Response.success(approvalUrl);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class PayPalCheckoutController {
|
||||
public Response<String> callback(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
Boolean result = callBackService.doGet(request, response);
|
||||
if (result){
|
||||
return Response.success();
|
||||
return Response.success(200,"success");
|
||||
}else {
|
||||
return Response.fail(500,"failure");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user