This commit is contained in:
Lemon
2023-08-16 14:44:10 +08:00
4 changed files with 18 additions and 5 deletions

View File

@@ -599,7 +599,7 @@ public class MemberService {
* @return
*/
public Map<String, Object> rechargeBalanceWithAdapay(WeixinPayDTO dto) {
// 获取支付信息
// 获取支付配置
AbstractAdapayConfig config = AdapayConfigFactory.getConfig(dto.getAppId());
if (config == null) {
throw new BusinessException(ReturnCodeEnum.CODE_ADAPAY_CONFIG_IS_NULL_ERROR);
@@ -624,7 +624,7 @@ public class MemberService {
createAdaPaymentParam.setDescription(JSON.toJSONString(map));
try {
log.info("创建汇付支付参数:{}", JSONObject.toJSONString(createAdaPaymentParam));
Map<String, Object> response = Payment.create(BeanMap.create(createAdaPaymentParam), dto.getAppId());
Map<String, Object> response = Payment.create(BeanMap.create(createAdaPaymentParam), config.getWechatAppId());
log.info("创建汇付支付参数反参:{}", JSONObject.toJSONString(response));
if (response != null && !response.isEmpty()) {
JSONObject jsonObject = JSONObject.parseObject(response.get("expend").toString());