Applied bug fixes from https://github.com/RainerAppel/cordova-plugin-inapppurchase which fix issues where null pointers like this occur:
java.lang.NullPointerException: Attempt to invoke interface method 'android.os.Bundle com.android.vending.billing.IInAppBillingService.getPurchases(int, java.lang.String, java.lang.String, java.lang.String)' on a null object reference