| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import org.springframework.stereotype.Component;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | |
| | |
|
| | | @Resource
|
| | | private UserCloudManageService userCloudManageService;
|
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | | public static final String TRADE_INDEX = "yufadan-";
|
| | |
|
| | |
| | | UserCloudOrder cloudOrder = userCloudOrderService.addCloudOrder(uid, type);
|
| | | if (cloudOrder == null || cloudOrder.getId() == null)
|
| | | throw new UserCloudException(1, "创建订单信息失败");
|
| | |
|
| | | SystemEnum system=userInfoService.getUserSystem(uid);
|
| | |
|
| | | AlipayTradeWapPayDTO payDTO = new AlipayTradeWapPayDTO();
|
| | | payDTO.setSubject("云发单充值");
|
| | |
| | | payDTO.setProductCode(type);
|
| | | payDTO.setTotalAmount(menuEnum.getMoney() + "");
|
| | | payDTO.setTimeoutExpress("30m");
|
| | | payDTO.setReturnUrl(configService.get(ConfigKeyEnum.cloudAlipayReturnLink.getKey()) +"?id=" +cloudOrder.getId());
|
| | | payDTO.setNotifyUrl(configService.get(ConfigKeyEnum.cloudAlipayNotifyLink.getKey()) +"?id=" +cloudOrder.getId());
|
| | | payDTO.setReturnUrl(configService.getValue(ConfigKeyEnum.cloudAlipayReturnLink.getKey(),system) +"?id=" +cloudOrder.getId());
|
| | | payDTO.setNotifyUrl(configService.getValue(ConfigKeyEnum.cloudAlipayNotifyLink.getKey(),system) +"?id=" +cloudOrder.getId());
|
| | |
|
| | | // 获取支付form
|
| | | return AlipayApi.tradeWapPayRequest(payDTO);
|