Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by ekohn_seismic · Jan 26, 2018 at 07:28 PM · iapstorewindows storereceipt

Getting invalid Windows Store receipts

I'm trying to implement IAP in the Windows store, but the receipts Unity is returning to me won't validate. Here's an example receipt I'm receiving:

 <?xml version=\"1.0\"?><Receipt Version=\"2.0\" CertificateId=\"A656B9B1B3AA509EEA30222E6D5E7DBDA9822DCD\" xmlns=\"http://schemas.microsoft.com/windows/2012/store/receipt\"><ProductReceipt PurchasePrice=\"USD0\" PurchaseDate=\"2018-01-26T18:55:45.243Z\" Id=\"c683f446-67f0-4b5c-8308-fe650acc8f87\" AppId=\"SonyPicturesTelevision.PlaytheShow_xhagv60wx4y2m\" ProductId=\"Pack_StarterPack_01\" ProductType=\"Durable\" PublisherUserId=\"JAHTYOzCxMy0f7ZyC+0w1LRsK2TdyVscTo8EuzpSODQ=\" MicrosoftProductId=\"7a31d10d-4d6a-4f3e-9f40-0136eb10002d\" MicrosoftAppId=\"7a31d10d-4d6a-4f3e-9f40-0136eb10002d\" ExpirationDate=\"9999-12-31T23:59:59.999Z\" OfferId=\"\" /><Signature xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><SignedInfo><CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\" /><SignatureMethod Algorithm=\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256\" /><Reference URI=\"\"><Transforms><Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\" /></Transforms><DigestMethod Algorithm=\"http://www.w3.org/2001/04/xmlenc#sha256\" /><DigestValue>neMDm4gb4mwS55v8JCi6Qbm6UcuRjcuurxytvMXlENc=</DigestValue></Reference></SignedInfo><SignatureValue>vzdoTgSoxwoIQcBjo8Pav1aw8OcabRJMIEttN3U3l9nxQT5GUpmRVJESqcWjQoVkx7wpnidPZw20JC5mO0a/FEoQAvAhgL2W8Abq14OQaDpmMhgan5yPdjQhZj296BCqAANpcGqdTCXWedku2dSeWEem+e4JY+3L7KZj/ZmM3BgMlacIB01dm7Y/+CQK40+OwUTIWHvqFq+j0XjEw9Z0K3kl53YWob7NievCgo0K9gIZy6RqtKFcWiWOqH3eJD/BAKG1mVjy7XNDz/aipfzJrbFZ7NFJqSqIwROVUfdMzbG2Jv/D6bB92FEf9I4fp+fo98ju5C4yGi+zjp3pFoOiKQ==</SignatureValue></Signature></Receipt>

Notably, the Receipt element is missing the required ReceiptDate and ReceiptDeviceID fields.

The way I'm getting the receipt is as follow:

 public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs args)
     {
         //Parse Unity receipt JSON for actual Windows Store receipt
         var receipt = JsonConvert.DeserializeObject<UnityReceipt>(args.purchasedProduct.receipt);
         string windowsReceipt = receipt.payload;
         playfab.ValidateReceipt(windowsReceipt, args.purchasedProduct.metadata.localizedPrice, args.purchasedProduct.metadata.isoCurrencyCode, receipt.store, args.purchasedProduct.definition.id);
 
         return PurchaseProcessingResult.Complete;
     }

Does anyone know what could be wrong here?

Thank you.

Comment
Add comment
10 |3000 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 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by tmanninoseismic · Mar 07, 2018 at 10:19 PM

Bumping this - wondering if anyone knows anything as to why that 'ReceiptDate and ReceiptDeviceID' data would be missing from the receipt?

Comment
Add comment · Share
10 |3000 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.

Follow this Question

Answers Answers and Comments

127 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity IAP : Receipt by user IOS/Android 0 Answers

IAP dont work on android device (unity 2019.1.4// IAP 1.22) 0 Answers

Know if Ios subscription was canceled in Unity IAP 0 Answers

unity iap Receipt validation 1 Answer

The product.receipt of a cancelled IAP does not return null. Help? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges