package router

import (
	"github.com/gin-gonic/gin"
)

func RegisterPayment(group, public *gin.RouterGroup, h *Payment) {
	payment := group.Group("/payment")
	payment.GET("/orders", h.Orders)
	payment.POST("/providers/:provider/test", h.TestProvider)
	payment.POST("/order", h.Order)
	payment.GET("/orders/:provider/:tradeNo", h.OrderByPath)
	payment.POST("/create", h.Create)
	payment.POST("/query", h.Query)
	payment.POST("/refund", h.Refund)
	payment.POST("/orders/:provider/:tradeNo/refund", h.RefundByPath)
	payment.POST("/orders/:provider/:tradeNo/fulfill", h.FulfillByPath)
	payment.POST("/fulfill", h.Fulfill)
	public.POST("/payment/callback/:provider", h.Callback)
}
