添加设备商城支付
This commit is contained in:
@@ -190,7 +190,7 @@ public class AliPayController {
|
||||
|
||||
@PostMapping("/orderPay")
|
||||
@ResponseBody
|
||||
public Result<Object> orderPay(String authCode,String orderNumber) {
|
||||
public Result<Object> orderPay(String authCode,String orderNumber,String appId) {
|
||||
if(StringUtil.isEmpty(authCode)){
|
||||
return ResultGenerator.genFailResult("授权码信息为空");
|
||||
}
|
||||
@@ -198,7 +198,7 @@ public class AliPayController {
|
||||
return ResultGenerator.genFailResult("订单号为空");
|
||||
}
|
||||
AlipaySystemOauthTokenResponse tokenResponse = AliUtil.getAliUserIdV2(authCode, ParametersUtil.ZY_PRI, ParametersUtil.ZY_PUB, ParametersUtil.ZY_ALI_APP_ID);
|
||||
return apiPayService.orderPay(tokenResponse.getUserId(),orderNumber);
|
||||
return apiPayService.orderPay(tokenResponse.getUserId(),orderNumber,appId);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -199,7 +199,8 @@ public class ApiPayController {
|
||||
public Result<Object> orderPay(@RequestBody JSONObject params) {
|
||||
String userId = params.getString("userId");
|
||||
String orderNumber = params.getString("orderNumber");
|
||||
return apiPayService.orderPay(userId,orderNumber);
|
||||
|
||||
return apiPayService.orderPay(userId,orderNumber,null);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -485,7 +485,8 @@ public class WechantController {
|
||||
System.out.println("openid"+openid);
|
||||
String orderNumber = params.getString("orderNumber");
|
||||
System.out.println("orderNumber"+orderNumber);
|
||||
return apiPayService.orderPay(openid,orderNumber);
|
||||
String appId=params.containsKey("appId")?params.getString("appId"):null;
|
||||
return apiPayService.orderPay(openid,orderNumber,appId);
|
||||
}
|
||||
|
||||
@PostMapping("/getAddress")
|
||||
|
||||
Reference in New Issue
Block a user