Giter Club home page Giter Club logo

Comments (3)

vladd-g avatar vladd-g commented on June 16, 2024

@yorondahacker For such request our backend always sends google_validation_result as an array, not as an object. It does as an object for a different request

Are you sure that it comes as a JsonObject for this request? Could you please provide the Adapty verbose logs (here in comments or to our support)?

from adaptysdk-android.

obaida-mostarihi avatar obaida-mostarihi commented on June 16, 2024

@yorondahacker For such request our backend always sends google_validation_result as an array, not as an object. It does as an object for a different request

Are you sure that it comes as a JsonObject for this request? Could you please provide the Adapty verbose logs (here in comments or to our support)?

We checked with the developer it's indeed an array but it's returning null
here are the logs:
2022-08-22 16:31:06.223 16333-16333/com.vpnhero.fast.unblock.xxx.free.vpn D/Adapty_v1.12.0: restorePurchases() 2022-08-22 16:31:06.740 16333-17425/com.vpnhero.fast.unblock.xxx.free.vpn D/Adapty_v1.12.0: POST https://api.adapty.io/api/v1/sdk/in-apps/google/token/restore/ Body: {"data":{"attributes":{"profile_id":"0762d366-d417-466f-917e-2cd46e7f62b1","restore_items":[{"currencyCode":"RUB","is_subscription":true,"localizedDescription":"","title":"p1w (VPN Hero: Secure VPN Proxy)","price":"499.00","product_id":"testing_subscription","purchase_token":"okeefgheocafkjafjdhhcppo.AO-J1Ox3Ie8ZNUxtTiWWpSWlZPNsUNBQoSIq1409KpwfJRfaDPEUmNOwqh5ecnREevGRuqMo3SSz2XamPcUptYxX-rrwCn6y-psoeG4jZENQx-HrpnVqtm_aekdIuH93koNdtVq4kx5C","subscriptionPeriod":{"numberOfUnits":1,"unit":"W"},"transaction_id":"GPA.3351-3893-0351-89567"}]},"type":"google_receipt_validation_result"}} 2022-08-22 16:31:07.053 16333-17425/com.vpnhero.fast.unblock.xxx.free.vpn D/Adapty_v1.12.0: Request is successful. https://api.adapty.io/api/v1/sdk/in-apps/google/token/restore/ Response: {"data":{"type":"google_receipt_validation_result","id":"0762d366-d417-466f-917e-2cd46e7f62b1","attributes":{"app_id":"00e06163-9a37-45fa-a423-532ae23201d0","profile_id":"0762d366-d417-466f-917e-2cd46e7f62b1","customer_user_id":null,"paid_access_levels":{"premium":{"id":"premium","is_active":true,"is_lifetime":false,"expires_at":"2022-08-22T13:35:51.000000+0000","starts_at":null,"will_renew":true,"vendor_product_id":"testing_subscription","store":"play_store","activated_at":"2022-08-22T13:23:54.000000+0000","renewed_at":"2022-08-22T13:30:51.000000+0000","unsubscribed_at":null,"billing_issue_detected_at":null,"is_in_grace_period":false,"active_introductory_offer_type":null,"active_promotional_offer_type":null,"active_promotional_offer_id":null,"cancellation_reason":null,"is_refund":false}},"subscriptions":{"testing_subscription":{"is_active":true,"is_lifetime":false,"expires_at":"2022-08-22T13:35:51.000000+0000","starts_at":null,"will_renew":true,"vendor_product_id":"testing_subscription","vendor_transaction_id":"GPA.3351-3893-0351-89567..0","vendor_original_transaction_id":"GPA.3351-3893-0351-89567","store":"play_store","activated_at":"2022-08-22T13:23:54.000000+0000","renewed_at":"2022-08-22T13:30:51.000000+0000","unsubscribed_at":null,"billing_issue_detected_at":null,"is_in_grace_period":false,"active_introductory_offer_type":null,"active_promotional_offer_type":null,"active_promotional_offer_id":null,"cancellation_reason":null,"is_sandbox":true,"is_refund":false}},"non_subscriptions":null,"promotional_offer_eligibility":false,"introductory_offer_eligibility":true,"custom_attributes":{},"total_revenue_usd":0.0}}} 2022-08-22 16:31:07.055 16333-16333/com.vpnhero.fast.unblock.xxx.free.vpn D/AdaptyRepository$restorePurchase: error: null 2022-08-22 16:31:07.059 16333-16333/com.vpnhero.fast.unblock.xxx.free.vpn D/AdaptyRepository$restorePurchase: purchaserInfo: PurchaserInfoModel(profileId=0762d366-d417-466f-917e-2cd46e7f62b1, customerUserId=null, accessLevels={premium=AccessLevelInfoModel(id=premium, isActive=true, vendorProductId=testing_subscription, vendorTransactionId=null, vendorOriginalTransactionId=null, store=play_store, activatedAt=2022-08-22T13:23:54.000000+0000, startsAt=null, renewedAt=2022-08-22T13:30:51.000000+0000, expiresAt=2022-08-22T13:35:51.000000+0000, isLifetime=false, cancellationReason=null, isRefund=false, activeIntroductoryOfferType=null, activePromotionalOfferType=null, willRenew=true, isInGracePeriod=false, unsubscribedAt=null, billingIssueDetectedAt=null)}, subscriptions={testing_subscription=SubscriptionInfoModel(isActive=true, vendorProductId='testing_subscription', vendorTransactionId=GPA.3351-3893-0351-89567..0, vendorOriginalTransactionId=GPA.3351-3893-0351-89567, store='play_store', activatedAt=2022-08-22T13:23:54.000000+0000, renewedAt=2022-08-22T13:30:51.000000+0000, expiresAt=2022-08-22T13:35:51.000000+0000, startsAt=null, isLifetime=false, activeIntroductoryOfferType=null, activePromotionalOfferType=null, willRenew=true, isInGracePeriod=false, unsubscribedAt=null, billingIssueDetectedAt=null, isSandbox=true, isRefund=false, cancellationReason=null)}, nonSubscriptions={}, customAttributes={}) 2022-08-22 16:31:07.062 16333-16333/com.vpnhero.fast.unblock.xxx.free.vpn D/AdaptyRepository$restorePurchase: googleValidationResult: null

from adaptysdk-android.

x401om avatar x401om commented on June 16, 2024

Hey, we have released a new version of our sdk. There is no more googleValidationResult parameter.

from adaptysdk-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.