Where can I get callback of ConfirmPendingPurchase
I'm using 'Unity IAP' now.
I succeeded purchase my product.
I got my receipt and I consumed my product.
But I could't find callback(or delegate) of ConfirmPendingPurchase.
I want to know "consume product" is success or not.
How can I know "ConfrimPendingPurchase" function works correctly?
Answer by ap-unity · Aug 22, 2017 at 11:36 PM
ConfirmPendingPurchase is not a callback. If you are not saving your purchases to a server, there is no need to use that method. You can simply return PurchaseProcessingResult.Complete within ProcessPurchase.
The manual has a good diagram of a successful purchase flow: https://docs.unity3d.com/Manual/UnityIAPProcessingPurchases.html
If the ProcessPurchase callback is used, that means the purchase was successful. If it was not successful, then OnPurchaseFailed callback will be used.
Answer by selo0530 · Aug 23, 2017 at 02:58 AM
Thank you for your reply @APalomo.
I already know "UnityIAP" purchase flow.
I need to verify android receipt from my server.
I returned PurchaseProcessingResult.Pending from ProcessPurchase callback function and I sent receipt to my server.
I checked unconsumed receipt from my server by consumptionState (through Google developer API).
After that my app called ConfirmPendingPurchase function.
Here is my point.
I should know consumptionState is completely changed or not. From my app.
Only then can I check the consumptionState is "1" from my server.
So I need to know consuming is completely done or not. From my app.
But I couldn't find any callback of ConfirmPendingPurchase.
I couldn't find how to know consumptionState is change to "1" from my app.
Do you have any idea to get consumptionState value in my app.
Answer by ddadkhah · Nov 11, 2020 at 02:42 AM
Why do you need to know the state? Why don't you just call ConfirmPurchase and give the rest of the work to Unity IAP? Assume it as done.
Your answer
![](https://koobas.hobune.stream/wayback/20220612133258im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity IAP Not working 0 Answers
How should I handle timeout when checking receipt of an In-App Purchase? 0 Answers
Unity IAP Demo Not Working on Android 1 Answer
can i use Unity IAP in kitkat? 0 Answers
unity iap Receipt validation 1 Answer