This commit is contained in:
2025-04-08 14:50:24 +08:00
parent 14b5d10992
commit 31d797a092
8 changed files with 285 additions and 84 deletions

View File

@@ -2,14 +2,16 @@ package pay
import (
"context"
"github.com/smartwalle/alipay/v3"
"net/http"
"os"
"time"
"tydata-server/pkg/lzkit/lzUtils"
"github.com/zeromicro/go-zero/core/logx"
"github.com/smartwalle/alipay/v3"
"tydata-server/app/user/cmd/api/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type AlipayCallbackLogic struct {
@@ -72,7 +74,7 @@ func (l *AlipayCallbackLogic) AlipayCallback(w http.ResponseWriter, r *http.Requ
default:
return nil
}
order.PlatformOrderId = lzUtils.StringToNullString(notification.OutTradeNo)
order.PlatformOrderId = lzUtils.StringToNullString(notification.TradeNo)
if updateErr := l.svcCtx.OrderModel.UpdateWithVersion(l.ctx, nil, order); updateErr != nil {
logx.Errorf("支付宝支付回调,修改订单信息失败: %+v", updateErr)
return nil