From 0c55efcf0cb40797cb54c38717f144d19ae6e181 Mon Sep 17 00:00:00 2001 From: ZackRhodes <30397274+ZackRhodes@users.noreply.github.com> Date: Sat, 10 Dec 2022 13:42:58 -0500 Subject: [PATCH] Slight alteration --- public/Steam/steam.js | 7 ++++--- src/components/tabs/shop/ShopTab.vue | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/Steam/steam.js b/public/Steam/steam.js index 708e4b477..9977f8c5a 100644 --- a/public/Steam/steam.js +++ b/public/Steam/steam.js @@ -181,7 +181,7 @@ const SteamFunctions = { }) }, PurchaseShopItem(itemCost,itemKey,itemConfig){ - console.log(itemCost,itemKey,itemConfig) + //console.log(itemCost,itemKey,itemConfig) const itemPurchaseRequest = { ItemId: itemKey, Price: itemCost, @@ -190,11 +190,12 @@ const SteamFunctions = { PlayFab.ClientApi.PurchaseItem(itemPurchaseRequest, (result, error) => { if (result !== null) { console.log(result); + if (itemConfig.singleUse) itemConfig.onPurchase(); + SteamFunctions.SyncPlayFabSTD(); } else if (error !== null) { console.log(error); + GameUI.notify.error(error.errorMessage) } }) - if (itemConfig.singleUse) itemConfig.onPurchase(); - SteamFunctions.SyncPlayFabSTD(); } }; \ No newline at end of file diff --git a/src/components/tabs/shop/ShopTab.vue b/src/components/tabs/shop/ShopTab.vue index 5b6b5dccb..53b76ca4f 100644 --- a/src/components/tabs/shop/ShopTab.vue +++ b/src/components/tabs/shop/ShopTab.vue @@ -41,7 +41,7 @@ export default { player.IAP.disabled = newValue; }, enableText() { - return `In-app Purchases: ${this.IAPsEnabled ? "Enabled" : "Disabled"}`; + return `In-app Purchases: ${player.IAP.enabled ? "Enabled" : "Disabled"}`; }, respecText() { if (!this.loggedIn) return "Not logged in!"; @@ -111,7 +111,6 @@ export default { @click="toggleEnable()" > {{ enableText }} - Disable in-app-purchases