Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OfferToken not found #80

Open
mujahid-dzinemedia opened this issue Jul 29, 2022 · 4 comments
Open

OfferToken not found #80

mujahid-dzinemedia opened this issue Jul 29, 2022 · 4 comments

Comments

@mujahid-dzinemedia
Copy link

BillingFlowParams.ProductDetailsParams.newBuilder()
                                .setOfferToken(offerToken)
                                .setProductDetails(productDetails)
                                .build()


https://stackoverflow.com/questions/72351444/android-in-app-billing-v5-subscription-with-trial-period
https://developer.android.com/google/play/billing/subscriptions

@akshaaatt Please update library its crashing when subscribe

@dhirajved
Copy link

.setOfferToken("")
try this way.

If you want to give offer than refer this doc.
https://developer.android.com/google/play/billing/integrate
Hope this will be helpful:)

@tracer8
Copy link

tracer8 commented Aug 27, 2022

Bump, this error make sub crash! @akshaaatt

@nikunjparadva
Copy link

yes, it crashed... here is the logcat.

        at com.google.android.gms.internal.play_billing.zzm.zzc(com.android.billingclient:billing@@5.0.0:1)
        at com.android.billingclient.api.BillingFlowParams$ProductDetailsParams$Builder.build(com.android.billingclient:billing@@5.0.0:2)
        at com.aemerse.iap.BillingService$launchBillingFlow$1.invoke(BillingService.kt:105)
        at com.aemerse.iap.BillingService$launchBillingFlow$1.invoke(BillingService.kt:99)
        at com.aemerse.iap.BillingService.toProductDetails(BillingService.kt:326)
        at com.aemerse.iap.BillingService.launchBillingFlow(BillingService.kt:99)
        at com.aemerse.iap.BillingService.subscribe(BillingService.kt:95)
        at com.aemerse.iap.IapConnector.subscribe(IapConnector.kt:65)```

@gitkobold
Copy link


java.lang.NullPointerException: offerToken is required for constructing ProductDetailsParams.
at com.google.android.gms.internal.play_billing.zzm.zzc(com.android.billingclient:billing@@5.0.0:1)
at com.android.billingclient.api.BillingFlowParams$ProductDetailsParams$Builder.build(com.android.billingclient:billing@@5.0.0:2)
at com.aemerse.iap.BillingService$launchBillingFlow$1.invoke(BillingService.kt:115)
at com.aemerse.iap.BillingService$launchBillingFlow$1.invoke(BillingService.kt:105)
at com.aemerse.iap.BillingService.toProductDetails(BillingService.kt:335)
at com.aemerse.iap.BillingService.launchBillingFlow(BillingService.kt:105)
at com.aemerse.iap.BillingService.buy(BillingService.kt:92)
at com.aemerse.iap.IapConnector.purchase(IapConnector.kt:61)`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants