|
|
@@ -7,6 +7,7 @@ import com.etotem.cfc.entity.PackageOrder;
|
|
|
import com.etotem.cfc.entity.ProductOrder;
|
|
|
import com.etotem.cfc.mapper.PackageOrderMapper;
|
|
|
import com.etotem.cfc.mapper.ProductOrderMapper;
|
|
|
+import com.etotem.cfc.service.MembershipService;
|
|
|
import com.etotem.cfc.service.ProductOrderService;
|
|
|
import com.etotem.cfc.service.api.PaymentServiceInterface;
|
|
|
import okhttp3.MediaType;
|
|
|
@@ -60,6 +61,10 @@ public class PaymentService implements PaymentServiceInterface {
|
|
|
@Resource
|
|
|
private ProductOrderService productOrderService;
|
|
|
|
|
|
+ @Lazy
|
|
|
+ @Resource
|
|
|
+ private MembershipService membershipService;
|
|
|
+
|
|
|
@Value("${wechat.appid}")
|
|
|
private String appid;
|
|
|
|
|
|
@@ -328,7 +333,9 @@ public class PaymentService implements PaymentServiceInterface {
|
|
|
log.info("微信支付通知: orderNo={}, transactionId={}", orderNo, transactionId);
|
|
|
|
|
|
// Route to appropriate handler based on order prefix
|
|
|
- if (orderNo != null && orderNo.startsWith("PO")) {
|
|
|
+ if (orderNo != null && orderNo.startsWith("ORD")) {
|
|
|
+ membershipService.processPaymentCallback(orderNo, transactionId, "wechat");
|
|
|
+ } else if (orderNo != null && orderNo.startsWith("PO")) {
|
|
|
productOrderService.handlePaymentSuccess(orderNo, transactionId);
|
|
|
} else {
|
|
|
handlePaymentCallback(orderNo, transactionId, "wechat");
|