Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by MertCorekci · Jun 24, 2019 at 12:34 PM · In-Game Economy

There is no item in the catalog with an ID matching the product ID in the receipt

Hey guys,

I'm trying to implement iap to my game. I'm getting this "There is no item in the catalog with an ID matching the product ID in the receipt" error.

My Setup

this catalog selected as a primary


XCode log.


2019-06-23 14:43:42.440263+0300 raidfield2[1843:307005] UnityIAP: Finishing transaction 1000000539710973

UnityIAP: Promo interface is available for 6 items

UnityEngine.Purchasing.Promo:ProvideProductsToAds(HashSet`1)

UnityEngine.Purchasing.JSONStore:OnPurchaseSucceeded(String, String, String)

UnityEngine.Purchasing.Extension.UnityUtil:Update()

(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/Debug.bindings.h Line: 43)

Validation failed: /Client/ValidateIOSReceipt: There is no item in the catalog with an ID matching the product ID in the receipt

PlayFab.Internal.PlayFabUnityHttp:OnResponse(String, CallRequestContainer)

PlayFab.Internal.<Post>c__Iterator1:MoveNext()

UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/Debug.bindings.h Line: 43)

I checked other users' same questions but i cannot fix this issue.

What should i do?

ekran-resmi-2019-06-23-151735.png (152.7 kB)
ekran-resmi-2019-06-23-151844.png (181.3 kB)
Comment

People who like this

0 Show 5
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SethDu ♦ · Jun 25, 2019 at 07:43 AM 0
Share

Can you provide related codes? make sure you hide sensitive information.

avatar image MertCorekci SethDu ♦ · Jun 25, 2019 at 09:04 AM 0
Share
public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e)
    {

        if (!IsInitialized)
        {
            return PurchaseProcessingResult.Complete;
        }

        // Test edge case where product is unknown
        if (e.purchasedProduct == null)
        {
            return PurchaseProcessingResult.Complete;
        }

        // Test edge case where purchase has no receipt
        if (string.IsNullOrEmpty(e.purchasedProduct.receipt))
        {
            return PurchaseProcessingResult.Complete;
        }

        var wrapper = (Dictionary<string, object>)MiniJson.JsonDecode(e.purchasedProduct.receipt);
        PlayFabClientAPI.ValidateIOSReceipt(new ValidateIOSReceiptRequest()
        {
            CurrencyCode = e.purchasedProduct.metadata.isoCurrencyCode,
            PurchasePrice = (int)e.purchasedProduct.metadata.localizedPrice * 100,
            ReceiptData = wrapper["Payload"].ToString()
        }, result => CompletePurchase(e.purchasedProduct),
                                            error => FailedPurchase(error)
        );

        return PurchaseProcessingResult.Complete;
    }
avatar image MertCorekci SethDu ♦ · Jun 25, 2019 at 09:05 AM 0
Share
void FailedPurchase(PlayFabError failNote){
        Debug.Log("Validation failed: " + failNote.GenerateErrorReport());
    }

    void CompletePurchase(Product product){
        if(product.definition.id=="rf.pack.gold100"){
            AddGold(100);
        }else if(product.definition.id == "rf.pack.gold500"){
            AddGold(500);
        }
        else if (product.definition.id == "rf.pack.gold1000")
        {
            AddGold(1000);
        }
        else if (product.definition.id == "rf.pack.gold3000")
        {
            AddGold(3000);
        }
        else if (product.definition.id == "rf.pack.gold10000")
        {
            AddGold(10000);
        }
    }


    void BuyProductID(string productId)
    {
        if (!IsInitialized) throw new Exception("IAP Service is not initialized!");

        // Pass in the product id to initiate purchase
        m_StoreController.InitiatePurchase(productId);
    }

    public void act_Buy(int index){
        BuyProductID(Catalog[index].ItemId);
    }
avatar image SethDu ♦ SethDu ♦ · Jun 26, 2019 at 02:40 AM 0
Share

My I ask is "0" your Primary Catalog?

avatar image MertCorekci SethDu ♦ · Jun 26, 2019 at 08:36 AM 0
Share

Yes it is, it works on google play

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by MertCorekci · Jun 25, 2019 at 03:06 AM

Update

* Title ID= BEC1
* I can validate purchases on android
* All products' status are approved on itunes connect.
* I still getting this error: Validation failed: /Client/ValidateIOSReceipt: There is no item in the catalog with an ID matching the product ID in the receipt

Comment

People who like this

0 Show 2 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SethDu ♦ · Jul 01, 2019 at 08:11 AM 0
Share

It can be caused by including multiple items in his receipt. One of the items matches his catalog and the other does not. While PlayFab will still throw an error and fail to grant any items, when it happens.

The fix now is to ensure the receipt only contains ios product ids that match PlayFab catalog item ids.

avatar image litebox SethDu ♦ · May 06, 2020 at 09:26 AM 0
Share

I have exactly same problem, I validated my receipt via https://sandbox.itunes.apple.com/verifyReceipt and it contains multiple items, some of them event don't exist anymore because of changes in products. Do you have any ideas how to "clean" it to start testing from scratch?

avatar image

Answer by litebox · May 06, 2020 at 09:25 AM

@SethDu, I have exactly same problem, I validated my receipt via https://sandbox.itunes.apple.com/verifyReceipt and it contains multiple items, some of them event don't exist anymore because of changes in products. Do you have any ideas how to "clean" it to start testing from scratch?

Comment
litebox

People who like this

1 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    Referral Codes can be used as an alternative to In App gifting 1 Answer

    Unity Editor Test Purchase - Best Practice 1 Answer

    As a beginner, how do I learn best practices? 1 Answer

    Can you create a global market for trading 1 Answer

    Where Is The Drop Table Documentation? 2 Answers

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges