PeterStaev / nativescript-purchase

:moneybag: A NativeScript plugin for making in-app purchases!
Apache License 2.0
83 stars 28 forks source link

Consume Purchase Documentation #109

Closed NicholasSmilovic closed 3 years ago

NicholasSmilovic commented 3 years ago

https://npm.proplugins.org/-/web/detail/@proplugins/nativescript-purchase says: image

but looking at the source code the promise isn't returning the billingResult.getResponseCode()

export function consumePurchase(token) {
    return new Promise((resolve, reject) => {
****
                if (billingResult.getResponseCode() === ***) {
                    resolve();
                }
****
    });
}

Using stars to hide the proplugin code in case it shouldn't be shared

PeterStaev commented 3 years ago

Hey @NicholasSmilovic , seems the readme was not adjusted when I migrated the plugin from AIDL to the Google Play Billing lib. The promise no longer returns int value. Instead if it is successful the promise is resolved, if there is a problem the promise will be rejected. I've adjusted the readme in the ProPlugins Git: image