- 只有存在相应的API才注册purchase partner

This commit is contained in:
gazebo
2019-04-24 07:19:44 +08:00
parent 6d787cd1a1
commit b1fcb3c4ae
10 changed files with 90 additions and 55 deletions

View File

@@ -22,8 +22,10 @@ type PurchaseHandler struct {
}
func init() {
curPurchaseHandler = new(PurchaseHandler)
partner.RegisterPurchasePlatform(curPurchaseHandler)
if api.MtwmAPI != nil {
curPurchaseHandler = new(PurchaseHandler)
partner.RegisterPurchasePlatform(curPurchaseHandler)
}
}
func (c *PurchaseHandler) GetVendorID() int {