I've followed the google sample code and it's failing to acknowledge non consumable product purchase and is getting refunded, only on Android Q (api 29).
returned error is code 5 , which is DEVELOPER_ERROR which defines as "Invalid arguments provided to the API. This error can also indicate that the application was not correctly signed or properly set up for In-app Billing in Google Play, or does not have the necessary permissions in its manifest" in documentation.
https://developer.android.com/google/play/billing/billing_library_overview#acknowledge
Any idea how this is happening ? It's working well in other Android version phones.
After trying out many options, Finally found an answer.
I was trying to acknowledge already acknowledged purchases. So, old android versions were basically accepting that, and in Android Q, it returns an error. So I checked for purchase.isAcknowledged and problem is solved.