-
public final class BillingErrorKt
-
-
Method Summary
Modifier and Type Method Description final static StringbillingErrorType(Throwable t)Stable discriminator string for a billing failure. -
-
Method Detail
-
billingErrorType
final static String billingErrorType(Throwable t)
Stable discriminator string for a billing failure.
WHY: everything downstream of a failed purchase — the
purchase_failedevent, the paywall delegate, and the Flutter / React Native wrappers, which can only receive plain data across their bridge — used to see an untypedThrowablewhose only signal was a human-readablemessage. A wrapper (or a BigQuery query) could not tell "user cancelled" from "card declined" from "product misconfigured" without regex-matching English prose. These strings are the contract; they are never localized and never renamed.Public, not internal: the React Native wrapper is a SEPARATE Gradle module, so
internalput this out of its reach and it rejected every purchase — cancel, ask-to-buy, declined card, dead network — with one code (PURCHASE_ERROR) and a localized message. These are the exact strings iOS'sbillingErrorType(_:)returns; that is what makes onecatch (e.code)work on both.
-
-
-
-