feat(in-app-purchase-2): adds typings for transaction (#3621)
This commit is contained in:
parent
ca190db829
commit
46d0cecb27
@ -88,7 +88,7 @@ export interface IAPProduct {
|
|||||||
|
|
||||||
additionalData?: any;
|
additionalData?: any;
|
||||||
|
|
||||||
transaction?: any;
|
transaction?: PlayStoreReceipt | AppStoreReceipt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call `product.finish()` to confirm to the store that an approved order has been delivered.
|
* 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;
|
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
|
* @hidden
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user