update 汇付参数移动到配置文件

This commit is contained in:
2023-05-27 14:27:36 +08:00
parent a46b7c30e2
commit 5804bff3d4
4 changed files with 31 additions and 3 deletions

View File

@@ -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));