DVPlayStoreAdapter class

Google Play's server-side verification and notifications.

Implemented types

Constructors

DVPlayStoreAdapter({required String packageName, String? serviceAccountEmail, String? serviceAccountPrivateKeyPem, Future<String> accessToken()?, DVBillingFetch? fetch, DateTime clock()?, String? pushAudience, String? pushServiceAccountEmail})
DVPlayStoreAdapter.fromSecrets(DVPlayStoreConfig config, {DVBillingFetch? fetch, DateTime clock()?, DVSecrets secrets = const DVSecrets()})
Builds the adapter from a project's declaration and DV Secrets.
factory

Properties

acknowledgementWindow → Duration?
Play refunds a purchase not acknowledged within three days.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
packageName → String
The application id, which every Developer API path and every notification names.
final
pushAudience → String?
The push endpoint's URL as configured on the Pub/Sub subscription, which is the audience of the OIDC token Google attaches. Null refuses every push.
final
pushServiceAccountEmail → String?
The service account the Pub/Sub subscription pushes as.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
store → DVStore
no setteroverride

Methods

acknowledge({required String originalTransactionId, required String transactionId, required String storeProductId}) → Future<void>
Tells the store the purchase was granted.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
useCatalog(Map<String, DVPurchaseKind> storeProducts) → void
override
verifyNotification(String body, Map<String, String> headers) → Future<DVStoreNotification>
Verifies a store server notification's signature and returns what it says, re-reading the purchase from the store where the notification does not carry it (Play's do not).
override
verifyReceipt(String receipt) → Future<DVStoreTransaction>
Asks the store about receipt -- a StoreKit signed transaction or a Play purchase token -- and returns its answer.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited