Skip to main content

Deduct Currency

Deducts currency from player's account.

Call Information

CurrencySubtract(string currencyCode, long currencyAmount, PlayNANOODelegate callback) {}

Call Information Details

ParameterDescriptionType
currencyCodeCurrency codestring
currencyAmountCurrency amountstring
callbackCommunication resultPlayNANOODelegate

Source Code

using PlayNANOO;

public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;

void Awake()
{
plugin = Plugin.GetInstance();

string currencyCode = "string";
long currencyAmount = 0;
plugin.CurrencySubtract(currencyCode, currencyAmount, (status, errorMessage, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log(values["amount"]);
}
else
{
Debug.Log("Fail");
}
});
}
}

Communication Result

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"amount": 100
}
Communication Result
Data KeyDescriptionType
amountAmount owneddouble