Skip to content

Commit

Permalink
Refactoring, fix constants.
Browse files Browse the repository at this point in the history
  • Loading branch information
oliexe committed Oct 29, 2024
1 parent dc8596b commit 0e062bb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
19 changes: 5 additions & 14 deletions Assets/Stash.Sample/Scripts/DeeplinkExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,7 @@ public class DeeplinkExample : MonoBehaviour

private async void Awake()
{
try{
CheckoutResponse response = await StashLauncher.Checkout("ITEM_ID", "ID_PLAYER", "ID_TOKEN", StashEnvironment.Test);
}
catch (StashRequestError e)
{
Console.WriteLine(e);
throw;
}


//Event handler "OnDeepLinkActivated" is invoked every time the game is launched or resumed via the Stash’s deep link.
if (Instance == null)
Expand All @@ -50,12 +43,10 @@ private async void Awake()

private async void Start()
{
Debug.Log("TRYING ");

try
{
LinkResponse response = await StashCustomLogin.LinkFacebook("LINK_CODE", "PLAYER_ID", "FB_APPID", "ACCESS_TOKEN", StashEnvironment.Test);

try{
CheckoutResponse response = await StashLauncher.Checkout("realMoneyProduct_gems_001", "351eb55e-16c5-431a-b4fa-8e00537e0523", "eyJhbGciOiJSUzI1NiIsImtpZCI6IjhkOWJlZmQzZWZmY2JiYzgyYzgzYWQwYzk3MmM4ZWE5NzhmNmYxMzciLCJ0eXAiOiJKV1QifQ.eyJuYW1lIjoiT25kcmVqIFJlaGFjZWsiLCJwaWN0dXJlIjoiaHR0cHM6Ly9saDMuZ29vZ2xldXNlcmNvbnRlbnQuY29tL2EvQUNnOG9jSnFxM2hHX3V4T204STE3Zm5nVjRIc29NNWZoUmpSWEZFbVRBTXBna0F4WlVuRHBVRT1zOTYtYyIsImlzcyI6Imh0dHBzOi8vc2VjdXJldG9rZW4uZ29vZ2xlLmNvbS9waWUtc3R1ZGlvLTc5YTkyIiwiYXVkIjoicGllLXN0dWRpby03OWE5MiIsImF1dGhfdGltZSI6MTcyNzM2NjMxOSwidXNlcl9pZCI6IlJ0bnpwRlZTVEdhcEp4OERDNHNpc1VHRFBrUzIiLCJzdWIiOiJSdG56cEZWU1RHYXBKeDhEQzRzaXNVR0RQa1MyIiwiaWF0IjoxNzI5MTE2MTMwLCJleHAiOjE3MjkxMTk3MzAsImVtYWlsIjoib25kcmVqQGZyYWN0YWwuaXMiLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiZmlyZWJhc2UiOnsiaWRlbnRpdGllcyI6eyJnb29nbGUuY29tIjpbIjExNjUzOTk1MTA2ODE3MjY0MzA3NCJdLCJlbWFpbCI6WyJvbmRyZWpAZnJhY3RhbC5pcyJdfSwic2lnbl9pbl9wcm92aWRlciI6Imdvb2dsZS5jb20ifX0.PZOOAU3El4mQdDx51HmwS3RR-5qb1IbxLbQMrU-IlVrlY2JBC2YTKD_0yLBl5E-cgXrCVTJS7rw8k_ABP_tVrlJsz5n2pqAOP_0GNacRMnFZPEB0llKGr85vhuTTyuQexTK_-2qwA8RcUMrbeIF97xJPWilnvIEyFIpuwGyelocODCMsOgAPDmfxSzGP40SG-ss3u7XdbfFwRHDcgOI2cXiYHe7UDYPYN0oD0t5WBr93PhhPg-TMRYkOhD_60Hd_eYXedq7D2QbzvF4THhuXws95sufBL8Yy5EstcfZUegWyYOHW494nkiBpD4ruynI-Qm_rMWdeqaFEgWnvDCtRJw", StashEnvironment.Test);
Debug.Log(response.url);
Application.OpenURL(response.url);
}
catch (StashRequestError e)
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/Stash/Scripts/Core/StashConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace Stash.Core
public class StashConstants
{
//TODO: Switch to package file.
public const string SdkVersion = "0.9.0";
public const string SdkVersion = "0.9.1";

//Root URLs
public const string RootUrl = "https://api.stash.gg";
Expand Down
5 changes: 4 additions & 1 deletion Assets/Stash/Scripts/Models/CheckoutResponse.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
using System;

namespace Stash.Models
{
[Serializable]
public class CheckoutResponse
{
public string url { get; set; }
public string url;
}
}

0 comments on commit 0e062bb

Please sign in to comment.