Skip to content

Commit 8b826e3

Browse files
authored
feat(in-app-purchase-2): update validator for custom headers (#4262)
1 parent 1b45462 commit 8b826e3

File tree

1 file changed

+12
-3
lines changed
  • src/@awesome-cordova-plugins/plugins/in-app-purchase-2

1 file changed

+12
-3
lines changed

src/@awesome-cordova-plugins/plugins/in-app-purchase-2/index.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,13 @@ export class InAppPurchase2 extends AwesomeCordovaNativePlugin {
745745
products: IAPProducts;
746746

747747
@CordovaProperty()
748-
validator: string | ((url: string | IAPProduct, callback: Function) => void);
748+
validator:
749+
| string
750+
| ((url: string | IAPProduct, callback: Function) => void)
751+
| {
752+
url: string;
753+
headers?: { [token: string]: string };
754+
};
749755

750756
@CordovaProperty()
751757
applicationUsername: string | (() => string);
@@ -915,8 +921,11 @@ export class InAppPurchase2 extends AwesomeCordovaNativePlugin {
915921
/** Opens the Manage Billing page (AppStore, Play, Microsoft, ...), where the user can update his/her payment methods. */
916922
@Cordova({ sync: true })
917923
manageBilling(): void {}
918-
924+
919925
/** Open the subscription price change notification workflow. (Play) See: https://developer.android.com/google/play/billing/subscriptions#price-change-communicate */
920926
@Cordova({ sync: true })
921-
launchPriceChangeConfirmationFlow(productId: string, callback: (status: 'OK' | 'UnknownProduct' | 'UserCanceled') => void): void {};
927+
launchPriceChangeConfirmationFlow(
928+
productId: string,
929+
callback: (status: 'OK' | 'UnknownProduct' | 'UserCanceled') => void
930+
): void {}
922931
}

0 commit comments

Comments
 (0)