Added google androidpublisher/v3 api to verify google purchase tokens

This commit is contained in:
2022-11-25 22:42:21 +01:00
parent 6d80638cf8
commit 3a0c65a849
18 changed files with 608 additions and 163 deletions

View File

@@ -85,7 +85,7 @@ func (h CompatHandler) Register(g *gin.Context) ginresp.HTTPResponse {
}
if data.ProToken != nil {
ptok, err := h.app.VerifyProToken(*data.ProToken)
ptok, err := h.app.VerifyProToken(ctx, "ANDROID|v2|"+*data.ProToken)
if err != nil {
return ginresp.CompatAPIError(0, "Failed to query purchase status")
}
@@ -634,7 +634,7 @@ func (h CompatHandler) Upgrade(g *gin.Context) ginresp.HTTPResponse {
}
if data.ProToken != nil {
ptok, err := h.app.VerifyProToken(*data.ProToken)
ptok, err := h.app.VerifyProToken(ctx, "ANDROID|v2|"+*data.ProToken)
if err != nil {
return ginresp.CompatAPIError(0, "Failed to query purchase status")
}