Merge remote-tracking branch 'origin/dev/dev1.0' into dev/dev1.0
This commit is contained in:
commit
18d5f96096
|
@ -63,9 +63,13 @@ func ApiRes(c *gin.Context, data interface{}, code int, msg ...string) {
|
||||||
}
|
}
|
||||||
// 记录日志
|
// 记录日志
|
||||||
if logId > 0 {
|
if logId > 0 {
|
||||||
|
var appId int64
|
||||||
|
if appCheckInfo != nil {
|
||||||
|
appId = appCheckInfo.AppId
|
||||||
|
}
|
||||||
services.RequestLogUpdate(&orderrequestlogmodel.OrderRequestLog{
|
services.RequestLogUpdate(&orderrequestlogmodel.OrderRequestLog{
|
||||||
Id: logId,
|
Id: logId,
|
||||||
AppId: appCheckInfo.AppId,
|
AppId: appId,
|
||||||
OutTradeNo: GetOutTradeNo(c),
|
OutTradeNo: GetOutTradeNo(c),
|
||||||
MerchantResponse: originData,
|
MerchantResponse: originData,
|
||||||
Status: common.STATUS_DISABLED,
|
Status: common.STATUS_DISABLED,
|
||||||
|
|
|
@ -164,6 +164,7 @@ func ValidatePayRequest() gin.HandlerFunc {
|
||||||
controllers.ApiRes(c, nil, appCheck.Code)
|
controllers.ApiRes(c, nil, appCheck.Code)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
c.Set("appCheckInfo", appCheck)
|
||||||
//解密
|
//解密
|
||||||
if appCheck.App.KeyType != pojo.NO_CRYPT {
|
if appCheck.App.KeyType != pojo.NO_CRYPT {
|
||||||
|
|
||||||
|
@ -195,7 +196,7 @@ func ValidatePayRequest() gin.HandlerFunc {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Log(c, "参数错误", "path=", path, "err=", err.Error(), "msg=", msg)
|
utils.Log(c, "参数错误", "path=", path, "err=", err.Error(), "msg=", msg)
|
||||||
controllers.ApiRes(c, nil, errorcode.ParamError, msg...)
|
controllers.ApiRes(c, nil, errorcode.ParamError, msg...)
|
||||||
c.Abort()
|
return
|
||||||
}
|
}
|
||||||
err = json.Unmarshal(postBody, &v)
|
err = json.Unmarshal(postBody, &v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -203,7 +204,7 @@ func ValidatePayRequest() gin.HandlerFunc {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
c.Set("request", v)
|
c.Set("request", v)
|
||||||
c.Set("appCheckInfo", appCheck)
|
|
||||||
c.Next()
|
c.Next()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,8 +117,8 @@ func (w *Pay) Refund() {
|
||||||
ok bool
|
ok bool
|
||||||
)
|
)
|
||||||
thirdPayRefund := &paymentService.OrderRefundRequest{
|
thirdPayRefund := &paymentService.OrderRefundRequest{
|
||||||
OrderId: w.Order.Id,
|
OrderId: w.RelationOrder.Id,
|
||||||
RefundOrderId: w.RelationOrder.Id,
|
RefundOrderId: w.Order.Id,
|
||||||
RefundReason: w.PayParam.Desc,
|
RefundReason: w.PayParam.Desc,
|
||||||
RefundAmount: int64(w.PayParam.Amount),
|
RefundAmount: int64(w.PayParam.Amount),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue