This module provides functionality for user payments through Google Play.
It is available only on Snipe Kit server.
notify (c:ClientKit, params:Params):Dynamic
kit/payment/google.notify
Notifies server about Google Play payment completion. Checks for payment validity and gives payment rewards.
Note: Requires all following internal variables to be set: "googlePlay.packageName", "googlePlay.payment.clientID", "googlePlay.payment.secret" and "googlePlay.payment.refreshToken". Access token is updated every 10 minutes.
Input:
Output:
errorCode
- String
. Operation error code.token
- String
. Received purchase token.itemID
- String
. Payment item string ID. Returned only on success.Error codes:
ok
- Operation successful.accessTokenError
- Access token is not retrieved yet.internalVarsUnset
- One or more of the internal variables is not set.noSuchItem
- No payment item with this string ID.transactionExists
- Transaction with this ID was already handled.serviceError
- Google API returned an error.purchaseCancelled
- This purchase was cancelled.