1
This commit is contained in:
@@ -45,3 +45,12 @@ func CallBackResultInfo(err error) *CallBackResult {
|
|||||||
ErrMsg: err.Error(),
|
ErrMsg: err.Error(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CallBackResultSign 签名错误
|
||||||
|
func CallBackResultSign(err error) *CallBackResult {
|
||||||
|
return &CallBackResult{
|
||||||
|
Success: false,
|
||||||
|
ErrCode: "sign-check-failure",
|
||||||
|
ErrMsg: err.Error(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
package tao_vegetable
|
package tao_vegetable
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -12,3 +14,14 @@ func TestQueryToken(t *testing.T) {
|
|||||||
globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false))
|
globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false))
|
||||||
globals.SugarLogger.Debugf("err := %s", utils.Format4Output(err, false))
|
globals.SugarLogger.Debugf("err := %s", utils.Format4Output(err, false))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestReplaceString(t *testing.T) {
|
||||||
|
aa := `{
|
||||||
|
"store_id": "CRF003",
|
||||||
|
"order_status": "PAID",
|
||||||
|
"merchant_code": "xxx",
|
||||||
|
"biz_order_id": 123456
|
||||||
|
}`
|
||||||
|
dd := strings.ReplaceAll(strings.ReplaceAll(aa, "\n", ""), " ", "")
|
||||||
|
fmt.Println(dd)
|
||||||
|
}
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ type PublicModel struct {
|
|||||||
|
|
||||||
// CallbackOrder 正新订单消息通知
|
// CallbackOrder 正新订单消息通知
|
||||||
type CallbackOrder struct {
|
type CallbackOrder struct {
|
||||||
PublicModel
|
//PublicModel
|
||||||
MerchantCode string `json:"merchant_code"` // 商家编码
|
|
||||||
StoreId string `json:"store_id"` // 门店id
|
StoreId string `json:"store_id"` // 门店id
|
||||||
BizOrderId int64 `json:"biz_order_id"` // 订单号
|
|
||||||
OrderStatus string `json:"order_status"` // 订单状态
|
OrderStatus string `json:"order_status"` // 订单状态
|
||||||
|
MerchantCode string `json:"merchant_code"` // 商家编码
|
||||||
|
BizOrderId int64 `json:"biz_order_id"` // 订单号
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnSaleCancel 售中订单取消回调
|
// OnSaleCancel 售中订单取消回调
|
||||||
|
|||||||
Reference in New Issue
Block a user