Result API IAPV4
Bookmark
IAPV4.marketConnect¶
IAPV4.marketConnect((ResultAPI result, List<IAPV4.IAPV4Type> iapV4TypeList) => {
switch(result.code) {
case ResultAPI.Code.IAPV4NetworkError:
// Check the network connection status of the device.
// If this error occurs despite the device's network connection being normal, please contact HIVE with the error message.
break;
case ResultAPI.Code.IAPV4ResponseError:
// Please contact HIVE with the received message.
break;
case ResultAPI.Code.IAPV4ServerResponseError:
// Please contact HIVE with the received message.
break;
case ResultAPI.Code.IAPV4RequestMarketJsonException:
// Please contact HIVE with the received message.
break;
case ResultAPI.Code.IAPV4AppStoreError:
// Check if the device can connect to the AppStore.
// If this issue persists, please contact HIVE with the received message.
break;
case ResultAPI.Code.IAPV4FailMarketConnect:
// Check if the selected Market can be connected on the device.
// If this issue persists, please contact HIVE with the received message.
break;
...
}
});
IAPV4::marketConnect([](ResultAPI const & result,std::vector<IAPV4Type> const & marketIDs){
switch(result.code) {
case ResultAPI::Code::IAPV4NetworkError:
// Check the device's network connection status.
// If this error occurs even when the device network connection is normal, contact HIVE with the error message.
break;
case ResultAPI::Code::IAPV4ResponseError:
// Contact HIVE with the received message.
break;
case ResultAPI::Code::IAPV4ServerResponseError:
// Contact HIVE with the received message.
break;
case ResultAPI::Code::IAPV4RequestMarketJsonException:
// Contact HIVE with the received message.
break;
case ResultAPI::Code::IAPV4AppStoreError:
// Check whether AppStore integration is available on the device.
// If the issue persists, contact HIVE with the received message.
break;
case ResultAPI::Code::IAPV4FailMarketConnect:
// Check whether integration with the selected Market is available on the device.
// If the issue persists, contact HIVE with the received message.
break;
...
}
});
IAPV4.marketConnect(new IAPV4.IAPV4MarketInfoListener() {
@Override
public void onIAPV4MarketInfo(ResultAPI result, List<IAPV4.IAPV4Type> iapV4TypeList) {
switch(result.code) {
case IAPV4NetworkError:
// Check the device's network connection status.
// If this error occurs even when the device network connection is normal, contact HIVE with the error message.
break;
case IAPV4ResponseError:
// Contact HIVE with the received message.
break;
case IAPV4ServerResponseError:
// Contact HIVE with the received message.
break;
case IAPV4RequestMarketJsonException:
// Contact HIVE with the received message.
break;
case IAPV4AppStoreError:
// Check whether AppStore integration is available on the device.
// If the issue persists, contact HIVE with the received message.
break;
case IAPV4FailMarketConnect:
// Check whether integration with the selected Market is available on the device.
// If the issue persists, contact HIVE with the received message.
break;
...
}
}
});
[HIVEIAPV4 marketConnect:^(HIVEResultAPI *result, NSArray<NSNumber *> *marketIDs) {
switch(result.code) {
case kIAPV4NetworkError:
// Check the device's network connection status.
// If this error occurs even when the device network connection is normal, contact HIVE with the error message.
break;
case kIAPV4ResponseError:
// Contact HIVE with the received message.
break;
case kIAPV4ServerResponseError:
// Contact HIVE with the received message.
break;
case kIAPV4RequestMarketJsonException:
// Contact HIVE with the received message.
break;
case kIAPV4AppStoreError:
// Check whether AppStore integration is available on the device.
// If the issue persists, contact HIVE with the received message.
break;
case kIAPV4FailMarketConnect:
// Check whether integration with the selected Market is available on the device.
// If the issue persists, contact HIVE with the received message.
break;
//...
}
}];
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) IAPV4NetworkError | Failed to communicate with the HIVE server. | Check the device's network connection status. If this error occurs even when the device network connection is normal, contact HIVE with the error message. |
| (Required implementation) IAPV4ResponseError | The HIVE server communication response value is invalid. | Contact HIVE with the received message. |
| (Required implementation) IAPV4ServerResponseError | The HIVE server communication response value is invalid. | Contact HIVE with the received message. |
| (Required implementation) IAPV4RequestMarketJsonException | [Android] An error occurs while creating JSON data for /api/call market server communication | Contact HIVE with the received message. |
| (Required implementation) IAPV4NetworkError | Failed to communicate with the HIVE server. | Check the device's network connection status. |
| (Required implementation) IAPV4ResponseError | The HIVE server communication response value is invalid. | Contact HIVE with the received message. |
| (Required implementation) IAPV4ServerResponseError | The server communication response value is invalid. | Contact HIVE with the received message. |
| (Required implementation) IAPV4RequestMarketJsonException | [Android] An error occurs while creating JSON data for /api/call market server communication | Contact HIVE with the received message. |
| (Required implementation) IAPV4AppStoreError | [Apple Market] An error occurred while attempting AppStore integration. | Check whether AppStore integration is available on the device. View AppStore errors |
| (Required implementation) IAPV4FailMarketConnect | [Google Market] An error occurred while attempting Google Market integration. [Lebi Market] An error occurred while attempting Lebi Market integration. [OneStore Market] An error occurred while attempting OneStore Market integration. | Check whether integration with the selected Market is available on the device. |
| IAPV4NotInitialize | The HIVE SDK has not been initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |
| IAPV4InProgressMarketConnect | Market Connect is already in progress. | If the IAPV4.marketConnect API is already running, duplicate API calls are not allowed. |
| IAPV4EmptyMarketList | The market list in the server communication response data is invalid. | Check the registered market information. |
| IAPV4NotSupportedMarket | This market cannot be used in the current version of the HIVE SDK. | Check the registered market information. |
| IAPV4MarketPidListEmptyInIAPServer | No market is registered on the server, or the market is not supported. | Check the registered market information. |
| IAPV4FailToConvertNSSet | [Apple Market] The item list for the Apple market registered on the server is invalid. | Check the item information for the registered Apple market. |
| IAPV4InProgressConnectAppStore | [Apple Market] An AppStore connection attempt is already in progress. | Wait until the AppStore connection already being attempted through the IAPV4.marketCoonect API ends. |
| IAPV4AppStoreResponseEmpty | [Apple Market] No item information is registered in AppStore, or AppStore integration was not completed normally. | Check whether the product is not registered in AppStore or is disabled. Check whether communication failed due to a temporary internet interruption. |
| IAPV4PlayStoreQueryInventoryFail | [Google Market] Google Market integration was not completed normally or product information retrieval was not completed normally. | Check whether Google Market integration is available on the device. If the issue persists, contact Hive with the received message. Added in 4.16.0 and 1.20.0. |
IAPV4.getProductInfo¶
Similar type : IAPV4.getSubscriptionProductInfo
IAPV4.getProductInfo((ResultAPI result, List<IAPV4.IAPV4Product> iapV4ProductList, int balance) => {
switch(result.code) {
case ResultAPI.Code.IAPV4ProductInfoJsonException:
// Please contact HIVE with the message received.
break;
case ResultAPI.Code.IAPV4RequestProductJsonException:
// Please contact HIVE with the message received.
break;
case ResultAPI.Code.IAPV4ResponseError:
// Please contact HIVE with the message received.
break;
/***** If a market selection is needed to proceed with the purchase *****/
case ResultAPI.Code.IAPV4EmptyMarketURL:
// There is no market selection list available to proceed with the purchase.
break;
case ResultAPI.Code.IAPV4CancelMarketSelect:
// The market selection for the purchase has been canceled, or an error occurred during the selection process.
// If the market selection does not proceed, the purchase cannot be completed, so please retry the API.
// If this error persists, please contact HIVE with the message received.
break;
case ResultAPI.Code.IAPV4NetworkError:
// Check the network connection status of the device.
// If this error occurs despite the device's network connection being normal, please contact HIVE with the error message.
break;
case ResultAPI.Code.IAPV4ServerResponseError:
// Please contact HIVE with the message received.
break;
...
}
});
IAPV4::getProductInfo([](ResultAPI const & result,std::vector<IAPV4Product> const & productInfoList,unsigned int balance){
switch(result.code) {
case ResultAPI::Code::IAPV4ProductInfoJsonException:
// Please contact HIVE with the message received.
break;
case ResultAPI::Code::IAPV4RequestProductJsonException:
// Please contact HIVE with the message received.
break;
case ResultAPI::Code::IAPV4ResponseError:
// Please contact HIVE with the message received.
break;
/***** If a market selection is needed to proceed with the purchase *****/
case ResultAPI::Code::IAPV4EmptyMarketURL:
// There is no market selection list available to proceed with the purchase.
break;
case ResultAPI::Code::IAPV4CancelMarketSelect:
// The market selection for the purchase has been canceled or an error occurred during selection processing.
// If the market selection does not proceed, the purchase cannot be completed, so please retry the API.
// If this error persists, please contact HIVE with the message received.
break;
case ResultAPI::Code::IAPV4NetworkError:
// Please check the network connection status of the device.
// If this error occurs despite the device's network connection being normal, please contact HIVE with the error message.
break;
case ResultAPI::Code::IAPV4ServerResponseError:
// Please contact HIVE with the message received.
break;
...
}
});
IAPV4.getProductInfo(new IAPV4.IAPV4ProductInfoListener() {
@Override
public void onIAPV4ProductInfo(ResultAPI result, final List<IAPV4.IAPV4Product> iapV4ProductList, final int balance) {
switch(result.code) {
case IAPV4ProductInfoJsonException:
// Contact HIVE with the received message.
break;
case IAPV4RequestProductJsonException:
// Contact HIVE with the received message.
break;
case IAPV4ResponseError:
// Contact HIVE with the received message.
break;
/***** When Market selection is required for purchase *****/
case IAPV4EmptyMarketURL:
// There is no Market selection list for purchase.
break;
case IAPV4CancelMarketSelect:
// The Market selection for purchase was canceled or an error occurred during selection processing.
// If Market selection is not completed, purchase cannot proceed, so retry the API.
// If the error persists, contact HIVE with the received message.
break;
case IAPV4NetworkError:
// Check the device's network connection status.
// If this error occurs even when the device network connection is normal, contact HIVE with the error message.
break;
case IAPV4ServerResponseError:
// Contact HIVE with the received message.
break;
...
}
}
});
[HIVEIAPV4 getProductInfo:^(HIVEResultAPI *result, NSArray<HIVEIAPV4Product *> *productInfoList, NSUInteger balance) {
switch (result.code) {
case kIAPV4ProductInfoJsonException:
// Please contact HIVE with the message received.
break;
case kIAPV4RequestProductJsonException:
// Please contact HIVE with the message received.
break;
case kIAPV4ResponseError:
// Please contact HIVE with the message received.
break;
/***** If market selection is required for purchase *****/
case kIAPV4EmptyMarketURL:
// There is no list of markets to select for purchase.
break;
case kIAPV4CancelMarketSelect:
// The selection of the market for purchase has been canceled or an error occurred during selection processing.
// If the market selection is not completed, the purchase cannot proceed, so please retry the API.
// If this error persists, please contact HIVE with the message received.
break;
case kIAPV4NetworkError:
// Please check the network connection status of the device.
// If this error occurs despite the device's network connection being normal, please contact HIVE with the error message.
break;
case kIAPV4ServerResponseError:
// Please contact HIVE with the message received.
break;
//...
}
}];
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) IAPV4ProductInfoJsonException | Information required for HIVE server communication is missing. | Contact HIVE with the received message. |
| (Required implementation) IAPV4RequestProductJsonException | Information required for HIVE server communication is missing. | Contact HIVE with the received message. |
| (Required implementation) IAPV4ResponseError | The HIVE server communication response value is invalid. | Contact HIVE with the received message. |
| (Required implementation) IAPV4ResponseError | The HIVE server communication response value is invalid. | Contact HIVE with the received message. |
| (Required implementation) IAPV4EmptyMarketURL | There is no selectable Market. | There is no Market selection list for purchase. |
| (Required implementation) IAPV4CancelMarketSelect | An error occurred while selecting the Market for purchase. | The Market selection for purchase was canceled or an error occurred during selection processing. If Market selection is not completed, purchase cannot proceed, so retry the API. If the error persists, contact HIVE with the received message. |
| (Required implementation) IAPV4NetworkError | Failed to communicate with the server. | Check the device's network connection status. If this error occurs even when the device network connection is normal, contact HIVE with the error message. |
| (Required implementation) IAPV4ServerResponseError | The server communication response value is invalid. | Contact HIVE with the received message. |
| IAPV4NotInitialize | The HIVE SDK has not been initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |
| IAPV4NeedMarketConnect | Market integration has not been completed. | Call the IAPV4.MarketConnect API to perform IAPV4 Market integration. |
| IAPV4NeedSignIn | Not signed in. | Call the AuthV4.helper.signIn API to sign in. View API |
| IAPV4EmptyProductList | No purchasable item exists. | Register the item information to purchase. |
| IAPV4InProgressMarketSelect | Market selection for purchase is already in progress. | Run it again after selecting the Market for purchase. |
| IAPV4NeedSignIn | [Lebi Market] You are not signed in, so Lebi Market cannot be used. | Guide the user to call the AuthV4.helper.connect API with providerType set to HIVE to perform HIVE linking. View API |
| IAPV4NeedSignIn | Not signed in. | Call the AuthV4.helper.signIn API to sign in. View API |
| IAPV4EmptyProductList | No purchasable item exists. | Register the item information to purchase. |
| IAPV4InProgressMarketSelect | Market selection for purchase is already in progress. | Run it again after selecting the Market for purchase. |
| IAPV4NeedSignIn | [Lebi Market] You are not signed in, so Lebi Market cannot be used. | Guide the user to call the AuthV4.helper.connect API with providerType set to HIVE to perform HIVE linking. View API |
| IAPV4NotSupportedMarket | A Market that is not supported by the current device OS was selected. | Ensure unsupported Markets are not displayed in the Market selection pop-up. |
| IAPV4PlayStoreQueryInventoryFail | [Google Market] Google Market integration was not completed normally or product information retrieval was not completed normally. | Check whether Google Market integration is available on the device. If the issue persists, contact Hive with the received message. Added in 4.16.0 and 1.20.0. |
IAPV4.purchase¶
Similar type : hive.IAPV4.purchaseSubscription
IAPV4.purchase ("com.gcp.product1", "{\"characterName\":\"GCP\"}", (ResultAPI result, IAPV4.IAPV4Receipt iapV4Receipt) => {
switch(result.code) {
case ResultAPI.Code.IAPV4RestrictPayments:
// Check whether in-app purchases are blocked on the device.
break;
case ResultAPI.Code.IAPV4NeedRestore:
// Restore purchases through the IAPV4.restore API.
break;
case ResultAPI.Code.IAPV4PurchaseParamJsonException:
// Contact HIVE with the received message.
break;
case ResultAPI.Code.IAPV4CancelPayment:
// Notify the user that the purchase was canceled.
break;
/**** Using the Apple store *****/
case ResultAPI.Code.IAPV4AppStoreError:
// Notify the user that the purchase was canceled.
break;
/***** Using the Google store *****/
case ResultAPI.Code.IAPV4FailPayment:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case ResultAPI.Code.IAPPlayStoreLaunchPurchaseFlowException:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
/***** Using the Lebi store *****/
case ResultAPI.Code.IAPV4LebiCancel:
// The user canceled the Lebi balance top-up. Notify the user that the purchase cannot proceed because the balance is insufficient.
break;
case ResultAPI.Code.IAPV4LebiPurchaseNetworkError:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case ResultAPI.Code.IAPV4LebiPurchaseJsonException:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case ResultAPI.Code.IAPV4LebiInternalRequestException:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case ResultAPI.Code.CommonUnknown:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case ResultAPI.Code.IAPV4PlayStorePending:
// The purchase was processed as a pending transaction due to offline purchase or a similar reason.
// Later, the completed purchase receipt can be received during Restore from the UE IAP_UPDATED signal.
break;
...
}
});
string marketPid = "com.gcp.product1";
string additionalInfo = "{\"characterName\":\"GCP\"}";
IAPV4::purchase(pidList[index], getEditboxValue(EDITBOX_ADDITIONAL_INFO), [](ResultAPI const & result,IAPV4Receipt const & receipt){
switch(result.code) {
case ResultAPI::Code::IAPV4RestrictPayments:
// Check whether in-app purchases are blocked on the device.
break;
case ResultAPI::Code::IAPV4NeedRestore:
// Restore purchases through the IAPV4.restore API.
break;
case ResultAPI::Code::IAPV4PurchaseParamJsonException:
// Contact HIVE with the received message.
break;
case ResultAPI::Code::IAPV4CancelPayment:
// Notify the user that the purchase was canceled.
break;
/ Using the Apple store *****/
case ResultAPI::Code::IAPV4AppStoreError:
// Notify the user that the purchase was canceled.
break;
/***** Using the Google store *****/
case ResultAPI::Code::IAPV4FailPayment:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case ResultAPI::Code::IAPPlayStoreLaunchPurchaseFlowException:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
/***** Using the Lebi store *****/
case ResultAPI::Code::IAPV4LebiCancel:
// The user canceled the Lebi balance top-up. Notify the user that the purchase cannot proceed because the balance is insufficient.
break;
case ResultAPI::Code::IAPV4LebiPurchaseNetworkError:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case ResultAPI::Code::IAPV4LebiPurchaseJsonException:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case ResultAPI::Code::IAPV4LebiInternalRequestException:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case ResultAPI::Code::CommonUnknown:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case ResultAPI::Code::IAPV4PlayStorePending:
// The purchase was processed as a pending transaction due to offline purchase or a similar reason.
// Later, the completed purchase receipt can be received during Restore from the UE IAP_UPDATED signal.
break;
...
}
});
IAPV4.purchase("com.gcp.product1", "{\"characterName\":\"GCP\"}", new IAPV4.IAPV4PurchaseListener() {
@Override
public void onIAPV4Purchase(ResultAPI result, final IAPV4.IAPV4Receipt iapV4Receipt) {
switch(result.code) {
case IAPV4RestrictPayments:
// Check whether in-app purchases are blocked on the device.
break;
case IAPV4NeedRestore:
// Restore purchases through the IAPV4.restore API.
break;
case IAPV4PurchaseParamJsonException:
// Contact HIVE with the received message.
break;
case IAPV4CancelPayment:
// Notify the user that the purchase was canceled.
break;
/ Using the Apple store *****/
case IAPV4AppStoreError:
// Notify the user that the purchase was canceled.
break;
/***** Using the Google store *****/
case IAPV4FailPayment:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case IAPPlayStoreLaunchPurchaseFlowException:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
/***** Using the Lebi store *****/
case IAPV4LebiCancel:
// The user canceled the Lebi balance top-up. Notify the user that the purchase cannot proceed because the balance is insufficient.
break;
case IAPV4LebiPurchaseNetworkError:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case IAPV4LebiPurchaseJsonException:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case IAPV4LebiInternalRequestException:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case CommonUnknown:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case IAPV4PlayStorePending:
// The purchase was processed as a pending transaction due to offline purchase or a similar reason.
// Later, the completed purchase receipt can be received during Restore from the UE IAP_UPDATED signal.
break;
...
}
}
});
[HIVEIAPV4 purchase:@"com.gcp.product1" additionalInfo:@"{\"characterName\":\"GCP\"}" handler:^(HIVEResultAPI *result, HIVEIAPV4Receipt *receipt) {
switch (result.code) {
case kIAPV4RestrictPayments:
// Check whether in-app purchases are blocked on the device.
break;
case kIAPV4NeedRestore:
// Restore purchases through the IAPV4.restore API.
break;
case kIAPV4PurchaseParamJsonException:
// Contact HIVE with the received message.
break;
case kIAPV4CancelPayment:
// Notify the user that the purchase was canceled.
break;
/**** Using the Apple store *****/
case kIAPV4AppStoreError:
// Notify the user that the purchase was canceled.
break;
/***** Using the Google store *****/
case kIAPV4FailPayment:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case kIAPPlayStoreLaunchPurchaseFlowException:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
/***** Using the Lebi store *****/
case kIAPV4LebiCancel:
// The user canceled the Lebi balance top-up. Notify the user that the purchase cannot proceed because the balance is insufficient.
break;
case kIAPV4LebiPurchaseNetworkError:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case kIAPV4LebiPurchaseJsonException:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case kIAPV4LebiInternalRequestException:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
case kCommonUnknown:
// After notifying the user about the problem, guide them to try the purchase again.
// If the issue persists, contact HIVE with the received message.
break;
//...
}
}];
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) IAPV4RestrictPayments | There is no Apple App Store purchase permission. | Check whether in-app purchases are blocked on the device. |
| (Required implementation) IAPV4NeedRestore | When the item is in restore state or an item to restore exists | Restore purchases through the IAPV4.restore API. |
| (Required implementation) IAPV4PurchaseParamJsonException | Information required for HIVE server communication is missing. | Contact HIVE with the received message. |
| (Required implementation) IAPV4CancelPayment | The user canceled the item purchase. [Google Market] The user canceled the item purchase. | Notify the user that the purchase was canceled. |
| (Required implementation) IAPV4AppStoreError | The user canceled the item purchase. [Google Market] The user canceled the item purchase. | Notify the user that the purchase was canceled. |
| (Required implementation) IAPV4AppStoreError | [Apple Market] A problem occurred while processing the purchase in AppStore Market. | After notifying the user about the problem, guide them to try the purchase again. If the issue persists, contact HIVE with the received message. |
| (Required implementation) IAPV4FailPayment | [Google Market] A problem occurred while processing the purchase in Google Market. | After notifying the user about the problem, guide them to try the purchase again. If the issue persists, contact HIVE with the received message. |
| (Required implementation) IAPPlayStoreLaunchPurchaseFlowException | [Google Market] A problem occurred while processing the completed purchase information received from Google Market. | After notifying the user about the problem, guide them to try the purchase again. If the issue persists, contact HIVE with the received message. |
| (Required implementation) IAPV4LebiCancel | [Lebi Market] Lebi balance top-up was canceled. The purchase is canceled because the balance is insufficient. | The user canceled the Lebi balance top-up. Notify the user that the purchase cannot proceed because the balance is insufficient. |
| (Required implementation) IAPV4LebiPurchaseNetworkError | [Lebi Market] A problem occurred while processing the purchase in Lebi Market. | After notifying the user about the problem, guide them to try the purchase again. If the issue persists, contact HIVE with the received message. |
| (Required implementation) IAPV4LebiPurchaseJsonException | [Lebi Market] A problem occurred while processing the completed purchase information received from Lebi Market. | After notifying the user about the problem, guide them to try the purchase again. If the issue persists, contact HIVE with the received message. |
| (Required implementation) IAPV4LebiInternalRequestException | [Lebi Market] A problem occurred while processing the completed purchase information received from Lebi Market. | After notifying the user about the problem, guide them to try the purchase again. If the issue persists, contact HIVE with the received message. |
| (Required implementation) IAPV4LebiInternalRequestException | [Lebi Market] A problem occurred while processing the completed purchase information received from Lebi Market. | After notifying the user about the problem, guide them to try the purchase again. If the issue persists, contact HIVE with the received message. |
| (Required implementation) CommonUnknown | [Lebi Market] A problem occurred while processing the completed purchase information received from Lebi Market. | After notifying the user about the problem, guide them to try the purchase again. If the issue persists, contact HIVE with the received message. |
| IAPV4NotInitialize | The HIVE SDK has not been initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |
| IAPV4NotInitialize | The HIVE SDK has not been initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |
| IAPV4NeedMarketConnect | Market integration has not been completed. | Call the IAPV4.MarketConnect API to perform IAPV4 Market integration. |
| IAPV4NeedSignIn | Not signed in. | Call the AuthV4.helper.signIn API to sign in. View API |
| IAPV4EmptyParamMarketPID | The marketPid value passed when calling the API is invalid. | Enter a purchasable marketPid value. |
| IAPV4EmptyProductList | No purchasable item is registered in HIVE. | Register the item information to purchase in HIVE. |
| IAPV4ProductNotExistInIAPServer | The item to purchase is not registered in HIVE. | Register the item information to purchase in HIVE. |
| IAPV4ProductNotExist | The item to purchase is not registered in the corresponding Market. | Register the item information in the corresponding Market. |
| IAPV4ProductNotExsitInAppStore | The item to purchase is not registered in AppStore Market. | Register the item information in AppStore Market. |
| IAPV4InProgressPurchasing | A purchase is already in progress. | A purchase is already in progress through the IAPV4.purchase API. |
| IAPV4InProgressRestoring | Purchase restoration is already in progress. | Purchase restoration is already in progress through the IAPV4.restore API. |
| IAPV4FailCreateSKPayment | An error occurred while processing purchase request information. | An error occurred while processing purchase information. Contact HIVE with the received message. |
| IAPV4NeedsHiveSyncing | [Lebi Market] You are not signed in to HIVE, so Lebi Market cannot be used. | Guide the user to call the AuthV4.helper.connect API with providerType set to HIVE to perform HIVE linking. View API |
IAPV4.restore¶
Similar type : IAPV4.restoreSubscription
IAPV4.restore ((ResultAPI result, List<IAPV4.IAPV4Receipt> iapV4ReceiptList) => {
switch(result.code) {
case ResultAPI.Code.IAPV4RestrictPayments:
// Check whether in-app purchases are blocked on the device.
break;
case ResultAPI.Code.IAPV4FailToRestore:
// After notifying the user about the problem, guide them to try purchase restoration again.
// If the issue persists, contact HIVE with the received message.
break;
...
}
});
IAPV4::restore([](ResultAPI const & result,std::vector<std::reference_wrapper<IAPV4Receipt>> receiptList) {
switch(result.code) {
case ResultAPI::Code::IAPV4RestrictPayments:
// Check whether in-app purchases are blocked on the device.
break;
case ResultAPI::Code::IAPV4FailToRestore:
// After notifying the user about the problem, guide them to try purchase restoration again.
// If the issue persists, contact HIVE with the received message.
break;
...
}
});
IAPV4.restore(new IAPV4.IAPV4RestoreListener() {
@Override
public void onIAPV4Restore(ResultAPI result, List<IAPV4.IAPV4Receipt> iapv4ReceiptList) {
switch(result.code) {
case IAPV4RestrictPayments:
// Check whether in-app purchases are blocked on the device.
break;
case IAPV4FailToRestore:
// Guide the user to attempt to restore purchases again after providing information about the issue.
// If the problem persists, please contact HIVE with the message received.
break;
...
}
}
});
[HIVEIAPV4 restore:^(HIVEResultAPI *result, NSArray<HIVEIAPV4Receipt *> *receiptList) {
switch (result.code) {
case kIAPV4RestrictPayments:
// Check whether in-app purchases are blocked on the device.
break;
case kIAPV4FailToRestore:
// After notifying the user about the problem, guide them to try purchase restoration again.
// If the issue persists, contact HIVE with the received message.
break;
//...
}
}];
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) IAPV4RestrictPayments | There is no Apple App Store purchase permission. | Check whether in-app purchases are blocked on the device. |
| (Required implementation) Google : IAPV4FailToRestore | [Google Market] A problem occurred while processing purchase restoration in Google Market. | After notifying the user about the problem, guide them to try purchase restoration again. If the issue persists, contact HIVE with the received message. |
| IAPV4NotInitialize | The HIVE SDK has not been initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |
| IAPV4NeedMarketConnect | Market integration has not been completed. | Call the IAPV4.MarketConnect API to perform IAPV4 Market integration. |
| IAPV4NeedSignIn | Not signed in. | Call the AuthV4.helper.signIn API to sign in. View API |
| IAPV4NotSupportedMarket | A Market that is not supported by the current device OS was selected. | Ensure unsupported Markets are not displayed in the Market selection pop-up. |
| IAPV4EmptyProductList | No purchasable item is registered in HIVE. | Register the item information to purchase in HIVE. |
| IAPV4InProgressPurchasing | A purchase is already in progress. | A purchase is already in progress through the IAPV4.purchase API. |
| IAPV4InProgressRestoring | Purchase restoration is already in progress. | Purchase restoration is already in progress through the IAPV4.restore API. |
| IAPV4InProgressCheckPromote | The Promote in-app purchase information request feature is in use. | A Promote purchase information request is already in progress through the IAPV4.checkPromotePurchase API. |
| IAPV4NothingToRestore | There are no items that require purchase restoration. | There are no items that require purchase restoration. |
IAPV4.transactionFinish¶
Similar type : IAPV4.transactionMultiFinish
IAPV4.transactionMultiFinish¶
Similar type : IAPV4.transactionFinish
List<String> marketPidList = new List<String>();
marketPidList.Add(iapV4Receipt.product.marketPid);
IAPV4.transactionMultiFinish (marketPidList, (List<ResultAPI> resultList, List<String> marketPidList) => {
foreach(ResultAPI result in resultList) {
switch(result.code) {
case ResultAPI.Code.IAPV4RestrictPayments:
// Check whether in-app purchases are blocked on the device.
break;
case ResultAPI.Code.IAPV4PlayStoreFinishFail:
// Check whether the item to finish purchase processing was purchased through an abnormal route.
// If this error continues to occur when finishing an item purchased through a normal route, contact HIVE.
break;
...
}
}
});
IAPV4::transactionMultiFinish(multiPid, [](std::vector<ResultAPI> const & resultList,std::vector<std::string> const & marketPidList){
for(int i=0;i<resultList.size();++i){
ResultAPI result = resultList[i];
switch(result.code) {
case ResultAPI::Code::IAPV4RestrictPayments:
// Check whether in-app purchases are blocked on the device.
break;
case ResultAPI::Code::IAPV4PlayStoreFinishFail:
// Check whether the item to finish purchase processing was purchased through an abnormal route.
// If this error continues to occur when finishing an item purchased through a normal route, contact HIVE.
break;
...
}
}
});
ArrayList<String> marketPidList = new ArrayList<String>();
marketPidList.add(iapV4Receipt.product.marketPid);
IAPV4.transactionMultiFinish(marketPidList, new IAPV4.IAPV4TransactionMultiFinishListener() {
@Override
public void onIAPV4TransacionMultiFinish(List<ResultAPI> resultList, List<String> marketPidList) {
for (ResultAPI result : resultList) {
switch(result.code) {
case IAPV4RestrictPayments:
// Check whether in-app purchases are blocked on the device.
break;
case IAPV4PlayStoreFinishFail:
// Check whether the item to finish purchase processing was purchased through an abnormal route.
// If this error continues to occur when finishing an item purchased through a normal route, contact HIVE.
break;
...
}
}
}
});
NSMutableArray<NSString*> *marketPidList = [NSMutableArray array];
[marketPidList addObject:iapV4Receipt.product.marketPid];
[HIVEIAPV4 transactionMultiFinish:marketPidList handler:^(NSArray<HIVEResultAPI *> *resultList, NSArray<NSString *> *marketPidList) {
for(HIVEResultAPI *result in resultList) {
switch (result.code) {
case kIAPV4RestrictPayments:
// Check whether in-app purchases are blocked on the device.
break;
case kIAPV4PlayStoreFinishFail:
// Check whether the item to finish purchase processing was purchased through an abnormal route.
// If this error continues to occur when finishing an item purchased through a normal route, contact HIVE.
break;
//...
}
}
}];
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) IAPV4RestrictPayments | There is no Apple App Store purchase permission. | Check whether in-app purchases are blocked on the device. |
| (Required implementation) IAPV4PlayStoreFinishFail | [Google Market] An error occurred while synchronizing the purchase with Google Market. | Check whether the item to finish purchase processing was purchased through an abnormal route. If this error continues to occur when finishing an item purchased through a normal route, contact HIVE. |
| IAPV4NotInitialize | The HIVE SDK has not been initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |
| IAPV4NeedMarketConnect | Market integration has not been completed. | Call the IAPV4.MarketConnect API to perform IAPV4 Market integration. |
| IAPV4NeedSignIn | Not signed in. | Call the AuthV4.helper.signIn API to sign in. View API |
| IAPV4NotSupportedMarket | A Market that is not supported by the current device OS was selected. | Ensure unsupported Markets are not displayed in the Market selection pop-up. |
| IAPV4FinishMarketPidEmpty | The marketPidList value passed when calling the API is invalid. | Enter a purchasable marketPid value. |
| IAPV4LebiFinishFail | [Lebi Market] Purchase information for this item does not exist on the Lebi server. | Check whether the item to finish purchase processing was purchased through an abnormal route. If this error continues to occur when finishing an item purchased through a normal route, contact HIVE. |
IAPV4.checkPromotePurchase¶
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) IAPV4RestrictPayments | There is no Apple App Store purchase permission. | Check whether in-app purchases are blocked on the device. |
| IAPV4NotInitialize | The HIVE SDK has not been initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |
| IAPV4NeedMarketConnect | Market integration has not been completed. | Call the IAPV4.MarketConnect API to perform IAPV4 Market integration. |
| IAPV4NeedSignIn | Not signed in. | Call the AuthV4.helper.signIn API to sign in. View API |
| IAPV4NotSupportedMarket | A Market that is not supported by the current device OS was selected. | Ensure unsupported Markets are not displayed in the Market selection pop-up. |
| IAPV4EmptyProductList | No purchasable item is registered in HIVE. | Register the item information to purchase in HIVE. |
| IAPV4InProgressPurchasing | A purchase is already in progress. | A purchase is already in progress through the IAPV4.purchase API. |
| IAPV4InProgressRestoring | Purchase restoration is already in progress. | Purchase restoration is already in progress through the IAPV4.restore API. |
| IAPV4InProgressCheckPromote | The Promote in-app purchase information request feature is in use. | A Promote purchase information request is already in progress through the IAPV4.checkPromotePurchase API. |
| IAPV4PromoteMarketPidEmpty | The marketPidList value passed when calling the API is invalid. | Enter a purchasable marketPid value. |
IAPV4.showMarketSelection¶
IAPV4.showMarketSelection ((ResultAPI result, List<IAPV4.IAPV4Type> iapV4TypeList) => {
switch(result.code) {
case ResultAPI.Code.IAPV4CancelMarketSelect:
// The Market selection for purchase was canceled or an error occurred during selection processing.
// If Market selection is not completed, purchase cannot proceed, so retry the API.
// If the error persists, contact HIVE with the received message.
break;
...
}
});
IAPV4::showMarketSelection([](ResultAPI const & result,std::vector<IAPV4Type> const & marketIDs) {
switch(result.code) {
case ResultAPI::Code::IAPV4CancelMarketSelect:
// The Market selection for purchase was canceled or an error occurred during selection processing.
// If Market selection is not completed, purchase cannot proceed, so retry the API.
// If the error persists, contact HIVE with the received message.
break;
...
}
});
IAPV4.showMarketSelection(new IAPV4.IAPV4MarketInfoListener() {
@Override
public void onIAPV4MarketInfo(ResultAPI result, List<IAPV4Type> iapV4TypeList) {
switch(result.code) {
case IAPV4CancelMarketSelect:
// The Market selection for purchase was canceled or an error occurred during selection processing.
// If Market selection is not completed, purchase cannot proceed, so retry the API.
// If the error persists, contact HIVE with the received message.
break;
...
}
}
});
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) IAPV4CancelMarketSelect | An error occurred while selecting the market to proceed with the purchase. | Please cancel the market selection or an error occurred during the selection process. If the market selection does not proceed, the purchase cannot be completed, so please retry the API. If this error persists, please contact HIVE with the message received. |
| IAPV4NeedMarketConnect | The market has not been initialized. | Please call the IAPV4.MarketConnect API to perform market initialization. |
| IAPV4NeedSignIn | You are not logged in. | Please call the AuthV4.helper.signIn API to log in. View API |
IAPV4.getBalanceInfo¶
(Android only)
IAPV4.getBalanceInfo ((ResultAPI result, int balance) => {
switch(result.code) {
/***** Using the Lebi market *****/
case ResultAPI.Code.IAPV4LebiInternalRequestException:
// This issue may occur temporarily.
// If this issue persists, contact HIVE with the received message.
break;
case ResultAPI.Code.CommonUnknown:
// This issue may occur temporarily.
// If this issue persists, contact HIVE with the received message.
break;
case ResultAPI.Code.IAPV4LebiBalanceParamJsonException:
// This issue may occur temporarily.
// If this issue persists, contact HIVE with the received message.
break;
case ResultAPI.Code.IAPV4LebiBalanceNetworkError:
// This issue may occur temporarily.
// If this issue persists, contact HIVE with the received message.
break;
case ResultAPI.Code.IAPV4LebiPostException:
// This issue may occur temporarily.
// If this issue persists, contact HIVE with the received message.
break;
...
}
});
IAPV4::getBalanceInfo([](ResultAPI const & result, int balance) {
switch(result.code) {
/***** Using the Lebi market *****/
case ResultAPI::Code::IAPV4LebiInternalRequestException:
// This issue may occur temporarily.
// If this issue persists, contact HIVE with the received message.
break;
case ResultAPI::Code::CommonUnknown:
// This issue may occur temporarily.
// If this issue persists, contact HIVE with the received message.
break;
case ResultAPI::Code::IAPV4LebiBalanceParamJsonException:
// This issue may occur temporarily.
// If this issue persists, contact HIVE with the received message.
break;
case ResultAPI::Code::IAPV4LebiBalanceNetworkError:
// This issue may occur temporarily.
// If this issue persists, contact HIVE with the received message.
break;
case ResultAPI::Code::IAPV4LebiPostException:
// This issue may occur temporarily.
// If this issue persists, contact HIVE with the received message.
break;
...
}
});
IAPV4.getBalanceInfo(new IAPV4.IAPV4BalanceInfoListener() {
@Override
public void onIAPV4Balance(ResultAPI result, int balance) {
switch(result.code) {
/***** Using the Lebi market *****/
case IAPV4LebiInternalRequestException:
// This issue may occur temporarily.
// If this issue persists, contact HIVE with the received message.
break;
case CommonUnknown:
// This issue may occur temporarily.
// If this issue persists, contact HIVE with the received message.
break;
case IAPV4LebiBalanceParamJsonException:
// This issue may occur temporarily.
// If this issue persists, contact HIVE with the received message.
break;
case IAPV4LebiBalanceNetworkError:
// This issue may occur temporarily.
// If this issue persists, contact HIVE with the received message.
break;
case IAPV4LebiPostException:
// This issue may occur temporarily.
// If this issue persists, contact HIVE with the received message.
break;
...
}
}
});
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) IAPV4LebiInternalRequestException | [Lebi Market] The Lebi Market server communication response data is invalid. | This issue may occur temporarily. If this issue persists, contact HIVE with the received message. |
| (Required implementation) CommonUnknown | [Lebi Market] An unknown error occurred while processing Lebi Market server communication response data. | This issue may occur temporarily. If this issue persists, contact HIVE with the received message. |
| (Required implementation) IAPV4LebiBalanceParamJsonException | [Lebi Market] The Lebi Market server communication response data format cannot be processed. | This issue may occur temporarily. If this issue persists, contact HIVE with the received message. |
| (Required implementation) IAPV4LebiBalanceNetworkError | [Lebi Market] Lebi Market The server communication response value is invalid. | This issue may occur temporarily. If this issue persists, contact HIVE with the received message. |
| (Required implementation) IAPV4LebiPostException | [Lebi Market] The Lebi Market server communication request data is invalid. | This issue may occur temporarily. If this issue persists, contact HIVE with the received message. |
| IAPV4NotInitialize | The HIVE SDK has not been initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |
| IAPV4NeedMarketConnect | Market integration has not been completed. | Call the IAPV4.MarketConnect API to perform IAPV4 Market integration. |
| IAPV4NeedSignIn | Not signed in. | Call the AuthV4.helper.signIn API to sign in. View API |
| IAPV4MarketNotSupportedAPI | [Google Market] The currently selected Market does not support this API. | Call this API in a supported Market. |
| IAPV4MarketNotSupportedAPI | [OneStore Market] The currently selected Market does not support this API. | Call this API in a supported Market. |
IAPV4.showCharge¶
(Android Only)
| Code | Message | How to solve |
|---|---|---|
| IAPV4NotInitialize | HIVE SDK is not initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |
| IAPV4NeedMarketConnect | Market connection is not established. | Call the IAPV4.MarketConnect API to establish the IAPV4 Market connection. |
| IAPV4NeedSignIn | Not signed in. | Call the AuthV4.helper.signIn API to sign in. View API |
| IAPV4MarketNotSupportedAPI | [Google Market] The selected Market does not support this API. | Call this API in a supported Market. |
| IAPV4MarketNotSupportedAPI | [OneStore Market] The selected Market does not support this API. | Call this API in a supported Market. |
IAPV4.getMarketProductInfo¶
Retrieves product information based on a list of specific product IDs registered in the market.
List<String> marketPidList = new List<String>();
marketPidList.Add("product1");
marketPidList.Add("product2");
IAPV4.getMarketProductInfo(marketPidList, (ResultAPI result, List<IAPV4.IAPV4Product> iapV4ProductList, int balance) => {
switch(result.code) {
case ResultAPI.Code.IAPV4ResponseError:
// Contact HIVE with the received message.
break;
case ResultAPI.Code.IAPV4NetworkError:
// Check the device's network connection status.
// If this error occurs even when the device network connection is normal, contact HIVE with the error message.
break;
case ResultAPI.Code.IAPV4ServerResponseError:
// Contact HIVE with the received message.
break;
...
}
});
std::vector<std::string> marketPidList;
marketPidList.push_back("product1");
marketPidList.push_back("product2");
IAPV4::getMarketProductInfo(marketPidList, [](ResultAPI const & result, std::vector<IAPV4Product> const & productInfoList, unsigned int balance){
switch(result.code) {
case ResultAPI::Code::IAPV4ResponseError:
// Please contact HIVE with the message received.
break;
case ResultAPI::Code::IAPV4NetworkError:
// Please check the network connection status of the device.
// If this error occurs despite the network connection status being normal, please contact HIVE with the error message.
break;
case ResultAPI::Code::IAPV4ServerResponseError:
// Please contact HIVE with the message received.
break;
...
}
});
let marketPidList = ["product1", "product2"]
HIVEIAPV4.getMarketProductInfo(marketPidList) { result, productInfoList, balance in
switch (result.code) {
case IAPV4ResponseError:
// Contact HIVE with the received message.
break;
case IAPV4NetworkError:
// Check the device's network connection status.
// If this error occurs even when the device network connection is normal, contact HIVE with the error message.
break;
case IAPV4ServerResponseError:
// Contact HIVE with the received message.
break;
//...
}
}
| Code | Message | How to solve |
|---|---|---|
| IAPV4ResponseError | The HIVE server communication response value is invalid. | Contact HIVE with the received message. |
| IAPV4NetworkError | Failed to communicate with the server. | Check the device's network connection status. If this error occurs even when the device network connection is normal, contact HIVE with the error message. |
| IAPV4ServerResponseError | The server communication response value is invalid. | Contact HIVE with the received message. |
| IAPV4NotInitialize | The HIVE SDK has not been initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |
| IAPV4NeedMarketConnect | Market integration has not been completed. | Call the IAPV4.MarketConnect API to perform IAPV4 Market integration. |
| IAPV4NeedSignIn | Not signed in. | Call the AuthV4.helper.signIn API to sign in. View API |
| IAPV4EmptyProductList | No purchasable item exists. | Register the item information to purchase. |
IAPV4.getSubscriptionProductInfo¶
Retrieves IAPV4 subscription product information.
IAPV4.getSubscriptionProductInfo((ResultAPI result, List<IAPV4.IAPV4Product> iapV4ProductList, int balance) => {
switch(result.code) {
case ResultAPI.Code.IAPV4ResponseError:
// Please contact HIVE with the message received.
break;
case ResultAPI.Code.IAPV4NetworkError:
// Check the network connection status of the device.
// If this error occurs despite the device's network connection status being normal, please contact HIVE with the error message.
break;
case ResultAPI.Code.IAPV4ServerResponseError:
// Please contact HIVE with the message received.
break;
...
}
});
IAPV4::getSubscriptionProductInfo([](ResultAPI const & result, std::vector<IAPV4Product> const & productInfoList, unsigned int balance){
switch(result.code) {
case ResultAPI::Code::IAPV4ResponseError:
// Please contact HIVE with the message received.
break;
case ResultAPI::Code::IAPV4NetworkError:
// Check the network connection status of the device.
// If this error occurs despite the device's network connection status being normal, please contact HIVE with the error message.
break;
case ResultAPI::Code::IAPV4ServerResponseError:
// Please contact HIVE with the message received.
break;
...
}
});
IAPV4.getSubscriptionProductInfo(new IAPV4.IAPV4ProductInfoListener() {
@Override
public void onIAPV4ProductInfo(ResultAPI result, final List<IAPV4.IAPV4Product> iapV4ProductList, final int balance) {
switch(result.code) {
case IAPV4ResponseError:
// Contact HIVE with the received message.
break;
case IAPV4NetworkError:
// Check the device's network connection status.
// If this error occurs even when the device network connection is normal, contact HIVE with the error message.
break;
case IAPV4ServerResponseError:
// Contact HIVE with the received message.
break;
...
}
}
});
[HIVEIAPV4 getSubscriptionProductInfo:^(HIVEResultAPI *result, NSArray<HIVEIAPV4Product *> *productInfoList, NSUInteger balance) {
switch (result.code) {
case kIAPV4ResponseError:
// Please contact HIVE with the message received.
break;
case kIAPV4NetworkError:
// Check the network connection status of the device.
// If this error occurs despite the device's network connection being normal, please contact HIVE with the error message.
break;
case kIAPV4ServerResponseError:
// Please contact HIVE with the message received.
break;
//...
}
}];
| Code | Message | How to solve |
|---|---|---|
| (Required implementation) IAPV4ResponseError | The HIVE server communication response value is invalid. | Contact HIVE with the received message. |
| (Required implementation) IAPV4NetworkError | Failed to communicate with the server. | Check the device's network connection status. If this error occurs even when the device network connection is normal, contact HIVE with the error message. |
| (Required implementation) IAPV4ServerResponseError | The server communication response value is invalid. | Contact HIVE with the received message. |
| IAPV4NotInitialize | The HIVE SDK has not been initialized. | Call the AuthV4.setup API to initialize the HIVE SDK. View API |
| IAPV4NeedMarketConnect | Market integration has not been completed. | Call the IAPV4.MarketConnect API to perform IAPV4 Market integration. |
| IAPV4NeedSignIn | Not signed in. | Call the AuthV4.helper.signIn API to sign in. View API |
| IAPV4EmptyProductList | No purchasable item exists. | Register the item information to purchase. |
| IAPV4NotSupportedMarket | A Market that is not supported by the current device OS was selected. | Ensure unsupported Markets are not displayed in the Market selection pop-up. |
IAPV4.setMarketSelection¶
Changes the IAPV4 payment market. The list of requestable markets is shown below. Requests must use only markets received when calling marketConnect; otherwise, the selected market is not changed.
| Value | Name | Description |
|---|---|---|
| 0 | notSelected | Not selected |
| 1 | appStore | Apple App Store |
| 2 | Google Play Store | |
| 3 | lebi | Lebi Market |
| 4 | oneStore | ONE Store |
| 5 | amazon | Amazon Appstore |
| 6 | samsung | Samsung Galaxy Store |
| 7 | huawei | Huawei AppGallery |
| 8 | funtap | Funtap |
| 9 | oppoAppMarket | OPPO App Market |
| 10 | vivoAppStore | vivo App Store |
| 11 | tencentMyapp | Tencent Myapp |
| 12 | xiaomiAppStore | Xiaomi App Store |
| 13 | huaweiAppGalleryChina | Huawei AppGallery China |
| 14 | facebookCloudGame | Facebook Cloud Game |
| 15 | hiveStore | PG |
| 16 | steam | Steam |
| 17 | nowgg | now.gg |
IAPV4.getSelectedMarket¶
Returns the currently selected market type. The purchase will proceed with the returned market type.