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 /
  • API and SDK Questions /
avatar image
Question by secretplacestudio · May 08, 2019 at 03:46 PM · apisunity3dIn-Game EconomyPlayer InventoryPartner Add-ons

iOS Reciept Validation Failed - Request Timeout

Hello,

We are trying to validate iOS receipt, but ValidateIOSReceipt function always returns error.

Request Type or Compress API Data settings not helping.

Project Id: 4140

Environment:

  • Unity3D 2019.1.1
  • Latest Playfab SDK
  • iOS 10.3.3 (Sandbox)

What we checked out:

  1. Check Apple's add-on settings (OK)
  2. Check ITC product id and Playfab product id (OK)
  3. Check receipt with https://sandbox.itunes.apple.com/verifyReceipt (SUCCESS)
  4. Check request with Postman and ValidateiOSReceipt (SUCCESS)
  5. Check other playfab functions (SUCCESS)
  6. Android receipt validation (SUCCESS)

Request:

{
    "CurrencyCode": "RUB",
    "PurchasePrice": 149,
    "ReceiptData": "MIIVPgYJKoZIhvcNAQcCoIIVLzCCFSsCAQExCzAJBgUrDgMCGgUAMIIE3wYJKoZIhvcNAQcBoIIE0ASCBMwxggTIMAoCAQgCAQEEAhYAMAoCARQCAQEEAgwAMAsCAQECAQEEAwIBADALAgELAgEBBAMCAQAwCwIBDgIBAQQDAgFlMAsCAQ8CAQEEAwIBADALAgEQAgEBBAMCAQAwCwIBGQIBAQQDAgEDMAwCAQMCAQEEBAwCNjkwDAIBCgIBAQQEFgI0KzANAgENAgEBBAUCAwGHzzANAgETAgEBBAUMAzEuMDAOAg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LDAqBgNVBAsMI0FwcGxlIFdvcmxkd2lkZSBEZXZlbG9wZXIgUmVsYXRpb25zMUQwQgYDVQQDDDtBcHBsZSBXb3JsZHdpZGUgRGV2ZWxvcGVyIFJlbGF0aW9ucyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eQIIDutXh+eeCY0wCQYFKw4DAhoFADANBgkqhkiG9w0BAQEFAASCAQAaT7mK/WpLHSSRwHSrMKqtI/CO9qbtXFVM3DiSeaS2+WtwhqCXzAyp+n+VKMrhLLu8SkubhHYB6lHTCmTiGUs8lRP6/z/axcRLKVrCKxLQha6WI5MoBZd2QVlefaSoM/A5nKD8Bq4iYKX/z84kP7eZOEQwD2l8jsNFmIf5RP51ES9TvtJjuFbOaFzLHRy6nBVjvx5n28zeqzv1nu/rhzGSwsovMlyXxDXi+NR1z8/BbGUTcFBKEVrNS/cguhOudq647L83CR00BEaxg6gqEDRWDnFcTkbOlmoHfN/uxFWBDmZZY2KZHsTLVTqkgr0H3hYqWJjNoU1SoggOfL/SN2FN"
}

Response:

Purchase Failed
UnityEngine.Logger:Log(LogType, Object)
SP.Services.Purchases.<>c__DisplayClass50_0:<Purchase>b__1(SFError)
SP.Services.Purchases.<>c__DisplayClass72_0:<OnTransactionUpdated>b__1(PlayFabError)
PlayFab.Internal.<Post>d__12:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 48)
{
  "SFErrorCode": -1,
  "CustomErrorCode": 1123,
  "ErrorMessage": "/Client/ValidateIOSReceipt: Request timeout"
}

Response Glossary:

  • SFErrorCode = Game Internal Custom Code
  • Error Message = PlayfabError.GenerateErrorReport
  • CustomErrorCode = PlayfabError.Error (parsed to int)

How it works?

