Closed graemian closed 6 months ago
Aaaaargh, the problem was caused by
type: CdvPurchase.PAID_SUBSCRIPTION
instead of
type: CdvPurchase.ProductType.PAID_SUBSCRIPTION
Geez, this one really had me pulling my hair out
What really misled me was that CdvPurchase.PAID_SUBSCRIPTION
works for Apple, but not for Google 😂
Aaaargh, maybe I picked up the wrong syntax from https://purchase.cordova.fovea.cc/discover/micro-example. It uses CdvPurchase.CONSUMABLE
instead of CdvPurchase. ProductType .CONSUMABLE
What really misled me was that
CdvPurchase.PAID_SUBSCRIPTION
works for Apple, but not for Google 😂
Loading subscriptions info is a different low-level API on Android, so this needs to be correctly defined. On iOS it's the same API calls for subscriptions and other in-app purchase products. I will fix the guide.
Observed behavior
Logs show CONSUMABLE is loaded:
[CdvPurchase.GooglePlay] DEBUG: Loaded: [{"productId":"test2","title":"Test (Bomad kids money tracker)","name":"Test","description":"Test","product_type":"inapp","product_format":"v11.0","formatted_price":"$0.99","price_amount_micros":990000,"price_currency_code":"USD"}]
But PAID_SUBSCRIPTION not found:
[CdvPurchase.Adapters] INFO: GooglePlay products loaded: [{"isError":true,"code":6777012,"message":"Product with id supporter_1m not found.","platform":"android-playstore","productId":"supporter_1m"}
Code to load PAID_SUBSCRIPTION looks like this:
It definitely exists in Google Play. I don't think there's any problem with the config since RevenueCat manages to successfully import it:
Full logs:
Expected behavior
The PAID_SUBSCRIPTION should load successfully, just like the CONSUMABLE
System Info
I'm using Meteor (https://guide.meteor.com/cordova), so I can't run
cordova info
directly. I will try to find a way. In the meantime, here's the contents of .meteor/cordova-plugins:Any help would be very much appreciated. I've got subscriptions working for Apple, but I'm really struggling with Android.