HIVE SDK for C++

Classes | Typedefs | Enumerations | Functions | Variables
IAPV4

Classes

class  IAPV4
 HIVE IAP can minimize the development costs of the market-specific purchase process and collect purchase logs consistently to provide information to business, development, and management departments. More...
 
class  IAPV4Product
 HIVE IAP 백오피스에서 생성한 상품 정보
마켓에 등록된 상품(Market Pid) 의 정보를 포함한다. More...
 
class  IAPV4Receipt
 purchase(String, String, IAPV4PurchaseListener)restore(IAPV4RestoreListener) API 에서 받을 수 있는 결과 정보. More...
 

Typedefs

typedef std::function< void(ResultAPI const &result, std::vector< IAPV4Type > const &marketIDs)> IAPV4::onMarketConnect
 HIVE IAPV4 Market information request result callback. More...
 
typedef std::function< void(ResultAPI const &result, std::vector< IAPV4Product > const &iapV4ProductList, unsigned int balance)> IAPV4::onGetProductInfo
 HIVE IAPV4 Product Information request callback. More...
 
typedef std::function< void(ResultAPI const &result, IAPV4Receipt const &iapV4Receipt)> IAPV4::onPurchase
 Purchase request result callback
The purchase of HIVE IAPV4 will require a marketPid registered in the App Store and Google Store. More...
 
typedef std::function< void(ResultAPI const &result, std::vector< std::reference_wrapper< IAPV4Receipt > > const &iapv4ReceiptList)> IAPV4::onRestore
 HIVE IAPV4 Restore request result callback
It may happen that the item delivery fails due to various situations in the product purchase process. More...
 
typedef std::function< void(ResultAPI const &result, std::string marketPid)> IAPV4::onTransactionFinish
 HIVE IAP v4 Transaction Finish request result callback
More...
 
typedef std::function< void(ResultAPI const &result, std::string marketPid)> IAPV4::onCheckPromotePurchase
 
typedef std::function< void(std::vector< ResultAPI > const &resultList, std::vector< std::string > const &marketPidList)> IAPV4::onTransactionMultiFinish
 HIVE IAP v4 Multiple Transaction Finish request result callback
More...
 
typedef std::function< void(ResultAPI const &result, int balance)> IAPV4::onBalance
 HIVE Lebi Balance request result callback, if it is a Rebi store. More...
 
typedef std::function< void(int responseCode)> IAPV4::onInAppMessages
 Google In-App Offers. More...
 

Enumerations

enum class  IAPV4Type
 결제 마켓 형태 More...
 

Functions

static void IAPV4::marketConnect (onMarketConnect listener)
 IAPV4 It initialize IAPV4 Purchase module. More...
 
static void IAPV4::getMarketProductInfo (std::vector< std::string > const &marketPidList, onGetProductInfo listener)
 Apple Appstore It returns information for composition of the product. More...
 
static void IAPV4::getProductInfo (onGetProductInfo listener)
 HIVE IAPV4 It returns information for composition of the product. More...
 
static void IAPV4::getSubscriptionProductInfo (onGetProductInfo listener)
 HIVE IAPV4 It returns information for composition of the product. More...
 
static void IAPV4::purchase (std::string marketPid, std::string iapPayload, onPurchase listener)
 HIVE IAPV4 The purchase will require a marketPid from the App Store and Google Store. More...
 
static void IAPV4::purchaseSubscriptionUpdate (std::string marketPid, std::string oldMarketPid, std::string iapPayload, onPurchase listener)
 HIVE IAPV4 The purchase will require a marketPid from the App Store and Google Store. More...
 
static void IAPV4::purchaseSubscription (IAPV4PurchaseParam param, onPurchase listener)
 HIVE IAPV4 The purchase will require a marketPid from the App Store and Google Store. More...
 
static void IAPV4::restore (onRestore listener)
 HIVE IAPV4 It restore the item that has not been delivered. More...
 
static void IAPV4::restoreSubscription (onRestore listener)
 HIVE IAPV4 It restore the item that has not been delivered. More...
 
static void IAPV4::transactionFinish (std::string marketPid, onTransactionFinish listener)
 HIVE IAP v4 It requests the transaction completion processing for the purchase receipt of the item that have been delivered. More...
 
static void IAPV4::transactionMultiFinish (std::vector< std::string > const &marketPidList, onTransactionMultiFinish listener)
 HIVE IAP v4 It requests the multiple transaction completion processing for the purchase receipt of the item that have been delivered. More...
 
static void IAPV4::showMarketSelection (onMarketConnect listener)
 It shows a UI to select a Lebi store or a Google store..
If the Google Store and the HIVE Lebi store are available at the same time, you should expose the store selection screen to allow the user to select a store. More...
 
