After using this plugin for some time, I noticed that some people for a mysterious reason had their payment processed successfully on the play store but not on my side.
After some search, I found out that the success or fail callback of the buy method has never been called for these people and the product is not available in the list retrieved with the getPurchases method.
The only solution I currently found to fix this problem is to force refresh the list of owned products after a certain amount of time without any response from the callbacks and then consume/process the owned products if there is any.
The intend of this PR is to add the refreshPurchases method in order to be able to force refresh from the play store the list of the owned products.
I also added the signature and receipt in the objects of the owned product list, that way the products can be processed (The success callback of the buy method already expose the signature and receipt of the purchased product).
Hi @poiuytrez,
After using this plugin for some time, I noticed that some people for a mysterious reason had their payment processed successfully on the play store but not on my side. After some search, I found out that the success or fail callback of the buy method has never been called for these people and the product is not available in the list retrieved with the getPurchases method.
The only solution I currently found to fix this problem is to force refresh the list of owned products after a certain amount of time without any response from the callbacks and then consume/process the owned products if there is any.
The intend of this PR is to add the refreshPurchases method in order to be able to force refresh from the play store the list of the owned products. I also added the signature and receipt in the objects of the owned product list, that way the products can be processed (The success callback of the buy method already expose the signature and receipt of the purchased product).
Tested and works perfectly