Ich habe zwei Abonnementpläne: monatlich und jährlich, die beide ein 7-tägiges kostenloses Testangebot enthalten. Wenn Benutzer jedoch den jährlichen Plan auswählen, wird nur der Grundpreis angezeigt und das 7-Tage-kostenlose Testangebot fehlt. Grund, der jährliche Plan zeigt das Angebot nicht wie erwartet an. Sie können dieses
Problem im Screenshot sehen.
fun launchBillingFlowForBasePlan(
activity: Activity,
productDetails: ProductDetails,
basePlanId: String,
offerToken: String
) {
val productDetailsParams = BillingFlowParams.ProductDetailsParams.newBuilder()
.setProductDetails(productDetails)
.setOfferToken(offerToken)
.build()
val billingFlowParams = BillingFlowParams.newBuilder()
.setProductDetailsParamsList(listOf(productDetailsParams))
.build()
billingClient?.launchBillingFlow(activity, billingFlowParams)
}
< /code>
Die Anforderung ist für beide gleich und Token unterscheidet Änderung bei der Auswahl des Plans < /p>
productDetails JSON: < /p>
{
"ProductID": "Friend2",
"Typ" : "subs",
"Titel": "Freund2 (AppName)",
"Name": "Freund2",
"LocalizedIn": [
"en-us"
],
"SkudetailStoken": "AEUHP4IKQGF6_NRZHOBVTEQZFDZKUP_UUH-9JRBOPAQLTQZBQJ2GW9SGFHGD8LZEYSIR",
"ABLECTSFERFERTENDE": 9BEC6VO1Telqyvc+cgxqudsjri3Hzggypbfi/W+A8B2TCH4OssuxesyCD8diyldy3 /2cvmbzo /51im5vdxakogxdq5skeqkqzql ",
" Baseplanid ":" Freund2Monthly ",
" OfferId ":" 7DayFree ",
" Preisträger ": [
{
" pricreicountmicrosMicros " ": 0,
" PriceCurrencyCode ":" INR ",
" FormattedPrice ":" Free ",
" BillingPeriod ":" p1w ",
" Recurrencemode ": 2,,
"BillingCycleCount": 1
},
{
"PriceamountMicros": 3050000000,
"PriceCurrencyCode": "INR",
"FormattedPrice": "£ 3.050.00",
"BillingPeriod": "p1m",
"Recurcemode": 1
}
],
"Offertags": [
"free-7-days"
]
},
{
"offerIdToken": "AWOstcb1NaHzUvl9pcRZKStIYB2WuVgt0BCENaUMQ9vPdHnQR3n00Ef03P650tp5vLvuiVz8S5osP+VOvnBmm9VW9iUqHo=",
"basePlanId": "friend2monthly",
"Preisphasen": [
{
"PriceAmountMicros": 3050000000,
"PriceCurrencyCode": "INR",
"FormattedPrice": "£ 3.050.00", < Br /> "BillingPeriod": "p1m",
"Recurrencemode": 1
}
],
"Offertags": []
},
{
"OfferidToken": "awostcbkwgg5Hot /qxqojlo0mo3hh9slvmov3Bywr40+mpf0ntuslsletvu2 /jneboifeykzs0BTP9IIFLZXLXLXA603VNAAZJZVTNADSDK",
"OfferId": "7daysfree",
"Preisfasen ": [
{
" priceamountmicros ": 0,
" PricecurrencyCode ":" Inr ",
" formatedPrice ":" Free ",
" BillingPeriod ": "P1W",
"Recurrencemode": 2,
"BillingCycleCount": 1
},
{
"PriceamountMicros": 33300000000,
"PricecurrencyCode ":" Inr ",
" formattedPrice ":" £ 33.300,00 ",
" BillingPeriod ":" P1Y ",
" Recurrencemode ": 1
}
] ,
"offerTags": [
"free-7-days"
]
},
{
"offerIdToken": "AWOstcYvq7X6C15dzTS0EHWEwRzfcubicKSZSABbxOktfRsMr1oKoVUVQASLcVJ7AayHH3dLMrW1yHvflsg3R2lTiOAbDs=",
"Baseplanid": "Yearlywfree",
"Preisphasen": [
{
"PriceAmountMicros": 33300000000,
"PricecurrencyCode": "Inr",
" /> "formattedPrice": "£ 33.300,00",
"BillingPeriod": "P1y",
"Recurrencemode": 1
}
],
"Offertags" : []
}
]
} < /p>
Ich habe zwei Abonnementpläne: monatlich und jährlich, die beide ein 7-tägiges kostenloses Testangebot enthalten. Wenn Benutzer jedoch den jährlichen Plan auswählen, wird nur der Grundpreis angezeigt und das 7-Tage-kostenlose Testangebot fehlt. Grund, der jährliche Plan zeigt das Angebot nicht wie erwartet an. Sie können dieses [url=viewtopic.php?t=11587]Problem[/url] im Screenshot sehen.
fun launchBillingFlowForBasePlan(
activity: Activity,
productDetails: ProductDetails,
basePlanId: String,
offerToken: String
) {
val productDetailsParams = BillingFlowParams.ProductDetailsParams.newBuilder()
.setProductDetails(productDetails)
.setOfferToken(offerToken)
.build()
val billingFlowParams = BillingFlowParams.newBuilder()
.setProductDetailsParamsList(listOf(productDetailsParams))
.build()
billingClient?.launchBillingFlow(activity, billingFlowParams)
}
< /code>
Die Anforderung ist für beide gleich und Token unterscheidet Änderung bei der Auswahl des Plans < /p>
productDetails JSON: < /p>
{
"ProductID": "Friend2",
"Typ" : "subs",
"Titel": "Freund2 (AppName)",
"Name": "Freund2",
"LocalizedIn": [
"en-us"
],
"SkudetailStoken": "AEUHP4IKQGF6_NRZHOBVTEQZFDZKUP_UUH-9JRBOPAQLTQZBQJ2GW9SGFHGD8LZEYSIR",
"ABLECTSFERFERTENDE": 9BEC6VO1Telqyvc+cgxqudsjri3Hzggypbfi/W+A8B2TCH4OssuxesyCD8diyldy3 /2cvmbzo /51im5vdxakogxdq5skeqkqzql ",
" Baseplanid ":" Freund2Monthly ",
" OfferId ":" 7DayFree ",
" Preisträger ": [
{
" pricreicountmicrosMicros " ": 0,
" PriceCurrencyCode ":" INR ",
" FormattedPrice ":" Free ",
" BillingPeriod ":" p1w ",
" Recurrencemode ": 2,,
"BillingCycleCount": 1
},
{
"PriceamountMicros": 3050000000,
"PriceCurrencyCode": "INR",
"FormattedPrice": "£ 3.050.00",
"BillingPeriod": "p1m",
"Recurcemode": 1
}
],
"Offertags": [
"free-7-days"
]
},
{
"offerIdToken": "AWOstcb1NaHzUvl9pcRZKStIYB2WuVgt0BCENaUMQ9vPdHnQR3n00Ef03P650tp5vLvuiVz8S5osP+VOvnBmm9VW9iUqHo=",
"basePlanId": "friend2monthly",
"Preisphasen": [
{
"PriceAmountMicros": 3050000000,
"PriceCurrencyCode": "INR",
"FormattedPrice": "£ 3.050.00", < Br /> "BillingPeriod": "p1m",
"Recurrencemode": 1
}
],
"Offertags": []
},
{
"OfferidToken": "awostcbkwgg5Hot /qxqojlo0mo3hh9slvmov3Bywr40+mpf0ntuslsletvu2 /jneboifeykzs0BTP9IIFLZXLXLXA603VNAAZJZVTNADSDK",
"OfferId": "7daysfree",
"Preisfasen ": [
{
" priceamountmicros ": 0,
" PricecurrencyCode ":" Inr ",
" formatedPrice ":" Free ",
" BillingPeriod ": "P1W",
"Recurrencemode": 2,
"BillingCycleCount": 1
},
{
"PriceamountMicros": 33300000000,
"PricecurrencyCode ":" Inr ",
" formattedPrice ":" £ 33.300,00 ",
" BillingPeriod ":" P1Y ",
" Recurrencemode ": 1
}
] ,
"offerTags": [
"free-7-days"
]
},
{
"offerIdToken": "AWOstcYvq7X6C15dzTS0EHWEwRzfcubicKSZSABbxOktfRsMr1oKoVUVQASLcVJ7AayHH3dLMrW1yHvflsg3R2lTiOAbDs=",
"Baseplanid": "Yearlywfree",
"Preisphasen": [
{
"PriceAmountMicros": 33300000000,
"PricecurrencyCode": "Inr",
" /> "formattedPrice": "£ 33.300,00",
"BillingPeriod": "P1y",
"Recurrencemode": 1
}
],
"Offertags" : []
}
]
} < /p>