Skip to content

Commit 1dc5420

Browse files
committed
Update Google Play e-commerce docs
1 parent faafda3 commit 1dc5420

File tree

4 files changed

+41
-32
lines changed

4 files changed

+41
-32
lines changed

docs/changelog.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This release adds support for Unreal Engine 5.7, EOS SDK 1.18.1.2, and routes vo
2525
- Free Edition users will need to update their engine version when updating to this release.
2626
- Added support for EOS SDK 1.17.1.3, 1.18.0.4 and 1.18.1.2.
2727
- Free Edition users will need to download and install the newer EOS SDK from the Epic Games Developer Portal when upgrading to this release. If you need to use an older EOS SDK version, please use the Paid Edition instead.
28-
- Voice chat audio is now routed through Unreal Engine, in preparation for supporting proximity voice chat in a _future release_.
28+
- Voice chat audio is now captured and emitted through Unreal Engine, in preparation for supporting proximity voice chat in a _future release_.
2929
- Added the "Voice Chat Debugger" tool in the editor, which can be accessed from the "Tools" menu. This shows you the state of all voice chat channels and participants, and allows you to easily toggle voice chat settings while testing with play-in-editor.
3030
- Fixed an issue where voice chat did not activate the microphone correctly on iOS.
3131
- Fixed an issue where packaging with Anti-Cheat would fail if the staging directory was read-only.

docs/ossv1/ecom/entitlements.mdx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ title: Retrieving entitlements
33
description: Fetching the e-commerce entitlements that the user owns.
44
---
55

6-
import Tabs from '@theme/Tabs';
7-
import TabItem from '@theme/TabItem';
8-
import Blueprint from '@site/src/Blueprint';
6+
import Tabs from "@theme/Tabs";
7+
import TabItem from "@theme/TabItem";
8+
import Blueprint from "@site/src/Blueprint";
99

1010
E-commerce functionality is provided via the `IOnlineStoreV2`, `IOnlineEntitlements` and `IOnlinePurchase` interfaces. Retrieving the owned entitlements is done via the `IOnlineEntitlements` interface.
1111

@@ -25,7 +25,7 @@ For Steam users, entitlements include both owned DLC and inventory items in the
2525
<TabItem value="google-play">
2626

2727
:::caution
28-
You can not retrieve entitlements on Google Play, because all purchases are consumable and therefore do not persist as entitlements.
28+
You can not retrieve entitlements on Google Play.
2929
:::
3030

3131
</TabItem>
@@ -70,9 +70,9 @@ When your callback fires, you'll want to handle any errors and then deregister t
7070

