mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 12:39:05 +08:00
🐛 Fixing a bug. 支付宝支付不维护租户ID
This commit is contained in:
1 parent
64ba722bc5
commit
c78200af7a
4 files changed
+6
-4
No files matched your search
+3
@@ -80,6 +80,7 @@ public class PayConfigParmaInitRunner {
|
||||
.build();
|
||||
|
||||
AliPayApiConfigKit.putApiConfig(aliPayApiConfig);
|
||||
log.info("新增支付宝支付参数 {}", aliPayApiConfig);
|
||||
}
|
||||
|
||||
// 微信支付
|
||||
@@ -104,7 +105,9 @@ public class PayConfigParmaInitRunner {
|
||||
storage.setSecret(params.getStr("secret"));
|
||||
storage.setToken(params.getStr("token"));
|
||||
wxMpService.setWxMpConfigStorage(storage);
|
||||
|
||||
mpServiceMap.put(channel.getAppId(), wxMpService);
|
||||
log.info("新增微信支付参数 {} {}", wx, wxMpService);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ public abstract class AbstractPayNotifyCallbakHandler implements PayNotifyCallba
|
||||
* @param notifyId
|
||||
* @param recordService
|
||||
*/
|
||||
public void saveRecord(Map<String, String> params, String result, PayNotifyRecord record, String notifyId
|
||||
void saveRecord(Map<String, String> params, String result, PayNotifyRecord record, String notifyId
|
||||
, PayNotifyRecordService recordService) {
|
||||
record.setNotifyId(notifyId);
|
||||
String orderNo = params.get(PayConstants.OUT_TRADE_NO);
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ public class AlipayPayNotifyCallbackHandler extends AbstractPayNotifyCallbakHand
|
||||
*/
|
||||
@Override
|
||||
public void before(Map<String, String> params) {
|
||||
Integer tenant = MapUtil.getInt(params, "tenant");
|
||||
Integer tenant = MapUtil.getInt(params, "passback_params");
|
||||
TenantContextHolder.setTenantId(tenant);
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -18,7 +18,6 @@
|
||||
package com.pig4cloud.pigx.pay.handler.impl;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.URLUtil;
|
||||
import cn.hutool.extra.servlet.ServletUtil;
|
||||
import com.alipay.api.AlipayApiException;
|
||||
import com.alipay.api.domain.AlipayTradeWapPayModel;
|
||||
@@ -95,7 +94,7 @@ public class AlipayWapPayOrderHandler extends AbstractPayOrderHandler {
|
||||
//分转成元 并且保留两位
|
||||
model.setTotalAmount(NumberUtil.div(tradeOrder.getAmount(), "100", 2).toString());
|
||||
model.setProductCode(goodsOrder.getGoodsId());
|
||||
model.setPassbackParams(URLUtil.encode(String.format("tenant=%s", TenantContextHolder.getTenantId())));
|
||||
model.setPassbackParams(String.valueOf(TenantContextHolder.getTenantId()));
|
||||
try {
|
||||
AliPayApi.wapPay(response, model, payCommonProperties.getAliPayConfig().getReturnUrl()
|
||||
, payCommonProperties.getAliPayConfig().getNotifyUrl());
|
||||
|
||||
Reference in new issue
Block a user