Skip to content

Commit

Permalink
feat(in-app-purchase-2): update validator for custom headers (#4262)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusbackes authored Sep 5, 2022
1 parent 1b45462 commit 8b826e3
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/@awesome-cordova-plugins/plugins/in-app-purchase-2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,13 @@ export class InAppPurchase2 extends AwesomeCordovaNativePlugin {
products: IAPProducts;

@CordovaProperty()
validator: string | ((url: string | IAPProduct, callback: Function) => void);
validator:
| string
| ((url: string | IAPProduct, callback: Function) => void)
| {
url: string;
headers?: { [token: string]: string };
};

@CordovaProperty()
applicationUsername: string | (() => string);
Expand Down Expand Up @@ -915,8 +921,11 @@ export class InAppPurchase2 extends AwesomeCordovaNativePlugin {
/** Opens the Manage Billing page (AppStore, Play, Microsoft, ...), where the user can update his/her payment methods. */
@Cordova({ sync: true })
manageBilling(): void {}

/** Open the subscription price change notification workflow. (Play) See: https://developer.android.com/google/play/billing/subscriptions#price-change-communicate */
@Cordova({ sync: true })
launchPriceChangeConfirmationFlow(productId: string, callback: (status: 'OK' | 'UnknownProduct' | 'UserCanceled') => void): void {};
launchPriceChangeConfirmationFlow(
productId: string,
callback: (status: 'OK' | 'UnknownProduct' | 'UserCanceled') => void
): void {}
}

0 comments on commit 8b826e3

Please sign in to comment.