fix alipay return
This commit is contained in:
@@ -246,7 +246,7 @@ func (h *FinanceHandler) HandleAlipayReturn(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 根据环境确定前端域名
|
// 根据环境确定前端域名
|
||||||
frontendDomain := "https://www.tianyuanapi.com"
|
frontendDomain := "https://console.tianyuanapi.com"
|
||||||
if gin.Mode() == gin.DebugMode {
|
if gin.Mode() == gin.DebugMode {
|
||||||
frontendDomain = "http://localhost:5173"
|
frontendDomain = "http://localhost:5173"
|
||||||
}
|
}
|
||||||
@@ -269,7 +269,7 @@ func (h *FinanceHandler) HandleAlipayReturn(c *gin.Context) {
|
|||||||
|
|
||||||
// redirectToFailPage 跳转到失败页面
|
// redirectToFailPage 跳转到失败页面
|
||||||
func (h *FinanceHandler) redirectToFailPage(c *gin.Context, outTradeNo, reason string) {
|
func (h *FinanceHandler) redirectToFailPage(c *gin.Context, outTradeNo, reason string) {
|
||||||
frontendDomain := "https://www.tianyuanapi.com"
|
frontendDomain := "https://console.tianyuanapi.com"
|
||||||
if gin.Mode() == gin.DebugMode {
|
if gin.Mode() == gin.DebugMode {
|
||||||
frontendDomain = "http://localhost:5173"
|
frontendDomain = "http://localhost:5173"
|
||||||
}
|
}
|
||||||
@@ -281,7 +281,7 @@ func (h *FinanceHandler) redirectToFailPage(c *gin.Context, outTradeNo, reason s
|
|||||||
|
|
||||||
// redirectToProcessingPage 跳转到处理中页面
|
// redirectToProcessingPage 跳转到处理中页面
|
||||||
func (h *FinanceHandler) redirectToProcessingPage(c *gin.Context, outTradeNo, amount string) {
|
func (h *FinanceHandler) redirectToProcessingPage(c *gin.Context, outTradeNo, amount string) {
|
||||||
frontendDomain := "https://www.tianyuanapi.com"
|
frontendDomain := "https://console.tianyuanapi.com"
|
||||||
if gin.Mode() == gin.DebugMode {
|
if gin.Mode() == gin.DebugMode {
|
||||||
frontendDomain = "http://localhost:5173"
|
frontendDomain = "http://localhost:5173"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,13 +23,13 @@ func Example() {
|
|||||||
DefaultAuthMode: "ORG",
|
DefaultAuthMode: "ORG",
|
||||||
PsnAuthModes: []string{"PSN"},
|
PsnAuthModes: []string{"PSN"},
|
||||||
WillingnessAuthModes: []string{"WILLINGNESS"},
|
WillingnessAuthModes: []string{"WILLINGNESS"},
|
||||||
RedirectUrl: "https://www.tianyuanapi.com/certification/callback",
|
RedirectUrl: "https://console.tianyuanapi.com/certification/callback",
|
||||||
},
|
},
|
||||||
&EsignSignConfig{
|
&EsignSignConfig{
|
||||||
AutoFinish: true,
|
AutoFinish: true,
|
||||||
SignFieldStyle: 1,
|
SignFieldStyle: 1,
|
||||||
ClientType: "ALL",
|
ClientType: "ALL",
|
||||||
RedirectUrl: "https://www.tianyuanapi.com/certification/callback",
|
RedirectUrl: "https://console.tianyuanapi.com/certification/callback",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -149,12 +149,12 @@ func ExampleBasicUsage() {
|
|||||||
DefaultAuthMode: "ORG",
|
DefaultAuthMode: "ORG",
|
||||||
PsnAuthModes: []string{"PSN"},
|
PsnAuthModes: []string{"PSN"},
|
||||||
WillingnessAuthModes: []string{"WILLINGNESS"},
|
WillingnessAuthModes: []string{"WILLINGNESS"},
|
||||||
RedirectUrl: "https://www.tianyuanapi.com/certification/callback",
|
RedirectUrl: "https://console.tianyuanapi.com/certification/callback",
|
||||||
}, &EsignSignConfig{
|
}, &EsignSignConfig{
|
||||||
AutoFinish: true,
|
AutoFinish: true,
|
||||||
SignFieldStyle: 1,
|
SignFieldStyle: 1,
|
||||||
ClientType: "ALL",
|
ClientType: "ALL",
|
||||||
RedirectUrl: "https://www.tianyuanapi.com/certification/callback",
|
RedirectUrl: "https://console.tianyuanapi.com/certification/callback",
|
||||||
})
|
})
|
||||||
client := NewClient(config)
|
client := NewClient(config)
|
||||||
|
|
||||||
@@ -185,12 +185,12 @@ func ExampleWithCustomData() {
|
|||||||
DefaultAuthMode: "ORG",
|
DefaultAuthMode: "ORG",
|
||||||
PsnAuthModes: []string{"PSN"},
|
PsnAuthModes: []string{"PSN"},
|
||||||
WillingnessAuthModes: []string{"WILLINGNESS"},
|
WillingnessAuthModes: []string{"WILLINGNESS"},
|
||||||
RedirectUrl: "https://www.tianyuanapi.com/certification/callback",
|
RedirectUrl: "https://console.tianyuanapi.com/certification/callback",
|
||||||
}, &EsignSignConfig{
|
}, &EsignSignConfig{
|
||||||
AutoFinish: true,
|
AutoFinish: true,
|
||||||
SignFieldStyle: 1,
|
SignFieldStyle: 1,
|
||||||
ClientType: "ALL",
|
ClientType: "ALL",
|
||||||
RedirectUrl: "https://www.tianyuanapi.com/certification/callback",
|
RedirectUrl: "https://console.tianyuanapi.com/certification/callback",
|
||||||
})
|
})
|
||||||
client := NewClient(config)
|
client := NewClient(config)
|
||||||
|
|
||||||
@@ -228,12 +228,12 @@ func ExampleEnterpriseAuth() {
|
|||||||
DefaultAuthMode: "ORG",
|
DefaultAuthMode: "ORG",
|
||||||
PsnAuthModes: []string{"PSN"},
|
PsnAuthModes: []string{"PSN"},
|
||||||
WillingnessAuthModes: []string{"WILLINGNESS"},
|
WillingnessAuthModes: []string{"WILLINGNESS"},
|
||||||
RedirectUrl: "https://www.tianyuanapi.com/certification/callback",
|
RedirectUrl: "https://console.tianyuanapi.com/certification/callback",
|
||||||
}, &EsignSignConfig{
|
}, &EsignSignConfig{
|
||||||
AutoFinish: true,
|
AutoFinish: true,
|
||||||
SignFieldStyle: 1,
|
SignFieldStyle: 1,
|
||||||
ClientType: "ALL",
|
ClientType: "ALL",
|
||||||
RedirectUrl: "https://www.tianyuanapi.com/certification/callback",
|
RedirectUrl: "https://console.tianyuanapi.com/certification/callback",
|
||||||
})
|
})
|
||||||
client := NewClient(config)
|
client := NewClient(config)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user