Skip to main content
Samsung Developer Program

Request Callback Listeners

Your service app must define and set listeners to get API method call results in order to process the returned information.

This section describes how to define listeners. To get call results, their associated SamsungIapHelp API method calls must also specify the listeners.

Value Object describes the value objects that the listeners use.

OnGetInboxListener( )

Callback interface that specifies the getItemInboxList(_startNum, _endNum, _startDate, _endDate) and getItemInboxList(_itemsIds) processing results and the user-purchased item data to be returned by the callback.

void onGetItemInbox(ErrorVo _errorVO, ArrayList<InboxVo> _inboxList);
Parameters

_errorVo

ErrorVo

Request processing results to be returned (Value Object).

_ inboxList

ArrayList<InboxVo>

Purchased item information to be returned:

 

mItemId

String

Unique ID of the commercial product.

 

mItemName

String

Name of the commercial product.

 

mItemPrice

Double

Price of the commercial product.

 

mItemPriceString

String

Currency + product price of the commercial product.

 

mCurrencyUnit

String

Currency of the commercial product.

 

mItemDesc

String

Brief description of the commercial product.

 

mItemImageUrl

String

URL of the commercial product image.

 

mItemDownloadUrl

String

URL to download the commercial product.

 

mType

String

Product type of the commercial product image.

 

mPaymentId

String

Payment ID of a purchased commercial product.

 

mPurchaseId

String

Purchase ID of a purchased commercial product.

 

mPurchaseDate

String

Purchased date (in milliseconds).

 

mSubscriptionEndDate

String

Expiration date (yyyymmdd) of a non- and autorecurring subscription item.

 

mJsonString

String

Original JSON string.

OnGetItemListener( )

Callback interface that specifies the getItemList() processing results and the offered item data to be returned by the callback.

void onGetItem(ErrorVo _errorVo, ArrayList<ItemVo> _itemList);
Parameters

_errorVo

ErrorVo

Request processing results to be returned  (Value Object).

_itemList

ArrayList<ItemVo>

Offered item information to be returned:

 

mItemId

String

Unique ID of the commercial product.

 

mItemName

String

Name of the commercial product.

 

mItemPrice

Double

Price of the commercial product.

 

mItemPriceString

String

Currency + product price of the commercial product.

 

mCurrencyUnit

String

Currency of the commercial product.

 

mItemDesc

String

Brief description of the commercial product.

 

mItemImageUrl

String

URL of the commercial product image.

 

mItemDownloadUrl

String

URL to download the commercial product.

 

mType

String

Product type of the commercial product image.

 

mSubscriptionDuration
Unit

String

Base unit (YEAR, MONTH, WEEK, DAY) for the validity period of a non- and autorecurring subscription item.

Note:  The units should be in capital letters.

 

mSubscriptionDuration
Multiplier

String

Number of validity periods of a non- and autorecurring subscription item.

In returned data, mSubscriptionDuration and mSubscriptionDurationUnit are expressed together (for example, 1MONTH). 

 

mJsonString

String

Original JSON string.

OnPaymentListener( )

Callback interface that specifies the startPayment() processing results and the purchased item data to be returned by the callback.

void onPayment(ErrorVo _errorVo, PurchaseVo _purchaseVo);
Parameters

_errorVo

ErrorVo

Request processing results (Value Object).

_ purchaseVo

PurchaseVo

Purchase item information to be returned:

 

mItemId

String

Unique ID of the commercial product.

 

mItemName

String

Name of the commercial product.

 

mItemPrice

Double

Price of the commercial product.

 

mItemPriceString

String

Currency + product price of the commercial product.

 

mCurrencyUnit

String

Currency of the commercial product.

 

mItemDesc

String

Brief description of the commercial product.

 

mItemImageUrl

String

URL of the commercial product image.

 

mItemDownloadUrl

String

URL to download the commercial product.

 

mPaymentId

String

Payment ID of a purchased commercial product.

 

mPurchaseId

String

Purchase ID of a purchased commercial product.

 

mPurchaseDate

String

Purchased date (in milliseconds).

 

mVerifyUrl

String

URL of IAP server to verify that the validity of the purchase using the mPurchaseId value.

 

mJsonString

String

Original JSON string.

  • Was this article helpful?