@@ -22,8 +22,8 @@ Initialize the plugin
2222To use the ``GodotGooglePlayBilling `` API:
2323
24241. Access the ``BillingClient `` autoload singleton, it's automatically added when the plugin is enabled.
25- 2. Connect to its signals to receive billing results
26- 3. Call ``start_connection ``
25+ 2. Connect to its signals to receive billing results.
26+ 3. Call ``start_connection ``.
2727
2828Initialization example:
2929
@@ -58,17 +58,17 @@ Return values for ``get_connection_state()``:
5858 DISCONNECTED, # This client was not yet connected to billing service or was already closed.
5959 CONNECTING, # This client is currently in process of connecting to billing service.
6060 CONNECTED, # This client is currently connected to billing service.
61- CLOSED # This client was already closed and shouldn't be used again.
61+ CLOSED, # This client was already closed and shouldn't be used again.
6262 }
6363
6464
6565Query available items
6666~~~~~~~~~~~~~~~~~~~~~
6767
6868Once the API has connected, query product IDs using `query_product_details() `. You must successfully complete
69- an product details query before calling the ``purchase() ``, ``purchase_subscription() ``, or ``update_subscription() `` functions,
69+ a product details query before calling the ``purchase() ``, ``purchase_subscription() ``, or ``update_subscription() `` functions,
7070or they will return an error. ``query_product_details() `` takes two parameters: an array
71- of product ID strings, and the type of product being queried.
71+ of product ID strings and the type of product being queried.
7272The product type should be ``BillingClient.ProductType.INAPP `` for normal in-app purchases or ``BillingClient.ProductType.SUBS `` for subscriptions.
7373The ID strings in the array should match the product IDs defined in the Google Play Console entry
7474for your app.
@@ -78,7 +78,7 @@ Example use of ``query_product_details()``:
7878::
7979
8080 func _on_connected():
81- BillingClient.query_product_details(["my_iap_item"], BillingClient.ProductType.INAPP) # BillingClient.ProductType.SUBS for subscriptions
81+ BillingClient.query_product_details(["my_iap_item"], BillingClient.ProductType.INAPP) # BillingClient.ProductType.SUBS for subscriptions.
8282
8383 func _on_query_product_details_response(query_result: Dictionary):
8484 if query_result.response_code == BillingClient.BillingResponseCode.OK:
@@ -98,7 +98,7 @@ a product type to query. The product type should be
9898``BillingClient.ProductType.INAPP `` for normal in-app purchases or ``BillingClient.ProductType.SUBS `` for subscriptions.
9999The ``query_purchases_response `` signal is sent with the result.
100100The signal has a single parameter: a :ref: `Dictionary <class_Dictionary >` with
101- a response code and either an array of purchases or debug message.
101+ a response code and either an array of purchases or a debug message.
102102Only active subscriptions and non-consumed one-time purchases are
103103included in the purchase array.
104104
@@ -107,7 +107,7 @@ Example use of ``query_purchases()``:
107107::
108108
109109 func _query_purchases():
110- BillingClient.query_purchases(BillingClient.ProductType.INAPP) # Or BillingClient.ProductType.SUBS for subscriptions
110+ BillingClient.query_purchases(BillingClient.ProductType.INAPP) # Or BillingClient.ProductType.SUBS for subscriptions.
111111
112112 func _on_query_purchases_response(query_result: Dictionary):
113113 if query_result.response_code == BillingClient.BillingResponseCode.OK:
@@ -132,7 +132,7 @@ offers are `personallised <https://developer.android.com/google/play/billing/int
132132Reminder: you **must ** query the product details for an item before you can
133133pass it to ``purchase() ``.
134134This method returns a dictionary indicating whether the billing flow was successfully launched.
135- It includes a response code and either an array of purchases or debug message.
135+ It includes a response code and either an array of purchases or a debug message.
136136
137137Example use of ``purchase() ``:
138138
@@ -273,9 +273,9 @@ Example use of ``acknowledge_purchase()``:
273273 if result.response_code == BillingClient.BillingResponseCode.OK:
274274 print("Acknowledge purchase success")
275275 _handle_purchase_token(result.token, true)
276- else:
277- print("Acknowledge purchase failed")
278- print("response_code: ", result.response_code, "debug_message: ", result.debug_message, "purchase_token: ", result.token)
276+ else:
277+ print("Acknowledge purchase failed")
278+ print("response_code: ", result.response_code, "debug_message: ", result.debug_message, "purchase_token: ", result.token)
279279
280280 # Find the product associated with the purchase token and award the
281281 # product if successful
@@ -301,7 +301,7 @@ If you support upgrading or downgrading between different subscription levels,
301301you should use ``update_subscription() `` to use the subscription update flow to
302302change an active subscription. Like ``purchase() ``, results are returned by the
303303``on_purchases_updated `` signal.
304- There are following parameters to ``update_subscription() ``:
304+ These are the parameters of ``update_subscription() ``:
305305
3063061. old_purchase_token: The purchase token of the currently active subscription
3073072. replacement_mode: The replacement mode to apply to the subscription
@@ -334,7 +334,7 @@ The replacement modes values are defined as:
334334 CHARGE_FULL_PRICE = 5,
335335
336336 # The new purchase takes effect immediately, the new plan will take effect when the old item expires.
337- DEFERRED = 6
337+ DEFERRED = 6,
338338 }
339339
340340
0 commit comments