1. Initialize IAP with Shopkey
Try to initializing IAP with Stove_IAPInit with the ShopKey factor issued by STOVE.
When initialized, the product list registered in STOVE Studio is automatically retrieved and is stored in the STOVE PC SDK internal cache.
If Stove_IAPInit fails, you can see the error through StovePCResult and OnError callbacks.
// input parameters
// char* shopKey: shopKey issued by the stove
StovePCResult result = StovePC_IAPInit(YOUR_SHOP_KEY);
if(result == StovePCResult::STOVE_PC_NO_ERROR)
{
// handle success
}
C++
복사
Below are potential ExternalErrors you might encounter.
ExternalError | Description |
500 | Internal Server Error
⇒ Please contact STOVE Onboarding Manager |
50001 | Store does not exist, or is under maintenance
⇒ Please check STOVE Studio |
50002 | Product does not exist or is unavailable for sale
⇒ Please check STOVE Studio |
999999 | undefined error
⇒ Please contact STOVE Onboarding Manager |
2. Call User Profile
A STOVE user can have up to 3 types of user profile
1) Character No. ⇒ Created per character
2) GUID ⇒ Created per game account
3) Member No. ⇒ Universal STOVE Member No.
STOVE PC SDK prioritizes the user information of the product as follows.
- Character No. > GUID > Member No.
Use StovePC_SetGameProfile to call users’ profile, such as character information.
(including game world information)
When character information is set through the StovePC_SetGameProfile
function, PC SDK proceeds with purchase based on Character No. when purchasing a product. When it is not set through StovePC_SetGameProfile, PC SDK proceeds purcfhase with GUID or Member No.
Therefore, in order to ensure that the purchasing entity is not colliding with other character information, consider whether to call the StovePC_SetGameProfile API before calling billing service API. Normally, StovePC_SetGameProfile function only needs to be called once per world/character change.