j3k0 / cordova-non-renewing-subscription

Simple API for Non-Renewing Subscriptions based on Fovea's Cordova Purchase Plugin
MIT License
19 stars 6 forks source link

error while consuming: labResult: Error #7

Closed mehmetkoc182 closed 6 years ago

mehmetkoc182 commented 8 years ago

I'm trying to use the extension with minimal code and get a working MVP. I get to pay and get a subscription for my app. However, I get an error message after the payment instead of a success message after entering the credit card number and purchasing.

------------- I invoke this code right after start up ------------------------


   nonRenewing.initialize({
        products: [{
            id: 'my_sku'
        }]
    });

     nonRenewing.openSubscriptionManager();

------------- I invoke this code right after start up ------------------------

--------Error Message-------------- error while consuming: labResult: Error consuming sku "my_sku" response: 5:Error --------Error Message--------------

And I get this one if I open up the app again.

--------Error Message-------------- error while consuming: labResult: items of type 'subs' cant be consumed (response: 6777013:error) --------Error Message--------------

Any ideas?

s-muntazir commented 8 years ago

i get a similar issue as well

mehmetkoc182 commented 8 years ago

Let me know how/when you figure it out. I still haven't.

j3k0 commented 7 years ago

Hi. Did you guys solved the issue? At first sight, it seems like you forgot to specify the subscription's duration.

ph33nx commented 6 years ago

Was someone able to figure this out? I have specified time duration in seconds as well, but still getting this error.

nonRenewing.initialize({ products: [{ id: 'gold', duration: 2592000 }] });

--------Error Message-------------- error while consuming: labResult: items of type 'subs' cant be consumed (response: 6777013:error) --------Error Message--------------

ph33nx commented 6 years ago

I was able to fix the error on startup by removing/commenting out the following lines from cordova-non-renewing-subscription.js

on line 239

// this.html(Templates.errorScreen(err));

on line 246

// this.html(Templates.loadingScreen());

on line 340 & 341

// p.finish();
// this.openStatusView();