- Home /
Unity In-App-Purchase Best practice
Hi,
I am adding In-app-purchase into my project by using Unity Built-in purchasing API. Following the tutorial, in function ProcessPurchase()
, I have to return PurchaseProcessingResult.Complete
after successfully give user an item.
What if there an exception occurs before I can give user an item, and that causes ProcessPurchase()
do not return anything. How could I restore that purchasing when launch game again?
Thank you,
Answer by Chanyutx10 · Jun 27, 2017 at 03:42 AM
I read unity purchasing library again, and found the answer. After initialized, if Purchasing API detects that it has an unfulfilled purchasing, it will invoke ProcessPurchase automatically. So I can implement a logic in ProcessPurchase method for give user an item for unfulfilled purchase.