微信支付
This commit is contained in:
@@ -315,7 +315,13 @@ public class BuyOrderController {
|
|||||||
paymentInfo.setOrderSn(orderSn);
|
paymentInfo.setOrderSn(orderSn);
|
||||||
paymentInfo.setBuyOrderId(buyOrder.getOrderId());
|
paymentInfo.setBuyOrderId(buyOrder.getOrderId());
|
||||||
paymentInfo.setTotalAmount(totalPrice);
|
paymentInfo.setTotalAmount(totalPrice);
|
||||||
paymentInfo.setAppName(buyOrder.getAppName());
|
if (buyOrder.getCome()==2){
|
||||||
|
paymentInfo.setAppName("wumen");
|
||||||
|
} else if (buyOrder.getCome()==1) {
|
||||||
|
paymentInfo.setAppName("zmzm");
|
||||||
|
}else {
|
||||||
|
paymentInfo.setAppName(buyOrder.getAppName());
|
||||||
|
}
|
||||||
wxpayService.prepay(paymentInfo);
|
wxpayService.prepay(paymentInfo);
|
||||||
}
|
}
|
||||||
rabbitTemplate.convertAndSend(
|
rabbitTemplate.convertAndSend(
|
||||||
@@ -554,7 +560,14 @@ public class BuyOrderController {
|
|||||||
paymentInfo.setOrderSn(buyOrderEntity.getOrderSn());
|
paymentInfo.setOrderSn(buyOrderEntity.getOrderSn());
|
||||||
paymentInfo.setBuyOrderId(Integer.valueOf(buyOrderEntity.getProductId()));
|
paymentInfo.setBuyOrderId(Integer.valueOf(buyOrderEntity.getProductId()));
|
||||||
paymentInfo.setTotalAmount(buyOrderEntity.getRealMoney());
|
paymentInfo.setTotalAmount(buyOrderEntity.getRealMoney());
|
||||||
paymentInfo.setAppName(buyOrder.getAppName());
|
// paymentInfo.setAppName(buyOrder.getAppName());
|
||||||
|
if (buyOrder.getCome()==2){
|
||||||
|
paymentInfo.setAppName("wumen");
|
||||||
|
} else if (buyOrder.getCome()==1) {
|
||||||
|
paymentInfo.setAppName("zmzm");
|
||||||
|
}else {
|
||||||
|
paymentInfo.setAppName(buyOrder.getAppName());
|
||||||
|
}
|
||||||
wxpayService.prepay(paymentInfo);
|
wxpayService.prepay(paymentInfo);
|
||||||
}
|
}
|
||||||
rabbitTemplate.convertAndSend(
|
rabbitTemplate.convertAndSend(
|
||||||
|
|||||||
@@ -80,9 +80,6 @@ public class UserVipController {
|
|||||||
String timeId = IdWorker.getTimeId().substring(0, 32);
|
String timeId = IdWorker.getTimeId().substring(0, 32);
|
||||||
buyOrder.setOrderSn(timeId);
|
buyOrder.setOrderSn(timeId);
|
||||||
buyOrder.setUserId(uid);
|
buyOrder.setUserId(uid);
|
||||||
if(buyOrder.getCome()==1){
|
|
||||||
buyOrder.setAppName("zmzm");
|
|
||||||
}
|
|
||||||
buyOrderService.save(buyOrder);
|
buyOrderService.save(buyOrder);
|
||||||
BigDecimal totalPrice = buyOrder.getRealMoney();
|
BigDecimal totalPrice = buyOrder.getRealMoney();
|
||||||
if (Constants.PAYMENT_METHOD_VIRTUAL.equals(buyOrder.getPaymentMethod())) {
|
if (Constants.PAYMENT_METHOD_VIRTUAL.equals(buyOrder.getPaymentMethod())) {
|
||||||
@@ -112,7 +109,14 @@ public class UserVipController {
|
|||||||
paymentInfo.setOrderSn(buyOrderEntity.getOrderSn());
|
paymentInfo.setOrderSn(buyOrderEntity.getOrderSn());
|
||||||
paymentInfo.setBuyOrderId(buyOrderEntity.getOrderId());
|
paymentInfo.setBuyOrderId(buyOrderEntity.getOrderId());
|
||||||
paymentInfo.setTotalAmount(buyOrderEntity.getRealMoney());
|
paymentInfo.setTotalAmount(buyOrderEntity.getRealMoney());
|
||||||
paymentInfo.setAppName(buyOrder.getAppName());
|
// paymentInfo.setAppName(buyOrder.getAppName());
|
||||||
|
if (buyOrder.getCome()==2){
|
||||||
|
paymentInfo.setAppName("wumen");
|
||||||
|
} else if (buyOrder.getCome()==1) {
|
||||||
|
paymentInfo.setAppName("zmzm");
|
||||||
|
}else {
|
||||||
|
paymentInfo.setAppName(buyOrder.getAppName());
|
||||||
|
}
|
||||||
wxpayService.prepay(paymentInfo);
|
wxpayService.prepay(paymentInfo);
|
||||||
}
|
}
|
||||||
rabbitTemplate.convertAndSend(
|
rabbitTemplate.convertAndSend(
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ public class WechatPayConfig implements Serializable {
|
|||||||
private String appId;//fzds
|
private String appId;//fzds
|
||||||
@Value("${wxpay.zmzmappId}")
|
@Value("${wxpay.zmzmappId}")
|
||||||
private String zmzmappId;
|
private String zmzmappId;
|
||||||
|
@Value("${wxpay.wumenappId}")
|
||||||
|
private String wumenappId;
|
||||||
/**
|
/**
|
||||||
* 商户号
|
* 商户号
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -86,6 +86,8 @@ public class WxpayServiceImpl extends ServiceImpl<PayWechatOrderDao, PayWechatOr
|
|||||||
appid = wechatPayConfig.getAppId();
|
appid = wechatPayConfig.getAppId();
|
||||||
}else if ("zmzm".equals(paymentInfo.getAppName())){
|
}else if ("zmzm".equals(paymentInfo.getAppName())){
|
||||||
appid = wechatPayConfig.getZmzmappId();
|
appid = wechatPayConfig.getZmzmappId();
|
||||||
|
} else if ("wumen".equals(paymentInfo.getAppName())) {
|
||||||
|
appid = wechatPayConfig.getWumenappId();
|
||||||
}
|
}
|
||||||
// app id
|
// app id
|
||||||
paramMap.put("appid", appid);
|
paramMap.put("appid", appid);
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ server:
|
|||||||
wxpay:
|
wxpay:
|
||||||
appId: wx47134a8f15083734
|
appId: wx47134a8f15083734
|
||||||
zmzmappId: wx912aa600132dc965
|
zmzmappId: wx912aa600132dc965
|
||||||
|
wumenappId: wx6b17b40171dea988
|
||||||
# wmysappId: wx47134a8f15083734
|
# wmysappId: wx47134a8f15083734
|
||||||
mchId: 1612860909
|
mchId: 1612860909
|
||||||
payUrl: https://api.mch.weixin.qq.com/v3/pay/transactions/app
|
payUrl: https://api.mch.weixin.qq.com/v3/pay/transactions/app
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ server:
|
|||||||
wxpay:
|
wxpay:
|
||||||
appId: wx47134a8f15083734
|
appId: wx47134a8f15083734
|
||||||
zmzmappId: wx912aa600132dc965
|
zmzmappId: wx912aa600132dc965
|
||||||
|
wumenappId: wx6b17b40171dea988
|
||||||
mchId: 1612860909
|
mchId: 1612860909
|
||||||
payUrl: https://api.mch.weixin.qq.com/v3/pay/transactions/app
|
payUrl: https://api.mch.weixin.qq.com/v3/pay/transactions/app
|
||||||
notifyUrl: https://testapi.nuttyreading.com/pay/payNotify
|
notifyUrl: https://testapi.nuttyreading.com/pay/payNotify
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ server:
|
|||||||
wxpay:
|
wxpay:
|
||||||
appId: wx47134a8f15083734
|
appId: wx47134a8f15083734
|
||||||
zmzmappId: wx912aa600132dc965
|
zmzmappId: wx912aa600132dc965
|
||||||
|
wumenappId: wx6b17b40171dea988
|
||||||
mchId: 1612860909
|
mchId: 1612860909
|
||||||
payUrl: https://api.mch.weixin.qq.com/v3/pay/transactions/app
|
payUrl: https://api.mch.weixin.qq.com/v3/pay/transactions/app
|
||||||
notifyUrl: https://api.nuttyreading.com/pay/payNotify
|
notifyUrl: https://api.nuttyreading.com/pay/payNotify
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ server:
|
|||||||
wxpay:
|
wxpay:
|
||||||
appId: wx47134a8f15083734
|
appId: wx47134a8f15083734
|
||||||
zmzmappId: wx912aa600132dc965
|
zmzmappId: wx912aa600132dc965
|
||||||
|
wumenappId: wx6b17b40171dea988
|
||||||
# wmysappId: wx47134a8f15083734
|
# wmysappId: wx47134a8f15083734
|
||||||
mchId: 1612860909
|
mchId: 1612860909
|
||||||
payUrl: https://api.mch.weixin.qq.com/v3/pay/transactions/app
|
payUrl: https://api.mch.weixin.qq.com/v3/pay/transactions/app
|
||||||
|
|||||||
Reference in New Issue
Block a user