I'm currently trying to purchase an item by using its alternate ID but I keep getting this error 1071 and the message says the item cannot be purchased. The item is in a store and its price is the same inside and outside this store. I tried to make the purchase with & without the "StoreId" parameter.
Here is my code
// Purchase request for item coming in. Possible to do my own cart system with multiple items. PlayFab::EconomyModels::FPurchaseInventoryItemsRequest PurchaseRequest; PlayFab::EconomyModels::FEntityKey EntityKey; EntityKey.Id = PlayFabID; EntityKey.Type = "title_player_account"; PurchaseRequest.Entity = MakeShared<PlayFab::EconomyModels::FEntityKey>(EntityKey); //PurchaseRequest.StoreId = "04064602-e343-4fd4-924f-20cb035fab28"; //PurchaseRequest.CollectionId = // This is similar to adding this item to the character inventory TODO: Replace This With - > GetCurrentCharacterID(); // Creates the pricing model for the item that the player is expected to pay. PlayFab::EconomyModels::FPurchasePriceAmount PriceAmount; PriceAmount.Amount = PurchaseData.ItemPrice; PriceAmount.ItemId = "CommonCredits"; PurchaseRequest.Amount = 1; PurchaseRequest.PriceAmounts.Add(PriceAmount); PurchaseRequest.DeleteEmptyStacks = true; // Trying to use the alternate ID so i can set it in engine and not have to create a new type to store the ID from the server PlayFab::EconomyModels::FAlternateId AlternateID; AlternateID.Type = "FriendlyId"; AlternateID.Value = PurchaseData.ItemID; // Sets up the item to buy by passing in the item ID. PlayFab::EconomyModels::FInventoryItemReference ItemReference; ItemReference.pfAlternateId = MakeShared<PlayFab::EconomyModels::FAlternateId>(AlternateID); //ItemReference.StackId = GetCurrentCharacterID(); // This is similar to adding this item to the character inventory TODO: Replace This With - > GetCurrentCharacterID(); PurchaseRequest.Item = MakeShared<PlayFab::EconomyModels::FInventoryItemReference>(ItemReference); EconomyAPI->PurchaseInventoryItems(PurchaseRequest, PlayFab::UPlayFabEconomyAPI::FPurchaseInventoryItemsDelegate::CreateUObject(this, &ThisClass::OnPurchaseStoreFrontItemSuccess), PlayFab::FPlayFabErrorDelegate::CreateUObject(this, &ThisClass::OnPurchaseStoreFrontItemFailure));