PurchaseVerificationData class

Represents the data that is used to verify purchases.

The property source helps you to determine the method to verify purchases. Different source of purchase has different methods of verifying purchases.

Both platforms have 2 ways to verify purchase data. You can either choose to verify the data locally using localVerificationData or verify the data using your own server with serverVerificationData.

For details on how to verify your purchase on iOS, you can refer to Apple's document about About Receipt Validation.

On Android, all purchase information should also be verified manually. See Verify a purchase.

It is preferable to verify purchases using a server with serverVerificationData.

If the platform is iOS, it is possible the data can be null or your validation of this data turns out invalid. When this happens, Call InAppPurchaseConnection.refreshPurchaseVerificationData to get a new PurchaseVerificationData object. And then you can validate the receipt data again using one of the methods mentioned in Receipt Validation.

You should never use any purchase data until verified.

Constructors

PurchaseVerificationData({@required String localVerificationData, @required String serverVerificationData, @required IAPSource source})

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
localVerificationData String
The data used for local verification. [...]
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
serverVerificationData String
The data used for server verification. [...]
final
source IAPSource
Indicates the source of the purchase.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited