feat: HashPay 回调支持根路径 POST /
This commit is contained in:
@@ -539,6 +539,11 @@ func (h *PaymentHandler) CreateHashPayPayment(c *gin.Context) {
|
||||
|
||||
// HashPayNotify 处理 HashPay 回调通知
|
||||
func (h *PaymentHandler) HashPayNotify(c *gin.Context) {
|
||||
// 添加 CORS 头
|
||||
c.Header("Access-Control-Allow-Origin", "*")
|
||||
c.Header("Access-Control-Allow-Methods", "POST, OPTIONS")
|
||||
c.Header("Access-Control-Allow-Headers", "Content-Type")
|
||||
|
||||
body, _ := io.ReadAll(c.Request.Body)
|
||||
|
||||
log.Printf("[HashPay] notify body: %s", string(body))
|
||||
|
||||
Reference in New Issue
Block a user