mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 汇付参数移动到配置文件
This commit is contained in:
@@ -50,6 +50,7 @@ import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
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;
|
||||
|
||||
@@ -119,7 +120,14 @@ public class OrderService {
|
||||
|
||||
private List<String> stationIdList = Lists.newArrayList("1", "2");
|
||||
|
||||
private String ADAPAY_APP_ID = "app_d0c80cb1-ffc8-48cb-a030-fe9bec823aaa";
|
||||
@Value("${adapay.appId}")
|
||||
private String ADAPAY_APP_ID;
|
||||
|
||||
@Value("${adapay.callback}")
|
||||
private String ADAPAY_CALLBACK_URL;
|
||||
|
||||
@Value("${adapay.refundCallback}")
|
||||
private String adapay_refund_callback_url;
|
||||
|
||||
/**
|
||||
* 生成订单
|
||||
@@ -262,6 +270,8 @@ public class OrderService {
|
||||
map.put("type", ScenarioEnum.ORDER.getValue());
|
||||
map.put("orderCode", dto.getOrderCode());
|
||||
createAdaPaymentParam.setDescription(JSON.toJSONString(map));
|
||||
//异步通知地址,url为http/https路径,服务器POST回调,URL 上请勿附带参数
|
||||
createAdaPaymentParam.setNotify_url(ADAPAY_CALLBACK_URL);
|
||||
createAdaPaymentParam.setExpend(JSONObject.toJSONString( ImmutableMap.of("open_id", openId)));
|
||||
try {
|
||||
log.info("创建汇付支付参数:{}", JSONObject.toJSONString(createAdaPaymentParam));
|
||||
|
||||
Reference in New Issue
Block a user