7#include "CoreMinimal.h"
8#include "UObject/NoExportTypes.h"
9#include "PPF_Platform.h"
10#include "OnlineSubsystemPico.h"
11#include "Pico_IAP.generated.h"
15DECLARE_LOG_CATEGORY_EXTERN(PicoIAP, Log, All);
19DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetProductsBySKUDelegate,
bool, bIsError,
const FString&, ErrorMessage,
UPico_ProductArray*, ProductArray);
20DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetViewerPurchasesDelegate,
bool, bIsError,
const FString&, ErrorMessage,
UPico_PurchaseArray*, PurchaseArray);
21DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetNextProductArrayPageDelegate,
bool, bIsError,
const FString&, ErrorMessage,
UPico_ProductArray*, ProductArray);
22DECLARE_DYNAMIC_DELEGATE_TwoParams(FConsumePurchaseDelegate,
bool, bIsError,
const FString&, ErrorMessage);
23DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetNextPurchaseArrayPageDelegate,
bool, bIsError,
const FString&, ErrorMessage,
UPico_PurchaseArray*, PurchaseArray);
24DECLARE_DYNAMIC_DELEGATE_ThreeParams(FLaunchCheckoutFlowDelegate,
bool, bIsError,
const FString&, ErrorMessage,
UPico_Purchase*, Purchase);
47 FConsumePurchaseDelegate ConsumePurchaseDelegate;
48 FGetProductsBySKUDelegate GetProductsBySKUDelegate;
49 FGetNextProductArrayPageDelegate GetNextProductArrayPageDelegate;
50 FGetViewerPurchasesDelegate GetViewerPurchasesDelegate;
51 FGetNextPurchaseArrayPageDelegate GetNextPurchaseArrayPageDelegate;
52 FLaunchCheckoutFlowDelegate LaunchCheckoutFlowDelegate;
65 bool ConsumePurchase(
const FString& SKU, FConsumePurchaseDelegate InConsumePurchaseDelegate);
79 bool GetProductsBySKU(TArray<FString> ProductSKUs, int32 Count, FGetProductsBySKUDelegate InGetProductsBySKUDelegate);
90 bool GetNextProductsArrayPage(
UPico_ProductArray* InProductArray, FGetNextProductArrayPageDelegate InGetNextProductArrayPageDelegate);
102 bool GetViewerPurchases(FGetViewerPurchasesDelegate InGetViewerPurchasesDelegate);
113 bool GetNextPurchaseArrayPage(
UPico_PurchaseArray* InPurchaseArray, FGetNextPurchaseArrayPageDelegate InGetNextPurchaseArrayPageDelegate);
131 bool LaunchCheckoutFlow(
const FString& SKU,
const FString& Price,
const FString& Currency, FLaunchCheckoutFlowDelegate InLaunchCheckoutFlowDelegate);
169 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|IAP")
170 static bool ConsumePurchase(UObject* WorldContextObject,
const FString& SKU, FConsumePurchaseDelegate InConsumePurchaseDelegate);
183 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|IAP")
184 static bool GetProductsBySKU(UObject* WorldContextObject, TArray<FString> ProductSKUs, int32 Count, FGetProductsBySKUDelegate InGetProductsBySKUDelegate);
196 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|IAP")
197 static bool GetNextProductsArrayPage(UObject* WorldContextObject,
UPico_ProductArray* InProductArray, FGetNextProductArrayPageDelegate InGetNextProductArrayPageDelegate);
210 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|IAP")
211 static bool GetViewerPurchases(UObject* WorldContextObject, FGetViewerPurchasesDelegate InGetViewerPurchasesDelegate);
223 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|IAP")
224 static bool GetNextPurchaseArrayPage(UObject* WorldContextObject,
UPico_PurchaseArray* InPurchaseArray, FGetNextPurchaseArrayPageDelegate InGetNextPurchaseArrayPageDelegate);
243 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|IAP")
244 static bool LaunchCheckoutFlow(UObject* WorldContextObject,
const FString& SKU,
const FString& Price,
const FString& Currency, FLaunchCheckoutFlowDelegate InLaunchCheckoutFlowDelegate);
259 FString Description = FString();
260 FString FormattedPrice = FString();
261 FString Price = FString();
262 FString Currency = FString();
263 FString Name = FString();
264 FString SKU = FString();
266 void InitParams(ppfProduct* InppfProductHandle);
268 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product")
269 FString GetDescription();
271 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product")
272 FString GetFormattedPrice();
274 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product")
277 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product")
278 FString GetCurrency();
280 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product")
283 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product")
298 TArray<UPico_Product*> ProductArray;
301 FString NextPageParam = FString();
304 void InitParams(ppfProductArray* InppfProductArrayHandle);
306 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product Array")
309 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product Array")
310 FString GetNextPageParam();
312 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product Array")
315 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product Array")
328 int32 ExpirationTime = 0;
330 FString ID = FString();
331 FString SKU = FString();
333 void InitParams(ppfPurchase* InppfPurchaseHandle);
335 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Purchase")
336 int32 GetExpirationTime();
338 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Purchase")
339 int32 GetGrantTime();
341 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Purchase")
344 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Purchase")
359 TArray<UPico_Purchase*> PurchaseArray;
362 FString NextPageParam = FString();
365 void InitParams(ppfPurchaseArray* InppfPurchaseArrayHandle);
367 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Purchase Array")
370 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Purchase Array")
371 FString GetNextPageParam();
373 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Purchase Array")
376 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Purchase Array")
OnlineSubsystemPico class inherited from FOnlineSubsystemImpl(Unreal Engine)
Definition: OnlineSubsystemPico.h:44
PicoIAPInterface class.
Definition: Pico_IAP.h:38
OnlinePicoIAP Blueprint Function class.
Definition: Pico_IAP.h:151
Definition: Pico_IAP.h:292
Definition: Pico_IAP.h:255
Definition: Pico_IAP.h:353
Definition: Pico_IAP.h:324