Skip to main content

Ready to market your stellar app?

Samsung Developer Program is your gateway to app monetization success.

Learn More

Samsung Developer Program

Method Details

Awake

private void Awake()

Sets the GameObject name to the class name for easy access via a native plugin.

Awake is part of the MonoBehavior in Unity. It is called when the script instance is being loaded.

OnMapSkuFailed

private void  OnMapSkuFailed(string exception)

Function for failed mapping of SKUs. Logs the exception received.

The SKU is attempting to be mapped to the app store. The exception message is from OpenIAB; it is specified in the library.

Parameters:

exception

Exception message to be included in the callback

OnBillingSupported

private void OnBillingSupported(string empty)

Function to be called when billing is supported. Fires the callback billingSupportedEvent.

Parameters:

empty

Empty string

OnBillingNotSupported

private void OnBillingNotSupported(string error)

Function to be called when billing is unsupported. Fires the callback billingNotSupportedEvent.

Parameters:

error

Error message

OnQueryInventorySucceeded

private void OnQueryInventorySucceeded(string json)

Function to be called for successful queries of inventories. Fires the callback queryInventorySucceededEvent.

Parameters:

json

String in JSON format
OnQueryInventoryFailed

private void OnQueryInventoryFailed(string error)

Function to be called for failed queries of inventories. Fires the callback queryInventoryFailedEvent.

Parameters:

error

Error message

OnPurchaseSucceeded

private void OnPurchaseSucceeded(string json)

Function to be called for successful purchases. Fires the callback purchaseSucceededEvent.

Parameters:

json String in JSON format
 
OnPurchaseFailed

private void OnPurchaseFailed(string message)

Function to be called for failed purchases. Fires the callback purchaseFailedEvent.

Parameters:

message Message string
OnConsumePurchaseSucceeded

private void OnConsumePurchaseSucceeded(string json)

Function to be called for successful consumption of purchase items. Fires the callback consumePurchaseSucceededEvent.

Parameters:

json String in JSON format
OnConsumePurchaseFailed

private void OnConsumePurchaseFailed(string error)

Function to be called for failed consumption of purchase items. Fires the callback consumePurchaseFailedEvent.

Parameters:

error Error message
OnTransactionRestored

private void OnTransactionRestored(string sku)

Function to be called for transaction restoration of the specified item SKU. Fires the callback transactionRestoredEvent.

Parameters:

sku SKU identifier of the item
OnRestoreTransactionFailed

private void OnRestoreTransactionFailed(string error)

Function to be called for failed transaction restorations. Fires the callback restoreFailedEvent.

Parameters:

error Error message
OnRestoreTransactionSucceeded

private void OnRestoreTransactionSucceeded(string message)

Function to be called for successful transaction restoration. Fires the callback restoreSucceededEvent.

Parameters:

message Message string

  • Was this article helpful?