public void OnTransactionUpdated(ISN_SKPaymentTransaction transaction)
{
    //Transactions have been updated.
    //Let's act accordinaly
    SFDebug.Log("transaction JSON: " + JsonUtility.ToJson(transaction));
    SFDebug.Log("OnTransactionComplete: " + transaction.ProductIdentifier);
    SFDebug.Log("OnTransactionComplete: state: " + transaction.State);
    SFDebug.Log(transaction.Product.Dump());

    switch (transaction.State)
    {
        case ISN_SKPaymentTransactionState.Purchasing:
            //No actions is reuiredhere, we probably don't even have a ProductIdentifier
            //but we can use this callback to show preloader for example, 
            //since we know that user is currently
            //working on this transaction
            break;

        case ISN_SKPaymentTransactionState.Purchased:
        case ISN_SKPaymentTransactionState.Restored:
            
            //Our product has been succsesly purchased or restored
            //So we need to provide content to our user depends on productIdentifier
            
            SFDebug.Log("Validation of IOS Reciept");
            var receipt = ISN_SKPaymentQueue.AppStoreReceipt;
            var request = new ValidateIOSReceiptRequest
            {
                CurrencyCode = transaction.Product.PriceLocale.CurrencyCode,
                PurchasePrice = (int) transaction.Product.Price,
                ReceiptData = receipt.AsBase64String
            };

            SFDebug.Log(request.Dump());
            
            PlayFabClientAPI.ValidateIOSReceipt(request, result =>
                {
                    SFDebug.Log("Validation Completed");
                    onPurchaseCompleted?.Invoke();
                },
                error =>
                {
                    SFDebug.Log("Validation Failed");
                    onPurchaseFailed?.Invoke(new SFError((int) error.Error, error.GenerateErrorReport()));
                });

            ISN_SKPaymentQueue.FinishTransaction(transaction);
            break;
        case ISN_SKPaymentTransactionState.Deferred:
            //iOS 8 introduces Ask to Buy, which lets parents approve any 
            //purchases initiated by children
            //You should update your UI to reflect this deferred state, 
            //and expect another Transaction Complete to be called again 
            //with a new transaction state 
            //reflecting the parent’s decision or after the transaction times out. 
            //Avoid blocking your UI or gameplay while waiting 
            //for the transaction to be updated.
            break;
        case ISN_SKPaymentTransactionState.Failed:
            //Our purchase flow is failed.
            //We can unlock intrefase and repor user that the purchase is failed. 
            SFDebug.Log("Transaction failed, code: " + transaction.Error.Code);
            SFDebug.Log("Transaction failed, description: " + transaction.Error.Message);
            onPurchaseFailed?.Invoke(new SFError(transaction.Error.Code, transaction.Error.Message));
            //at this point we just need to finish the transaction
            ISN_SKPaymentQueue.FinishTransaction(transaction);
            break;
    }

    if (transaction.State == ISN_SKPaymentTransactionState.Failed)
    {
        SFDebug.Log("Error code: " + transaction.Error.Code + "\n" + "Error description:" +
                  transaction.Error.Message);
    }
    else
    {
        SFDebug.Log("product " + transaction.ProductIdentifier + " state: " + transaction.State.ToString());
    }
}
Comment
secretplacestudio

People who like this

1 Show 0
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

16 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Marcus Nixon · May 14, 2019 at 05:57 PM

Unity 2019 was released last month and we are in the midst of testing it with the PlayFab SDK. In order to circumvent this issue, our recommendation is to stay with Unity 2018 until our team has had a chance to complete validation testing on the SDK and make any changes needed. I am also opening up a bug report for this issue so that it will be tracked. Thanks for bringing this to our attention.

Comment

People who like this

0 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
avatar image

Answer by Marcus Nixon · May 08, 2019 at 06:44 PM

Hi secretplacestudio,

The request timeout error is usually related to an API call that took too much time to complete. Can you confirm back how many items are in your receipt and how much time the API call took before it failed?

Comment
secretplacestudio

People who like this

1 Show 1 · 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 secretplacestudio · May 08, 2019 at 10:42 PM 0
Share

Added code snippet above ;)

avatar image

Answer by secretplacestudio · May 08, 2019 at 10:29 PM

