Parcourir la source

微信支付更新

soobin il y a 2 ans
Parent
commit
1e5495e734

+ 4 - 3
src/main/java/com/szwl/controller/TWeixinPayController.java

@@ -265,7 +265,7 @@ public class TWeixinPayController {
         order.setFrpCode(frpCode1);
         order.setAltInfo(altInfo.toString());
         order.setStatus(0);
-        String payPlatform = "2";
+        String payPlatform = "3";
         order.setPayPlatform(payPlatform);
         if(StringUtils.isNotEmpty(payPlatform)&&payPlatform.equals("1")){
             order.setIsSettlement("0");
@@ -369,8 +369,9 @@ public class TWeixinPayController {
         createRequest.setAmount(amount);
         String refundNo = orderService.initSn(order.getEquipmentId());
         createRequest.setOutRefundNo(refundNo);
-//        createRequest.setNotifyUrl("https://app.sunzee.com.cn/PAY-SERVER/tWeixinPay/refundNotify");
-        createRequest.setNotifyUrl("http://mianhuatang.gz2vip.91tunnel.com/tWeixinPay/refundNotify");
+        createRequest.setNotifyUrl("https://app.sunzee.com.cn/PAY-SERVER/tWeixinPay/refundNotify");
+//        createRequest.setNotifyUrl("http://mianhuatang.gz2vip.91tunnel.com/tWeixinPay/refundNotify");
+//        createRequest.setNotifyUrl("http://soobin.5gzvip.91tunnel.com/tWeixinPay/refundNotify");
         Refund refund = orderService.weixinRefundApi(createRequest,order.getAdminId());
         System.out.println("退款参数"+refund.toString());
         if(refund.getStatus()==PROCESSING){

+ 1 - 1
src/main/java/com/szwl/controller/TWeixinPaymentMchController.java

@@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RestController;
  * </p>
  *
  * @author wuhs
- * @since 2023-04-13
+ * @since 2023-04-15
  */
 @RestController
 @RequestMapping("/tWeixinPaymentMch")

+ 1 - 1
src/main/java/com/szwl/mapper/TWeixinPaymentMchMapper.java

@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  * </p>
  *
  * @author wuhs
- * @since 2023-04-13
+ * @since 2023-04-15
  */
 public interface TWeixinPaymentMchMapper extends BaseMapper<TWeixinPaymentMch> {
 

+ 1 - 0
src/main/java/com/szwl/mapper/xml/TWeixinPayConfigMapper.xml

@@ -21,3 +21,4 @@
     </sql>
 
 </mapper>
+

+ 1 - 1
src/main/java/com/szwl/model/entity/TOrder.java

@@ -85,7 +85,7 @@ public class TOrder implements Serializable {
     private BigDecimal refundAmount;
 
     private String note;
-    @ApiModelProperty(value = "支付平台; 0或null为汇聚,1为杉德支付,2为直接对接微信支付平台")
+    @ApiModelProperty(value = "支付平台; 0或null为汇聚,1为杉德支付,2为香港QFPay,3为直接对接微信支付平台")
     private String payPlatform;
 
     private String isSettlement;

+ 1 - 1
src/main/java/com/szwl/model/entity/TWeixinPaymentMch.java

@@ -15,7 +15,7 @@ import lombok.EqualsAndHashCode;
  * </p>
  *
  * @author wuhs
- * @since 2023-04-13
+ * @since 2023-04-15
  */
 @Data
 @EqualsAndHashCode(callSuper = false)

+ 1 - 1
src/main/java/com/szwl/service/TWeixinPaymentMchService.java

@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * </p>
  *
  * @author wuhs
- * @since 2023-04-13
+ * @since 2023-04-15
  */
 public interface TWeixinPaymentMchService extends IService<TWeixinPaymentMch> {
 

+ 4 - 2
src/main/java/com/szwl/service/impl/TOrderServiceImpl.java

@@ -54,6 +54,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
 //    @Autowired
 //    private Verifier verifier;
 
+    @Override
     public synchronized String initSn(Long equipmentId) {
         StringBuilder number = new StringBuilder();
         if (equipmentId != null) {
@@ -105,8 +106,9 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
         request.setAppid(weixinPayConfig.getAppId());
         request.setMchid(weixinPayConfig.getMerchantId());
         request.setDescription(productName);
-//        request.setNotifyUrl("https://app.sunzee.com.cn/PAY-SERVER/tWeixinPay/notify");
-        request.setNotifyUrl("http://mianhuatang.gz2vip.91tunnel.com/tWeixinPay/notify");
+        request.setNotifyUrl("https://app.sunzee.com.cn/PAY-SERVER/tWeixinPay/notify");
+//        request.setNotifyUrl("http://mianhuatang.gz2vip.91tunnel.com/tWeixinPay/notify");
+//        request.setNotifyUrl("http://soobin.5gzvip.91tunnel.com/tWeixinPay/notify");
         request.setOutTradeNo(orderNo1);
         // 调用下单方法,得到应答
         PrepayResponse response = service.prepay(request);

+ 1 - 1
src/main/java/com/szwl/service/impl/TWeixinPaymentMchServiceImpl.java

@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
  * </p>
  *
  * @author wuhs
- * @since 2023-04-13
+ * @since 2023-04-15
  */
 @Service
 public class TWeixinPaymentMchServiceImpl extends ServiceImpl<TWeixinPaymentMchMapper, TWeixinPaymentMch> implements TWeixinPaymentMchService {