question

elliotcollis avatar image
elliotcollis asked

Problems with receipt validation for subscription.

Hi playfab,

I've been trying to set up a subscription for the last while and been running into an error on receipt validation. We're using playfab with Unity for a live game.

For Android I get "Google ServiceAccountInvalid" error code 1332. For IOS I get "iTunes Sandbox validation result 21003 (AuthenticationFailed) from https://sandbox.itunes.apple.com/verifyRecipt"

Any ideas what I might be missing? On IOS I'm testing in Sandbox. Thank you.

unity3dAuthentication
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

elliotcollis avatar image
elliotcollis answered

Hi @Infer Wang,

Thank you for the help. I've gotten android working well. It didn't end up being the link the project, but how subscriptions are set up in playfab. We now have the subscription Item and a seperate bundle that holds the membership.

I have a quick questions for IOS though. I've throughly tested and the receipt data is fine. But we haven't yet entered the IOS shared secret on playfab. The app is live and we're using IAP and don't want to break anything. If we enter the shared secret now will it break purchasing for the live game on the app store?

Thanks for all your help!

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Infer Wang avatar image Infer Wang commented ·

Unfortunately, I don’t know whether it will break purchase. Also, I don’t have iOS device to test it. You may try to test it on a developing title first.

0 Likes 0 ·
elliotcollis avatar image elliotcollis Infer Wang commented ·

Ok thank you, I'll make a test title to test it on first.

0 Likes 0 ·
Infer Wang avatar image
Infer Wang answered

For Android, the error code 1332 means that the Google service account that you used to call the Google Play Developer API is not linked in the Google Play Developer Console. To fix this, you may follow these steps: Go to the Google Play Developer Console and select your app. Go to Settings > API access and click on Link a project. Select the project that matches the project ID of your Google service account and click Link project. Wait for a few minutes for the linking process to complete. Try to validate your receipt again using PlayFab. For iOS, the error code 21003 means that the receipt data is not valid, or the shared secret is incorrect. To fix this, you may check these things: Make sure that you are encoding the receipt data correctly. You should use base64 encoding to convert the binary receipt data to a string before sending it to PlayFab. Make sure that you are providing the correct shared secret for your app. You can find the shared secret in the App Store Connect under Features > In-App Purchases > Manage.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.