Skip to content
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

Purchases not being acknowledged sometimes #70

Open
LiviuSebastian opened this issue Jan 16, 2024 · 5 comments
Open

Purchases not being acknowledged sometimes #70

LiviuSebastian opened this issue Jan 16, 2024 · 5 comments

Comments

@LiviuSebastian
Copy link

Hello, and thank you for developing this library.

I have implemented version 1.1.1 of the library in two of my apps for in-app purchases. In these apps, I am also using the com.android.billingclient:billing:6.0.0 dependency. However, I am facing an issue where purchases are automatically refunded exactly after 3 days and 10 minutes.

Upon researching the Google documentation, I found that "If you don't acknowledge a purchase within three days, the user automatically receives a refund, and Google Play revokes the purchase" (source: Google Play Billing Documentation).

This automatic refund is not happening for every purchase, and I'm unsure how to resolve it. Do you have any ideas or suggestions on what steps I should take to address this issue?

Thank you for your assistance.

@Touchsoftwares
Copy link

billingConnector = new BillingConnector(this, getString(R.string.license_key))
.setConsumableIds(listConsumables)
.setNonConsumableIds(listProducts)
.setSubscriptionIds(listSucriptions)
.autoAcknowledge() <------
// .autoConsume()
.enableLogging()
.connect();

@LiviuSebastian
Copy link
Author

This is my code. Although I have "autoAcknowledge()" still some times after after 3 days and 10 minutes the purchase is refunded:

billingConnector = new BillingConnector(this, getString(R.string.license_key))
.setNonConsumableIds(nonConsumableId)
.autoAcknowledge()
.enableLogging()
.connect();

@duckyngo
Copy link

duckyngo commented Mar 4, 2024

I got exactly same problem. Here is my code for initialize BillingClient:

billingConnector = BillingConnector(
            requireContext(),
            BASE_64_ENCODED_PUBLIC_KEY) //"license_key" - public developer key from Play Console
//            .setConsumableIds(consumableIds) //to set consumable ids - call only for consumable products
            .setNonConsumableIds(nonConsumableIds) //to set non-consumable ids - call only for non-consumable products
            .setSubscriptionIds(subscriptionIds) //to set subscription ids - call only for subscription products
            .autoAcknowledge() //legacy option - better call this. Alternatively purchases can be acknowledge via public method "acknowledgePurchase(PurchaseInfo purchaseInfo)"
            .autoConsume() //legacy option - better call this. Alternatively purchases can be consumed via public method consumePurchase(PurchaseInfo purchaseInfo)"
            .enableLogging() //to enable logging for debugging throughout the library - this can be skipped
            .connect() //to connect billing client with Play Console

Do you have any ideas or suggestion to address this issue?

@akardas16
Copy link

actually if you reinitialize the billingConnector, library will acknowledge all non-acknowledged packages.

@akardas16
Copy link

I found that if you try to re-acknowledge an acknowledged purchase, Server error! Please try again error will occur in billingClient.acknowledgePurchase(acknowledgePurchaseParams) { billingResult: BillingResult -> } so if you get error about acknowledge, probably purchase already acknowledged.

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

No branches or pull requests

4 participants