Hey @Marcus Nixon,

It's 1 consumable item and It takes about 1-2 minutes.

Comment

People who like this

0 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
avatar image

Answer by Marcus Nixon · May 09, 2019 at 07:20 PM

1 consumable item for 1-2 minutes is most likely causing the timeout. Let me investigate what the best options are to resolve this.

Comment

People who like this

0 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
avatar image

Answer by Marcus Nixon · May 09, 2019 at 08:32 PM

Your call to VerifyReceipt was successful, but can you confirm that you did not receive a status code like the ones referenced at this site? https://developer.apple.com/library/archive/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html#//apple_ref/doc/uid/TP40010573-CH104-SW2

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 secretplacestudio · May 09, 2019 at 08:48 PM 0
Share

It was empty response 200 OK. Then I tried to send request 2nd Time and I got error code and message that this receipt was already used

avatar image secretplacestudio · May 09, 2019 at 08:49 PM 0
Share

Also I saw play stream event in postman's playfab account

avatar image

Answer by Marcus Nixon · May 10, 2019 at 02:12 PM

Sounds like the issue was the receipt itself. Our API report also shows that your ValidateIOSReceipt calls are taking about .5 seconds to complete, so doesn't seem to be an issue from that perspective.

Comment

People who like this

0 Show 1 · 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 secretplacestudio · May 10, 2019 at 02:47 PM 0
Share

Yes. I thought that it might be issue in Compress Api Data toggle. I tried different approaches but nothing works(

avatar image

Answer by Marcus Nixon · May 10, 2019 at 04:08 PM

Can you try stepping through these troubleshooting steps for validation problems with iTunes receipts and let me know your results? https://community.playfab.com/questions/124/205469588-Validation-problems-with-iTunes-receipts.html

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 secretplacestudio · May 10, 2019 at 04:23 PM 0
Share

Yes. I'll share results with u in an hour

avatar image secretplacestudio · May 10, 2019 at 06:00 PM 0
Share

Do u have an email where i can share info I collected?

avatar image

Answer by secretplacestudio · May 10, 2019 at 06:22 PM

https://sandbox.itunes.apple.com/verifyReceipt

ValidateIOSReceipt - Playfab - 200 OK

Log: log.zip


postman-6nkifqu4ub.png (61.4 kB)
log.zip (9.1 kB)
Comment

People who like this

0 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
avatar image

Answer by Marcus Nixon · May 10, 2019 at 09:43 PM

Can you confirm that you are passing the correct data into the ValidateIOSReceipt call? You can reference it here. https://docs.microsoft.com/en-us/rest/api/playfab/client/platform-specific-methods/validateiosreceipt?view=playfab-rest

The ReceiptData param should receive the string that is passed back by the App Store as a result of a successful purchase.

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 secretplacestudio · May 10, 2019 at 09:47 PM 0
Share

Yes. In postman it works. You can see how this request looks above .But when I'm sending same request from iOS device it gives me error

avatar image secretplacestudio · May 10, 2019 at 10:25 PM 0
Share

Im using this plugin to make purchases. The only way to get receipt is to use this function . It returns base64 encoded string and i'm passing it in ReceiptData refering to playfab docs:

Base64 encoded receipt data, passed back by the App Store as a result of a successful purchase.
avatar image

Answer by secretplacestudio · May 13, 2019 at 02:35 PM

@Marcus Nixon Hello. We cant resolve this problem. Can we sync with to see which data do u recieve from iphone. I have no idea why through the postman api call works and through ios device - no :/

Comment

People who like this

0 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
  • 1
  • 2
  • ›

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

    iOS Restore Purchase Receipt using Unity IAP 1 Answer

    Apple (iOS) receipt validation in Unity IAP 1 Answer

    I'm making a payment system using XSolla and playfab in unity, to get started, I have to use which facility? Pay Station or Store? 1 Answer

    Is there any example script of purchases in iOS with Unity IAP via Playfab? 2 Answers

    Issue with ValidateGooglePlayPurchase 1 Answer

    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