AlexDisler / cordova-plugin-inapppurchase

A lightweight cordova plugin for in app purchases on iOS/Android
316 stars 191 forks source link

Error retrieving SKU details in Android <5.1.1 #179

Closed GPerezLZ closed 6 years ago

GPerezLZ commented 7 years ago

Please include:

Your code / steps to reproduce

inAppPurchase.getProducts(['com.xxxxxxxxxx.20']).then(function (products) {
            // Muestro el listado de productos posibles
            $.each(products, function (i, item) {
                $('#sCantidad').append($('<option>', {
                    value: item.productId,
                    text: item.title
                }));
            });
        }).catch(function (error) {
            log(error);
        });

Console output

Error retrieving SKU details

Type of product you are working with consumable/non-consumable/subscription

consumable

Version of cordova

7.0.1

Version of iOS/Android

The problem occurs in Android versions smaller than 5.1.1

What is the minimum version of android for the plugin?

moritzgloeckl commented 7 years ago

Well, this plugin uses the InAppBilling Library V3, which was released in February 2013. Android 4.4 has been released in October 2013. It really boils down to the Google Play client you're using, which should be at least 3.9.16 for in-app items and 3.10.10 for subscriptions.

GPerezLZ commented 7 years ago

Now I understand, this is something new for me. Can I solve this problem somehow or simply on phones with Android versions smaller than 5.1.1 I will not be able to show my products?

Thank you very much!

moritzgloeckl commented 7 years ago

Well you can modify this plugin to use a lower version of the InAppBilling Library.