feat(in-app-purchase-2): adds typings for transaction (#3621)

This commit is contained in:
Nico Lueg 2021-04-05 23:30:53 +02:00 committed by GitHub
parent ca190db829
commit 46d0cecb27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,7 +88,7 @@ export interface IAPProduct {
additionalData?: any;
transaction?: any;
transaction?: PlayStoreReceipt | AppStoreReceipt;
/**
* Call `product.finish()` to confirm to the store that an approved order has been delivered.
@ -197,6 +197,23 @@ export interface IAPProductEvents {
downloaded: (callback: IAPQueryCallback) => IAPProductEvents;
}
export type PlayStoreReceipt = {
id: string;
purchaseState: number;
purchaseToken: string;
receipt: string;
signature: string;
type: "android-playstore";
};
export type AppStoreReceipt = {
id: string;
appStoreReceipt: string;
original_transaction_id: string;
type: "ios-appstore";
};
/**
* @hidden
*/