Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
0
Question by Loris2222 · Jul 15, 2020 at 09:42 AM · in app purchasegoogle-play-store

Unity IAP ProcessPurchase called even if purchase was not completed

I am encountering a bug, seemingly in Unity IAP system, where consumable purchases that were cancelled by the user or that failed for other reasons are still sent through and ProcessPurchase gets called anyway at the next startup of the app, allowing for fake purchases to take place.
This, however, happens only for the first purchase after deleting the app data or installing, but the bug happens again each time data is deleted.
Steps for reproducing are below.

I am mostly using the standard Unity IAP implementation (with code) on Android as per the tutorial.

I have tried checking the receipts but all cancelled/failed orders show correct receipts, also I have tried on accounts that were not on the testers list to see if it was a problem with test credit cards but still it wasn't working.
I have also noticed that when OnInitialized gets called no product appears to be on the StoreController, so no pending transactions could be found and marked for deletion, but ProcessPurchase will get called regardless.

Steps for reproducing:

  1. Delete app data from phone or reinstall app.
  2. Start a purchase and cancel it or leave it in the IAP UI.
  3. Close the app.
  4. Open the app again. ProcessPurchase is called as if the first purchase was completed.
  5. Try again steps 2-4, ProcessPurchase is not called this time.

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

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by warfronts · Aug 29, 2020 at 06:54 PM

Same is happening to us on android. Once Google play store window is open, pause the game, kill the game. The next app startup ProcessPurchase is called.

Did you manage to figure it out? Thanks.

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
0

Answer by heneliezer1 · Jan 14, 2021 at 04:40 PM

Happens to me too.. Any solutions? ,Happens to me too. I think it only happens after a user purchased that item. deleted the app . pressed the item in the store ( but did not buy ) restart game and the money is there ( even tho its a consumable and should not return )

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
0

Answer by heneliezer1 · Jan 13, 2021 at 10:35 PM

This only happens if u bought the item successfully. then delete the app. download again. click on buy button but dont buy -> restart app -> ull get the item , even tho its a consumable and u deleted the app. Anyone else had this bug? when is it going to be fixed

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

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

Related Questions

Google Play ANR com.android.billingclient.api.BillingClientStateListener.onBillingSetupFinished 0 Answers

Restore IAP in Android using Prime 31 1 Answer

Prime[31] Android In App Billing - Product is owned when receipt is not valid or fails to verify 0 Answers

Do I need a Google Merchant account in order to implement the Unity In App Purchases for Google Play Store? 1 Answer

iOS Native Plugin: Cannot get product information 0 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