支付回调测试
This commit is contained in:
@@ -124,6 +124,7 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
.antMatchers(anonymousUrls.get(RequestMethodEnum.ALL.getType()).toArray(new String[0])).permitAll()
|
.antMatchers(anonymousUrls.get(RequestMethodEnum.ALL.getType()).toArray(new String[0])).permitAll()
|
||||||
.antMatchers("/auth/appletsLogin").permitAll()
|
.antMatchers("/auth/appletsLogin").permitAll()
|
||||||
.antMatchers("/api/tbHandover").permitAll()
|
.antMatchers("/api/tbHandover").permitAll()
|
||||||
|
.antMatchers("/notify/fstPay").permitAll()
|
||||||
// 所有请求都需要认证
|
// 所有请求都需要认证
|
||||||
.anyRequest().authenticated()
|
.anyRequest().authenticated()
|
||||||
.and().apply(securityConfigurerAdapter());
|
.and().apply(securityConfigurerAdapter());
|
||||||
|
|||||||
@@ -125,26 +125,19 @@ public class TbPlaceController {
|
|||||||
|
|
||||||
@GetMapping("/payType")
|
@GetMapping("/payType")
|
||||||
@ApiOperation("代客下单 获取支付类型")
|
@ApiOperation("代客下单 获取支付类型")
|
||||||
public ResponseEntity<Object> getPayType(
|
public ResponseEntity<Object> getPayType(@RequestParam Integer shopId) {
|
||||||
@RequestParam Integer shopId
|
|
||||||
) {
|
|
||||||
return ResponseEntity.ok(tbShopTableService.getPayType(shopId));
|
return ResponseEntity.ok(tbShopTableService.getPayType(shopId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/order")
|
@DeleteMapping("/order")
|
||||||
@ApiOperation("代客下单 删除订单")
|
@ApiOperation("代客下单 删除订单")
|
||||||
public ResponseEntity<Object> delete(
|
public ResponseEntity<Object> delete(@Validated @RequestBody DeleteOrderDTO deleteOrderDTO) {
|
||||||
@Validated @RequestBody DeleteOrderDTO deleteOrderDTO
|
|
||||||
) {
|
|
||||||
return ResponseEntity.ok(tbShopTableService.deleteOrder(deleteOrderDTO));
|
return ResponseEntity.ok(tbShopTableService.deleteOrder(deleteOrderDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/pay")
|
@PutMapping("/pay")
|
||||||
@ApiOperation("代客下单 支付订单")
|
@ApiOperation("代客下单 支付订单")
|
||||||
public ResponseEntity<Object> pay(
|
public ResponseEntity<Object> pay(@Validated @RequestBody PayDTO payDTO) {
|
||||||
@Validated @RequestBody PayDTO payDTO
|
|
||||||
) {
|
|
||||||
|
|
||||||
return ResponseEntity.ok(tbShopTableService.pay(payDTO));
|
return ResponseEntity.ok(tbShopTableService.pay(payDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,18 +157,14 @@ public class TbPlaceController {
|
|||||||
|
|
||||||
@PutMapping("/choseCount")
|
@PutMapping("/choseCount")
|
||||||
@ApiOperation("代客下单 选择用餐人数")
|
@ApiOperation("代客下单 选择用餐人数")
|
||||||
public ResponseEntity<Object> choseCount(
|
public ResponseEntity<Object> choseCount(@Validated @RequestBody ChoseCountDTO choseCountDTO) {
|
||||||
@Validated @RequestBody ChoseCountDTO choseCountDTO
|
|
||||||
) {
|
|
||||||
|
|
||||||
return ResponseEntity.ok(tbShopTableService.choseCount(choseCountDTO));
|
return ResponseEntity.ok(tbShopTableService.choseCount(choseCountDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/updateVip")
|
@PutMapping("/updateVip")
|
||||||
@ApiOperation("代客下单 查询购物车 /shop/table")
|
@ApiOperation("代客下单 查询购物车 /shop/table")
|
||||||
public ResponseEntity<Object> updateVip(
|
public ResponseEntity<Object> updateVip(@Validated @RequestBody UpdateVipDTO updateVipDTO) {
|
||||||
@Validated @RequestBody UpdateVipDTO updateVipDTO
|
|
||||||
) {
|
|
||||||
return ResponseEntity.ok(tbShopTableService.updateVip(updateVipDTO));
|
return ResponseEntity.ok(tbShopTableService.updateVip(updateVipDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,9 +179,7 @@ public class TbPlaceController {
|
|||||||
@Log("代客下单 打印菜品单")
|
@Log("代客下单 打印菜品单")
|
||||||
@ApiOperation("代客下单 打印菜品单")
|
@ApiOperation("代客下单 打印菜品单")
|
||||||
@PostMapping("printDishes")
|
@PostMapping("printDishes")
|
||||||
public ResponseEntity<Object> printDishes(
|
public ResponseEntity<Object> printDishes(@Validated @RequestBody BaseTableDTO baseTableDTO) {
|
||||||
@Validated @RequestBody BaseTableDTO baseTableDTO
|
|
||||||
) {
|
|
||||||
return ResponseEntity.ok(tbShopTableService.printDishes(baseTableDTO));
|
return ResponseEntity.ok(tbShopTableService.printDishes(baseTableDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ public class TbPayServiceImpl implements TbPayService {
|
|||||||
private String thirdPayType;
|
private String thirdPayType;
|
||||||
@Value("${thirdPay.url}")
|
@Value("${thirdPay.url}")
|
||||||
private String url;
|
private String url;
|
||||||
@Value("${thirdPay.callBack}")
|
@Value("${thirdPay.notify.fstPay}")
|
||||||
private String callBack;
|
private String fstPayNotify;
|
||||||
|
|
||||||
|
|
||||||
private final TbOrderInfoMapper orderInfoMapper;
|
private final TbOrderInfoMapper orderInfoMapper;
|
||||||
@@ -269,7 +269,7 @@ public class TbPayServiceImpl implements TbPayService {
|
|||||||
reqbody, reqbody,
|
reqbody, reqbody,
|
||||||
BigDecimal.valueOf(payment.getAmount()).setScale(2, RoundingMode.DOWN).multiply(new BigDecimal(100)).longValue(),
|
BigDecimal.valueOf(payment.getAmount()).setScale(2, RoundingMode.DOWN).multiply(new BigDecimal(100)).longValue(),
|
||||||
payType.equals("wechatPay") ? thirdApply.getSmallAppid() : null,
|
payType.equals("wechatPay") ? thirdApply.getSmallAppid() : null,
|
||||||
code, DateUtils.getSsdfTimes(), thirdApply.getStoreId(), callBack, thirdApply.getAppToken());
|
code, DateUtils.getSsdfTimes(), thirdApply.getStoreId(), fstPayNotify, thirdApply.getAppToken());
|
||||||
log.info("响应信息, {}", publicResp);
|
log.info("响应信息, {}", publicResp);
|
||||||
if (ObjectUtil.isNotNull(publicResp) && ObjectUtil.isNotEmpty(publicResp)) {
|
if (ObjectUtil.isNotNull(publicResp) && ObjectUtil.isNotEmpty(publicResp)) {
|
||||||
if ("000000".equals(publicResp.getCode())) {
|
if ("000000".equals(publicResp.getCode())) {
|
||||||
|
|||||||
@@ -212,7 +212,6 @@ public class ThirdPayService {
|
|||||||
) {
|
) {
|
||||||
MainScanReq mainScanReq=null;
|
MainScanReq mainScanReq=null;
|
||||||
if("66bab943ae82f63b50ae3cff".equals(appId)){
|
if("66bab943ae82f63b50ae3cff".equals(appId)){
|
||||||
|
|
||||||
mainScanReq = new MainScanReq(subject, body, amount, subAppId, "cny", authCode, orderNo, storeId, notifyUrl,1,"TA1824003985261588482",null);
|
mainScanReq = new MainScanReq(subject, body, amount, subAppId, "cny", authCode, orderNo, storeId, notifyUrl,1,"TA1824003985261588482",null);
|
||||||
url="https://paymentweb.sxczgkj.cn";
|
url="https://paymentweb.sxczgkj.cn";
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ thirdPay:
|
|||||||
payType: fushangtong
|
payType: fushangtong
|
||||||
callBack: https://cashierclient.sxczgkj.cn/cashier-client/notify/notifyPay
|
callBack: https://cashierclient.sxczgkj.cn/cashier-client/notify/notifyPay
|
||||||
url: https://paymentapi.sxczgkj.cn
|
url: https://paymentapi.sxczgkj.cn
|
||||||
|
notify:
|
||||||
|
fstPay: https://admintestweb.sxczgkj.cn/notify/fstPay
|
||||||
|
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
mapper-locations: classpath:/cn/ysk/cashier/mybatis/mapper/*Mapper.xml
|
mapper-locations: classpath:/cn/ysk/cashier/mybatis/mapper/*Mapper.xml
|
||||||
|
|||||||
Reference in New Issue
Block a user