widgrensitasobi-defold
widgrensit/asobi-defold/asobi.api.iap
asobi in-app purchase verification over REST. A project reaches it as client.iap.
- GitHub: widgrensit/asobi-defold — pinned to
v1.18.1- Pick a release from widgrensit/asobi-defold releases and add its Source code (zip) URL (or a packaged
.zipasset, if the library ships one) togame.projectunder[project]dependencies, then Fetch Libraries in the Defold editor. - Run
bunx @defold-typescript/cli resolveto materialize its types. - Import it under a namespace alias of your choice:
import * as api_iap from "asobi.api.iap"
- Pick a release from widgrensit/asobi-defold releases and add its Source code (zip) URL (or a packaged
Functions
verify_apple(client: Client, signed_transaction: string, callback?: HttpCallback)
Verifies an App Store purchase with the server.
Parameters
client:Client— The client.signed_transaction:string— The signed transaction the App Store returned.callback?:HttpCallback— Receives the verification, or the error.
verify_google(client: Client, product_id: string, purchase_token: string, callback?: HttpCallback)
Verifies a Google Play purchase with the server.
Parameters
client:Client— The client.product_id:string— The product's id.purchase_token:string— The purchase token Google Play returned.callback?:HttpCallback— Receives the verification, or the error.