[Unity Plugin] Upgrade ONE store IAP

Compare Import Unity Package

Compare IapCallManager API

Initialize & connect ONE store IAP

In v19 SDK and above, you can determine whether it is a success or failure with the value of IapResult.code.

The way to connect to the billing module is the same.

Before

After

The response to the successful or failed connection has significantly changed.

In SDK V17, you had to confirm the support status through isBillingSupported() after the successful connection.

However, in SDK V19 and above, you do not need to check the support status. Inside the SDK, the support status will be automatically checked.

To check the value of IapResult.code, refer to PurchaseResponse.ResponseCode.

Before

After

Check in-app product details

Before

Specify the array value of the in-app ID (productid) and the corresponding in-app type. There are two types of in-app: Managed product (ProductType.INAPP) and Monthly auto-renewal product (ProductType.AUTO). Enter ProductType.ALL to check both types of in-app.

After

You can receive the response result value of checking the in-app product details through ProductDetailsSuccessEvent(), ProductDetailsErrorEvent() of GaaIapResultListener.

The communication between Android and Unity is string communication. There is a limit in the string length to be sent at once, and therefore the result value will be transmitted per in-app at a time.

Therefore, the value of ProductDetailsSuccessEvent(..., ..., int count, int totalCount) is important.

ex) If there is one in-app: count = 1, totalCount = 1 /

if there are 10 in-apps: count = 1, totalCount = 10 ... count = 10, totalCount = 10

Before

After

Request purchase

To purchase the in-app, changes have been made in putting productId, productType obtained with QueryProductDetails into the PurchaseFlowParams object and sending it.

Before

After

If you call the LaunchPurchaseFlow() method, ONE store billing screen will appear.

Fig.1 ONE store in-app billing screen

For the same reason as ‘Check in-app product information’, count, totalCount exist in the part in which the response result to payment has been received.

Before

After

Acknowledge purchase

This API is newly added to ONE store IAP library V6(SDK V19).

For details, refer to ‘Use ONE store IAP in Unity’.

Consume Managed product

Before

After

Check purchase history

There is no significant change in the request for check purchase hitsory.

Before

After

The following is the response part and is transmitted the same as the response for ‘Request purchase’.

Before

After

Change Monthly auto-renewal product status

In SDK V17, the developer had to decide recurringState in person and to send the command value, however, in SDK V19, if PurchaseData is entered, the SDK determines and transfers the command value.

Before

After

Request ONE store login

Before

After

Install ONE store service (OSS)

This API is newly added to ONE store IAP library V6(SDK V19).

For details, refer to ‘Use ONE store IAP in Unity’.

Obtain store identification code

This API is newly added to ONE store IAP library V6(SDK V19).

For details, refer to ‘Use ONE store IAP in Unity’.

Compare Import Unity Package

Compare IapCallManager API

Initialize & connect ONE store IAP

In v19 SDK and above, you can determine whether it is a success or failure with the value of IapResult.code.

The way to connect to the billing module is the same.

Before

After

The response to the successful or failed connection has significantly changed.

In SDK V17, you had to confirm the support status through isBillingSupported() after the successful connection.

However, in SDK V19 and above, you do not need to check the support status. Inside the SDK, the support status will be automatically checked.

To check the value of IapResult.code, refer to PurchaseResponse.ResponseCode.

Before

After

Check in-app product details

Before

Specify the array value of the in-app ID (productid) and the corresponding in-app type. There are two types of in-app: Managed product (ProductType.INAPP) and Monthly auto-renewal product (ProductType.AUTO). Enter ProductType.ALL to check both types of in-app.

After

You can receive the response result value of checking the in-app product details through ProductDetailsSuccessEvent(), ProductDetailsErrorEvent() of GaaIapResultListener.

The communication between Android and Unity is string communication. There is a limit in the string length to be sent at once, and therefore the result value will be transmitted per in-app at a time.

Therefore, the value of ProductDetailsSuccessEvent(..., ..., int count, int totalCount) is important.

ex) If there is one in-app: count = 1, totalCount = 1 /

if there are 10 in-apps: count = 1, totalCount = 10 ... count = 10, totalCount = 10

Before

After

Request purchase

To purchase the in-app, changes have been made in putting productId, productType obtained with QueryProductDetails into the PurchaseFlowParams object and sending it.

Before

After

If you call the LaunchPurchaseFlow() method, ONE store billing screen will appear.

Fig.1 ONE store in-app billing screen

For the same reason as ‘Check in-app product information’, count, totalCount exist in the part in which the response result to payment has been received.

Before

After

Acknowledge purchase

This API is newly added to ONE store IAP library V6(SDK V19).

For details, refer to ‘Use ONE store IAP in Unity’.

Consume Managed product

Before

After

Check purchase history

There is no significant change in the request for check purchase hitsory.

Before

After

The following is the response part and is transmitted the same as the response for ‘Request purchase’.

Before

// GaaIapResultListener.cs void QueryPurchasesSuccessEvent(PurchaseData purchaseData, string signature, int count, int totalCount)

void QueryPurchasesErrorEvent(IapResult iapResult)

After

Change Monthly auto-renewal product status

In SDK V17, the developer had to decide recurringState in person and to send the command value, however, in SDK V19, if PurchaseData is entered, the SDK determines and transfers the command value.

Before

After

Request ONE store login

Before

After

Install ONE store service (OSS)

This API is newly added to ONE store IAP library V6(SDK V19).

For details, refer to ‘Use ONE store IAP in Unity’.

Obtain store identification code

This API is newly added to ONE store IAP library V6(SDK V19).

For details, refer to ‘Use ONE store IAP in Unity’.

Last updated