现金支付
支付回调
This commit is contained in:
@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("notify")
|
||||
@RequestMapping("/notify")
|
||||
public class NotifyController {
|
||||
private static final String SUCCESS = "SUCCESS";
|
||||
|
||||
@@ -25,7 +25,7 @@ public class NotifyController {
|
||||
private OrderInfoService orderInfoService;
|
||||
|
||||
|
||||
@RequestMapping("payCallBack")
|
||||
@RequestMapping("/payCallBack")
|
||||
public String notifyCallBack(@RequestBody CzgBaseRespParams respParams){
|
||||
JSONObject czg = CzgPayUtils.getCzg(respParams);
|
||||
AssertUtil.isNull(czg, "回调数据为空");
|
||||
|
||||
@@ -28,6 +28,11 @@ public class OrderPayController {
|
||||
private PayService payService;
|
||||
|
||||
|
||||
@PostMapping("/cashPay")
|
||||
public CzgResult<Object> cashPayOrder(@Validated @RequestBody OrderPayParamDTO payParam) {
|
||||
return payService.cashPayOrder(payParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员支付
|
||||
* payType 必填
|
||||
@@ -37,7 +42,7 @@ public class OrderPayController {
|
||||
* <p>
|
||||
* accountPay(小程序使用) 密码支付 用户密码pwd 必填
|
||||
*/
|
||||
@PostMapping("vipPay")
|
||||
@PostMapping("/vipPay")
|
||||
public CzgResult<Object> vipPayOrder(@Validated @RequestBody OrderPayParamDTO payParam) {
|
||||
AssertUtil.isBlank(payParam.getPayType(), "支付类型不可为空");
|
||||
return payService.vipPayOrder(payParam);
|
||||
@@ -46,7 +51,7 @@ public class OrderPayController {
|
||||
/**
|
||||
* h5支付
|
||||
*/
|
||||
@PostMapping("h5Pay")
|
||||
@PostMapping("/h5Pay")
|
||||
public CzgResult<Map<String, Object>> h5PayOrder(HttpServletRequest request, @Validated @RequestBody OrderPayParamDTO payParam) {
|
||||
return payService.h5PayOrder(ServletUtil.getClientIPByHeader(request), payParam);
|
||||
}
|
||||
@@ -57,7 +62,7 @@ public class OrderPayController {
|
||||
* payType 必填 支付方式,aliPay 支付宝,wechatPay 微信
|
||||
* openId 必填
|
||||
*/
|
||||
@PostMapping("jsPay")
|
||||
@PostMapping("/jsPay")
|
||||
public CzgResult<Map<String, Object>> jsPayOrder(HttpServletRequest request, @Validated @RequestBody OrderPayParamDTO payParam) {
|
||||
return payService.jsPayOrder(ServletUtil.getClientIPByHeader(request), payParam);
|
||||
}
|
||||
@@ -67,7 +72,7 @@ public class OrderPayController {
|
||||
* payType 必填 支付方式,aliPay 支付宝,wechatPay 微信
|
||||
* openId 必填
|
||||
*/
|
||||
@PostMapping("ltPayOrder")
|
||||
@PostMapping("/ltPayOrder")
|
||||
public CzgResult<Map<String, Object>> ltPayOrder(HttpServletRequest request, @Validated @RequestBody OrderPayParamDTO payParam) {
|
||||
return payService.ltPayOrder(ServletUtil.getClientIPByHeader(request), payParam);
|
||||
}
|
||||
@@ -75,7 +80,7 @@ public class OrderPayController {
|
||||
/**
|
||||
* 正扫
|
||||
*/
|
||||
@PostMapping("scanPay")
|
||||
@PostMapping("/scanPay")
|
||||
public CzgResult<Map<String, Object>> scanPayOrder(HttpServletRequest request, @Validated @RequestBody OrderPayParamDTO payParam) {
|
||||
return payService.scanPayOrder(ServletUtil.getClientIPByHeader(request), payParam);
|
||||
}
|
||||
@@ -84,7 +89,7 @@ public class OrderPayController {
|
||||
* 反扫
|
||||
* authCode 必填 扫描码
|
||||
*/
|
||||
@PostMapping("microPay")
|
||||
@PostMapping("/microPay")
|
||||
public CzgResult<Map<String, Object>> microPayOrder(@Validated @RequestBody OrderPayParamDTO payParam) {
|
||||
return payService.microPayOrder(payParam);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class VipPayController {
|
||||
* 现金充值
|
||||
* 如果shop_info的 is_member_in_pwd=1 则pwd必填 店铺操作密码
|
||||
*/
|
||||
@PostMapping("cashPayVip")
|
||||
@PostMapping("/cashPayVip")
|
||||
public CzgResult<Object> cashPayVip(@Validated @RequestBody VipPayParamDTO payParam) {
|
||||
AssertUtil.isNull(payParam.getShopUserId(), "充值失败 未指定店铺用户Id");
|
||||
payParam.setPlatformType(ServletUtil.getHeaderIgnoreCase(ServletUtil.getRequest(), "platformType"));
|
||||
@@ -43,7 +43,7 @@ public class VipPayController {
|
||||
* payType 必填 支付方式,aliPay 支付宝,wechatPay 微信
|
||||
* openId 必填
|
||||
*/
|
||||
@PostMapping("jsPayVip")
|
||||
@PostMapping("/jsPayVip")
|
||||
public CzgResult<Map<String, Object>> jsPayVip(HttpServletRequest request, @Validated @RequestBody VipPayParamDTO payParam) {
|
||||
AssertUtil.isNull(payParam.getShopUserId(), "充值失败 未指定店铺用户Id");
|
||||
payParam.setPlatformType(ServletUtil.getHeaderIgnoreCase(ServletUtil.getRequest(), "platformType"));
|
||||
@@ -55,7 +55,7 @@ public class VipPayController {
|
||||
* payType 必填 支付方式,aliPay 支付宝,wechatPay 微信
|
||||
* openId 必填
|
||||
*/
|
||||
@PostMapping("ltPayVip")
|
||||
@PostMapping("/ltPayVip")
|
||||
public CzgResult<Map<String, Object>> ltPayVip(HttpServletRequest request, @Validated @RequestBody VipPayParamDTO payParam) {
|
||||
AssertUtil.isNull(payParam.getShopUserId(), "充值失败 未指定店铺用户Id");
|
||||
payParam.setPlatformType(ServletUtil.getHeaderIgnoreCase(ServletUtil.getRequest(), "platformType"));
|
||||
@@ -65,7 +65,7 @@ public class VipPayController {
|
||||
/**
|
||||
* 正扫
|
||||
*/
|
||||
@PostMapping("scanPayVip")
|
||||
@PostMapping("/scanPayVip")
|
||||
public CzgResult<Map<String, Object>> scanPayVip(HttpServletRequest request, @Validated @RequestBody VipPayParamDTO payParam) {
|
||||
AssertUtil.isNull(payParam.getShopUserId(), "充值失败 未指定店铺用户Id");
|
||||
payParam.setPlatformType(ServletUtil.getHeaderIgnoreCase(ServletUtil.getRequest(), "platformType"));
|
||||
@@ -76,7 +76,7 @@ public class VipPayController {
|
||||
* 反扫
|
||||
* authCode 必填 扫描码
|
||||
*/
|
||||
@PostMapping("microPayVip")
|
||||
@PostMapping("/microPayVip")
|
||||
public CzgResult<Map<String, Object>> microPayVip(@Validated @RequestBody VipPayParamDTO payParam) {
|
||||
AssertUtil.isNull(payParam.getShopUserId(), "充值失败 未指定店铺用户Id");
|
||||
payParam.setPlatformType(ServletUtil.getHeaderIgnoreCase(ServletUtil.getRequest(), "platformType"));
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
* @description
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("admin/order")
|
||||
@RequestMapping("/admin/order")
|
||||
public class AdminOrderController {
|
||||
|
||||
@Resource
|
||||
|
||||
Reference in New Issue
Block a user