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 /
avatar image
1
Question by rmassanet · Jul 27, 2016 at 01:22 PM · iapin-app-purchase

Confim pending purchases using Unity In-App Purchases service

Greetings,

I am currently migrating a game from Unity 4 to Unity 5. I was using a plugin for in-app purchases before, but now I am migrating to Unity's in-app purchasing service.

The issue is that, according to Unity's documentation, when your IStoreListener is instructed to process a purchase, it can return PurchaseProcessingResult.Pending, so you can validate the purchase with your own server. It's not clear to me what happens with those pending purchases until they are verified. The documentation of the pending state says:

Unity IAP should continue to send the application notifications about this transaction when it starts.

(https://docs.unity3d.com/ScriptReference/Purchasing.PurchaseProcessingResult.Pending.html)

So, if I have pending purchases, I would expect to receive new calls to ProcessPurchase next time I call UnityPurchasing.Initialize. But it's not happening.

I can't find a way to force a "refresh" of the pending requests. Does anyone know how to do it?

Thanks in advance.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by rmassanet · Jul 28, 2016 at 01:32 PM

Solved!

I'm posting this answer in case any one finds this question, having the same problem.

In my case, I just had to reimport the Unity IAP package. To do that, open the Services window, click on In-App Purchasing, and then click Import.

Upgrading Unity did not solve this, as the package binaries are in the project and are not a part of the engine, at this moment.

Also, it is not clear to me what the problem was. Reading through the package's changelog, I can't find any fix that affects both Android and iOS. There is a fix for iOS, that could be causing the problem I described, but it doesn't say anything about Android.

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

Answer by Banderous · Jul 27, 2016 at 06:23 PM

Are you restarting your Application or just calling Initialize within the same process lifetime? You need to restart the App for ProcessPurchase to be called again.

Comment
Add comment · Show 4 · 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
avatar image rmassanet · Jul 28, 2016 at 06:00 AM 0
Share

I tried both, and none of them causes ProcessPurchase to be called again.

avatar image rmassanet rmassanet · Jul 28, 2016 at 09:59 AM 0
Share

I see that Unity has fixed this in version 5.3.6. I don't know when they broke it. I was using 5.3.5 and it was not working.

avatar image rmassanet rmassanet · Jul 28, 2016 at 11:01 AM 0
Share

Actually, they haven't. I'm still not receiving calls to ProcessPurchase.

avatar image Banderous rmassanet · Jul 28, 2016 at 01:22 PM 0
Share

Please attach a trace from the device in question, starting from when your application starts and Unity IAP is initialised.

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

52 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

Related Questions

In iOS, IAP With Sandbox User Works But It Fails With Non-Sandbox Users 0 Answers

How i can protect my IAP for Google Play ? 0 Answers

my in-app purchase is not showing the files 3 Answers

Unity In-App Purchase Local Validation is slow 0 Answers

The IAP service currently disabled - Unity Bug 3 Answers


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