Deduct Currency
Deducts currency from player's account.
Call Information
CurrencySubtract(string currencyCode, long currencyAmount, PlayNANOODelegate callback) {}
Call Information Details
Parameter | Description | Type |
---|---|---|
currencyCode | Currency code | string |
currencyAmount | Currency amount | string |
callback | Communication result | PlayNANOODelegate |
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 Key | Description | Type |
---|---|---|
amount | Amount owned | double |