InAppPurchaseDialog Class Reference

Class representing the dialog for processing In-App billing. More...

Inheritance diagram for InAppPurchaseDialog:
ICommonDialog

List of all members.

Public Member Functions

 InAppPurchaseDialog ()
 Creates a dialog.
void Dispose ()
void GetProductInfo (string[] labels)
 Opens a dialog and obtains product information from the server.
void GetTicketInfo ()
 Opens a dialog and obtains ticket information from the server.
void Purchase (string label)
 Opens a dialog and purchases a product.
void Consume (string label)
 Opens a dialog and consumes a ticket.
void Open ()
 Opens the dialog (This function is not supported)
void Abort ()
 Aborts the dialog (currently unsupported)

Properties

CommonDialogState State [get]
 Dialog processing state.
CommonDialogResult Result [get]
 Dialog processing result.
InAppPurchaseCommand Command [get]
 Dialog processing command.
string[] Arguments [get]
 Dialog processing argument.
InAppPurchaseProductList ProductList [get]
 Product list.
bool IsProductInfoComplete [get]
 Whether all product information is obtained.
bool IsTicketInfoComplete [get]
 Whether all ticket information is obtained.

Detailed Description

Class representing the dialog for processing In-App billing.


Constructor & Destructor Documentation

Creates a dialog.

A dialog class is created, and a product list is read from the metadata.


Member Function Documentation

void Abort ( )

Aborts the dialog (currently unsupported)

Aborts dialog processing and closes the dialog.

Implements ICommonDialog.

void Consume ( string  label)

Opens a dialog and consumes a ticket.

Parameters:
labelProduct label

Opens a dialog, connects to the server, and consumes the ticket of the specified product. Note that ticket information must be obtained in advance. Exceptions will occur in the following cases.

  • The specified product is not registered in the list
  • Ticket information is not obtained
  • The specified product is not a consumption type product
  • The remaining number of times of the product is zero

When dialog processing is completed and the result is OK, all ticket information is updated. If the result is Error or Aborted, the ticket information is not updated and the IsTicketInfoComplete property is false. In such cases, obtain the ticket information again with the GetTicketInfo function and check if the processing succeeded or failed.

void Dispose ( )

Frees unmanaged resources of a dialog.

void GetProductInfo ( string[]  labels)

Opens a dialog and obtains product information from the server.

Parameters:
labelsProduct label array (select all if null)

Opens a dialog, connects to the server, and obtains product information for the specified product. Note that this function sends requests to the server for each product; therefore, it can take a long time to obtain a vast amount of information at one time.

void GetTicketInfo ( )

Opens a dialog and obtains ticket information from the server.

Opens a dialog, connects to the server, and obtains ticket information for all products.

void Open ( )

Opens the dialog (This function is not supported)

This function is not supported. To open the dialog, use the GetProductInfo, GetTicketInfo, Purchase, and Consume functions.

Implements ICommonDialog.

void Purchase ( string  label)

Opens a dialog and purchases a product.

Parameters:
labelProduct label

Opens a dialog, connects to the server, and purchases the specified product. Note that product information and ticket information must be obtained in advance. Exceptions will occur in the following cases.

  • The specified product is not registered in the list
  • Product or ticket information is not obtained
  • The specified product is a normal type product and was already purchased

When dialog processing is completed and the result is OK, all ticket information is updated. If the result is Error or Aborted, the ticket information is not updated and the IsTicketInfoComplete property is false. In such cases, obtain the ticket information again with the GetTicketInfo function and check if the processing succeeded or failed.


Property Documentation

string [] Arguments [get]

Dialog processing argument.

Obtains the argument of the dialog processing executed last.

InAppPurchaseCommand Command [get]

Dialog processing command.

Obtains the command of the dialog processing executed last.

bool IsProductInfoComplete [get]

Whether all product information is obtained.

Returns true if all product information is obtained.

bool IsTicketInfoComplete [get]

Whether all ticket information is obtained.

Returns true if all ticket information is obtained. Returns false if ticket information is not obtained or it cannot be updated to the latest state due to an error.

InAppPurchaseProductList ProductList [get]

Product list.

Obtains a list of products that can be purchased.

CommonDialogResult Result [get]

Dialog processing result.

Obtains the result of the dialog processing executed last.

Implements ICommonDialog.

CommonDialogState State [get]

Dialog processing state.

Obtains the state of the dialog processing executed last.

Implements ICommonDialog.