mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 19:45:09 +08:00
update 汇付参数移动到配置文件
This commit is contained in:
@@ -54,6 +54,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.cglib.beans.BeanMap;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -93,6 +94,12 @@ public class MemberService {
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
@Value("${adapay.appId}")
|
||||
private String ADAPAY_APP_ID;
|
||||
|
||||
@Value("${adapay.callback}")
|
||||
private String ADAPAY_CALLBACK_URL;
|
||||
|
||||
/**
|
||||
* 校验短信验证码
|
||||
* @param dto
|
||||
@@ -450,14 +457,14 @@ public class MemberService {
|
||||
CreateAdaPaymentParam createAdaPaymentParam = new CreateAdaPaymentParam();
|
||||
createAdaPaymentParam.setOrder_no(IdUtils.fastSimpleUUID());
|
||||
createAdaPaymentParam.setPay_amt(AdapayUtil.formatAmount(dto.getAmount()));
|
||||
createAdaPaymentParam.setApp_id("app_d0c80cb1-ffc8-48cb-a030-fe9bec823aaa"); // todo 后面移动到配置文件中
|
||||
createAdaPaymentParam.setApp_id(ADAPAY_APP_ID); // 移动到配置文件中
|
||||
createAdaPaymentParam.setPay_channel("wx_lite"); // todo 如果以后有支付宝等别的渠道,这里需要做修改,判断是什么渠道的请求
|
||||
createAdaPaymentParam.setGoods_title("余额");
|
||||
createAdaPaymentParam.setGoods_desc("会员充值余额");
|
||||
// createAdaPaymentParam.setDescription("充电费用3");
|
||||
createAdaPaymentParam.setExpend(JSONObject.toJSONString( ImmutableMap.of("open_id", dto.getOpenId())));
|
||||
//异步通知地址,url为http/https路径,服务器POST回调,URL 上请勿附带参数
|
||||
createAdaPaymentParam.setNotify_url("https://api.jsowellcloud.com/uniapp/pay/adapayCallback");
|
||||
createAdaPaymentParam.setNotify_url(ADAPAY_CALLBACK_URL);
|
||||
Map<String, String> map = Maps.newHashMap();
|
||||
map.put("type", ScenarioEnum.BALANCE.getValue());
|
||||
map.put("memberId", dto.getMemberId());
|
||||
|
||||
Reference in New Issue
Block a user