PicoIAPInterface class.
More...
#include <Pico_IAP.h>
|
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...
|
|
◆ 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
-
SKU | The SKU of the product. |
InConsumePurchaseDelegate | Will 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
-
InProductArray | The current object of product array. |
InGetNextProductArrayPageDelegate | Will 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
-
InPurchaseArray | The current object of purchase array. |
InGetNextPurchaseArrayPageDelegate | Will 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
-
ProductSKUs | The 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. |
Count | The number of 'ProductSKUs' arrays to return. |
InGetProductsBySKUDelegate | Will 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
-
InGetViewerPurchasesDelegate | Will 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
-
SKU | The SKU of the product the user wants to purchase. |
Price | The price for the product. |
Currency | The currency of the payment. |
InLaunchCheckoutFlowDelegate | Will be executed when the request has been completed. Delegate will contain the requested object class. |
- Returns
- Bool:
-
true
: success
-
false
: failure