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);
41 FOnlineSubsystemPico& PicoSubsystem;
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);
78 bool GetProductsBySKU(TArray<FString> ProductSKUs, int32 Count, FGetProductsBySKUDelegate InGetProductsBySKUDelegate);
130 bool LaunchCheckoutFlow(
const FString& SKU,
const FString& Price,
const FString& Currency, FLaunchCheckoutFlowDelegate InLaunchCheckoutFlowDelegate);
168 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|IAP")
169 static
bool ConsumePurchase(UObject* WorldContextObject,const FString& SKU, FConsumePurchaseDelegate InConsumePurchaseDelegate);
182 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|IAP")
183 static
bool GetProductsBySKU(UObject* WorldContextObject, TArray<FString> ProductSKUs, int32 Count, FGetProductsBySKUDelegate InGetProductsBySKUDelegate);
195 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|IAP")
196 static
bool GetNextProductsArrayPage(UObject* WorldContextObject,
UPico_ProductArray* InProductArray, FGetNextProductArrayPageDelegate InGetNextProductArrayPageDelegate);
209 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|IAP")
210 static
bool GetViewerPurchases(UObject* WorldContextObject, FGetViewerPurchasesDelegate InGetViewerPurchasesDelegate);
222 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|IAP")
223 static
bool GetNextPurchaseArrayPage(UObject* WorldContextObject,
UPico_PurchaseArray* InPurchaseArray, FGetNextPurchaseArrayPageDelegate InGetNextPurchaseArrayPageDelegate);
242 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|IAP")
243 static
bool LaunchCheckoutFlow(UObject* WorldContextObject, const FString& SKU, const FString& Price, const FString& Currency, FLaunchCheckoutFlowDelegate InLaunchCheckoutFlowDelegate);
258 FString Description = FString();
259 FString FormattedPrice = FString();
260 FString Price = FString();
261 FString Currency = FString();
262 FString Name = FString();
263 FString SKU = FString();
265 void InitParams(ppfProduct* InppfProductHandle);
267 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product")
268 FString GetDescription();
270 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product")
271 FString GetFormattedPrice();
273 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product")
276 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product")
277 FString GetCurrency();
279 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product")
282 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product")
297 TArray<UPico_Product*> ProductArray;
300 FString NextPageParam = FString();
303 void InitParams(ppfProductArray* InppfProductArrayHandle);
305 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product Array")
308 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product Array")
309 FString GetNextPageParam();
311 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product Array")
314 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Product Array")
327 int32 ExpirationTime = 0;
329 FString ID = FString();
330 FString SKU = FString();
332 void InitParams(ppfPurchase* InppfPurchaseHandle);
334 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Purchase")
335 int32 GetExpirationTime();
337 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Purchase")
338 int32 GetGrantTime();
340 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Purchase")
343 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Purchase")
358 TArray<UPico_Purchase*> PurchaseArray;
361 FString NextPageParam = FString();
364 void InitParams(ppfPurchaseArray* InppfPurchaseArrayHandle);
366 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Purchase Array")
369 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Purchase Array")
370 FString GetNextPageParam();
372 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Purchase Array")
375 UFUNCTION(BlueprintPure, Category =
"Pico Platform|IAP|Purchase Array")
PicoIAPInterface class.
Definition: Pico_IAP.h:38
bool GetProductsBySKU(TArray< FString > ProductSKUs, int32 Count, FGetProductsBySKUDelegate InGetProductsBySKUDelegate)
Gets a list of purchasable products in the current app.
bool ConsumePurchase(const FString &SKU, FConsumePurchaseDelegate InConsumePurchaseDelegate)
Records the order fulfillment result for a consumable.
bool GetNextPurchaseArrayPage(UPico_PurchaseArray *InPurchaseArray, FGetNextPurchaseArrayPageDelegate InGetNextPurchaseArrayPageDelegate)
Gets the next page of purchased products.
bool LaunchCheckoutFlow(const FString &SKU, const FString &Price, const FString &Currency, FLaunchCheckoutFlowDelegate InLaunchCheckoutFlowDelegate)
Launches the checkout flow to pay for a product.
bool GetNextProductsArrayPage(UPico_ProductArray *InProductArray, FGetNextProductArrayPageDelegate InGetNextProductArrayPageDelegate)
Gets the next page of purchasable products.
bool GetViewerPurchases(FGetViewerPurchasesDelegate InGetViewerPurchasesDelegate)
Gets a list of purchased products for a user.
OnlinePicoIAP Blueprint Function class.
Definition: Pico_IAP.h:150
Definition: Pico_IAP.h:291
Definition: Pico_IAP.h:254
Definition: Pico_IAP.h:352
Definition: Pico_IAP.h:323