Skip to content

Commit 2eb38f7

Browse files
Erik Bylundkirre-bylund
authored andcommitted
Change to using bool argument to use sandboxed app store
1 parent 6f9b033 commit 2eb38f7

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Runtime/Game/LootLockerSDKManager.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4286,7 +4286,8 @@ public static void LootLockerPurchaseCatalogItems(string walletId, LootLockerCat
42864286
/// </summary>
42874287
/// <param name="transactionId">The id of the transaction successfully made towards the Apple App Store</param>
42884288
/// <param name="onComplete">onComplete Action for handling the response</param>
4289-
public static void RedeemAppleAppStorePurchaseForPlayer(string transactionId, Action<LootLockerResponse> onComplete)
4289+
/// <param name="sandboxed">Optional: Should this redemption be made towards sandbox App Store</param>
4290+
public static void RedeemAppleAppStorePurchaseForPlayer(string transactionId, Action<LootLockerResponse> onComplete, bool sandboxed = false)
42904291
{
42914292
if (!CheckInitialized())
42924293
{
@@ -4295,7 +4296,8 @@ public static void RedeemAppleAppStorePurchaseForPlayer(string transactionId, Ac
42954296
}
42964297
var body = LootLockerJson.SerializeObject(new LootLockerRedeemAppleAppStorePurchaseForPlayerRequest()
42974298
{
4298-
transaction_id = transactionId
4299+
transaction_id = transactionId,
4300+
sandboxed = sandboxed
42994301
});
43004302

43014303
LootLockerServerRequest.CallAPI(LootLockerEndPoints.redeemAppleAppStorePurchase.endPoint, LootLockerEndPoints.redeemAppleAppStorePurchase.httpMethod, body, onComplete: (serverResponse) => { LootLockerResponse.Deserialize(onComplete, serverResponse); });
@@ -4307,7 +4309,8 @@ public static void RedeemAppleAppStorePurchaseForPlayer(string transactionId, Ac
43074309
/// <param name="transactionId">The id of the transaction successfully made towards the Apple App Store</param>
43084310
/// <param name="classId">The id of the class to redeem this transaction for</param>
43094311
/// <param name="onComplete">onComplete Action for handling the response</param>
4310-
public static void RedeemAppleAppStorePurchaseForClass(string transactionId, int classId, Action<LootLockerResponse> onComplete)
4312+
/// <param name="sandboxed">Optional: Should this redemption be made towards sandbox App Store</param>
4313+
public static void RedeemAppleAppStorePurchaseForClass(string transactionId, int classId, Action<LootLockerResponse> onComplete, bool sandboxed = false)
43114314
{
43124315
if (!CheckInitialized())
43134316
{
@@ -4317,7 +4320,8 @@ public static void RedeemAppleAppStorePurchaseForClass(string transactionId, int
43174320
var body = LootLockerJson.SerializeObject(new LootLockerRedeemAppleAppStorePurchaseForClassRequest()
43184321
{
43194322
transaction_id = transactionId,
4320-
class_id = classId
4323+
class_id = classId,
4324+
sandboxed = sandboxed
43214325
});
43224326

43234327
LootLockerServerRequest.CallAPI(LootLockerEndPoints.redeemAppleAppStorePurchase.endPoint, LootLockerEndPoints.redeemAppleAppStorePurchase.httpMethod, body, onComplete: (serverResponse) => { LootLockerResponse.Deserialize(onComplete, serverResponse); });

Runtime/Game/Requests/PurchaseRequest.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,10 @@ public class LootLockerPurchaseCatalogItemRequest
9292
/// </summary>
9393
public class LootLockerRedeemAppleAppStorePurchaseForPlayerRequest
9494
{
95-
#if LOOTLOCKER_SANDBOX_APPLE_APP_STORE
9695
/// <summary>
9796
/// Whether or not to use the app store sandbox for this redemption
9897
/// </summary>
99-
public string sandboxed { get; set; } = true;
100-
#endif
98+
public bool sandboxed { get; set; } = false;
10199
/// <summary>
102100
/// The id of the transaction successfully made towards the Apple App Store
103101
/// </summary>

0 commit comments

Comments
 (0)