public void RedeemCode(string code)
{
if ( RedeemCodeSuccess == null )
{
Logger.Error(false, "RedeemCode", "Cannot redeem a code without anything listening to RedeemCodeSuccess.");
return;
}
if ( RedeemCodeFailed == null )
{
Logger.Error(false, "RedeemCode", "Cannot redeem a code without anything listening to RedeemCodeFailed.");
return;
}
try
{
JsonData data = new JsonData();
data["code"] = code;
bridge.Call("redeemCode", JsonMapper.ToJson(data));
}
catch(Exception e)
{
Logger.Error(true, "RedeemCode", e);
}
}