diff --git a/app/http/controllers/front/pay_page.go b/app/http/controllers/front/pay_page.go
index b61ec89..0e5a8cd 100644
--- a/app/http/controllers/front/pay_page.go
+++ b/app/http/controllers/front/pay_page.go
@@ -12,6 +12,7 @@ import (
"fmt"
"github.com/ahmetb/go-linq/v3"
"github.com/gin-gonic/gin"
+ "github.com/qit-team/snow-core/log/logger"
"net/http"
"strconv"
"strings"
@@ -79,6 +80,8 @@ func PayPage(c *gin.Context) {
func PayChannelList(c *gin.Context) {
req, _ := controllers.GetRequest(c).(*front.PayChannelListRequest)
req.UserAgent = c.Request.UserAgent()
+ logger.Info(c, "PayChannelList", fmt.Sprintf("req.OrderId: %s, req.UserAgent: %s", req.OrderId, req.UserAgent))
+
data, code := services.PayPageChannelList(*req)
result := []front.PayChannelListResponse{}
diff --git a/app/services/pay_page.go b/app/services/pay_page.go
index 0105fff..357c5b6 100644
--- a/app/services/pay_page.go
+++ b/app/services/pay_page.go
@@ -48,6 +48,13 @@ func PayPageChannelList(reqParam front.PayChannelListRequest) (resultPayChannelL
code = errorcode.PayChannelNotFound
return
}
+
+ // 兜底只有1中支付方式,默认返回该支付方式,不校验支付环境
+ if len(payList) == 1 {
+ resultPayChannelList = payList
+ return
+ }
+
merchantPayChannelMap := make(map[int]paychannelmodel.PayChannel, 0)
for _, pay := range payList {
if !pay.ExpireTime.IsZero() && pay.ExpireTime.Unix() < time.Now().Unix() {
diff --git a/front/templates/payPage.html b/front/templates/payPage.html
index 1bde452..3ab9f48 100644
--- a/front/templates/payPage.html
+++ b/front/templates/payPage.html
@@ -265,7 +265,7 @@
- {{else}}
-
- {{end}}
-