7171
```cpp
7272
void UMyClass::HandleQueryEntitlementsComplete(
73-
bool bWasSuccessful,
74-
const FUniqueNetId& UserId,
75-
const FString& Namespace,
73+
bool bWasSuccessful,
74+
const FUniqueNetId& UserId,
75+
const FString& Namespace,
7676
const FString& Error)
7777
{
7878
// Deregister the event handler.
@@ -100,7 +100,9 @@ void UMyClass::HandleQueryEntitlementsComplete(
100100
101101
To retrieve the entitlements, use the "Query Entitlements" blueprint node then the "Get All Entitlements" blueprint node.
102102
103-
<Blueprint height="500px" blueprint={`
103+
<Blueprint
104+
height="500px"
105+
blueprint={`
104106
Begin Object Class=/Script/BlueprintGraph.K2Node_GetSubsystem Name="K2Node_GetSubsystem_2"
105107
CustomClass=Class'"/Script/OnlineSubsystemBlueprints.OnlineEntitlementsSubsystem"'
106108
NodePosX=16
@@ -184,11 +186,12 @@ Begin Object Class=/Script/BlueprintGraph.K2Node_CallFunction Name="K2Node_CallF
184186
CustomProperties Pin (PinId=9A0235C349B03628CE3F5A8857EAB1E1,PinName="Namespace",PinToolTip="Namespace\\nString",PinType.PinCategory="string",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_AsyncAction_2 90BACF3749F0E979F5878489089D5413,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
185187
CustomProperties Pin (PinId=7A867BAA4BDD29ABD57E50AD618C3BD1,PinName="OutUserEntitlements",PinToolTip="Out User Entitlements\\nArray of Online Entitlement Object References",Direction="EGPD_Output",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=Class'"/Script/OnlineSubsystemBlueprints.OnlineEntitlement"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=Array,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
186188
End Object
187-
`} />
189+
`}
190+
/>
188191
189192
</TabItem>
190193
</Tabs>
191194
192195
## Consuming an entitlement
193196
194-
Refer to [Purchasing offers](purchasing.mdx) on how to consume entitlements. The process for consuming entitlements differs between different platforms and stores.
197+
Refer to [Purchasing offers](purchasing.mdx) on how to consume entitlements. The process for consuming entitlements differs between different platforms and stores.

docs/ossv1/ecom/offers.mdx

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ title: Retrieving offers
33
description: Fetching the available e-commerce offers for purchase.
44
---
55

6-
import Tabs from '@theme/Tabs';
7-
import TabItem from '@theme/TabItem';
8-
import Blueprint from '@site/src/Blueprint';
6+
import Tabs from "@theme/Tabs";
7+
import TabItem from "@theme/TabItem";
8+
import Blueprint from "@site/src/Blueprint";
99

1010
E-commerce functionality is provided via the `IOnlineStoreV2`, `IOnlineEntitlements` and `IOnlinePurchase` interfaces. Retrieving the available offers is done via the `IOnlineStoreV2` interface.
1111

@@ -42,8 +42,7 @@ When querying offers for Google Play, there are a few things to note:
4242
- The `QueryCategories` operation isn't supported, because Google Play offers don't have categories.
4343
- The `QueryOffersByFilter` operation isn't supported, because Google Play only supports retrieving in-app purchases by product ID.
4444
- You must use `QueryOffersById` to fetch offers on Google Play.
45-
- The Google Play integration only supports consumable in-app purchases.
46-
- The Google Play integration does not support non-consumable in-app purchases.
45+
- The Google Play integration supports consumable and non-consumable in-app purchases.
4746
- The Google Play integration does not support subscriptions.
4847

4948
</TabItem>
@@ -80,7 +79,7 @@ StoreV2->QueryOffersByFilter(
8079
FOnQueryOnlineStoreOffersComplete::CreateLambda([
8180
StoreV2Wk = TWeakPtr<IOnlineStoreV2, ESPMode::ThreadSafe>(StoreV2)](
8281
bool bWasSuccessful,
83-
const TArray<FUniqueOfferId>& OfferIds,
82+
const TArray<FUniqueOfferId>& OfferIds,
8483
const FString& Error)
8584
{
8685
if (auto StoreV2 = StoreV2Wk.Pin())
@@ -89,7 +88,7 @@ StoreV2->QueryOffersByFilter(
8988
{
9089
TArray<FOnlineStoreOfferRef> Offers;
9190
StoreV2->GetOffers(Offers);
92-
91+
9392
// Offers now contains a list of offers. You can call
9493
// GetOffers from anywhere to get the cached list of
9594
// offers.
@@ -104,7 +103,9 @@ StoreV2->QueryOffersByFilter(
104103

105104
To query for the available offers, use the "Query Offers by Filter" blueprint node followed by "Get Offers".
106105

107-
<Blueprint height="500px" blueprint={`
106+
<Blueprint
107+
height="500px"
108+
blueprint={`
108109
Begin Object Class=/Script/BlueprintGraph.K2Node_GetSubsystem Name="K2Node_GetSubsystem_0"
109110
CustomClass=Class'"/Script/OnlineSubsystemBlueprints.OnlineStoreV2Subsystem"'
110111
NodePosY=-175
@@ -182,7 +183,8 @@ Begin Object Class=/Script/BlueprintGraph.K2Node_IfThenElse Name="K2Node_IfThenE
182183
CustomProperties Pin (PinId=5443BFB64039F236E187E796A3BB5571,PinName="then",PinFriendlyName=NSLOCTEXT("K2Node", "true", "true"),Direction="EGPD_Output",PinType.PinCategory="exec",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_CallFunction_2 BBAD002F48A01855476AA1BA94459D5F,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
183184
CustomProperties Pin (PinId=F450808447C8D03E27EB9582DF78D443,PinName="else",PinFriendlyName=NSLOCTEXT("K2Node", "false", "false"),Direction="EGPD_Output",PinType.PinCategory="exec",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
184185
End Object
185-
`} />
186+
`}
187+
/>
186188

187189
</TabItem>
188190
</Tabs>
@@ -220,7 +222,7 @@ StoreV2->QueryOffersById(
220222
FOnQueryOnlineStoreOffersComplete::CreateLambda([
221223
StoreV2Wk = TWeakPtr<IOnlineStoreV2, ESPMode::ThreadSafe>(StoreV2)](
222224
bool bWasSuccessful,
223-
const TArray<FUniqueOfferId>& OfferIds,
225+
const TArray<FUniqueOfferId>& OfferIds,
224226
const FString& Error)
225227
{
226228
if (auto StoreV2 = StoreV2Wk.Pin())
@@ -229,7 +231,7 @@ StoreV2->QueryOffersById(
229231
{
230232
TArray<FOnlineStoreOfferRef> Offers;
231233
StoreV2->GetOffers(Offers);
232-
234+
233235
// Offers now contains a list of offers. You can call
234236
// GetOffers from anywhere to get the cached list of
235237
// offers.
@@ -244,7 +246,9 @@ StoreV2->QueryOffersById(
244246

245247
To query for the available offers, use the "Query Offers by ID" blueprint node followed by "Get Offers".
246248

247-
<Blueprint height="500px" blueprint={`
249+
<Blueprint
250+
height="500px"
251+
blueprint={`
248252
Begin Object Class=/Script/BlueprintGraph.K2Node_GetSubsystem Name="K2Node_GetSubsystem_0"
249253
CustomClass=/Script/CoreUObject.Class'"/Script/OnlineSubsystemBlueprints.OnlineStoreV2Subsystem"'
250254
NodePosX=624
@@ -330,7 +334,8 @@ Begin Object Class=/Script/BlueprintGraph.K2Node_MakeArray Name="K2Node_MakeArra
330334
CustomProperties Pin (PinId=22F5D1DF42B0296013404FAC236185F6,PinName="Array",Direction="EGPD_Output",PinType.PinCategory="string",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=Array,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_AsyncAction_1 FBDBD07F4FBD9DB441389297AFD14044,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
331335
CustomProperties Pin (PinId=EAB5F5D04198F8602191B894FD0BF6AA,PinName="[0]",PinType.PinCategory="string",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="test_iap",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
332336
End Object
333-
`} />
337+
`}
338+
/>
334339

335340
</TabItem>
336-
</Tabs>
341+
</Tabs>

docs/ossv1/ecom/purchasing.mdx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ Refer to [Initating a purchase](#initating-a-purchase-on-any-platform) for an ex
5555
</TabItem>
5656
<TabItem value="google-play">
5757

58-
When using Google Play Billing, in-app purchases will be available with their product IDs as the offer IDs. You can only purchase consumable items on Google Play; subscriptions and non-consumable items are not supported.
58+
When using Google Play Billing, in-app purchases will be available with their product IDs as the offer IDs. You can only purchase consumable and non-consumable items on Google Play; subscriptions are not supported.
5959

60-
After a purchase completes on Google Play, you must award the player the in-app purchase and then call `FinalizePurchase` on the receipt to consume the purchase.
60+
After a purchase completes on Google Play, you must award the player the in-app purchase and then call `FinalizePurchase` on the receipt to consume or acknowledge the purchase.
6161

6262
:::caution
6363
If you do not call `FinalizePurchase` when using Google Play, the user's purchase will be automatically refunded after 3 days.
@@ -180,7 +180,7 @@ To finalize purchases on Google Play, you need to check for outstanding receipts
180180

181181
When the game starts up, you should query for any outstanding receipts so that you can finalize the purchases and award items.
182182

183-
After a purchase is consumed with `FinalizePurchase`, the receipt will no longer appear when querying receipts or calling `GetReceipts`.
183+
After a purchase is consumed or acknowledged with `FinalizePurchase`, the receipt will no longer appear when querying receipts or calling `GetReceipts`.
184184

185185
<Tabs lazy groupId="code-format" defaultValue="c++" values={[ { label: 'C++', value: 'c++' }, { label: 'Blueprints', value: 'blueprints' } ]}>
186186
<TabItem value="c++">
@@ -234,15 +234,15 @@ You _must_ handle deferred purchases on Google Play. Also, you can not know when
234234
The `OnUnexpectedPurchaseReceipt` event fires:
235235

236236
- When a deferred purchase moves to the `Purchased` state.
237-
- When a receipt is consumed via `FinalizePurchase` and removed from the `GetReceipts` array.
237+
- When a receipt is consumed or acknowledged via `FinalizePurchase` and removed from the `GetReceipts` array.
238238

239239
:::note
240240
The `TransactionId` field of a receipt is the `ReceiptId` to use in other functions.
241241
:::
242242

243-
### Consuming a purchase via `FinalizePurchase`
243+
### Consuming or acknowledging a purchase via `FinalizePurchase`
244244

245-
To acknowledge a purchase on Google Play and consume the purchase, you must call `FinalizePurchase`. If you don't call this function for a receipt, the user's purchase will automatically be refunded 3 days after it moved into the `Purchased` state.
245+
To acknowledge or consume a purchase on Google Play, you must call `FinalizePurchase`. If you don't call this function for a receipt, the user's purchase will automatically be refunded 3 days after it moved into the `Purchased` state.
246246

247247
<Tabs lazy groupId="code-format" defaultValue="c++" values={[ { label: 'C++', value: 'c++' }, { label: 'Blueprints', value: 'blueprints' } ]}>
248248
<TabItem value="c++">
@@ -252,7 +252,8 @@ To consume a purchase, call `FinalizePurchase`:
252252
```cpp
253253
Purchase->FinalizePurchase(
254254
*Identity->GetUniquePlayerId(0).Get(), // The local player to get offers for.
255-
ReceiptId // The TransactionId field of the receipt.
255+
ReceiptId, // The TransactionId field of the receipt.
256+
TEXT("consume") // Or "acknowledge" to acknowledge without consuming the receipt.
256257
);
257258
```
258259

0 commit comments

Comments
 (0)