j3k0 / cordova-plugin-purchase

In-App Purchase for Cordova on iOS, Android and Windows
https://purchase.cordova.fovea.cc
1.29k stars 529 forks source link

"Developer hasn't acknowledged your purchase" #1546

Open Nikita0x opened 2 months ago

Nikita0x commented 2 months ago

Can anybody please help me, how do I "acknowledge the purchase"?

After I subscribe in test environment, if I don't "acknowledge" - Google issues a refund automatically after 5 minutes. How to acknowledge it?

Nikita0x commented 2 months ago

All subscriptions must be acknowledged for the google to not issue a refund after 5 minutes. If you acknowledge it - the subscriptions is automatically renewed after 5 minutes up to 12 times and works as expected. After ploughing through the internet and not finding any info on how to "acknowledge" it, including the documentation of this plugin - I found how to "acknowledge" it.

`

acknowledgePurchase() {

        let test = new CdvPurchase.GooglePlay.Bridge.Bridge();

        test.acknowledgePurchase(
            () => {
            // Success callback
            console.log("Purchase acknowledged successfully");
            },
            (error) => {
            // Error callback
            console.error("Failed to acknowledge purchase", error);
            }, 
            purchaseToken
        );

    }

`

and it successfully acknowledges it. One thing I really did not understand is why there are 0 documentation on it, 0 comments for this class or its methods, and it is never mentioned in the main read me where it says " you will need these 3 main classes for this plugin to work" while the acknowledgment part is crucial