You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/inappbilling/_includes/add-manual.mdx
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,4 +61,6 @@ This ANE requires the following Google Play Services:
61
61
You must include the above native extensions in your application along with this extension,
62
62
and you need to ensure they are packaged with your application.
63
63
64
-
You can access the Google Play Services client library extensions here: [https://github.com/distriqt/ANE-GooglePlayServices](https://github.com/distriqt/ANE-GooglePlayServices).
64
+
You can access the repositories for these client library extensions here:
65
+
-[Google Play Services](https://github.com/distriqt/ANE-GooglePlayServices).
First step is always to add the plugin to your development environment.
7
+
8
+
9
+
## Asset Store
10
+
11
+
Open the Asset Store in your browser and add the plugin to your assets.
12
+
13
+
Open the Package Manager (Window > Package Manager) in the Unity Editor and select the "My Assets" section. Select the plugin, and click Import.
14
+
15
+
16
+
## Manual Installation
17
+
18
+
In unity you import the package by selecting `Assets / Import Package / Custom Package ...` and then browsing to the unity plugin package file: `com.distriqt.InAppBilling.unitypackage`.
19
+
20
+

21
+
22
+
You can manually download the extension from our repository:
23
+
24
+
-https://github.com/distriqt/ANE-InAppBilling
25
+
26
+
27
+
28
+
## Import the Plugin
29
+
30
+
31
+
This will present the import dialog and display all the files for the plugin, make sure all the files are selected.
32
+
33
+
The plugin will be added to your project and you can now use the plugins functionality in your application.
34
+
35
+
36
+
:::note Proguard
37
+
If you are using a custom proguard configuration you may need to add the following line to ensure the interface class for the plugin is accessible to unity at runtime.
38
+
39
+
```
40
+
-keep class com.distriqt.extension.inappbilling.InAppBillingUnityPlugin {*;}
41
+
```
42
+
:::
43
+
44
+
45
+
46
+
## Checking for Support
47
+
48
+
You can use the `isSupported` flag to determine if this extension is supported on the current platform and device.
49
+
50
+
This allows you to react to whether the functionality is available on the device and provide an alternative solution if not.
Copy file name to clipboardExpand all lines: docs/inappbilling/application-receipt.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ It is up to you to decide if this is required for your situation.
24
24
25
25
26
26
:::info
27
-
The "Application Receipt" variant performs local validation of the application receipt to retrieve purchase information and makes this information available through the [Get Purchases](get-purchases.md) API.
27
+
The "Application Receipt" variant performs local validation of the application receipt to retrieve purchase information and makes this information available through the [Get Purchases](get-purchases) API.
We suggest you listen to the following four events before calling setup:
47
56
48
57
-`InAppBillingEvent.SETUP_SUCCESS`: Dispatched when setup is successfully completed;
49
58
-`InAppBillingEvent.SETUP_FAILURE`: Dispatched when there was an error during setup;
50
59
-`PurchaseEvent.PURCHASES_UPDATED`: Dispatched if there are pending purchases needing to be processed;
51
-
-`PurchaseRequestEvent.SHOULD_ADD_PURCHASE`: Dispatched if the app was launched from an AppStore promotional purchase (see [Promotions](promotions.md)).
60
+
-`PurchaseRequestEvent.SHOULD_ADD_PURCHASE`: Dispatched if the app was launched from an AppStore promotional purchase (see [Promotions](promotions)).
We suggest you listen to the following four events before calling setup:
77
+
78
+
-`InAppBilling.Instance.Events.OnPurchasesUpdated`: Dispatched if there are pending purchases needing to be processed;
79
+
-`InAppBilling.Instance.Events.OnShouldAddPurchase`: Dispatched if the app was launched from an AppStore promotional purchase (see [Promotions](promotions));
The billing service type will be automatically selected based on the default of the current device platform. However we suggest you specify the service type in your `BillingService` using `setServiceType()` to specify a particular service:
If you do not call it then the default for the current platform will be used,
83
130
i.e. Apple InApp Purchases on iOS and Google's Play InApp Billing on Android.
84
131
@@ -93,6 +140,13 @@ Once you have completed setup it is important to check whether the user on the c
93
140
94
141
For example, the latest version of Play Billing is only supported with an updated version of the Play Store app. If an older version is on the user's device the billing api will not be available.
To check the status call the `checkAvailability()` function and await the result. This function will dispatch an `AvailabilityEvent.COMPLETE` event or call a callback function passed as the parameter to the function.
The `availability` value will be one of the values defined in the `InAppBillingAvailability` class:
122
176
177
+
-`InAppBillingAvailability.AVAILABLE`: Service is available for products and purchases;
178
+
-`InAppBillingAvailability.NOT_AVAILABLE`: Service is unavailable on the device;
179
+
-`InAppBillingAvailability.STORE_UPGRADE_REQUIRED`: An update is required to the store application for this service
180
+
181
+
182
+
183
+
</TabItem>
184
+
<TabItemvalue="unity" >
185
+
186
+
187
+
To check the status call the `CheckAvailability()` function and await the result.
188
+
189
+
```csharp
190
+
InAppBilling.Instance.CheckAvailability(
191
+
(e) =>
192
+
{
193
+
Debug.Log( "availability = "+e.availability );
194
+
}
195
+
);
196
+
```
197
+
The `e.availability` value will be one of the values defined in the `InAppBillingAvailability` class:
198
+
123
199
-`InAppBillingAvailability.AVAILABLE`: Service is available for products and purchases;
124
200
-`InAppBillingAvailability.NOT_AVAILABLE`: Service is unavailable on the device;
125
201
-`InAppBillingAvailability.STORE_UPGRADE_REQUIRED`: An update is required to the store application for this service;
126
202
203
+
</TabItem>
204
+
</Tabs>
127
205
128
206
You should handle the response as required and inform your users if purchasing isn't available or steps to upgrade the store application.
129
207
@@ -138,10 +216,24 @@ It is equally appropriate to handle those error events however we suggest an upf
138
216
139
217
## Pending Purchases
140
218
141
-
Note that the pending purchases may not be available to you at the `InAppBillingEvent.SETUP_SUCCESS` event, as they may be updated after setup has completed. This is particularly true on iOS/tvOS where the payment queue update (which populates the pending purchases) will occur a short time after setup succeeds.
Note that the pending purchases may not be available to you at the `InAppBillingEvent.SETUP_SUCCESS` event, as they may be updated after setup has completed.
226
+
This is particularly true on iOS/tvOS where the payment queue update (which populates the pending purchases) will occur a short time after setup succeeds.
142
227
143
228
This update will be indicated by a `PurchaseEvent.PURCHASES_UPDATED`, indicating there are purchases to process.
144
229
230
+
</TabItem>
231
+
<TabItemvalue="unity" >
145
232
233
+
Note that the pending purchases may not be available to you after setup is complete, as they may be updated after this point.
234
+
This is particularly true on iOS/tvOS where the payment queue update (which populates the pending purchases) will occur a short time after setup succeeds.
146
235
236
+
This update will be indicated by an `OnPurchasesUpdated` event, indicating there are purchases to process.
Copy file name to clipboardExpand all lines: docs/inappbilling/catappult/catappult.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ This extension implements Catappult's Native Android Billing and not the One-Ste
23
23
24
24
## Setting up a Billing Service
25
25
26
-
> The following is in addition to the documentation in [Setting up a Billing Service](../billing-service.md).
26
+
> The following is in addition to the documentation in [Setting up a Billing Service](../billing-service).
27
27
28
28
When setting up your service you will need to specify the `InAppBillingServiceTypes.CATAPPULT_NATIVE_BILLING` service type and provide your Catappult Public key. The public key is used to verify purchases to provide a level of fraud protection:
0 commit comments