Example #1
0
 public void OnGetSkuDetailsFinished(IapResult result, IList <SkuDetails> skuDetailsList)
 {
     _sample.ResultText.text = JsonConvert.SerializeObject
                                   (result, Formatting.Indented, JsonnetSetting()) + "\n" +
                               JsonConvert.SerializeObject
                                   (skuDetailsList, Formatting.Indented, JsonnetSetting());
 }
Example #2
0
 public void OnGetPurchasesFinished(IapResult result, IList <string> ownedSkus, string continuationToken)
 {
     _sample.ResultText.text = JsonConvert.SerializeObject
                                   (result, Formatting.Indented, JsonnetSetting()) + "\n" +
                               JsonConvert.SerializeObject
                                   (ownedSkus, Formatting.Indented, JsonnetSetting()) + "\n" +
                               "continuationToken: " + continuationToken;
 }
Example #3
0
 public void OnSubscriptionFinished(IapResult result, Purchase purchase, string webhookMessage)
 {
     _sample.ResultText.text = JsonConvert.SerializeObject
                                   (result, Formatting.Indented, JsonnetSetting()) + "\n" +
                               JsonConvert.SerializeObject
                                   (purchase, Formatting.Indented, JsonnetSetting()) + "\n" +
                               "webhookMessage: " + webhookMessage;
 }
Example #4
0
 public void OnConsumptionFinished(IapResult result, string sku, string purchaseToken, string webhookMessage)
 {
     _sample.ResultText.text = JsonConvert.SerializeObject
                                   (result, Formatting.Indented, JsonnetSetting()) + "\n" +
                               "sku: " + sku + "\n" +
                               "purchaseToken: " + purchaseToken + "\n" +
                               "webhookMessage: " + webhookMessage;
     if (result.ResultCode == IapResult.SUCCESS)
     {
         _sample.PurchaseToken = null;
     }
 }
Example #5
0
 public void OnPurchaseFinished(IapResult result, Purchase purchase, string webhookMessage)
 {
     _sample.ResultText.text = JsonConvert.SerializeObject
                                   (result, Formatting.Indented, JsonnetSetting()) + "\n" +
                               JsonConvert.SerializeObject
                                   (purchase, Formatting.Indented, JsonnetSetting()) + "\n" +
                               "webhookMessage: " + webhookMessage;
     if (result.ResultCode == IapResult.SUCCESS)
     {
         _sample.PurchaseToken = purchase.PurchaseToken;
     }
 }