mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 10:16:38 +08:00
commit
39c84ca7e3
@ -1,10 +1,12 @@
|
||||
package net.lab1024.smartadmin.module.system.alipay;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alipay.api.AlipayClient;
|
||||
import com.alipay.api.DefaultAlipayClient;
|
||||
import com.alipay.api.domain.AlipayTradePrecreateModel;
|
||||
import com.alipay.api.request.AlipayTradePrecreateRequest;
|
||||
import com.alipay.api.response.AlipayTradePrecreateResponse;
|
||||
import com.alipay.api.request.AlipayTradePagePayRequest;
|
||||
import com.alipay.api.request.AlipayTradeWapPayRequest;
|
||||
import com.alipay.api.response.AlipayTradePagePayResponse;
|
||||
import com.alipay.api.response.AlipayTradeWapPayResponse;
|
||||
import net.lab1024.smartadmin.module.system.alipay.alipayModel.AliPayEntity;
|
||||
import net.lab1024.smartadmin.module.system.alipay.conf.AlipayConfig;
|
||||
import net.lab1024.smartadmin.module.system.royalcanin.good.service.OrderService;
|
||||
@ -12,7 +14,6 @@ import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.QueryEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
public class AliPayService {
|
||||
@ -22,28 +23,48 @@ public class AliPayService {
|
||||
private OrderService orderService;
|
||||
|
||||
|
||||
public String generateQRCode(AliPayEntity aliPayEntity) throws Exception {
|
||||
AlipayTradePrecreateModel model = new AlipayTradePrecreateModel();
|
||||
model.setSubject("皇家宠物食品官方商城");
|
||||
model.setTotalAmount(aliPayEntity.getTotal_amount());
|
||||
model.setStoreId(UUID.randomUUID().toString());
|
||||
model.setTimeoutExpress("3m");
|
||||
model.setOutTradeNo(aliPayEntity.getOut_trade_no());
|
||||
model.setBody(aliPayEntity.getBody());
|
||||
model.setGoodsDetail(aliPayEntity.getGoodsDetail());
|
||||
AlipayTradePrecreateRequest request = new AlipayTradePrecreateRequest();
|
||||
request.setBizModel(model);
|
||||
public String generateOrderPhone(AliPayEntity aliPayEntity) throws Exception {
|
||||
JSONObject bizContent = new JSONObject();
|
||||
bizContent.put("subject","皇家宠物食品官方商城");
|
||||
bizContent.put("total_amount",aliPayEntity.getTotal_amount());
|
||||
bizContent.put("out_trade_no",aliPayEntity.getOut_trade_no());
|
||||
bizContent.put("goods_detail", aliPayEntity.getGoodsDetail());
|
||||
AlipayTradeWapPayRequest request = new AlipayTradeWapPayRequest();
|
||||
request.setBizContent(bizContent.toString());
|
||||
request.setNotifyUrl(AlipayConfig.notify_url);
|
||||
request.setReturnUrl(AlipayConfig.return_url);
|
||||
AlipayClient alipayClient = new DefaultAlipayClient(AlipayConfig.gatewayUrl, AlipayConfig.app_id, AlipayConfig.merchant_private_key, "json", AlipayConfig.charset, AlipayConfig.alipay_public_key, AlipayConfig.sign_type);
|
||||
AlipayTradePrecreateResponse alipayTradePrecreateResponse = alipayClient.execute(request);
|
||||
if (alipayTradePrecreateResponse.isSuccess()) {
|
||||
String code = alipayTradePrecreateResponse.getQrCode();
|
||||
return code;
|
||||
AlipayTradeWapPayResponse alipayTradeWapPayResponse = alipayClient.pageExecute(request);
|
||||
if (alipayTradeWapPayResponse.isSuccess()) {
|
||||
String body = alipayTradeWapPayResponse.getBody();
|
||||
return body;
|
||||
} else {
|
||||
throw new RuntimeException("支付宝生成二维码失败");
|
||||
throw new RuntimeException("支付宝调用失败!");
|
||||
}
|
||||
}
|
||||
|
||||
public String generateOrderPC(AliPayEntity aliPayEntity) throws Exception {
|
||||
JSONObject bizContent = new JSONObject();
|
||||
bizContent.put("subject","皇家宠物食品官方商城");
|
||||
bizContent.put("total_amount",aliPayEntity.getTotal_amount());
|
||||
bizContent.put("out_trade_no",aliPayEntity.getOut_trade_no());
|
||||
bizContent.put("goods_detail", aliPayEntity.getGoodsDetail());
|
||||
AlipayTradePagePayRequest request = new AlipayTradePagePayRequest ();
|
||||
request.setBizContent(bizContent.toString());
|
||||
request.setNotifyUrl(AlipayConfig.notify_url);
|
||||
request.setReturnUrl(AlipayConfig.return_url);
|
||||
AlipayClient alipayClient = new DefaultAlipayClient(AlipayConfig.gatewayUrl, AlipayConfig.app_id, AlipayConfig.merchant_private_key, "json", AlipayConfig.charset, AlipayConfig.alipay_public_key, AlipayConfig.sign_type);
|
||||
|
||||
AlipayTradePagePayResponse alipayTradePagePayResponse = alipayClient.pageExecute(request);
|
||||
if (alipayTradePagePayResponse.isSuccess()) {
|
||||
String body = alipayTradePagePayResponse.getBody();
|
||||
return body;
|
||||
} else {
|
||||
throw new RuntimeException("支付宝调用失败!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void orderCallBackAliPay(String outTradeNo,String totalFee ) throws Exception {
|
||||
if (orderService.afterPaySucceedUpdateOrderStatus(outTradeNo,totalFee)) {
|
||||
QueryEntity queryEntity = new QueryEntity();
|
||||
|
@ -23,6 +23,9 @@ import net.lab1024.smartadmin.module.system.royalcanin.good.service.OrderService
|
||||
import net.lab1024.smartadmin.module.system.royalcanin.memberAccount.MemberAccountChangeEntity;
|
||||
import net.lab1024.smartadmin.module.system.royalcanin.notify.model.NotifyEntity;
|
||||
import net.lab1024.smartadmin.module.system.royalcanin.notify.service.NotifyService;
|
||||
import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.AddOrSaveEntity;
|
||||
import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.OrderCouponEntity;
|
||||
import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.QueryEntity;
|
||||
import net.lab1024.smartadmin.util.MapRemoveNullUtil;
|
||||
import net.lab1024.smartadmin.util.SmartHttpUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -89,88 +92,6 @@ public class AlipayController {
|
||||
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// @RequestMapping("royalcanin/updateOrderAliPay")
|
||||
// public String returnUrl(HttpServletRequest request) throws Exception {
|
||||
// Map<String,String> params = new HashMap<String,String>();
|
||||
// Map<String,String[]> requestParams = request.getParameterMap();
|
||||
// for (Iterator<String> iter = requestParams.keySet().iterator(); iter.hasNext();) {
|
||||
// String name = (String) iter.next();
|
||||
// String[] values = (String[]) requestParams.get(name);
|
||||
// String valueStr = "";
|
||||
// for (int i = 0; i < values.length; i++) {
|
||||
// valueStr = (i == values.length - 1) ? valueStr + values[i]
|
||||
// : valueStr + values[i] + ",";
|
||||
// }
|
||||
// //乱码解决,这段代码在出现乱码时使用(如果感觉自己配置没问题,然后验签一直失败,就把这个注释掉试试,反正我的是这个问题)
|
||||
// //valueStr = new String(valueStr.getBytes("ISO-8859-1"), "utf-8");
|
||||
// params.put(name, valueStr);
|
||||
// }
|
||||
// System.out.println("params:"+params);
|
||||
// boolean signVerified = AlipaySignature.rsaCheckV1(params,AlipayConfig.alipay_public_key,AlipayConfig.charset,AlipayConfig.sign_type); //调用SDK验证签名
|
||||
// System.out.println(signVerified);
|
||||
// //——请在这里编写您的程序(以下代码仅作参考)——
|
||||
// if(signVerified) {
|
||||
// // 更新订单状态
|
||||
// //商户订单号
|
||||
// String out_trade_no = new String(request.getParameter("out_trade_no").getBytes("ISO-8859-1"),"UTF-8");
|
||||
// //付款金额
|
||||
// String total_amount = new String(request.getParameter("total_amount").getBytes("ISO-8859-1"),"UTF-8");
|
||||
//
|
||||
//
|
||||
// //支付宝交易号
|
||||
// String trade_no = new String(request.getParameter("trade_no").getBytes("ISO-8859-1"),"UTF-8");
|
||||
// OrderEntity orderEntity = orderService.findByOrderId(out_trade_no);
|
||||
// String[] products = orderEntity.getProductCode().split(",");
|
||||
// ProductMasterQueryEntity productMasterQueryEntity = new ProductMasterQueryEntity();
|
||||
// double basePoint = 0;
|
||||
// //自动获取会员积分
|
||||
// for (String product : products) {
|
||||
// productMasterQueryEntity.setProductCode(product);
|
||||
// Map<String, String> paramMap = MapRemoveNullUtil.setConditionMap(productMasterQueryEntity);
|
||||
// MapRemoveNullUtil.removeNullEntry(paramMap);
|
||||
// paramMap.put("secret", "H5@2021");
|
||||
// paramMap.put("channelId", "15");
|
||||
// String sb = SmartHttpUtil.sendPostForm(url + "productMaster/query", paramMap, null);
|
||||
// JSONObject jsonObject = JSONObject.parseObject(sb);
|
||||
// com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(jsonObject.getString("data"));
|
||||
// JSONObject jsonObjectData = (JSONObject) jsonArray.get(0);
|
||||
// basePoint = basePoint + Double.parseDouble(jsonObjectData.getString("basePoint"));
|
||||
// }
|
||||
// MemberAccountChangeEntity memberAccountChangeEntity = new MemberAccountChangeEntity();
|
||||
// memberAccountChangeEntity.setChangeTypeId("1");
|
||||
// memberAccountChangeEntity.setChangeValue(StringUtil.toString(basePoint));
|
||||
// memberAccountChangeEntity.setMemberId(orderEntity.getMemberId());
|
||||
// memberAccountService.memberAccountChange(memberAccountChangeEntity);
|
||||
// NotifyEntity notifyEntity = new NotifyEntity();
|
||||
// notifyEntity.setAppId(AlipayConfig.app_id);
|
||||
// notifyEntity.setMchId(request.getParameter("seller_id"));
|
||||
// notifyEntity.setSign(request.getParameter("sign"));
|
||||
// notifyEntity.setResultCode(request.getParameter("code"));
|
||||
// notifyEntity.setOpenid(request.getParameter("merchant_order_no"));
|
||||
// notifyEntity.setOutTradeNo(out_trade_no);
|
||||
// notifyEntity.setTotalFee(total_amount);
|
||||
// notifyEntity.setTradeType(request.getParameter("sub_code"));
|
||||
// notifyEntity.setFeeType("CNY");
|
||||
// notifyEntity.setNonceStr(trade_no);
|
||||
// notifyService.insertNotify(notifyEntity);
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// String trade_status= new String(request.getParameter("trade_status").getBytes("ISO-8859-1"),"UTF-8");
|
||||
// System.out.println("trade_status:"+trade_status);
|
||||
// return "trade_no:"+trade_no+"<br/>out_trade_no:"+out_trade_no+"<br/>total_amount:"+total_amount;
|
||||
// }else {
|
||||
// return "验签失败";
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@RequestMapping("royalcanin/updateOrderAliPay")
|
||||
@ResponseBody
|
||||
public String alipayNotifyNotice(HttpServletRequest request, HttpServletRequest response) throws Exception {
|
||||
@ -215,6 +136,10 @@ public class AlipayController {
|
||||
|
||||
//付款金额
|
||||
String total_amount = new String(request.getParameter("total_amount").getBytes("ISO-8859-1"), "UTF-8");
|
||||
//校验通知中的seller_id
|
||||
String seller_id = new String(request.getParameter("seller_id").getBytes("ISO-8859-1"), "UTF-8");
|
||||
|
||||
|
||||
|
||||
if (trade_status.equals("TRADE_FINISHED")) {
|
||||
return "TRADE_FINISHED";
|
||||
@ -236,20 +161,20 @@ public class AlipayController {
|
||||
// ordersService.updateOrderStatus(out_trade_no, trade_no, total_amount);
|
||||
|
||||
OrderEntity orderEntity = orderService.findByOrderId(out_trade_no);
|
||||
String[] products = orderEntity.getProductCode().split(",");
|
||||
String [] products = orderEntity.getProductCode().split(",");
|
||||
ProductMasterQueryEntity productMasterQueryEntity = new ProductMasterQueryEntity();
|
||||
double basePoint = 0;
|
||||
//自动获取会员积分
|
||||
for (String product : products) {
|
||||
for (String product:products) {
|
||||
productMasterQueryEntity.setProductCode(product);
|
||||
Map<String, String> paramMap = MapRemoveNullUtil.setConditionMap(productMasterQueryEntity);
|
||||
MapRemoveNullUtil.removeNullEntry(paramMap);
|
||||
paramMap.put("secret", "H5@2021");
|
||||
paramMap.put("channelId", "15");
|
||||
String sb = SmartHttpUtil.sendPostForm(url + "productMaster/query", paramMap, null);
|
||||
paramMap.put("secret","H5@2021");
|
||||
paramMap.put("channelId","15");
|
||||
String sb = SmartHttpUtil.sendPostForm(url+"productMaster/query",paramMap,null);
|
||||
JSONObject jsonObject = JSONObject.parseObject(sb);
|
||||
com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(jsonObject.getString("data"));
|
||||
JSONObject jsonObjectData = (JSONObject) jsonArray.get(0);
|
||||
JSONObject jsonObjectData = (JSONObject)jsonArray.get(0);
|
||||
basePoint = basePoint + Double.parseDouble(jsonObjectData.getString("basePoint"));
|
||||
}
|
||||
MemberAccountChangeEntity memberAccountChangeEntity = new MemberAccountChangeEntity();
|
||||
@ -257,18 +182,58 @@ public class AlipayController {
|
||||
memberAccountChangeEntity.setChangeValue(StringUtil.toString(basePoint));
|
||||
memberAccountChangeEntity.setMemberId(orderEntity.getMemberId());
|
||||
memberAccountService.memberAccountChange(memberAccountChangeEntity);
|
||||
|
||||
//更新订单信息
|
||||
QueryEntity queryEntity = new QueryEntity();
|
||||
queryEntity.setOrderNumber(out_trade_no);
|
||||
String orderEntityJson = orderService.query(queryEntity);
|
||||
com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(orderEntityJson);
|
||||
JSONObject jsonObject = (JSONObject)jsonArray.get(0);
|
||||
if(orderEntity != null) {
|
||||
AddOrSaveEntity addOrSaveEntity = new AddOrSaveEntity();
|
||||
addOrSaveEntity.setOrderNumber(out_trade_no);
|
||||
addOrSaveEntity.setPhoneNumber(orderEntity.getPhoneNumber());
|
||||
addOrSaveEntity.setStatus("1");
|
||||
addOrSaveEntity.setOrderDetailList(jsonObject.getString("orderDetailList"));
|
||||
addOrSaveEntity.setDeliveryType(jsonObject.getString("deliveryType"));
|
||||
addOrSaveEntity.setSalesAmount(jsonObject.getString("salesAmount"));
|
||||
addOrSaveEntity.setOrderDate(jsonObject.getString("orderDate"));
|
||||
addOrSaveEntity.setAddressCityName(jsonObject.getString("addressCityName"));
|
||||
addOrSaveEntity.setAddressCountyName(jsonObject.getString("addressCountyName"));
|
||||
addOrSaveEntity.setAddressDetailInfo(jsonObject.getString("addressDetailInfo"));
|
||||
addOrSaveEntity.setAddressPhoneNumber(jsonObject.getString("addressPhoneNumber"));
|
||||
addOrSaveEntity.setAddressProvinceName(jsonObject.getString("addressProvinceName"));
|
||||
addOrSaveEntity.setAddressUserName(jsonObject.getString("addressUserName"));
|
||||
addOrSaveEntity.setPaymentAmount(total_amount);
|
||||
addOrSaveEntity.setPaymentToken(trade_no);
|
||||
addOrSaveEntity.setPaymentResult("SUCCESS");
|
||||
if (orderEntity.getCouponCode() != "" && null != orderEntity.getCouponCode()) {
|
||||
//coupon json化
|
||||
OrderCouponEntity orderCouponEntity = new OrderCouponEntity();
|
||||
orderCouponEntity.setCouponCode(orderEntity.getCouponCode());
|
||||
orderCouponEntity.setCouponName(orderEntity.getCouponName());
|
||||
orderCouponEntity.setCouponId(orderEntity.getCouponId());
|
||||
Map<String, String> orderCouponParamMap = MapRemoveNullUtil.setConditionMap(orderCouponEntity);
|
||||
MapRemoveNullUtil.removeNullEntry(orderCouponParamMap);
|
||||
net.sf.json.JSONObject orderCouponJson = net.sf.json.JSONObject.fromObject(orderCouponParamMap);
|
||||
addOrSaveEntity.setOrderCoupon(orderCouponJson.toString());
|
||||
}
|
||||
orderService.addOrSave(addOrSaveEntity);
|
||||
}
|
||||
NotifyEntity notifyEntity = new NotifyEntity();
|
||||
notifyEntity.setAppId(AlipayConfig.app_id);
|
||||
notifyEntity.setMchId(request.getParameter("seller_id"));
|
||||
notifyEntity.setSign(request.getParameter("sign"));
|
||||
notifyEntity.setResultCode(request.getParameter("code"));
|
||||
notifyEntity.setOpenid(request.getParameter("merchant_order_no"));
|
||||
notifyEntity.setMchId(seller_id);
|
||||
notifyEntity.setSign(AlipayConfig.sign_type);
|
||||
notifyEntity.setResultCode("");
|
||||
notifyEntity.setOpenid("");
|
||||
notifyEntity.setOutTradeNo(out_trade_no);
|
||||
notifyEntity.setTotalFee(total_amount);
|
||||
notifyEntity.setTradeType(request.getParameter("sub_code"));
|
||||
notifyEntity.setTimeEnd("");
|
||||
notifyEntity.setTradeType("");
|
||||
notifyEntity.setFeeType("CNY");
|
||||
notifyEntity.setNonceStr(trade_no);
|
||||
notifyEntity.setNonceStr("");
|
||||
notifyService.insertNotify(notifyEntity);
|
||||
orderService.afterPaySucceedUpdateOrderStatus(out_trade_no,total_amount);
|
||||
}else {
|
||||
return "验签失败";
|
||||
}
|
||||
|
@ -31,9 +31,9 @@ public class AlipayConfig {
|
||||
public static String alipay_public_key = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC9yEe5sOFYFmEW0GdVCyvuU5vXCLsk2lwWmfC/bh/kcjBaBNTaFSiuG1VFPWsNIKWEHLdbEwMQnq4WxhqYN741wXxJlOpvsECFYtGSL6szx7BDaTYATQGVk963SeKYplz5ZPlXg1QiKgcqS3brvnpxxtcS1JKCJ/6iJXJkZXxK2QIDAQAB";
|
||||
// public static String alipay_public_key = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnxj/9qwVfgoUh/y2W89L6BkRAFljhNhgPdyPuBV64bfQNN1PjbCzkIM6qRdKBoLPXmKKMiFYnkd6rAoprih3/PrQEB/VsW8OoM8fxn67UDYuyBTqA23MML9q1+ilIZwBC2AQ2UBVOrFXfFl75p6/B5KsiNG9zpgmLCUYuLkxpLQIDAQAB";
|
||||
// 服务器异步通知页面路径 需http://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问
|
||||
public static String notify_url = "https://royalcanincn.escase.cn/jc/royalcanin/royalcanin/updateOrderAliPay";
|
||||
public static String notify_url = "https://shop.royalcanin.com.cn/royalcanin/royalcanin/royalcanin/updateOrderAliPay";
|
||||
// 页面跳转同步通知页面路径 需http://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问
|
||||
public static String return_url = "https://royalcanincn.escase.cn/jc/royalcanin/royalcanin/updateOrderAliPay";
|
||||
public static String return_url = "https://shop.royalcanin.com.cn";
|
||||
|
||||
// 签名方式
|
||||
public static String sign_type = "RSA2";
|
||||
|
@ -307,9 +307,9 @@ public class OrderController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "支付宝支付订单", notes = "生成订单")
|
||||
@PostMapping("royalcanin/generateOrderAlipay")
|
||||
public ResponseDTO<String> generateOrderAliPay(String orderNo) throws Exception {
|
||||
@ApiOperation(value = "支付宝支付订单PC", notes = "生成订单")
|
||||
@PostMapping("royalcanin/generateOrderAlipayPC")
|
||||
public ResponseDTO<String> generateOrderAliPayPC(String orderNo) throws Exception {
|
||||
OrderEntity ordersEntity = orderService.findByOrderId(orderNo);
|
||||
if(ordersEntity != null) {
|
||||
QueryEntity queryEntity = new QueryEntity();
|
||||
@ -325,7 +325,7 @@ public class OrderController {
|
||||
aliPayEntity.setProduct_code(ordersEntity.getProductCode());
|
||||
aliPayEntity.setTotal_amount(ordersEntity.getOrderAmount());
|
||||
aliPayEntity.setOut_trade_no(ordersEntity.getOrderNo());
|
||||
return ResponseDTO.succData(aliPayService.generateQRCode(aliPayEntity));
|
||||
return ResponseDTO.succData(aliPayService.generateOrderPC(aliPayEntity));
|
||||
} else {
|
||||
return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_FAIL);
|
||||
}
|
||||
@ -336,6 +336,36 @@ public class OrderController {
|
||||
return ResponseDTO.wrap(OrderResponseCodeConst.WITHOUT_ORDER);
|
||||
}
|
||||
}
|
||||
@ApiOperation(value = "支付宝支付订单Phone", notes = "生成订单")
|
||||
@PostMapping("royalcanin/generateOrderAlipayPhone")
|
||||
public ResponseDTO<String> generateOrderAliPayPhone(String orderNo) throws Exception {
|
||||
OrderEntity ordersEntity = orderService.findByOrderId(orderNo);
|
||||
if(ordersEntity != null) {
|
||||
QueryEntity queryEntity = new QueryEntity();
|
||||
queryEntity.setOrderNumber(ordersEntity.getOrderNo());
|
||||
String orderInfo = orderService.query(queryEntity);
|
||||
com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(orderInfo);
|
||||
JSONObject jsonObject = (JSONObject)jsonArray.get(0);
|
||||
if(jsonObject.getString("status").equals("0")) {
|
||||
AliPayEntity aliPayEntity = new AliPayEntity();
|
||||
ordersEntity.setPayType("2");
|
||||
ordersEntity.setOrderStatus("0");
|
||||
if (orderService.updateOrder(ordersEntity.getOrderNo()) == 1) {
|
||||
aliPayEntity.setProduct_code(ordersEntity.getProductCode());
|
||||
aliPayEntity.setTotal_amount(ordersEntity.getOrderAmount());
|
||||
aliPayEntity.setOut_trade_no(ordersEntity.getOrderNo());
|
||||
return ResponseDTO.succData(aliPayService.generateOrderPhone(aliPayEntity));
|
||||
} else {
|
||||
return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_FAIL);
|
||||
}
|
||||
}else{
|
||||
return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_ERROR);
|
||||
}
|
||||
}else{
|
||||
return ResponseDTO.wrap(OrderResponseCodeConst.WITHOUT_ORDER);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("royalcanin/updateOrderAliPay")
|
||||
public ResponseDTO<String> alipayNotify(HttpServletRequest request) throws Exception {
|
||||
|
Loading…
Reference in New Issue
Block a user