Pico Unreal Platform SDK
FPicoIAPInterface Class Reference

PicoIAPInterface class. More...

#include <Pico_IAP.h>

Public Member Functions

bool ConsumePurchase (const FString &SKU, FConsumePurchaseDelegate InConsumePurchaseDelegate)
 Records the order fulfillment result for a consumable. More...
 
bool GetProductsBySKU (TArray< FString > ProductSKUs, int32 Count, FGetProductsBySKUDelegate InGetProductsBySKUDelegate)
 Gets a list of purchasable products in the current app. More...
 
bool GetNextProductsArrayPage (UPico_ProductArray *InProductArray, FGetNextProductArrayPageDelegate InGetNextProductArrayPageDelegate)
 Gets the next page of purchasable products. More...
 
bool GetViewerPurchases (FGetViewerPurchasesDelegate InGetViewerPurchasesDelegate)
 Gets a list of purchased products for a user. More...
 
bool GetNextPurchaseArrayPage (UPico_PurchaseArray *InPurchaseArray, FGetNextPurchaseArrayPageDelegate InGetNextPurchaseArrayPageDelegate)
 Gets the next page of purchased products. More...
 
bool LaunchCheckoutFlow (const FString &SKU, const FString &Price, const FString &Currency, FLaunchCheckoutFlowDelegate InLaunchCheckoutFlowDelegate)
 Launches the checkout flow to pay for a product. More...
 

Detailed Description

PicoIAPInterface class.

Member Function Documentation

◆ ConsumePurchase()

bool ConsumePurchase ( const FString &  SKU,
FConsumePurchaseDelegate  InConsumePurchaseDelegate 
)

Records the order fulfillment result for a consumable.

Note
Users are unable to repurchase the same consumable until the previous order is fulfilled.
Parameters
SKUThe SKU of the product.
InConsumePurchaseDelegateWill be executed when the request has been completed. Delegate will contain the requested object class.
Returns
Bool:
  • true: success
  • false: failure

◆ GetNextProductsArrayPage()

bool GetNextProductsArrayPage ( UPico_ProductArray InProductArray,
FGetNextProductArrayPageDelegate  InGetNextProductArrayPageDelegate 
)

Gets the next page of purchasable products.

Parameters
InProductArrayThe current object of product array.
InGetNextProductArrayPageDelegateWill be executed when the request has been completed. Delegate will contain the requested object class.
Returns
Bool:
  • true: success
  • false: failure

◆ GetNextPurchaseArrayPage()

bool GetNextPurchaseArrayPage ( UPico_PurchaseArray InPurchaseArray,
FGetNextPurchaseArrayPageDelegate  InGetNextPurchaseArrayPageDelegate 
)

Gets the next page of purchased products.

Parameters
InPurchaseArrayThe current object of purchase array.
InGetNextPurchaseArrayPageDelegateWill be executed when the request has been completed. Delegate will contain the requested object class.
Returns
Bool:
  • true: success
  • false: failure

◆ GetProductsBySKU()

bool GetProductsBySKU ( TArray< FString >  ProductSKUs,
int32  Count,
FGetProductsBySKUDelegate  InGetProductsBySKUDelegate 
)

Gets a list of purchasable products in the current app.

Parameters
ProductSKUsThe SKUs of products. If this parameter is empty, all purchasable products will be returned. If SKUs are specified, products with corresponding SKUs will be returned.
CountThe number of 'ProductSKUs' arrays to return.
InGetProductsBySKUDelegateWill be executed when the request has been completed. Delegate will contain the requested object class.
Returns
Bool:
  • true: success
  • false: failure

◆ GetViewerPurchases()

bool GetViewerPurchases ( FGetViewerPurchasesDelegate  InGetViewerPurchasesDelegate)

Gets a list of purchased products for a user.

Note
This list includes consumables that have not been fulfilled and products that are permanently available after one purchase.
Parameters
InGetViewerPurchasesDelegateWill be executed when the request has been completed. Delegate will contain the requested object class.
Returns
Bool:
  • true: success
  • false: failure

◆ LaunchCheckoutFlow()

bool LaunchCheckoutFlow ( const FString &  SKU,
const FString &  Price,
const FString &  Currency,
FLaunchCheckoutFlowDelegate  InLaunchCheckoutFlowDelegate 
)

Launches the checkout flow to pay for a product.

Note
PICO tries to handle and fix as many errors as possible. Home returns the appropriate error message and how to resolve it if possible. Returns a purchase on success, empty purchase on cancel, and an error on error.
Parameters
SKUThe SKU of the product the user wants to purchase.
PriceThe price for the product.
CurrencyThe currency of the payment.
InLaunchCheckoutFlowDelegateWill be executed when the request has been completed. Delegate will contain the requested object class.
Returns
Bool:
  • true: success
  • false: failure