New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to manually cancel a pending purchase? #615
Comments
Even the failure result, you should still call |
@hyochan if i do that, the payment will be approved and the user account will be charged without getting rewarded. |
@tmjordan Oh, I see what you meant. What if you proceed logic by giving a reward then? |
@hyochan when a user purchase a product, the given receipt is sent to google servers in order to validate the receipt and to get the status of the purchase (if the payment has been approved , or is pending, or cancelled). |
It would be nice, if we can manually cancel a purchase which has not been yet acknowledged or consumed. In that scenario the user will be refunded if the payment had been approved. |
@tmjordan Thanks for your good point of view. Sounds very reasonable but I am not quite sure that |
@hyochan, Is there a functionnality like that on iOS, in order to cancel a purchase which has not been completed by calling So i have the same problem on ios and android, i need to cancel a purchase which has not been completed. And specifically on ios, not having that purchase being recorded in the history unless if there is a more efficient way to check the validity of a subscription. |
I would like to handle similar scenario
Is there a method to cancel the transaction. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
Hey - I don't believe this issue should have been closed - it seems to me that this is a critical bit of functionality. Was something implemented that can achieve this in the latest version? I see no mention of it in the docs. |
Version of react-native-iap
3.3.7
Version of react-native
0.59.8
Platforms you faced the error (IOS or Android or both?)
Android
Expected behavior
when i request a purchase, then i validate the receipt on my server, if the validation failed i want to be able to manually cancel the purchase, instead of the function purchaseUpdatedListener triggered every time, if don't call acknowledgepurchase or consumepurchase.
Actual behavior
when not finishing the purchase, i can not cancel the pending purchase. On android i have to wait that it is cancelled automatically.
Tested environment (Emulator? Real Device?)
Real device
Steps to reproduce the behavior
Make a purchase and don't call acknowledgepurchase or consumepurchase.
The text was updated successfully, but these errors were encountered: