zwhui před 2 roky
rodič
revize
d3df62f4f7

+ 1 - 1
netflix-service/src/main/java/com/cyksj/service/order/OrderDonService.java

@@ -98,7 +98,7 @@ public interface OrderDonService extends IService<OrderDon> {
 
     UpgradeOrderDon submitUpgrade(OrderPayRequest payRequest);
 
-    AliPayParams aliPayUpgrade(AlipayOrderDonReq re, String productCode) throws Exception;
+    AliPayParams aliPayUpgrade(AlipayOrderDonReq re, String productCode, String qrPayMode) throws Exception;
 
     void aliPayUpgradeNotify(Map<String, String> params) throws Exception;
 

+ 2 - 2
netflix-service/src/main/java/com/cyksj/service/order/impl/OrderDonServiceImpl.java

@@ -3231,8 +3231,8 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 	}
 
 	@Override
-	public AliPayParams aliPayUpgrade(AlipayOrderDonReq re, String productCode) throws Exception {
-		return aliPayCommonService.unifiedPayUpgrade(re,productCode,null);
+	public AliPayParams aliPayUpgrade(AlipayOrderDonReq re, String productCode, String qrPayMode) throws Exception {
+		return aliPayCommonService.unifiedPayUpgrade(re,productCode,qrPayMode);
 	}
 
 

+ 16 - 1
netflix-web/src/main/java/com/cyksj/web/controller/payment/OrderController.java

@@ -324,7 +324,7 @@ public class OrderController {
     @PostMapping("/post/pay/upgrade/zfb")
     @Deprecated
     public Result<String> aliPayUpgrade(@RequestBody @Validated AlipayOrderDonReq re) throws Exception {
-        AliPayParams aliPayParams = orderDonService.aliPayUpgrade(re, ZfbProductCode.MOBILE_WEB.getProductCode());
+        AliPayParams aliPayParams = orderDonService.aliPayUpgrade(re, ZfbProductCode.MOBILE_WEB.getProductCode(),null);
         return GatewayResponse.SUCCESS.newBuilder().toResult(aliPayParams.getBody());
     }
 
@@ -344,6 +344,21 @@ public class OrderController {
         return GatewayResponse.SUCCESS.newBuilder().toResult(aliPayParams.getBody());
     }
 
+    /**
+     * 支付宝web支付
+     * pc网页内嵌二维码
+     */
+    @PostMapping("/get/zfb/upgrade/orderQrCode")
+    public Result<String> zfbWebQrCodeUpgrade(@RequestBody @Validated AlipayOrderDonReq re) throws Exception {
+        AliPayParams aliPayParams = orderDonService.aliPayUpgrade(re, ZfbProductCode.PC_WEB.getProductCode(), BaseZfbConfig.qrPayMode_orderCode);
+//        response.setContentType("text/html;charset=" + BaseZfbConfig.charset);
+        //直接将完整的表单html输出到页面
+//        response.getWriter().write(aliPayParams.getBody());
+//        response.getWriter().flush();
+//        response.getWriter().close();
+        return GatewayResponse.SUCCESS.newBuilder().toResult(aliPayParams.getBody());
+    }
+
     /**
      * 支付宝web支付
      * pc网页跳转二维码