1. Purchase History Verification
Purchase History Verfication can be done using UMyStoveSDKObject::StoveSDKVerifyPurchase, the IsPurchased field is true for products that have been purchased more than once.
Purchase History Verification is performed targetting the cache within PC SDK.
If you enter categoryID parameter, verification is only carried out within that categoryID. However, if you use an empty string parameter (””), then verification is done for all categories.
Therefore, it may be advantageous to enter categoryID in terms of seach speed.
// input parameters
// const FString& CategoryId: Category ID to search for products
// const FString& ProductId : Product ID
const FStovePurchaseVerification UMyStoveSDKObject::StoveSDKVerifyPurchase(const FString& CategoryId, const FString& ProductId)
{
/*Add the 'walkthrough' codes here.*/
FStovePurchaseVerification Verify = Super::StoveSDKVerifyPurchase(CategoryId, ProductId);
if (Verify.ErrorResult.Result == StovePCResult::STOVE_PC_NO_ERROR)
{
OnLog("[Success] StoveSDKVerifyPurchase");
OnLog("%s product in %s category was %s", *ProductId, *CategoryId, Verify.IsPurchased ? TEXT("purchased") : TEXT("not purchased"));
}
else
{
//failure handling
}
return Verify;
}
C++
복사
UMyStoveSDKObject::StoveSDKVerifyPurchase function returns a FStovePurchaseVerification structure.The returned FStovePurchaseVerification structure contains the product purchase history, including the error codes.