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 ntanda · Aug 03, 2020 at 11:09 AM ·

InvalidEnvironmentForReceipt error on Live iOS game

Hello, I am getting an error on some iOS users (if not all) when they try to make a purchase in my game.

They are charged by Apple, but the Playfab receipt validation fails with the following:

"TitleId": "AD88",
"Source": "PlayFab",
"Error": "InvalidEnvironmentForReceipt",
"PaymentProvider": "iTunes Sandbox",
"ReceiptContent": "[Actual Receipt]",
"PaymentType": "ReceiptValidation",
"Valid": false

I'm using Unity IAPs and didn't have a problem until recently on the Live build.

Any ideas on what is going wrong?

Thanks

Comment

People who like this

0 Show 1
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 ntanda · Aug 07, 2020 at 03:55 PM 0
Share

Bump, because it seems like Apple returns the correct environment for the problematic receipts.

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Aug 04, 2020 at 12:44 AM

The way the receipt validation process works for iOS (in part) is that we make a call to Apple to verify if the receipt is a valid Production environment receipt. If not, we check if it's a valid Development environment receipt. In practice, receipts have to be for one of the two environments. However, we occasionally see Apple return the "wrong environment" error for both environments on a receipt check. Only in that case do we return the wrong environment error.

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 ntanda · Aug 04, 2020 at 08:50 AM 0
Share

Thanks, I seem to get that error on quite a lot of users at the moment - if that's an Apple side bug, do you have any leads on where I could look / what I should look for to get that fixed? Knowing the actual error they're sending would be a great start!

Cheers

edit: I have checked some of the conspicuous receipts, and the environment is returned as Production by Apple every time. That would indicate that it is a PlayFab issue then?

avatar image Brendan ♦♦ ntanda · Aug 13, 2020 at 02:05 AM 0
Share

No, if you re-try the receipt processing in PlayFab, it would likely succeed. What I'm saying above is that at the time you made the call, Apple returned that error for both sandbox and prod. We have no way to investigate why they did that - it's entirely on their side. I would open a ticket with the Apple store folks to get more info.

avatar image

Answer by NoBloat · Dec 14, 2021 at 04:38 PM

For anyone dealing with this error, I found a solution by removing then re-adding the Apple Partner Add-On in Game Manager.

More info: https://community.playfab.com/answers/58485/view.html

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

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

    4 People are following this question.

    avatar image avatar image avatar image avatar image

    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