static void IAPV4::getBalanceInfo (onBalance listener)
 It request Lebi balance information. More...
 
static void IAPV4::showCharge (onBalance listener)
 It shows Lebi refill page. More...
 
static void IAPV4::checkPromotePurchase (onCheckPromotePurchase listener)
 Apple AppStore Promote InApp Purchase 동작으로 얻어온 MarketPID를 요청한다. More...
 
static IAPV4Type IAPV4::getSelectedMarket ()
 현재 선택된 마켓 타입을 반환한다. More...
 
static std::string IAPV4::getAccountUuid ()
 현재 계정의 UUIDv3 값을 반환한다. More...
 
static void IAPV4::showInAppMessages (int categoryId, onInAppMessages listener)
 Google In-App Offers. More...
 

Variables

std::string IAPV4Product::productType
 consumable, subscription
 
std::string IAPV4Product::marketPid
 Unique product ID registered in Market.
 
std::string IAPV4Product::currency
 Currency code (ex, KRW / USD)
 
double IAPV4Product::price
 Product price.
 
std::string IAPV4Product::displayPrice
 Product price string (ex. $100.00)
 
std::string IAPV4Product::title
 Item Title.
 
std::string IAPV4Product::productDescription
 Product Description.
 
std::string IAPV4Product::originalMarketJson
 Original Product info in Market.
 
double IAPV4Product::originalPrice
 세일전 가격 문자열 Google Only
 
std::string IAPV4Product::iconURL
 세일전 가격 Google Only More...
 
int IAPV4Product::coinsReward
 상품 아이콘 (512x512) Google Only
 
IAPV4Type IAPV4Receipt::type
 Receipt Market Information.
 
IAPV4Product IAPV4Receipt::product
 Purchased product information.
 
std::string IAPV4Receipt::iapPayload
 iapPayload entered in purchase request
 
std::string IAPV4Receipt::hiveiapReceipt
 Receipt Data to send when requesting validation to IAP server.
 
int IAPV4Receipt::quantity
 Purchase quantity (Support Google Play multi-purchase)
 

Detailed Description

Typedef Documentation

◆ onBalance

typedef std::function<void(ResultAPI const & result, int balance)> IAPV4::onBalance

HIVE Lebi Balance request result callback, if it is a Rebi store.

Parameters
resultResult of API call
balanceHIVE Lebi balance

◆ onCheckPromotePurchase

typedef std::function<void(ResultAPI const & result,std::string marketPid)> IAPV4::onCheckPromotePurchase
Parameters
resultAPI 호출 결과
marketPidMarket PID

◆ onGetProductInfo

typedef std::function<void(ResultAPI const & result,std::vector<IAPV4Product> const & iapV4ProductList,unsigned int balance)> IAPV4::onGetProductInfo

HIVE IAPV4 Product Information request callback.

Parameters
resultResult of API call
iapV4ProductListProduct Information
balanceBalance information for HIVE Lebi Market If Lebi Market enabled.
See also
#getProductInfo(IAPV4ProductInfoListener)

◆ onInAppMessages

typedef std::function<void(int responseCode)> IAPV4::onInAppMessages

Google In-App Offers.

Parameters
responseCode2(NAVIGATE_TO_DEV_APP_STORE) 일 경우 유저가 제안(Offer)를 확인하고 사용하기를 원한 상황입니다. 개발자는 유저가 구매할 인앱 항목을 선택할 수 있는 게임/앱 내 상점으로 (유저가 해당 화면에 없는 경우) 유저를 이동해야 합니다. 0 은 아무런 액션을 하지 않아도 되고, 음수는 에러상황 입니다.

◆ onMarketConnect

typedef std::function<void(ResultAPI const & result,std::vector<IAPV4Type> const & marketIDs)> IAPV4::onMarketConnect

HIVE IAPV4 Market information request result callback.

Parameters
resultResult of API call
marketIDs사용 가능한 마켓 정보의 목록
This list of market information means the market available on the game client.
If there is more than one market list, you must provide a screen that display the available market list to the user so that the user can select a store.
See also
#marketConnect(IAPV4MarketInfoListener)

◆ onPurchase

typedef std::function<void(ResultAPI const & result,IAPV4Receipt const & iapV4Receipt)> IAPV4::onPurchase

Purchase request result callback
The purchase of HIVE IAPV4 will require a marketPid registered in the App Store and Google Store.


iapPayload is supplementary information for the purchase request, and is included in the purchase completion callback,
but, in case of purchasing outside of the app, such as a promo code purchase etc., it can not be included in iapV4Receipt.

Parameters
resultResult of API call
iapV4ReceiptIt includes the purchased product information and iapPayload.
See also
#purchase(String, String, IAPV4PurchaseListener)

◆ onRestore

