This commit is contained in:
邹宗楠
2022-08-31 17:32:34 +08:00
parent 97a83f1c2f
commit 9915fa1eb2
2 changed files with 203 additions and 3 deletions

View File

@@ -3,10 +3,11 @@ 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/baseapi/utils"
)
// 美团回调接口
func OnCallbackMsg(msg *tiktokShop.CreateOrderCallback) (tiktokShop *mtwmapi.CallbackResponse) {
func OnCallbackMsg(msg *tiktokShop.CreateOrderCallback) (resp *mtwmapi.CallbackResponse) {
if CurPurchaseHandler != nil {
switch msg.Tag {
case tiktokShop.CallbackMsgTagId:
@@ -16,8 +17,8 @@ func OnCallbackMsg(msg *tiktokShop.CreateOrderCallback) (tiktokShop *mtwmapi.Cal
return response
}
func GetOrderIDFromMsg(msg *mtwmapi.CallbackMsg) string {
return msg.FormData.Get(mtwmapi.KeyOrderID)
func GetOrderIDFromMsg(msg *tiktokShop.CreateOrderCallback) string {
return utils.Int64ToStr(msg.Data.PId)
}
func GetVendorStoreIDFromMsg(msg *mtwmapi.CallbackMsg) string {