错误提示有问题

This commit is contained in:
2026-05-22 15:54:54 +08:00
parent 2adbc87a52
commit 860f589b9a
3 changed files with 22 additions and 17 deletions

View File

@@ -2,12 +2,12 @@ package alipay
import (
"context"
"fmt"
"time"
"github.com/smartwalle/alipay/v3"
"github.com/break/junhong_cmp_fiber/internal/model"
apperrors "github.com/break/junhong_cmp_fiber/pkg/errors"
)
// BuildWapPayURL 生成支付宝手机网站支付 URL。
@@ -40,7 +40,7 @@ func BuildWapPayURL(ctx context.Context, cfg *model.WechatConfig, payment *model
payURL, err := client.TradeWapPay(param)
if err != nil {
return "", fmt.Errorf("生成支付宝 WAP 支付链接失败: %w", err)
return "", apperrors.Wrap(apperrors.CodeNoPaymentConfig, err, "支付宝配置不可用:生成支付链接失败")
}
return payURL.String(), nil