|
@@ -15,6 +15,7 @@ import com.cyksj.model.dto.AliPayParams;
|
|
|
import com.cyksj.model.dto.H5JsPayParams;
|
|
import com.cyksj.model.dto.H5JsPayParams;
|
|
|
import com.cyksj.model.entity.OrderDon;
|
|
import com.cyksj.model.entity.OrderDon;
|
|
|
import com.cyksj.model.manage.views.OrderDonView;
|
|
import com.cyksj.model.manage.views.OrderDonView;
|
|
|
|
|
+import com.cyksj.model.request.AlipayOrderDonReq;
|
|
|
import com.cyksj.model.request.OrderPayRequest;
|
|
import com.cyksj.model.request.OrderPayRequest;
|
|
|
import com.cyksj.model.request.WxOrderRefundReq;
|
|
import com.cyksj.model.request.WxOrderRefundReq;
|
|
|
import com.cyksj.model.request.ZfbOrderRefundReq;
|
|
import com.cyksj.model.request.ZfbOrderRefundReq;
|
|
@@ -219,10 +220,12 @@ public class OrderController {
|
|
|
* 支付宝表单支付
|
|
* 支付宝表单支付
|
|
|
* 支付宝调起支付宝表单
|
|
* 支付宝调起支付宝表单
|
|
|
*/
|
|
*/
|
|
|
- @PostMapping("/post/pay/zfb/{orderId}")
|
|
|
|
|
|
|
+ @PostMapping("/post/pay/zfb")
|
|
|
@Deprecated
|
|
@Deprecated
|
|
|
- public Result<String> aliPay(@PathVariable Long orderId,HttpServletResponse response) throws Exception {
|
|
|
|
|
- AliPayParams aliPayParams = orderDonService.aliPay(orderId, ZfbProductCode.MOBILE_WEB.getProductCode(), null);
|
|
|
|
|
|
|
+ public Result<String> aliPay(@RequestBody @Validated AlipayOrderDonReq re) throws Exception {
|
|
|
|
|
+ Long orderId = re.getOrderId();
|
|
|
|
|
+ String returnUrl = re.getReturnUrl();
|
|
|
|
|
+ AliPayParams aliPayParams = orderDonService.aliPay(orderId, returnUrl, ZfbProductCode.MOBILE_WEB.getProductCode(), null);
|
|
|
// response.setContentType("text/html;charset=" + BaseZfbConfig.charset);
|
|
// response.setContentType("text/html;charset=" + BaseZfbConfig.charset);
|
|
|
//直接将完整的表单html输出到页面
|
|
//直接将完整的表单html输出到页面
|
|
|
// response.getWriter().write(aliPayParams.getBody());
|
|
// response.getWriter().write(aliPayParams.getBody());
|
|
@@ -235,10 +238,12 @@ public class OrderController {
|
|
|
* 支付宝web支付
|
|
* 支付宝web支付
|
|
|
* pc网页内嵌二维码
|
|
* pc网页内嵌二维码
|
|
|
*/
|
|
*/
|
|
|
- @PostMapping("/get/zfb/orderQrCode/{orderId}")
|
|
|
|
|
- public Result<String> zfbWebQrCode(@PathVariable Long orderId,HttpServletResponse response) throws Exception {
|
|
|
|
|
- AliPayParams aliPayParams = orderDonService.aliPay(orderId, ZfbProductCode.PC_WEB.getProductCode(), BaseZfbConfig.qrPayMode_orderCode);
|
|
|
|
|
- response.setContentType("text/html;charset=" + BaseZfbConfig.charset);
|
|
|
|
|
|
|
+ @PostMapping("/get/zfb/orderQrCode")
|
|
|
|
|
+ public Result<String> zfbWebQrCode(@RequestBody @Validated AlipayOrderDonReq re) throws Exception {
|
|
|
|
|
+ Long orderId = re.getOrderId();
|
|
|
|
|
+ String returnUrl = re.getReturnUrl();
|
|
|
|
|
+ AliPayParams aliPayParams = orderDonService.aliPay(orderId, returnUrl, ZfbProductCode.PC_WEB.getProductCode(), BaseZfbConfig.qrPayMode_orderCode);
|
|
|
|
|
+// response.setContentType("text/html;charset=" + BaseZfbConfig.charset);
|
|
|
//直接将完整的表单html输出到页面
|
|
//直接将完整的表单html输出到页面
|
|
|
// response.getWriter().write(aliPayParams.getBody());
|
|
// response.getWriter().write(aliPayParams.getBody());
|
|
|
// response.getWriter().flush();
|
|
// response.getWriter().flush();
|
|
@@ -250,10 +255,11 @@ public class OrderController {
|
|
|
* 支付宝web支付
|
|
* 支付宝web支付
|
|
|
* pc网页跳转二维码
|
|
* pc网页跳转二维码
|
|
|
*/
|
|
*/
|
|
|
- @PostMapping("/get/zfb/orderRedirect/{orderId}")
|
|
|
|
|
- public Result<String> zfbWebRedirectQrCode(@PathVariable Long orderId, HttpServletResponse response) throws Exception {
|
|
|
|
|
- AliPayParams aliPayParams = orderDonService.aliPay(orderId, ZfbProductCode.PC_WEB.getProductCode(), BaseZfbConfig.qrPayMode_redirect);
|
|
|
|
|
- response.setContentType("text/html;charset=" + BaseZfbConfig.charset);
|
|
|
|
|
|
|
+ @PostMapping("/get/zfb/orderRedirect")
|
|
|
|
|
+ public Result<String> zfbWebRedirectQrCode(@RequestBody @Validated AlipayOrderDonReq re) throws Exception {
|
|
|
|
|
+ Long orderId = re.getOrderId();
|
|
|
|
|
+ String returnUrl = re.getReturnUrl();
|
|
|
|
|
+ AliPayParams aliPayParams = orderDonService.aliPay(orderId, returnUrl, ZfbProductCode.PC_WEB.getProductCode(), BaseZfbConfig.qrPayMode_redirect);
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(aliPayParams.getBody());
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(aliPayParams.getBody());
|
|
|
}
|
|
}
|
|
|
|
|
|