1. Initialize IAP with Shopkey
Try to initializing IAP with UMyStoveSDKObject::StoveSDKIAPInit 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 UMyStoveSDKObject::StoveSDKIAPInit fails, you can see the error through StovePCResult and OnError callbacks.
// input parameters
// FString ShopKey: ShopKey issued by the stove
FStoveResult UMyStoveSDKObject::StoveSDKIAPInit(const FString& ShopKey)
{
/*Add the 'walkthrough' codes here.*/
FStoveResult ErroResult = Super::StoveSDKIAPInit(ShopKey);
if (ErroResult.Result == StovePCResult::STOVE_PC_NO_ERROR)
{
// success handling
}
return ErrorResult;
}
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 UMyStoveSDKObject::StoveSDKSetGameProfile to call users’ profile, such as character information. (including game world information)
When character information is set through UMyStoveSDKObject::StoveSDKSetGameProfile, PC SDK proceeds with purchase based on Character No. when purchasing a product. When it is not set through UMyStoveSDKObject::StoveSDKSetGameProfile, 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 UMyStoveSDKObject::StoveSDKSetGameProfile API before calling billing service API. Normally, UMyStoveSDKObject::StoveSDKSetGameProfile function only needs to be called once per world/character change.