加入积分系统,将充值与积分关联

This commit is contained in:
2024-03-06 20:56:22 +08:00
parent ee96759832
commit e84d800ba0
16 changed files with 234 additions and 34 deletions

View File

@@ -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");
}