我正在通过RevenueCat将应用程序购买集成到我的Flutter应用程序中,并支持Android和IOS。我已经按照文档中提到的所有步骤进行了配置(https://docs.revenuecat.com/docs/creating-play-service-credentials),添加了订阅详细信息,创建了授权,产品,产品在Revenue Cat Jmeter 板中。
在代码中启动main.dart中的收入猫平台,获取产品并获得正确数据,启动购买,并显示付款成功,但一旦返回应用程序,则显示错误(随附以下日志):
D/[Purchases] - DEBUG(28086): ℹ️ SDK Version - 4.0.5
D/[Purchases] - DEBUG(28086): 👤 Initial App User ID - null
D/[Purchases] - DEBUG(28086): 👤 Identifying App User ID: $RCAnonymousID:1990da266b524c10a34f3118b99cef30
D/[Purchases] - DEBUG(28086): ℹ️ Deleting old synced subscriber attributes that don't belong to $RCAnonymousID:1990da266b524c10a34f3118b99cef30
D/[Purchases] - DEBUG(28086): ℹ️ App foregrounded
D/[Purchases] - DEBUG(28086): ℹ️ PurchaserInfo cache is stale, updating from network in foreground.
D/[Purchases] - DEBUG(28086): ℹ️ Offerings cache is stale, updating from network in foreground
D/[Purchases] - DEBUG(28086): 😻 Offerings updated from network.
D/[Purchases] - DEBUG(28086): ℹ️ Skipping updating pending purchase queue since BillingClient is not connected yet.
D/[Purchases] - DEBUG(28086): ℹ️ No subscriber attributes to synchronize.
D/[Purchases] - DEBUG(28086): ℹ️ Listener set
D/[Purchases] - DEBUG(28086): ℹ️ Sending latest PurchaserInfo to listener.
D/[Purchases] - DEBUG(28086): ℹ️ Starting connection for com.android.billingclient.api.BillingClientImpl@a7f65c2
D/[Purchases] - DEBUG(28086): ℹ️ Ending connection for com.android.billingclient.api.BillingClientImpl@d4289d5
D/[Purchases] - DEBUG(28086): ℹ️ Billing Service Setup finished for com.android.billingclient.api.BillingClientImpl@a7f65c2
D/[Purchases] - DEBUG(28086): ℹ️ Updating pending purchase queue
D/[Purchases] - DEBUG(28086): ℹ️ API request started: GET /subscribers/%24RCAnonymousID%3A1990da266b524c10a34f3118b99cef30
D/[Purchases] - DEBUG(28086): ℹ️ API request completed with status: GET /subscribers/%24RCAnonymousID%3A1990da266b524c10a34f3118b99cef30 200
D/[Purchases] - DEBUG(28086): ℹ️ PurchaserInfo updated, sending to listener.
D/[Purchases] - DEBUG(28086): ℹ️ API request started: GET /subscribers/%24RCAnonymousID%3A1990da266b524c10a34f3118b99cef30/offerings
D/[Purchases] - DEBUG(28086): ℹ️ API request completed with status: GET /subscribers/%24RCAnonymousID%3A1990da266b524c10a34f3118b99cef30/offerings 200
D/[Purchases] - DEBUG(28086): ℹ️ Requesting products from the store with identifiers: labh_premium
D/[Purchases] - DEBUG(28086): ℹ️ Querying subs
D/[Purchases] - DEBUG(28086): ℹ️ Querying inapp
D/[Purchases] - DEBUG(28086): ℹ️ Cleaning previously sent tokens
D/[Purchases] - DEBUG(28086): ℹ️ Tokens already posted: []
D/[Purchases] - DEBUG(28086): ℹ️ Saving tokens []
D/[Purchases] - DEBUG(28086): ℹ️ Tokens already posted: []
D/[Purchases] - DEBUG(28086): ℹ️ Products request finished for labh_premium
D/[Purchases] - DEBUG(28086): 💰 Retrieved skuDetailsList: SkuDetails: {"productId":"labh_premium","type":"subs","price":"₹329.87","price_amount_micros":329870000,"price_currency_code":"INR","title":"Labh Premium (Labh)","description":"To get unlimited product additions, notifications and all features access","subscriptionPeriod":"P1M","freeTrialPeriod":"P12W6D","skuDetailsToken":"AEuhp4LH4Q6C1qQKx2QJ_dGdjtBeF_-zqyo1n6A9ZAt6YOi1tpbQ9n5RvEOUEyxm5bE="}
D/[Purchases] - DEBUG(28086): 💰 labh_premium - SkuDetails: {"productId":"labh_premium","type":"subs","price":"₹329.87","price_amount_micros":329870000,"price_currency_code":"INR","title":"Labh Premium (Labh)","description":"To get unlimited product additions, notifications and all features access","subscriptionPeriod":"P1M","freeTrialPeriod":"P12W6D","skuDetailsToken":"AEuhp4LH4Q6C1qQKx2QJ_dGdjtBeF_-zqyo1n6A9ZAt6YOi1tpbQ9n5RvEOUEyxm5bE="}
D/[Purchases] - DEBUG(28086): ℹ️ Vending PurchaserInfo from cache.
D/[Purchases] - DEBUG(28086): ℹ️ Checking if cache is stale AppInBackground false
D/[Purchases] - DEBUG(28086): ℹ️ Vending Offerings from cache
D/[Purchases] - DEBUG(28086): ℹ️ Checking if cache is stale AppInBackground false
D/[Purchases] - DEBUG(28086): ℹ️ Vending Offerings from cache
D/[Purchases] - DEBUG(28086): 💰 Purchase started - product: SkuDetails: {"productId":"labh_premium","type":"subs","price":"₹329.87","price_amount_micros":329870000,"price_currency_code":"INR","title":"Labh Premium (Labh)","description":"To get unlimited product additions, notifications and all features access","subscriptionPeriod":"P1M","freeTrialPeriod":"P12W6D","skuDetailsToken":"AEuhp4LH4Q6C1qQKx2QJ_dGdjtBeF_-zqyo1n6A9ZAt6YOi1tpbQ9n5RvEOUEyxm5bE="} - offering: Default
D/[Purchases] - DEBUG(28086): 💰 Purchasing product: labh_premium
D/[Purchases] - DEBUG(28086): ℹ️ Checking if cache is stale AppInBackground false
E/sqlite3_android(28086): [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
E/sqlite3_android(28086): [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
D/ViewRootImpl(28086): support adaptive color gamut feature!
V/ViewRootImpl(28086): The specified message queue synchronization barrier token has not been posted or has already been removed
D/ViewRootImpl[MainActivity](28086): windowFocusChanged hasFocus=false inTouchMode=true
E/sqlite3_android(28086): [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
E/sqlite3_android(28086): [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
E/sqlite3_android(28086): [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
E/sqlite3_android(28086): [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
D/DecorView(28086): onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@a52f5b8[ProxyBillingActivity]
D/ViewRootImpl[ProxyBillingActivity](28086): windowFocusChanged hasFocus=true inTouchMode=true
D/ViewRootImpl[ProxyBillingActivity](28086): windowFocusChanged hasFocus=false inTouchMode=true
W/BillingHelper(28086): Couldn't find purchase lists, trying to find single data.
D/[Purchases] - DEBUG(28086): ℹ️ BillingWrapper purchases updated: labh_premium GPA.3376-1240-3145-24419 incnbbphcdfjpldpihckgkkn.AO-J1Ozpf81-Sw2aVSSj45AWwZc_-GEoB3UGeyZ2uuXWy34eXFHnBy-O-xrPywEeNuTS7cJz_z1Z2IDjL0E5IOPGCPb6dnSOay5WBpePNJXitLoC29yNFyk
D/[Purchases] - DEBUG(28086): ℹ️ Requesting products from the store with identifiers: labh_premium
D/DecorView(28086): onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@a4a7730[MainActivity]
D/ViewRootImpl[MainActivity](28086): windowFocusChanged hasFocus=true inTouchMode=true
E/sqlite3_android(28086): [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
D/[Purchases] - DEBUG(28086): ℹ️ Products request finished for labh_premium
D/[Purchases] - DEBUG(28086): 💰 Retrieved skuDetailsList: SkuDetails: {"productId":"labh_premium","type":"subs","price":"₹329.87","price_amount_micros":329870000,"price_currency_code":"INR","title":"Labh Premium (Labh)","description":"To get unlimited product additions, notifications and all features access","subscriptionPeriod":"P1M","freeTrialPeriod":"P12W6D","skuDetailsToken":"AEuhp4LH4Q6C1qQKx2QJ_dGdjtBeF_-zqyo1n6A9ZAt6YOi1tpbQ9n5RvEOUEyxm5bE="}
D/[Purchases] - DEBUG(28086): 💰 labh_premium - SkuDetails: {"productId":"labh_premium","type":"subs","price":"₹329.87","price_amount_micros":329870000,"price_currency_code":"INR","title":"Labh Premium (Labh)","description":"To get unlimited product additions, notifications and all features access","subscriptionPeriod":"P1M","freeTrialPeriod":"P12W6D","skuDetailsToken":"AEuhp4LH4Q6C1qQKx2QJ_dGdjtBeF_-zqyo1n6A9ZAt6YOi1tpbQ9n5RvEOUEyxm5bE="}
D/[Purchases] - DEBUG(28086): ℹ️ Found 0 unsynced attributes for App User ID: $RCAnonymousID:1990da266b524c10a34f3118b99cef30
E/sqlite3_android(28086): [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
D/[Purchases] - DEBUG(28086): ℹ️ API request started: POST /receipts
D/[Purchases] - DEBUG(28086): ℹ️ API request completed with status: POST /receipts 503
E/[Purchases] - ERROR(28086): 🤖‼️ There was a credentials issue. Check the underlying error for more details.
我收到了Google Play商店的第一张收据,5分钟后我收到了取消收据,并显示了“购买未被确认”的原因。
任何形式的帮助都将不胜感激。谢谢。
3条答案
按热度按时间rpppsulh1#
E/[采购] -错误(28086):🤖存在️凭据问题。有关详细信息,请检查基础错误。
该错误表明您上传到RevenueCat的Play Store凭据存在问题。通常,这是由于凭据在Google中传播需要一天以上的时间-因此,如果您最近设置了这些凭据,则可能是由于此原因。
参考文件:
voase2hg2#
我重新创建了谷歌凭据,并将新凭据与Revenuecat链接起来,几个小时后,它运行正常。
lyfkaqu13#
在我的例子中,我只是忘了在(https://www.revenuecat.com/docs/creating-play-service-credentials)中执行“发送测试通知”步骤,这告诉我没有将pub/sub链接到revenuecat。一旦我执行了这一步骤,通知就被接收到了,它就像一个魔咒一样工作了。