You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
579 B
24 lines
579 B
|
1 year ago
|
package routers
|
||
|
|
|
||
|
|
import (
|
||
|
|
"net/http"
|
||
|
|
|
||
|
|
"github.com/gin-gonic/gin"
|
||
|
|
"github.com/liangdas/mqant/log"
|
||
|
|
)
|
||
|
|
|
||
|
|
func commonRouter(e *gin.RouterGroup) {
|
||
|
|
e.GET("front/payCallback", frontPayCallback)
|
||
|
|
e.GET("front/payCallback/fail", frontPayCallbackFail)
|
||
|
|
}
|
||
|
|
|
||
|
|
func frontPayCallback(c *gin.Context) {
|
||
|
|
log.Debug("frontcallback:%v", c.Request.RequestURI)
|
||
|
|
c.Redirect(http.StatusMovedPermanently, "zypayment://result=true")
|
||
|
|
}
|
||
|
|
|
||
|
|
func frontPayCallbackFail(c *gin.Context) {
|
||
|
|
log.Debug("frontcallback:%v", c.Request.RequestURI)
|
||
|
|
c.Redirect(http.StatusMovedPermanently, "zypayment://result=false")
|
||
|
|
}
|