package pay

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"system_pay/controller/base"
)

// 卡拉卡统一支付回调
type NoticeController struct {
}

// WxNotice 拉卡拉统一支付微信回调
// @Summary 拉卡拉统一支付微信回调
// @Description 拉卡拉统一支付微信回调
// @Tags 拉卡拉统一支付回调
// @Accept application/json
// @Produce application/json
// @Param   body    body  models.WxNoticeInput   true	 "参数"
// @Param language header string ture "语言类型 zh-CN简体中文 en-US英文 ja 日文 默认中文"
// @Success 200
// @router /api/v1/pay/wx_notice [post]
func (l *PayController) WxNotice(c *gin.Context) {

	fmt.Println("拉卡拉微信回调start")

	//ph2 := make(map[string]interface{}, 0)
	////ph2 = new(interface{})
	//err := c.ShouldBind(ph2)
	//if err != nil {
	//	response := new(base.ResponseDataWxNotice)
	//	response.Code = "FAIL"
	//	response.Message = "执行失败1"
	//	base.ResponseWxNotice(c, response)
	//	return
	//}
	//fmt.Println(ph2)

	//ph := new(models.WxNoticeInput)
	//err := c.ShouldBindJSON(ph)
	//if err != nil {
	//	response := new(base.ResponseDataWxNotice)
	//	response.Code = "FAIL"
	//	response.Message = "执行失败2"
	//	base.ResponseWxNotice(c, response)
	//	return
	//}
	////fmt.Println(ph)
	//
	//// 拉卡拉统一支付微信回调
	//response, err := pay.WxNotice(ph)
	//
	//fmt.Println("拉卡拉微信回调end")

	response := new(base.ResponseDataWxNotice)
	response.Code = "SUCCESS"
	response.Message = "执行成功"
	base.ResponseWxNotice(c, response)
}