typedef std::function<void(ResultAPI const & result,std::vector<std::reference_wrapper<IAPV4Receipt>> const & iapv4ReceiptList)> IAPV4::onRestore

HIVE IAPV4 Restore request result callback
It may happen that the item delivery fails due to various situations in the product purchase process.


In order to prepare for this situation, you should request to deliver the item that has not been delivered.

Parameters
resultResult of API call
iapv4ReceiptListIt includes the purchased product information and iapPayload
See also
#restore(IAPV4RestoreListener)

◆ onTransactionFinish

typedef std::function<void(ResultAPI const & result,std::string marketPid)> IAPV4::onTransactionFinish

HIVE IAP v4 Transaction Finish request result callback

Parameters
resultResult of API call
marketPidmarketPid of the product whose transaction ended
See also
#transactionFinish(String, IAPV4TransactionFinishListener)

◆ onTransactionMultiFinish

typedef std::function<void(std::vector<ResultAPI> const & resultList,std::vector<std::string> const & marketPidList)> IAPV4::onTransactionMultiFinish

HIVE IAP v4 Multiple Transaction Finish request result callback

Parameters
resultListResult list of the transaction end
marketPidListmarketPid list of the transaction end
See also
#transactionMultiFinish(List, IAPV4TransactionMultiFinishListener)

Enumeration Type Documentation

◆ IAPV4Type

enum class IAPV4Type
strong

결제 마켓 형태

Function Documentation

◆ checkPromotePurchase()

static void IAPV4::checkPromotePurchase ( onCheckPromotePurchase  listener)
static

Apple AppStore Promote InApp Purchase 동작으로 얻어온 MarketPID를 요청한다.


앱의 시작, 앱의 Background -> Foregroud시에 이 API를 호출하여 MarketPID를 얻어오도록 한다.

얻어온 MarketPID로 구매를 진행하도록 한다.

Warning
iOS 11 이상에서만 지원한다.
See also
#purchase:iapPayload:handler:
HIVEIAPV4CheckPromotePurchaseHandler
Parameters
listenerAPI 호출 결과 통지

◆ getAccountUuid()

static std::string IAPV4::getAccountUuid ( )
static

현재 계정의 UUIDv3 값을 반환한다.


Returns the Hive account ID converted to a UUID version 3. return null, if not logged in.

Returns
accountUuid

◆ getBalanceInfo()

static void IAPV4::getBalanceInfo ( onBalance  listener)
static

It request Lebi balance information.

Parameters
listenerResult of API call

◆ getMarketProductInfo()

static void IAPV4::getMarketProductInfo ( std::vector< std::string > const &  marketPidList,
onGetProductInfo  listener 
)
static

Apple Appstore It returns information for composition of the product.


Parameters
listenerResult of API call

◆ getProductInfo()

static void IAPV4::getProductInfo ( onGetProductInfo  listener)
static

HIVE IAPV4 It returns information for composition of the product.


Parameters
listenerResult of API call

◆ getSelectedMarket()

static IAPV4Type IAPV4::getSelectedMarket ( )
static

현재 선택된 마켓 타입을 반환한다.


얻어온 마켓 타입으로 구매를 진행하도록 한다.

See also
#marketConnect(IAPV4MarketInfoListener)

◆ getSubscriptionProductInfo()

static void IAPV4::getSubscriptionProductInfo ( onGetProductInfo  listener)
static

HIVE IAPV4 It returns information for composition of the product.


Parameters
handlerResult of API call
Since
4.11.6

◆ marketConnect()

static void IAPV4::marketConnect ( onMarketConnect  listener)
static

IAPV4 It initialize IAPV4 Purchase module.


When HIVE IAPV4 is initialized, it sends a list of available market information in the result callback.
This list of market information means the market available on the game client.

Parameters
listenerResult of API call

◆ purchase()

static void IAPV4::purchase ( std::string  marketPid,
std::string  iapPayload,
onPurchase  listener 
)
static

HIVE IAPV4 The purchase will require a marketPid from the App Store and Google Store.


iapPayload is supplementary information for the purchase request, and is included in the purchase completion callback,
but, in case of purchasing outside of the app, such as a promo code purchase etc., it can not be included in iapV4Receipt.

Parameters
marketPidUnique code registered on the App Store or Google Store.
iapPayloadA string containing supplementary information about the purchase request, specified by the developer.
listenerResult of API call

◆ purchaseSubscription()

static void IAPV4::purchaseSubscription ( IAPV4PurchaseParam  param,
onPurchase  listener 
)
static

HIVE IAPV4 The purchase will require a marketPid from the App Store and Google Store.


iapPayload is supplementary information for the purchase request, and is included in the purchase completion callback,
but, in case of purchasing outside of the app, such as a promo code purchase etc., it can not be included in iapV4Receipt.

