LootLocker Unreal SDK 10.5.0
Game backend SDK for Unreal Engine
Loading...
Searching...
No Matches
LootLockerPurchasesRequestHandler.h
Go to the documentation of this file.
1// Copyright (c) 2021 LootLocker
2
3#pragma once
4
5
6#include "CoreMinimal.h"
9#include "TimerManager.h"
10#include "Kismet/BlueprintAsyncActionBase.h"
11#include "LootLockerSDK/Private/Utils/LootLockerUtilities.h"
12#include "LootLockerPurchasesRequestHandler.generated.h"
13
14USTRUCT(BlueprintType)
16{
17 GENERATED_BODY()
18 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
19 int time_left = 0;
20};
21
25USTRUCT(BlueprintType, Category = "LootLocker")
27{
28 GENERATED_BODY()
32 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
33 FString Catalog_listing_id = "";
37 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
38 int Quantity = 0;
39};
40
44USTRUCT(BlueprintType, Category = "LootLocker")
46{
47 GENERATED_BODY()
51 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
52 FString Wallet_id = "";
56 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
58};
59
63USTRUCT(BlueprintType, Category = "LootLocker")
65{
66 GENERATED_BODY()
70 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
71 bool Sandboxed = false;
75 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
76 FString Transaction_id = "";
77};
78
82USTRUCT(BlueprintType, Category = "LootLocker")
84{
85 GENERATED_BODY()
89 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
90 int Class_id = 0;
91};
92
96USTRUCT(BlueprintType, Category = "LootLocker")
98{
99 GENERATED_BODY()
103 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
104 FString Product_id = "";
108 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
109 FString Purchase_token = "";
110};
111
115USTRUCT(BlueprintType, Category = "LootLocker")
117{
118 GENERATED_BODY()
122 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
123 int Class_id = 0;
124};
125
129USTRUCT(BlueprintType, Category = "LootLocker")
131{
132 GENERATED_BODY()
136 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
137 FString Account_id = "";
141 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
142 FString Bearer_token = "";
146 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
147 TArray<FString> Entitlement_ids;
151 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
152 FString Sandbox_id = "";
153};
154
158USTRUCT(BlueprintType, Category = "LootLocker")
160{
161 GENERATED_BODY()
165 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
166 FString Character_id = "";
167};
168
172USTRUCT(BlueprintType, Category = "LootLocker")
174{
175 GENERATED_BODY()
179 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
180 FString Service_ticket = "";
184 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
185 int Expires_in = 0;
189 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
190 FString Expires_at = "";
191};
192
196USTRUCT(BlueprintType, Category = "LootLocker")
198{
199 GENERATED_BODY()
203 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
204 FString User_collections_id = "";
208 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
209 FString Product_id = "";
210};
211
215USTRUCT(BlueprintType, Category = "LootLocker")
217{
218 GENERATED_BODY()
222 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
223 int Class_id = 0;
224};
225
228UENUM(BlueprintType, Category = "LootLocker")
233{
234 Init = 0,
235 Approved = 1,
236 Succeeded = 2,
237 Failed = 3,
238 Refunded = 4,
239 PartialRefund = 5,
240 ChargedBack = 6,
243};
245
249USTRUCT(BlueprintType, Category = "LootLocker")
251{
252 GENERATED_BODY()
256 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
257 FString Steam_id = "";
261 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
262 FString Currency = "";
266 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
267 FString Language = "";
271 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
272 FString Catalog_item_id = "";
273};
274
278USTRUCT(BlueprintType, Category = "LootLocker")
280{
281 GENERATED_BODY()
285 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
286 int Class_id = 0;
287};
288
292USTRUCT(BlueprintType, Category = "LootLocker")
294{
295 GENERATED_BODY()
299 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
300 bool isSuccess = false;
304 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
305 FString Entitlement_id = "";
306};
307
311USTRUCT(BlueprintType, Category = "LootLocker")
313{
314 GENERATED_BODY()
318 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
319 FString Entitlement_id = "";
320};
321
325USTRUCT(BlueprintType, Category = "LootLocker")
327{
328 GENERATED_BODY()
332 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
334};
335
339USTRUCT(BlueprintType, Category = "LootLocker")
341{
342 GENERATED_BODY()
346 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
347 FString Entitlement_id = "";
348};
349
352UENUM(BlueprintType, Category = "LootLocker")
357{
358 removed = 0,
359 skipped = 1,
360};
362
365UENUM(BlueprintType, Category = "LootLocker")
375
378UENUM(BlueprintType, Category = "LootLocker")
390
391USTRUCT(BlueprintType)
393{
394 GENERATED_BODY()
396 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
397 TArray<FString> entitlement_ids;
398};
399
400USTRUCT(BlueprintType)
402{
403 GENERATED_BODY()
405 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
406 int64 asset_id = 0;
408 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
409 FString name;
411 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
413};
414
415USTRUCT(BlueprintType)
417{
418 GENERATED_BODY()
420 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
421 FString currency_id;
423 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
424 FString currency_code;
426 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
427 FString amount;
428};
429
430USTRUCT(BlueprintType)
432{
433 GENERATED_BODY()
435 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
438 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
439 FString id;
441 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
442 FString name;
444 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
445 FString amount;
446};
447
448USTRUCT(BlueprintType)
450{
451 GENERATED_BODY()
459 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
462 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
463 FString message;
465 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
467};
468
469USTRUCT(BlueprintType)
471{
472 GENERATED_BODY()
474 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
475 FString entitlement_id;
477 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
479};
480
481USTRUCT(BlueprintType)
483{
484 GENERATED_BODY()
486 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
487 TArray<FLootLockerRefundPlayerInventoryEvent> player_inventory_events;
489 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
490 TArray<FLootLockerRefundCurrencyEntry> currency_refunded;
492 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
493 TArray<FLootLockerRefundCurrencyEntry> currency_clawback;
498 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
499 TArray<FLootLockerRefundWarning> warnings;
500};
501
502//==================================================
503// Async Purchase Types
504//==================================================
505
508UENUM(BlueprintType, Category = "LootLocker")
513{
514 Pending = 0,
515 Active = 1,
516 Failed = 2,
517 TimedOut = 3,
518 Cancelled = 4,
519};
521
525USTRUCT(BlueprintType, Category = "LootLocker")
527{
528 GENERATED_BODY()
532 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
533 FString Entitlement_id = "";
534};
535
539USTRUCT(BlueprintType, Category = "LootLocker")
541{
542 GENERATED_BODY()
546 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
547 FString Entitlement_id = "";
551 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
556 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
557 FString Error = "";
558};
559
562
566
568{
569 static constexpr int RetryLimit = 5;
570 FString EntitlementId = "";
571 FString WalletId = "";
572 TArray<FLootLockerCatalogItemAndQuantityPair> Items;
574 FDateTime TimeoutTime;
575 float PollingIntervalSeconds = 1.0f;
576 int Retries = 0;
577 bool ShouldCancel = false;
579
581 FLootLockerAsyncPurchaseProcess(float _PollingIntervalSeconds, float TimeoutAfterMinutes);
582};
583
592
596USTRUCT(BlueprintType, Category = "LootLocker")
598{
599 GENERATED_BODY()
603 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
604 FString Catalog_item_id = "";
605};
606
610USTRUCT(BlueprintType, Category = "LootLocker")
612{
613 GENERATED_BODY()
617 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
618 FString checkout_link = "";
622 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
623 FString entitlement_id = "";
624};
625
630
632UCLASS()
633class LOOTLOCKERSDK_API ULootLockerPurchasesRequestHandler : public UObject
634{
635 GENERATED_BODY()
636public:
638
639
640 static FString ActivateRentalAsset(const FLootLockerPlayerData& PlayerData, int AssetInstanceId, const FActivateRentalAssetResponseDelegate& OnCompletedRequest);
641
642 static FString PurchaseCatalogItems(const FLootLockerPlayerData& PlayerData, const FString& WalletID, const TArray<FLootLockerCatalogItemAndQuantityPair>& ItemsToPurchase, const FLootLockerDefaultDelegate& OnCompleted);
643
644 static FString RedeemAppleAppStorePurchaseForPlayer(const FLootLockerPlayerData& PlayerData, const FString& TransactionId, const bool Sandboxed = false, const FLootLockerDefaultDelegate& OnCompleted = FLootLockerDefaultDelegate());
645
646 static FString RedeemAppleAppStorePurchaseForClass(const FLootLockerPlayerData& PlayerData, const int ClassId, const FString& TransactionId, const bool Sandboxed = false, const FLootLockerDefaultDelegate& OnCompleted = FLootLockerDefaultDelegate());
647
648 static FString RedeemGooglePlayStorePurchaseForPlayer(const FLootLockerPlayerData& PlayerData, const FString& ProductId, const FString& PurchaseToken, const FLootLockerDefaultDelegate& OnCompleted);
649
650 static FString RedeemGooglePlayStorePurchaseForClass(const FLootLockerPlayerData& PlayerData, const int ClassId, const FString& ProductId, const FString& PurchaseToken, const FLootLockerDefaultDelegate& OnCompleted);
651
652 static FString RedeemEpicStorePurchase(const FLootLockerPlayerData& PlayerData, const FString& AccountId, const FString& BearerToken, const TArray<FString>& EntitlementIds, const FString& SandboxId, const FLootLockerDefaultDelegate& OnCompleted);
653
654 static FString RedeemEpicStorePurchaseForCharacter(const FLootLockerPlayerData& PlayerData, const FString& CharacterId, const FString& AccountId, const FString& BearerToken, const TArray<FString>& EntitlementIds, const FString& SandboxId, const FLootLockerDefaultDelegate& OnCompleted);
655
656 static FString GetXboxServiceTicket(const FLootLockerPlayerData& PlayerData, const FLootLockerXboxServiceTicketDelegate& OnCompleted);
657
658 static FString RedeemXboxStorePurchaseForPlayer(const FLootLockerPlayerData& PlayerData, const FString& UserCollectionsId, const FString& ProductId, const FLootLockerDefaultDelegate& OnCompleted);
659
660 static FString RedeemXboxStorePurchaseForClass(const FLootLockerPlayerData& PlayerData, const int ClassId, const FString& UserCollectionsId, const FString& ProductId, const FLootLockerDefaultDelegate& OnCompleted);
661
662 static FString RedeemPlayStationStorePurchaseForPlayer(const FLootLockerPlayerData& PlayerData, const FString& TransactionId, const FString& AuthCode, const FString& EntitlementLabel, const FString& ServiceLabel = "", const FString& ServiceName = "", const int Environment = -1, const int UseCount = -1, const FLootLockerDefaultDelegate& OnCompleted = FLootLockerDefaultDelegate());
663
664 static FString RedeemPlayStationStorePurchaseForCharacter(const FLootLockerPlayerData& PlayerData, const FString& CharacterId, const FString& TransactionId, const FString& AuthCode, const FString& EntitlementLabel, const FString& ServiceLabel = "", const FString& ServiceName = "", const int Environment = -1, const int UseCount = -1, const FLootLockerDefaultDelegate& OnCompleted = FLootLockerDefaultDelegate());
665
666 static FString BeginSteamPurchaseRedemption(const FLootLockerPlayerData& PlayerData, const FString& SteamId, const FString& Currency, const FString& Language, const FString& CatalogItemId, const FLootLockerBeginSteamPurchaseRedemptionDelegate& OnCompleted);
667
668 static FString BeginSteamPurchaseRedemptionForClass(const FLootLockerPlayerData& PlayerData, const int ClassId, const FString& SteamId, const FString& Currency, const FString& Language, const FString& CatalogItemId, const FLootLockerBeginSteamPurchaseRedemptionDelegate& OnCompleted);
669
670 static FString QuerySteamPurchaseRedemptionStatus(const FLootLockerPlayerData& PlayerData, const FString& EntitlementId, const FLootLockerQuerySteamPurchaseRedemptionStatusDelegate& OnCompleted);
671
672 static FString FinalizeSteamPurchaseRedemption(const FLootLockerPlayerData& PlayerData, const FString& EntitlementId, const FLootLockerDefaultDelegate& OnCompleted);
673
674 static FString RefundByEntitlementIds(const FLootLockerPlayerData& PlayerData, const TArray<FString>& EntitlementIds, const FLootLockerRefundByEntitlementIdsDelegate& OnCompleted);
675
676 static FString CreateStripeCheckoutSession(const FLootLockerPlayerData& PlayerData, const FString& CatalogItemId, const FLootLockerCreateStripeCheckoutSessionDelegate& OnCompleted);
677
678 static FString InitiateAsyncPurchase(const FLootLockerPlayerData& PlayerData, const FString& WalletId, const TArray<FLootLockerCatalogItemAndQuantityPair>& Items, const FLootLockerAsyncPurchaseInitiatedDelegate& OnCompleted);
679
680 static FString GetAsyncPurchaseStatus(const FLootLockerPlayerData& PlayerData, const FString& EntitlementId, const FLootLockerAsyncPurchaseStatusDelegate& OnCompleted);
681
682 static FString RetryAsyncPurchase(const FLootLockerPlayerData& PlayerData, const FString& EntitlementId, const FString& WalletId, const TArray<FLootLockerCatalogItemAndQuantityPair>& Items, const FLootLockerAsyncPurchaseInitiatedDelegate& OnCompleted);
683
684 static FString StartAsyncPurchasePolling(const FLootLockerPlayerData& PlayerData, const FString& WalletId, const TArray<FLootLockerCatalogItemAndQuantityPair>& Items, const FLootLockerAsyncPurchaseStatusDelegate& OnStatusUpdate, const FLootLockerAsyncPurchaseStatusDelegate& OnComplete, float PollingIntervalSeconds = 1.0f, float TimeoutAfterMinutes = 5.0f);
685
686 static void CancelAsyncPurchasePolling(const FString& ProcessID);
687
688 static FString ContinualAsyncPurchasePollAction(const FString& ProcessID, const FLootLockerAsyncPurchaseStatusDelegate& OnStatusUpdate, const FLootLockerAsyncPurchaseStatusDelegate& OnComplete);
689
690 static void KillAsyncPurchaseProcess(const FString& ProcessID);
691
692protected:
693 static FString GetAsyncPurchaseStatus(const FLootLockerPlayerData& PlayerData, const FString& EntitlementId, const LLAPI<FLootLockerAsyncPurchaseStatusResponse>::FResponseInspectorCallback& OnCompleted);
694 static void SetAsyncPurchaseTimer(FTimerHandle& TimerHandle, const FTimerDelegate& Delegate, float Time);
695 static void ClearAsyncPurchaseTimer(FTimerHandle& TimerHandle);
696
697private:
698 static TMap<FString, FLootLockerAsyncPurchaseProcess> AsyncPurchaseProcesses;
699};
700
701//==================================================
702// Async Blueprint Delegate Definitions
703//==================================================
704
708DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FLootLockerAsyncPurchasePollingMulticastDelegate, FString, ProcessID, FLootLockerAsyncPurchaseStatusResponse, Response);
709
710//==================================================
711// Async Blueprint Node Definitions
712//==================================================
713
714UCLASS()
715class ULootLockerAsyncPollAsyncPurchase : public UBlueprintAsyncActionBase
716{
717 GENERATED_BODY()
718public:
730 UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true", Category = "LootLocker Methods | Purchases", WorldContext = "WorldContextObject", AdvancedDisplay = "PollingIntervalSeconds,TimeoutAfterMinutes,ForPlayerWithUlid", PollingIntervalSeconds = 1.0f, TimeoutAfterMinutes = 5.0f, ForPlayerWithUlid = ""))
731 static LOOTLOCKERSDK_API ULootLockerAsyncPollAsyncPurchase* AsyncPollAsyncPurchase(UObject* WorldContextObject, FString ForPlayerWithUlid, FString WalletId, TArray<FLootLockerCatalogItemAndQuantityPair> Items, float PollingIntervalSeconds, float TimeoutAfterMinutes);
732
734 UPROPERTY(BlueprintAssignable)
735 FLootLockerAsyncPurchasePollingMulticastDelegate OnPending;
737 UPROPERTY(BlueprintAssignable)
738 FLootLockerAsyncPurchasePollingMulticastDelegate OnActive;
740 UPROPERTY(BlueprintAssignable)
741 FLootLockerAsyncPurchasePollingMulticastDelegate OnFailed;
743 UPROPERTY(BlueprintAssignable)
744 FLootLockerAsyncPurchasePollingMulticastDelegate OnTimedOut;
746 UPROPERTY(BlueprintAssignable)
747 FLootLockerAsyncPurchasePollingMulticastDelegate OnCancelled;
748
749 LOOTLOCKERSDK_API virtual void Activate() override;
750
751protected:
752 FString ForPlayerWithUlid = "";
753 FString ProcessID = "";
754 FString WalletId = "";
756 float PollingIntervalInSeconds = 1.0f;
757 float TimeoutAfterMinutes = 5.0f;
758};
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FLootLockerAsyncPurchasePollingMulticastDelegate, FString, ProcessID, FLootLockerAsyncPurchaseStatusResponse, Response)
Multicast delegate for events triggered from the async purchase polling node.
void(* FLootLockerDefaultDelegate)(FLootLockerResponse)
Definition LootLockerResponse.h:38
Definition LootLockerPurchasesRequestHandler.h:716
Definition LootLockerPurchasesRequestHandler.h:634
static void KillAsyncPurchaseProcess(const FString &ProcessID)
static FString RetryAsyncPurchase(const FLootLockerPlayerData &PlayerData, const FString &EntitlementId, const FString &WalletId, const TArray< FLootLockerCatalogItemAndQuantityPair > &Items, const FLootLockerAsyncPurchaseInitiatedDelegate &OnCompleted)
static FString RedeemPlayStationStorePurchaseForPlayer(const FLootLockerPlayerData &PlayerData, const FString &TransactionId, const FString &AuthCode, const FString &EntitlementLabel, const FString &ServiceLabel="", const FString &ServiceName="", const int Environment=-1, const int UseCount=-1, const FLootLockerDefaultDelegate &OnCompleted=FLootLockerDefaultDelegate())
static FString BeginSteamPurchaseRedemption(const FLootLockerPlayerData &PlayerData, const FString &SteamId, const FString &Currency, const FString &Language, const FString &CatalogItemId, const FLootLockerBeginSteamPurchaseRedemptionDelegate &OnCompleted)
static FString CreateStripeCheckoutSession(const FLootLockerPlayerData &PlayerData, const FString &CatalogItemId, const FLootLockerCreateStripeCheckoutSessionDelegate &OnCompleted)
static FString ActivateRentalAsset(const FLootLockerPlayerData &PlayerData, int AssetInstanceId, const FActivateRentalAssetResponseDelegate &OnCompletedRequest)
static FString RedeemPlayStationStorePurchaseForCharacter(const FLootLockerPlayerData &PlayerData, const FString &CharacterId, const FString &TransactionId, const FString &AuthCode, const FString &EntitlementLabel, const FString &ServiceLabel="", const FString &ServiceName="", const int Environment=-1, const int UseCount=-1, const FLootLockerDefaultDelegate &OnCompleted=FLootLockerDefaultDelegate())
static FString GetAsyncPurchaseStatus(const FLootLockerPlayerData &PlayerData, const FString &EntitlementId, const LLAPI< FLootLockerAsyncPurchaseStatusResponse >::FResponseInspectorCallback &OnCompleted)
static void SetAsyncPurchaseTimer(FTimerHandle &TimerHandle, const FTimerDelegate &Delegate, float Time)
static FString RedeemEpicStorePurchase(const FLootLockerPlayerData &PlayerData, const FString &AccountId, const FString &BearerToken, const TArray< FString > &EntitlementIds, const FString &SandboxId, const FLootLockerDefaultDelegate &OnCompleted)
static FString RedeemEpicStorePurchaseForCharacter(const FLootLockerPlayerData &PlayerData, const FString &CharacterId, const FString &AccountId, const FString &BearerToken, const TArray< FString > &EntitlementIds, const FString &SandboxId, const FLootLockerDefaultDelegate &OnCompleted)
static FString RedeemAppleAppStorePurchaseForClass(const FLootLockerPlayerData &PlayerData, const int ClassId, const FString &TransactionId, const bool Sandboxed=false, const FLootLockerDefaultDelegate &OnCompleted=FLootLockerDefaultDelegate())
static FString RedeemGooglePlayStorePurchaseForClass(const FLootLockerPlayerData &PlayerData, const int ClassId, const FString &ProductId, const FString &PurchaseToken, const FLootLockerDefaultDelegate &OnCompleted)
static FString RedeemGooglePlayStorePurchaseForPlayer(const FLootLockerPlayerData &PlayerData, const FString &ProductId, const FString &PurchaseToken, const FLootLockerDefaultDelegate &OnCompleted)
static FString RedeemXboxStorePurchaseForClass(const FLootLockerPlayerData &PlayerData, const int ClassId, const FString &UserCollectionsId, const FString &ProductId, const FLootLockerDefaultDelegate &OnCompleted)
ULootLockerPurchasesRequestHandler()
Definition LootLockerPurchasesRequestHandler.h:637
static void CancelAsyncPurchasePolling(const FString &ProcessID)
static void ClearAsyncPurchaseTimer(FTimerHandle &TimerHandle)
static FString StartAsyncPurchasePolling(const FLootLockerPlayerData &PlayerData, const FString &WalletId, const TArray< FLootLockerCatalogItemAndQuantityPair > &Items, const FLootLockerAsyncPurchaseStatusDelegate &OnStatusUpdate, const FLootLockerAsyncPurchaseStatusDelegate &OnComplete, float PollingIntervalSeconds=1.0f, float TimeoutAfterMinutes=5.0f)
static FString GetXboxServiceTicket(const FLootLockerPlayerData &PlayerData, const FLootLockerXboxServiceTicketDelegate &OnCompleted)
static FString InitiateAsyncPurchase(const FLootLockerPlayerData &PlayerData, const FString &WalletId, const TArray< FLootLockerCatalogItemAndQuantityPair > &Items, const FLootLockerAsyncPurchaseInitiatedDelegate &OnCompleted)
static FString RefundByEntitlementIds(const FLootLockerPlayerData &PlayerData, const TArray< FString > &EntitlementIds, const FLootLockerRefundByEntitlementIdsDelegate &OnCompleted)
static FString BeginSteamPurchaseRedemptionForClass(const FLootLockerPlayerData &PlayerData, const int ClassId, const FString &SteamId, const FString &Currency, const FString &Language, const FString &CatalogItemId, const FLootLockerBeginSteamPurchaseRedemptionDelegate &OnCompleted)
static FString QuerySteamPurchaseRedemptionStatus(const FLootLockerPlayerData &PlayerData, const FString &EntitlementId, const FLootLockerQuerySteamPurchaseRedemptionStatusDelegate &OnCompleted)
static FString RedeemXboxStorePurchaseForPlayer(const FLootLockerPlayerData &PlayerData, const FString &UserCollectionsId, const FString &ProductId, const FLootLockerDefaultDelegate &OnCompleted)
static FString GetAsyncPurchaseStatus(const FLootLockerPlayerData &PlayerData, const FString &EntitlementId, const FLootLockerAsyncPurchaseStatusDelegate &OnCompleted)
static FString ContinualAsyncPurchasePollAction(const FString &ProcessID, const FLootLockerAsyncPurchaseStatusDelegate &OnStatusUpdate, const FLootLockerAsyncPurchaseStatusDelegate &OnComplete)
static FString FinalizeSteamPurchaseRedemption(const FLootLockerPlayerData &PlayerData, const FString &EntitlementId, const FLootLockerDefaultDelegate &OnCompleted)
static FString RedeemAppleAppStorePurchaseForPlayer(const FLootLockerPlayerData &PlayerData, const FString &TransactionId, const bool Sandboxed=false, const FLootLockerDefaultDelegate &OnCompleted=FLootLockerDefaultDelegate())
static FString PurchaseCatalogItems(const FLootLockerPlayerData &PlayerData, const FString &WalletID, const TArray< FLootLockerCatalogItemAndQuantityPair > &ItemsToPurchase, const FLootLockerDefaultDelegate &OnCompleted)
ELootLockerRefundInventoryEventAction
Possible actions for a player inventory event during a refund.
Definition LootLockerPurchasesRequestHandler.h:357
void(* FLootLockerRefundByEntitlementIdsDelegate)(FLootLockerRefundByEntitlementIdsResponse)
C++ response callback delegate; receives an FLootLockerRefundByEntitlementIdsResponse result.
Definition LootLockerPurchasesRequestHandler.h:591
ELootLockerRefundNonReversibleRewardKind
Possible kinds of non-reversible rewards in a refund warning.
Definition LootLockerPurchasesRequestHandler.h:370
void(* FLootLockerCreateStripeCheckoutSessionDelegate)(FLootLockerCreateStripeCheckoutSessionResponse)
C++ response callback delegate; receives an FLootLockerCreateStripeCheckoutSessionResponse result.
Definition LootLockerPurchasesRequestHandler.h:627
void(* FLootLockerXboxServiceTicketDelegate)(FLootLockerXboxServiceTicketResponse)
C++ response callback delegate; receives an FLootLockerXboxServiceTicketResponse result.
Definition LootLockerPurchasesRequestHandler.h:629
void(* FLootLockerQuerySteamPurchaseRedemptionStatusDelegate)(FLootLockerQuerySteamPurchaseRedemptionStatusResponse)
C++ response callback delegate; receives an FLootLockerQuerySteamPurchaseRedemptionStatusResponse res...
Definition LootLockerPurchasesRequestHandler.h:589
ELootLockerSteamPurchaseRedemptionStatus
Possible statuses a Steam Purchase can have.
Definition LootLockerPurchasesRequestHandler.h:233
void(* FLootLockerAsyncPurchaseStatusDelegate)(FLootLockerAsyncPurchaseStatusResponse)
C++ response callback delegate; receives an FLootLockerAsyncPurchaseStatusResponse result.
Definition LootLockerPurchasesRequestHandler.h:565
void(* FLootLockerAsyncPurchaseInitiatedDelegate)(FLootLockerAsyncPurchaseInitiatedResponse)
C++ response callback delegate; receives an FLootLockerAsyncPurchaseInitiatedResponse result.
Definition LootLockerPurchasesRequestHandler.h:563
ELootLockerRefundWarningDetailType
Possible warning types in a refund response.
Definition LootLockerPurchasesRequestHandler.h:383
ELootLockerAsyncPurchaseStatus
Possible statuses for an async purchase.
Definition LootLockerPurchasesRequestHandler.h:513
void(* FLootLockerBeginSteamPurchaseRedemptionDelegate)(FLootLockerBeginSteamPurchaseRedemptionResponse)
C++ response callback delegate; receives an FLootLockerBeginSteamPurchaseRedemptionResponse result.
Definition LootLockerPurchasesRequestHandler.h:587
void(* FActivateRentalAssetResponseDelegate)(FLootLockerActivateRentalAssetResponse)
C++ response callback delegate; receives an FLootLockerActivateRentalAssetResponse result.
Definition LootLockerPurchasesRequestHandler.h:585
Definition LootLockerPurchasesRequestHandler.h:16
Response from initiating an async purchase.
Definition LootLockerPurchasesRequestHandler.h:527
Definition LootLockerPurchasesRequestHandler.h:568
FTimerHandle AsyncPurchaseProcessTimerHandle
Definition LootLockerPurchasesRequestHandler.h:578
TArray< FLootLockerCatalogItemAndQuantityPair > Items
Definition LootLockerPurchasesRequestHandler.h:572
FLootLockerAsyncPurchaseProcess(float _PollingIntervalSeconds, float TimeoutAfterMinutes)
FLootLockerPlayerData PlayerData
Definition LootLockerPurchasesRequestHandler.h:573
FDateTime TimeoutTime
Definition LootLockerPurchasesRequestHandler.h:574
Response from polling the status of an async purchase.
Definition LootLockerPurchasesRequestHandler.h:541
Request to begin the Steam purchase redemption process for a catalog item for a specific class,...
Definition LootLockerPurchasesRequestHandler.h:280
Request to begin the Steam purchase redemption process for a catalog item, specifying the Steam user ...
Definition LootLockerPurchasesRequestHandler.h:251
Response indicating whether the Steam purchase redemption process started successfully,...
Definition LootLockerPurchasesRequestHandler.h:294
Pairs a catalog listing identifier with the quantity to purchase.
Definition LootLockerPurchasesRequestHandler.h:27
Request to create a Stripe Checkout session for a catalog item.
Definition LootLockerPurchasesRequestHandler.h:598
Response from creating a Stripe Checkout session.
Definition LootLockerPurchasesRequestHandler.h:612
Request to finalize a completed Steam purchase redemption by entitlement identifier.
Definition LootLockerPurchasesRequestHandler.h:341
Definition LootLockerPlayerData.h:12
Request to purchase one or more catalog items from a specific wallet.
Definition LootLockerPurchasesRequestHandler.h:46
Request to query the current status of a Steam purchase redemption by entitlement identifier.
Definition LootLockerPurchasesRequestHandler.h:313
Response containing the current redemption status of a Steam purchase.
Definition LootLockerPurchasesRequestHandler.h:327
Request to redeem an Apple App Store purchase for a specific class, extending the player request with...
Definition LootLockerPurchasesRequestHandler.h:84
Request to redeem an Apple App Store purchase for the current player using a transaction identifier,...
Definition LootLockerPurchasesRequestHandler.h:65
Request to redeem one or more Epic Games Store entitlements for a specific character,...
Definition LootLockerPurchasesRequestHandler.h:160
Request to redeem one or more Epic Games Store entitlements for the current player using an Epic acco...
Definition LootLockerPurchasesRequestHandler.h:131
Request to redeem a Google Play Store purchase for a specific class using a product identifier,...
Definition LootLockerPurchasesRequestHandler.h:117
Request to redeem a Google Play Store purchase for the current player using a product identifier and ...
Definition LootLockerPurchasesRequestHandler.h:98
Request to redeem an Xbox Store purchase for a class.
Definition LootLockerPurchasesRequestHandler.h:217
Request to redeem an Xbox Store purchase for the current player.
Definition LootLockerPurchasesRequestHandler.h:198
Definition LootLockerPurchasesRequestHandler.h:393
Definition LootLockerPurchasesRequestHandler.h:483
Definition LootLockerPurchasesRequestHandler.h:417
Definition LootLockerPurchasesRequestHandler.h:432
Definition LootLockerPurchasesRequestHandler.h:402
Definition LootLockerPurchasesRequestHandler.h:450
Definition LootLockerPurchasesRequestHandler.h:471
Base response struct — every SDK callback receives a struct that derives from this.
Definition LootLockerResponse.h:19
Response from a request to get an Xbox service ticket.
Definition LootLockerPurchasesRequestHandler.h:174