29 lines
839 B
Go
29 lines
839 B
Go
package tiktok_store
|
|
|
|
import (
|
|
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
|
tiktokShop "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
|
|
"git.rosy.net.cn/jx-callback/business/jxutils"
|
|
"git.rosy.net.cn/jx-callback/business/model"
|
|
)
|
|
|
|
// OnCallbackMsg 抖音
|
|
func OnCallbackMsg(msg *tiktokShop.OrderCallback) (response *tiktokShop.CallbackResponse) {
|
|
if CurPurchaseHandler != nil {
|
|
if msg.Data != "" && len(msg.Body) > 0 {
|
|
jxutils.CallMsgHandler(func() {
|
|
response = CurPurchaseHandler.onOrderMsg(msg)
|
|
}, jxutils.ComposeUniversalOrderID(msg.MsgId, model.VendorIDDD))
|
|
}
|
|
}
|
|
return response
|
|
}
|
|
|
|
func GetOrderIDFromMsg(msg *mtwmapi.CallbackMsg) string {
|
|
return msg.FormData.Get(mtwmapi.KeyOrderID)
|
|
}
|
|
|
|
func GetVendorStoreIDFromMsg(msg *mtwmapi.CallbackMsg) string {
|
|
return msg.FormData.Get(mtwmapi.KeyAppPoiCode)
|
|
}
|