Parameters
paramA collection of parameters required for purchase
listenerResult of API call
Since
4.16.4.0

◆ purchaseSubscriptionUpdate()

static void IAPV4::purchaseSubscriptionUpdate ( std::string  marketPid,
std::string  oldMarketPid,
std::string  iapPayload,
onPurchase  listener 
)
static

HIVE IAPV4 The purchase will require a marketPid from the App Store and Google Store.


iapPayload is supplementary information for the purchase request, and is included in the purchase completion callback,
but, in case of purchasing outside of the app, such as a promo code purchase etc., it can not be included in iapV4Receipt.

Parameters
marketPidUnique code registered on the App Store or Google Store.
oldMarketPidUnique code registered on the App Store or Google Store. (Android Only)
iapPayloadA string containing supplementary information about the purchase request, specified by the developer. (Android Only)
listenerResult of API call
Since
4.11.6

◆ restore()

static void IAPV4::restore ( onRestore  listener)
static

HIVE IAPV4 It restore the item that has not been delivered.


It may happen that the item delivery fails due to various situations in the product purchase process.
In order to prepare for this situation, you should request to deliver the item that has not been delivered.

Parameters
listenerAPI 결과 통지

◆ restoreSubscription()

static void IAPV4::restoreSubscription ( onRestore  listener)
static

HIVE IAPV4 It restore the item that has not been delivered.


Parameters
listenerResult of API call
Since
4.11.6

◆ showCharge()

static void IAPV4::showCharge ( onBalance  listener)
static

It shows Lebi refill page.

Parameters
listenerResult of API call

◆ showInAppMessages()

static void IAPV4::showInAppMessages ( int  categoryId,
onInAppMessages  listener 
)
static

Google In-App Offers.

Parameters
categoryId3(PROMOTIONAL)
listenerInt(responseCode) 가 2(NAVIGATE_TO_DEV_APP_STORE) 일 경우 유저가 제안(Offer)를 확인하고 사용하기를 원한 상황입니다. 개발자는 유저가 구매할 인앱 항목을 선택할 수 있는 게임/앱 내 상점으로 (유저가 해당 화면에 없는 경우) 유저를 이동해야 합니다.

0 은 아무런 액션을 하지 않아도 되고, 음수는 에러상황 입니다.

◆ showMarketSelection()

static void IAPV4::showMarketSelection ( onMarketConnect  listener)
static

It shows a UI to select a Lebi store or a Google store..
If the Google Store and the HIVE Lebi store are available at the same time, you should expose the store selection screen to allow the user to select a store.

Parameters
listenerResult of API call

◆ transactionFinish()

static void IAPV4::transactionFinish ( std::string  marketPid,
onTransactionFinish  listener 
)
static

HIVE IAP v4 It requests the transaction completion processing for the purchase receipt of the item that have been delivered.


At the completion of item delivery after purchasing or restoring, this API should be called to complete the purchase on the market.

Warning
If you do not notify the completion of the purchase to the market after payment has been made, it will be left as an unpaid item..
Since the unpaid items will continue to be recovered until the transactionFinish API call, you should check for duplicate receipts.
Parameters
marketPidThe unique ID of the item for which the transaction is to be completed.
listenerResult of API call
See also
IAPV4TransactionFinishListener::transactionFinish(String, IAPV4TransactionFinishListener)
IAPV4TransactionMultiFinishListener::transactionMultiFinish(List, IAPV4TransactionMultiFinishListener)

◆ transactionMultiFinish()

static void IAPV4::transactionMultiFinish ( std::vector< std::string > const &  marketPidList,
onTransactionMultiFinish  listener 
)
static

HIVE IAP v4 It requests the multiple transaction completion processing for the purchase receipt of the item that have been delivered.


At the completion of item delivery after purchasing or restoring, this API should be called to complete the purchase on the market.

Warning
If you do not notify the completion of the purchase to the market after payment has been made, it will be left as an unpaid item..
Since the unpaid items will continue to be recovered until the transactionFinish API call, you should check for duplicate receipts.
Parameters
marketPidListThe list of unique ID of the item for which the transaction is to be completed.
listenerResult of API call
See also
IAPV4TransactionMultiFinishListener::transactionMultiFinish(List, IAPV4TransactionMultiFinishListener)
IAPV4TransactionFinishListener::transactionFinish(String, IAPV4TransactionFinishListener)

Variable Documentation

◆ iconURL

std::string IAPV4Product::iconURL

세일전 가격 Google Only

32-bit PNG (with alpha)

Dimensions: 512px by 512px

Maximum file size: 1024KB

Copyright © Com2uS Platform Corporation. All Right Reserved. Terms of Use Privacy Policy