Navigation
API > API/Plugins > API/Plugins/OnlineSubsystemSteam
Inheritance Hierarchy
- IOnlinePurchase
- TSharedFromThis
- FOnlinePurchaseSteam
References
| Module | OnlineSubsystemSteam |
| Header | /Engine/Plugins/Online/OnlineSubsystemSteam/Source/Public/OnlinePurchaseInterfaceSteam.h |
| Include | #include "OnlinePurchaseInterfaceSteam.h" |
Syntax
class FOnlinePurchaseSteam :
public IOnlinePurchase ,
public TSharedFromThis< FOnlinePurchaseSteam, ESPMode::ThreadSafe >
Remarks
The Steam purchase interface is designed to handle microtransactions in-game, not DLC entitlements (use the external UI to show the Steam store for those) Steam microtransactions are not defined by the server, but rather by the client. UE lets us define these microtransactions in two ways
1) Config Driven Config driven microtransactions can be datamined, and can possibily be tampered if your backend server does not have the proper protections in place to verify the transaction. Therefore it is only recommended for development/debug flows. To add a new static microtransaction to Steam, add the following in your game's Engine file [OnlineSubsystemSteam] +StaticMicrotransactions=(Id=32bitinteger, Amount=costofitem, Description=myMicroTransaction)
2) Server-driven
- Make an implementation of ISteamPurchasingServerLink and implement all functions
Constructors
| Type | Name | Description | |
|---|---|---|---|
FOnlinePurchaseSteam
(
FOnlineSubsystemSteam* InSteamSubsystem |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | GetStoreCategories
(
TArray< FOnlineStoreCategory >& OutCategories |
||
| TSharedPtr< FOnlineStoreOffer > | GetStoreOffer
(
const FUniqueOfferId& OfferId |
||
| void | GetStoreOffers
(
TArray< FOnlineStoreOfferRef >& OutOffers |
||
| void | RegisterServerLink
(
TSharedRef< ISteamPurchasingServerLink > InServerLink |
Overridden from IOnlinePurchase
| Type | Name | Description | |
|---|---|---|---|
| void | Checkout
(
const FUniqueNetId& UserId, |
Initiate the checkout process for purchasing offers via payment | |
| void | Checkout
(
const FUniqueNetId& UserId, |
Initiate the checkout process for purchasing offers via payment without receipts returned Recommended for use when the entitlement or receipt information of the purchase is not needed by the caller | |
| void | FinalizePurchase
(
const FUniqueNetId& UserId, |
Finalizes a purchase with the supporting platform Acknowledges that the purchase has been properly redeemed by the application | |
| void | FinalizeReceiptValidationInfo
(
const FUniqueNetId& UserId, |
||
| void | GetReceipts
(
const FUniqueNetId& UserId, |
Get list of cached receipts for user (includes transactions currently being processed) | |
| bool | IsAllowedToPurchase
(
const FUniqueNetId& UserId |
Determine if user is allowed to purchase from store | |
| void | QueryReceipts
(
const FUniqueNetId& UserId, |
Query for all of the user's receipts from prior purchases | |
| void | RedeemCode
(
const FUniqueNetId& UserId, |
Initiate the checkout process for obtaining offers via code redemption |