feat: 充值支持支付宝充值
This commit is contained in:
@@ -23,4 +23,6 @@ public class MemberInDTO {
|
||||
private Integer userCouponId;
|
||||
// 是否使用积分抵扣
|
||||
private Integer pointsNum ;
|
||||
private String payType;
|
||||
|
||||
}
|
||||
|
||||
@@ -1087,6 +1087,11 @@ public class PayService {
|
||||
return Result.fail("支付通道不存在");
|
||||
}
|
||||
|
||||
if ("aliPay".equals(memberInDTO.getPayType()) && StrUtil.isBlank(thirdApply.getAlipaySmallAppid())) {
|
||||
return Result.fail("店铺未配置支付宝小程序appId");
|
||||
}
|
||||
|
||||
|
||||
// 霸王餐活动充值
|
||||
BigDecimal payAmount;
|
||||
TbMemberIn memberIn = new TbMemberIn();
|
||||
@@ -1142,12 +1147,17 @@ public class PayService {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
String smallAppid = thirdApply.getSmallAppid();
|
||||
if ("aliPay".equals(memberInDTO.getPayType())) {
|
||||
smallAppid = thirdApply.getAlipaySmallAppid();
|
||||
}
|
||||
String convertPayType = "aliPay".equals(memberInDTO.getPayType()) ? "ALIPAY" : "WECHAT";
|
||||
String orderNo = DateUtils.getsdfTimesSS();
|
||||
PublicResp<WxScanPayResp> publicResp = thirdPayService
|
||||
.scanpay(thirdUrl, thirdApply.getAppId(),
|
||||
"会员充值", "会员充值", payAmount
|
||||
.multiply(new BigDecimal(100)).longValue(), "WECHAT",
|
||||
thirdApply.getSmallAppid(), memberInDTO.getOpenId(), ip, orderNo, thirdApply.getStoreId(),
|
||||
.multiply(new BigDecimal(100)).longValue(), convertPayType,
|
||||
smallAppid, memberInDTO.getOpenId(), ip, orderNo, thirdApply.getStoreId(),
|
||||
callInBack, null, thirdApply.getAppToken());
|
||||
if (ObjectUtil.isNotNull(publicResp) && ObjectUtil.isNotEmpty(publicResp)) {
|
||||
if ("000000".equals(publicResp.getCode())) {
|
||||
|
||||
Reference in New Issue
Block a user