This commit is contained in:
邹宗楠
2022-07-22 19:29:26 +08:00
parent 4c8e27b68f
commit dceafe02da
2 changed files with 12 additions and 4 deletions

View File

@@ -383,7 +383,10 @@ func CreateOrder2QBiDa(order *model.UserVendorOrder) error {
makeOrder.ReceiveName = receiveAddress.ConsigneeName
makeOrder.ReceivePhone = receiveAddress.ConsigneeMobile
otherId, err := createOtherOrder(makeOrder)
if err != nil {
globals.SugarLogger.Debug("err==========", err)
}
order.Remark = fmt.Sprintf("%s", err.Error())
order.OtherWayBill = otherId
order.OrderStatus = model.OrderStatusWaitPickup
order.UpdatedAt = time.Now()

View File

@@ -24,10 +24,15 @@ func (c *TongLianController) Msg() {
if c.Ctx.Input.Method() == http.MethodPost {
call, err := api.TLpayAPI.GetCallbackMsg(getUsefulRequest2(c.Ctx))
globals.SugarLogger.Debugf("tonglianapi callback callbackResponse:%s", utils.Format4Output(call, true))
if err == nil {
err = financial.OnTLPayCallback(call)
if err != nil {
c.Abort("404")
return
}
c.Data["json"] = call
if err = financial.OnTLPayCallback(call); err != nil {
c.Abort("404")
return
}
c.Data["json"] = "success"
c.ServeJSON()
} else {
c.Abort("404")