Skip to content

Conversation

@haiderali333222
Copy link

This PR adds support for acknowledging purchases on Google Play. The acknowledgment process is required for non-consumable and subscription purchases to confirm they were successfully granted to the user. Without acknowledgment, purchases may be automatically refunded.

Changes Introduced
Implemented acknowledgePurchase function in the Google Play engine.

Added a new exported method acknowledgePurchase in the main module.

Integrated the Google Play acknowledgment API with proper request formatting.

Ensured consistency with existing verification and cancellation functions.

Updated the URL handling logic to match other Google Play API calls.

How to Test
Make a test purchase on Google Play.

Call iap.acknowledgePurchase('google', paymentData, callback).

Ensure the acknowledgment request completes successfully (HTTP 204 response).

Verify that acknowledged purchases are not refunded automatically.

Why This is Needed
Acknowledging purchases is a required step for ensuring purchases are finalized. Without this, purchases may be canceled or refunded by Google.

Let me know if you’d like to tweak anything! 🚀

@haiderali333222
Copy link
Author

Hi Team,
I would like to get this feature added . This is fully tested as well. We are using this frequently in our project and i think it will be very useful for others too
@markgardner @ghansali @stelcheck
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant