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