@paydock/client-sdk 1.104.6-beta → 1.105.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nvmrc +1 -0
- package/README.md +320 -362
- package/api.d.ts +1 -0
- package/api.js +1 -0
- package/bundles/widget.umd.js +7410 -6717
- package/bundles/widget.umd.min.js +1 -2
- package/canvas3ds.d.ts +1 -0
- package/canvas3ds.js +1 -0
- package/checkout-button.d.ts +1 -0
- package/checkout-button.js +1 -0
- package/inicialization-guide.md +7 -0
- package/{bundles/types → lib}/api/api-base.d.ts +1 -2
- package/lib/api/api-base.js +101 -0
- package/lib/api/api-base.js.map +1 -0
- package/{bundles/types → lib}/api/api-charge-internal.d.ts +0 -1
- package/lib/api/api-charge-internal.js +30 -0
- package/lib/api/api-charge-internal.js.map +1 -0
- package/{bundles/types → lib}/api/api-charge.d.ts +0 -1
- package/lib/api/api-charge.js +49 -0
- package/lib/api/api-charge.js.map +1 -0
- package/{bundles/types → lib}/api/api-internal.d.ts +0 -1
- package/lib/api/api-internal.js +13 -0
- package/lib/api/api-internal.js.map +1 -0
- package/{bundles/types → lib}/api/api-service-internal.d.ts +1 -3
- package/lib/api/api-service-internal.js +18 -0
- package/lib/api/api-service-internal.js.map +1 -0
- package/{bundles/types → lib}/api/api.d.ts +0 -1
- package/lib/api/api.js +62 -0
- package/lib/api/api.js.map +1 -0
- package/lib/api/index.d.ts +1 -0
- package/lib/api/index.js +2 -0
- package/lib/api/index.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/canvas-3ds.d.ts +0 -1
- package/lib/canvas-3ds/canvas-3ds.js +157 -0
- package/lib/canvas-3ds/canvas-3ds.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/index.d.ts +0 -1
- package/lib/canvas-3ds/index.js +2 -0
- package/lib/canvas-3ds/index.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/services/gpayments-service.d.ts +0 -1
- package/lib/canvas-3ds/services/gpayments-service.js +181 -0
- package/lib/canvas-3ds/services/gpayments-service.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/services/index.d.ts +0 -1
- package/lib/canvas-3ds/services/index.js +2 -0
- package/lib/canvas-3ds/services/index.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/services/standalone3ds-service.d.ts +0 -1
- package/lib/canvas-3ds/services/standalone3ds-service.js +32 -0
- package/lib/canvas-3ds/services/standalone3ds-service.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/afterpay/afterpay-checkout-button.d.ts +0 -1
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js +50 -0
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/afterpay/afterpay.runner.d.ts +0 -1
- package/lib/checkout-button/afterpay/afterpay.runner.js +41 -0
- package/lib/checkout-button/afterpay/afterpay.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/checkout-button.d.ts +0 -1
- package/{bundles/types → lib}/checkout-button/checkout-button.interface.d.ts +0 -1
- package/lib/checkout-button/checkout-button.interface.js +45 -0
- package/lib/checkout-button/checkout-button.interface.js.map +1 -0
- package/lib/checkout-button/checkout-button.js +266 -0
- package/lib/checkout-button/checkout-button.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/checkout-contextual-handler.d.ts +0 -1
- package/lib/checkout-button/checkout-contextual-handler.js +75 -0
- package/lib/checkout-button/checkout-contextual-handler.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/index.d.ts +1 -2
- package/lib/checkout-button/index.js +85 -0
- package/lib/checkout-button/index.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/paypal/paypal-checkout-button.d.ts +0 -1
- package/lib/checkout-button/paypal/paypal-checkout-button.js +25 -0
- package/lib/checkout-button/paypal/paypal-checkout-button.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/paypal/paypal.runner.d.ts +0 -1
- package/lib/checkout-button/paypal/paypal.runner.js +14 -0
- package/lib/checkout-button/paypal/paypal.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/base.runner.d.ts +3 -4
- package/lib/checkout-button/runner/base.runner.js +13 -0
- package/lib/checkout-button/runner/base.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/contextual.runner.d.ts +1 -2
- package/lib/checkout-button/runner/contextual.runner.js +40 -0
- package/lib/checkout-button/runner/contextual.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/index.d.ts +0 -1
- package/lib/checkout-button/runner/index.js +11 -0
- package/lib/checkout-button/runner/index.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/popup.runner.d.ts +1 -2
- package/lib/checkout-button/runner/popup.runner.js +68 -0
- package/lib/checkout-button/runner/popup.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/redirect.runner.d.ts +1 -2
- package/lib/checkout-button/runner/redirect.runner.js +15 -0
- package/lib/checkout-button/runner/redirect.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +0 -1
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +64 -0
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +1 -2
- package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js +78 -0
- package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +1 -2
- package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js +49 -0
- package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.config.d.ts +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.config.js +4 -0
- package/lib/checkout-button/zipmoney/zipmoney.config.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.runner.d.ts +1 -2
- package/lib/checkout-button/zipmoney/zipmoney.runner.js +23 -0
- package/lib/checkout-button/zipmoney/zipmoney.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.types.d.ts +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.types.js +1 -0
- package/lib/checkout-button/zipmoney/zipmoney.types.js.map +1 -0
- package/{bundles/types → lib}/components/ability-guard.d.ts +0 -1
- package/lib/components/ability-guard.js +44 -0
- package/lib/components/ability-guard.js.map +1 -0
- package/{bundles/types → lib}/components/background.d.ts +0 -1
- package/lib/components/background.js +193 -0
- package/lib/components/background.js.map +1 -0
- package/{bundles/types → lib}/components/container.d.ts +0 -1
- package/lib/components/container.js +63 -0
- package/lib/components/container.js.map +1 -0
- package/{bundles/types → lib}/components/dispatcher.d.ts +1 -2
- package/lib/components/dispatcher.js +39 -0
- package/lib/components/dispatcher.js.map +1 -0
- package/{bundles/types → lib}/components/element-style.d.ts +1 -2
- package/lib/components/element-style.js +52 -0
- package/lib/components/element-style.js.map +1 -0
- package/{bundles/types → lib}/components/flypay-iframe-event.d.ts +0 -1
- package/lib/components/flypay-iframe-event.js +28 -0
- package/lib/components/flypay-iframe-event.js.map +1 -0
- package/{bundles/types/components/form-interceptor.d.ts → lib/components/form-Interceptor.d.ts} +0 -1
- package/lib/components/form-Interceptor.js +38 -0
- package/lib/components/form-Interceptor.js.map +1 -0
- package/{bundles/types → lib}/components/http-core.d.ts +0 -1
- package/lib/components/http-core.js +57 -0
- package/lib/components/http-core.js.map +1 -0
- package/{bundles/types → lib}/components/iframe-event.d.ts +0 -4
- package/lib/components/iframe-event.js +75 -0
- package/lib/components/iframe-event.js.map +1 -0
- package/{bundles/types → lib}/components/iframe.d.ts +0 -1
- package/lib/components/iframe.js +62 -0
- package/lib/components/iframe.js.map +1 -0
- package/{bundles/types → lib}/components/link.d.ts +3 -5
- package/lib/components/link.js +59 -0
- package/lib/components/link.js.map +1 -0
- package/{bundles/types → lib}/components/loader.d.ts +0 -1
- package/lib/components/loader.js +234 -0
- package/lib/components/loader.js.map +1 -0
- package/{bundles/types → lib}/components/param.d.ts +9 -10
- package/lib/components/param.js +147 -0
- package/lib/components/param.js.map +1 -0
- package/{bundles/types → lib}/components/popup.d.ts +0 -1
- package/lib/components/popup.js +104 -0
- package/lib/components/popup.js.map +1 -0
- package/{bundles/types → lib}/components/storage-dispatcher.d.ts +0 -1
- package/lib/components/storage-dispatcher.js +75 -0
- package/lib/components/storage-dispatcher.js.map +1 -0
- package/{bundles/types → lib}/components/trigger.d.ts +0 -1
- package/lib/components/trigger.js +49 -0
- package/lib/components/trigger.js.map +1 -0
- package/{bundles/types → lib}/components/vault-display-iframe-event.d.ts +0 -1
- package/lib/components/vault-display-iframe-event.js +27 -0
- package/lib/components/vault-display-iframe-event.js.map +1 -0
- package/{bundles/types → lib}/components/wallet-background.d.ts +0 -1
- package/lib/components/wallet-background.js +63 -0
- package/lib/components/wallet-background.js.map +1 -0
- package/{bundles/types → lib}/components/wallet-trigger.d.ts +0 -1
- package/lib/components/wallet-trigger.js +27 -0
- package/lib/components/wallet-trigger.js.map +1 -0
- package/{bundles/types/configs/env/environment.paydock.d.ts → lib/configs/env/env.d.ts} +8 -5
- package/lib/configs/env/env.js +117 -0
- package/lib/configs/env/env.js.map +1 -0
- package/{bundles/types → lib}/configs/sdk.d.ts +2 -3
- package/lib/configs/sdk.js +16 -0
- package/lib/configs/sdk.js.map +1 -0
- package/{bundles/types → lib}/constants/validators.d.ts +2 -3
- package/lib/constants/validators.js +42 -0
- package/lib/constants/validators.js.map +1 -0
- package/{bundles/types → lib}/external-checkout/builder.d.ts +0 -1
- package/lib/external-checkout/builder.js +45 -0
- package/lib/external-checkout/builder.js.map +1 -0
- package/{bundles/types → lib}/external-checkout/checker.d.ts +0 -1
- package/lib/external-checkout/checker.js +22 -0
- package/lib/external-checkout/checker.js.map +1 -0
- package/lib/external-checkout/index.d.ts +2 -0
- package/lib/external-checkout/index.js +3 -0
- package/lib/external-checkout/index.js.map +1 -0
- package/{bundles/types → lib}/helper/access-token.d.ts +0 -1
- package/lib/helper/access-token.js +44 -0
- package/lib/helper/access-token.js.map +1 -0
- package/{bundles/types → lib}/helper/browser.d.ts +0 -1
- package/lib/helper/browser.js +79 -0
- package/lib/helper/browser.js.map +1 -0
- package/{bundles/types → lib}/helper/event-emitter.d.ts +0 -1
- package/lib/helper/event-emitter.js +23 -0
- package/lib/helper/event-emitter.js.map +1 -0
- package/{bundles/types → lib}/helper/event.d.ts +0 -1
- package/lib/helper/event.js +23 -0
- package/lib/helper/event.js.map +1 -0
- package/{bundles/types → lib}/helper/ms.d.ts +0 -1
- package/lib/helper/ms.js +32 -0
- package/lib/helper/ms.js.map +1 -0
- package/{bundles/types → lib}/helper/object.d.ts +0 -1
- package/lib/helper/object.js +6 -0
- package/lib/helper/object.js.map +1 -0
- package/{bundles/types → lib}/helper/url.d.ts +0 -1
- package/lib/helper/url.js +11 -0
- package/lib/helper/url.js.map +1 -0
- package/{bundles/types → lib}/helper/uuid.d.ts +0 -1
- package/lib/helper/uuid.js +26 -0
- package/lib/helper/uuid.js.map +1 -0
- package/lib/index.d.ts +15 -0
- package/lib/index.js +15 -0
- package/lib/index.js.map +1 -0
- package/{bundles/types → lib}/payment-source/builder.d.ts +0 -1
- package/lib/payment-source/builder.js +49 -0
- package/lib/payment-source/builder.js.map +1 -0
- package/{bundles/types → lib}/payment-source/index.d.ts +0 -1
- package/lib/payment-source/index.js +2 -0
- package/lib/payment-source/index.js.map +1 -0
- package/{bundles/types → lib}/payment-source-widget/html-payment-source-widget.d.ts +0 -1
- package/lib/payment-source-widget/html-payment-source-widget.js +172 -0
- package/lib/payment-source-widget/html-payment-source-widget.js.map +1 -0
- package/{bundles/types → lib}/payment-source-widget/index.d.ts +0 -1
- package/lib/payment-source-widget/index.js +35 -0
- package/lib/payment-source-widget/index.js.map +1 -0
- package/{bundles/types → lib}/payment-source-widget/interfaces.d.ts +0 -1
- package/lib/payment-source-widget/interfaces.js +2 -0
- package/lib/payment-source-widget/interfaces.js.map +1 -0
- package/{bundles/types → lib}/payment-source-widget/payment-source-widget.d.ts +0 -1
- package/lib/payment-source-widget/payment-source-widget.js +142 -0
- package/lib/payment-source-widget/payment-source-widget.js.map +1 -0
- package/lib/secure-remote-commerce/index.d.ts +1 -0
- package/lib/secure-remote-commerce/index.js +2 -0
- package/lib/secure-remote-commerce/index.js.map +1 -0
- package/lib/secure-remote-commerce/interfaces.d.ts +71 -0
- package/lib/secure-remote-commerce/interfaces.js +28 -0
- package/lib/secure-remote-commerce/interfaces.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/providers/src-provider.d.ts +0 -1
- package/lib/secure-remote-commerce/providers/src-provider.js +1 -0
- package/lib/secure-remote-commerce/providers/src-provider.js.map +1 -0
- package/lib/secure-remote-commerce/providers/visa-src/helper.d.ts +7 -0
- package/lib/secure-remote-commerce/providers/visa-src/helper.js +36 -0
- package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +1 -0
- package/lib/secure-remote-commerce/providers/visa-src/index.d.ts +1 -0
- package/lib/secure-remote-commerce/providers/visa-src/index.js +2 -0
- package/lib/secure-remote-commerce/providers/visa-src/index.js.map +1 -0
- package/{bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts → lib/secure-remote-commerce/providers/visa-src/visa-src.d.ts} +7 -5
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +113 -0
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +1 -0
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +8 -0
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +10 -0
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +1 -0
- package/lib/secure-remote-commerce/secure-remote-commerce.d.ts +163 -0
- package/lib/secure-remote-commerce/secure-remote-commerce.js +239 -0
- package/lib/secure-remote-commerce/secure-remote-commerce.js.map +1 -0
- package/{bundles/types → lib}/vault-display-widget/index.d.ts +0 -1
- package/lib/vault-display-widget/index.js +14 -0
- package/lib/vault-display-widget/index.js.map +1 -0
- package/{bundles/types → lib}/vault-display-widget/vault-display-widget.d.ts +0 -1
- package/lib/vault-display-widget/vault-display-widget.js +99 -0
- package/lib/vault-display-widget/vault-display-widget.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/afterpay.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/afterpay.wallet-service.js +152 -0
- package/lib/wallet-buttons/afterpay.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/apple.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/apple.wallet-service.js +324 -0
- package/lib/wallet-buttons/apple.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/flypay-v2.wallet-service.d.ts +1 -1
- package/lib/wallet-buttons/flypay-v2.wallet-service.js +165 -0
- package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/flypay.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/flypay.wallet-service.js +117 -0
- package/lib/wallet-buttons/flypay.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/google.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/google.wallet-service.js +301 -0
- package/lib/wallet-buttons/google.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/helpers/flypay-v2.helper.d.ts +0 -1
- package/lib/wallet-buttons/helpers/flypay-v2.helper.js +151 -0
- package/lib/wallet-buttons/helpers/flypay-v2.helper.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/index.d.ts +0 -1
- package/lib/wallet-buttons/index.js +128 -0
- package/lib/wallet-buttons/index.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/interfaces.d.ts +0 -1
- package/lib/wallet-buttons/interfaces.js +1 -0
- package/lib/wallet-buttons/interfaces.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/mastercard.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/mastercard.wallet-service.js +27 -0
- package/lib/wallet-buttons/mastercard.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/paypal.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/paypal.wallet-service.js +144 -0
- package/lib/wallet-buttons/paypal.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/stripe.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/stripe.wallet-service.js +100 -0
- package/lib/wallet-buttons/stripe.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/wallet-buttons.d.ts +0 -1
- package/lib/wallet-buttons/wallet-buttons.js +479 -0
- package/lib/wallet-buttons/wallet-buttons.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/wallet-service.js +60 -0
- package/lib/wallet-buttons/wallet-service.js.map +1 -0
- package/{bundles/types → lib}/widget/configuration.d.ts +1 -2
- package/lib/widget/configuration.js +260 -0
- package/lib/widget/configuration.js.map +1 -0
- package/{bundles/types → lib}/widget/html-multi-widget.d.ts +3 -4
- package/lib/widget/html-multi-widget.js +422 -0
- package/lib/widget/html-multi-widget.js.map +1 -0
- package/{bundles/types → lib}/widget/html-widget.d.ts +0 -1
- package/lib/widget/html-widget.js +127 -0
- package/lib/widget/html-widget.js.map +1 -0
- package/{bundles/types → lib}/widget/index.d.ts +1 -2
- package/lib/widget/index.js +132 -0
- package/lib/widget/index.js.map +1 -0
- package/{bundles/types → lib}/widget/meta.d.ts +0 -1
- package/lib/widget/meta.js +8 -0
- package/lib/widget/meta.js.map +1 -0
- package/{bundles/types → lib}/widget/multi-widget.d.ts +1 -2
- package/lib/widget/multi-widget.js +437 -0
- package/lib/widget/multi-widget.js.map +1 -0
- package/{bundles/types → lib}/widget/style.d.ts +0 -1
- package/lib/widget/style.js +204 -0
- package/lib/widget/style.js.map +1 -0
- package/package.json +42 -164
- package/payment-source-widget.d.ts +1 -0
- package/payment-source-widget.js +1 -0
- package/slate.md +189 -163
- package/tslint.json +129 -0
- package/typings/globals/@auspayplus/open-payments-checkout/index.d.ts +43 -0
- package/typings/globals/jasmine/index.d.ts +576 -0
- package/typings/globals/jasmine-ajax/index.d.ts +83 -0
- package/typings/globals/jquery/index.d.ts +3759 -0
- package/typings/index.d.ts +4 -0
- package/vault-display-widget.d.ts +1 -0
- package/vault-display-widget.js +1 -0
- package/vendors/zipmoney.d.ts +18 -0
- package/vendors/zipmoney.js +2 -0
- package/widget.d.ts +1 -0
- package/widget.js +1 -0
- package/bundles/index.cjs +0 -10456
- package/bundles/index.cjs.d.ts +0 -3206
- package/bundles/index.cjs.map +0 -1
- package/bundles/index.mjs +0 -10424
- package/bundles/index.mjs.d.ts +0 -3206
- package/bundles/index.mjs.map +0 -1
- package/bundles/types/api/api-base.d.ts.map +0 -1
- package/bundles/types/api/api-charge-internal.d.ts.map +0 -1
- package/bundles/types/api/api-charge.d.ts.map +0 -1
- package/bundles/types/api/api-internal.d.ts.map +0 -1
- package/bundles/types/api/api-service-internal.d.ts.map +0 -1
- package/bundles/types/api/api.d.ts.map +0 -1
- package/bundles/types/api/index.d.ts +0 -2
- package/bundles/types/api/index.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/index.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/services/index.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +0 -1
- package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +0 -1
- package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/checkout-button.d.ts.map +0 -1
- package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +0 -1
- package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +0 -1
- package/bundles/types/checkout-button/index.d.ts.map +0 -1
- package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +0 -1
- package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/base.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/index.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/redirect.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/index.d.ts +0 -4
- package/bundles/types/checkout-button/zipmoney/index.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +0 -1
- package/bundles/types/components/ability-guard.d.ts.map +0 -1
- package/bundles/types/components/background.d.ts.map +0 -1
- package/bundles/types/components/container.d.ts.map +0 -1
- package/bundles/types/components/dispatcher.d.ts.map +0 -1
- package/bundles/types/components/element-style.d.ts.map +0 -1
- package/bundles/types/components/flypay-iframe-event.d.ts.map +0 -1
- package/bundles/types/components/form-interceptor.d.ts.map +0 -1
- package/bundles/types/components/http-core.d.ts.map +0 -1
- package/bundles/types/components/iframe-event.d.ts.map +0 -1
- package/bundles/types/components/iframe.d.ts.map +0 -1
- package/bundles/types/components/link.d.ts.map +0 -1
- package/bundles/types/components/loader.d.ts.map +0 -1
- package/bundles/types/components/param.d.ts.map +0 -1
- package/bundles/types/components/popup.d.ts.map +0 -1
- package/bundles/types/components/storage-dispatcher.d.ts.map +0 -1
- package/bundles/types/components/trigger.d.ts.map +0 -1
- package/bundles/types/components/vault-display-iframe-event.d.ts.map +0 -1
- package/bundles/types/components/wallet-background.d.ts.map +0 -1
- package/bundles/types/components/wallet-trigger.d.ts.map +0 -1
- package/bundles/types/configs/env/environment.cba.d.ts +0 -29
- package/bundles/types/configs/env/environment.cba.d.ts.map +0 -1
- package/bundles/types/configs/env/environment.interface.d.ts +0 -12
- package/bundles/types/configs/env/environment.interface.d.ts.map +0 -1
- package/bundles/types/configs/env/environment.paydock.d.ts.map +0 -1
- package/bundles/types/configs/env/index.d.ts +0 -3
- package/bundles/types/configs/env/index.d.ts.map +0 -1
- package/bundles/types/configs/sdk.d.ts.map +0 -1
- package/bundles/types/constants/validators.d.ts.map +0 -1
- package/bundles/types/external-checkout/builder.d.ts.map +0 -1
- package/bundles/types/external-checkout/checker.d.ts.map +0 -1
- package/bundles/types/external-checkout/index.d.ts +0 -3
- package/bundles/types/external-checkout/index.d.ts.map +0 -1
- package/bundles/types/helper/access-token.d.ts.map +0 -1
- package/bundles/types/helper/browser.d.ts.map +0 -1
- package/bundles/types/helper/event-emitter.d.ts.map +0 -1
- package/bundles/types/helper/event.d.ts.map +0 -1
- package/bundles/types/helper/ms.d.ts.map +0 -1
- package/bundles/types/helper/object.d.ts.map +0 -1
- package/bundles/types/helper/url.d.ts.map +0 -1
- package/bundles/types/helper/uuid.d.ts.map +0 -1
- package/bundles/types/index-cba.d.ts +0 -13
- package/bundles/types/index-cba.d.ts.map +0 -1
- package/bundles/types/index.d.ts +0 -14
- package/bundles/types/index.d.ts.map +0 -1
- package/bundles/types/payment-source/builder.d.ts.map +0 -1
- package/bundles/types/payment-source/index.d.ts.map +0 -1
- package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +0 -1
- package/bundles/types/payment-source-widget/index.d.ts.map +0 -1
- package/bundles/types/payment-source-widget/interfaces.d.ts.map +0 -1
- package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/index.d.ts +0 -103
- package/bundles/types/secure-remote-commerce/index.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/interfaces.d.ts +0 -149
- package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts +0 -31
- package/bundles/types/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts +0 -2
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts +0 -86
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +0 -1
- package/bundles/types/vault-display-widget/index.d.ts.map +0 -1
- package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/index-cba.d.ts +0 -2
- package/bundles/types/wallet-buttons/index-cba.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/index.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/interfaces.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts +0 -330
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/wallet-service.d.ts.map +0 -1
- package/bundles/types/widget/configuration.d.ts.map +0 -1
- package/bundles/types/widget/html-multi-widget.d.ts.map +0 -1
- package/bundles/types/widget/html-widget.d.ts.map +0 -1
- package/bundles/types/widget/index.d.ts.map +0 -1
- package/bundles/types/widget/meta.d.ts.map +0 -1
- package/bundles/types/widget/multi-widget.d.ts.map +0 -1
- package/bundles/types/widget/style.d.ts.map +0 -1
- package/bundles/widget.umd.js.d.ts +0 -3206
- package/bundles/widget.umd.js.map +0 -1
- package/bundles/widget.umd.js.min.d.ts +0 -3206
- package/bundles/widget.umd.min.js.map +0 -1
- package/docs/api-canvas3ds.md +0 -158
- package/docs/api-checkout-button.md +0 -912
- package/docs/api-examples.md +0 -65
- package/docs/api-ps-widget.md +0 -585
- package/docs/api-vault-display.md +0 -94
- package/docs/api-widget.md +0 -2499
- package/docs/api-wrapper.md +0 -78
- package/docs/canvas3ds-examples.md +0 -242
- package/docs/cba-header.md +0 -13
- package/docs/cba-license.md +0 -2
- package/docs/checkout-examples.md +0 -248
- package/docs/header.md +0 -15
- package/docs/html/layout.html +0 -78
- package/docs/html/marked.js +0 -23
- package/docs/html/style.css +0 -365
- package/docs/install/npm.content.md +0 -16
- package/docs/install/npm.example.md +0 -24
- package/docs/install/umd.content.md +0 -20
- package/docs/install/umd.example.md +0 -6
- package/docs/install.md +0 -43
- package/docs/install.readme.t.md +0 -17
- package/docs/install.slate.t.md +0 -17
- package/docs/license.md +0 -2
- package/docs/partials/header.hbs +0 -3
- package/docs/ps-examples.md +0 -129
- package/docs/secure-remote-commerce-examples.md +0 -232
- package/docs/secure-remote-commerce.md +0 -336
- package/docs/vault-display-example.md +0 -132
- package/docs/wallet-buttons-examples.md +0 -609
- package/docs/wallet-buttons.md +0 -619
- package/docs/wallet-cba-buttons-examples.md +0 -388
- package/docs/widget-examples.md +0 -134
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { PaymentSourceWidget } from "./payment-source-widget";
|
|
2
|
+
import { Container } from "../components/container";
|
|
3
|
+
import { IFrame } from "../components/iframe";
|
|
4
|
+
import { EVENT, IFrameEvent } from "../components/iframe-event";
|
|
5
|
+
import { Event as EventHelper } from "../helper/event";
|
|
6
|
+
/**
|
|
7
|
+
* Interface of data from event.
|
|
8
|
+
*
|
|
9
|
+
* @interface IEventSelectData
|
|
10
|
+
*
|
|
11
|
+
* @param {string} event
|
|
12
|
+
* @param {string} purpose
|
|
13
|
+
* @param {string} message_source
|
|
14
|
+
* @param {string} [ref_id]
|
|
15
|
+
* @param {string} customer_id
|
|
16
|
+
* @param {string} payment_source_id
|
|
17
|
+
* @param {string} gateway_id
|
|
18
|
+
* @param {boolean} primary
|
|
19
|
+
* @param {string} [widget_id]
|
|
20
|
+
* @param {string} [card_number_last4]
|
|
21
|
+
* @param {string} [card_scheme]
|
|
22
|
+
* @param {string} gateway_type
|
|
23
|
+
* @param {string} [checkout_email]
|
|
24
|
+
* @param {string} payment_source_type
|
|
25
|
+
* @param {string} [account_name]
|
|
26
|
+
* @param {string} [account_number]
|
|
27
|
+
* */
|
|
28
|
+
/**
|
|
29
|
+
* Interface of data from event.
|
|
30
|
+
*
|
|
31
|
+
* @interface IEventPaginationData
|
|
32
|
+
*
|
|
33
|
+
* @param {string} event
|
|
34
|
+
* @param {string} purpose
|
|
35
|
+
* @param {string} message_source
|
|
36
|
+
* @param {string} [ref_id]
|
|
37
|
+
* @param {number} total_item
|
|
38
|
+
* @param {number} skip
|
|
39
|
+
* @param {number} limit
|
|
40
|
+
* */
|
|
41
|
+
/**
|
|
42
|
+
* Interface of data from event.
|
|
43
|
+
*
|
|
44
|
+
* @interface IEventAfterLoadData
|
|
45
|
+
*
|
|
46
|
+
* @param {string} event The name of the event.
|
|
47
|
+
* @param {string} purpose A system variable that states the purpose of the event.
|
|
48
|
+
* @param {string} message_source A system variable that identifies the event source.
|
|
49
|
+
* @param {string} [ref_id] Custom unique value that identifies result of processed operation.
|
|
50
|
+
* @param {number} total_item Pagination param. Total item count
|
|
51
|
+
* @param {number} skip Pagination param. Skip items from first item
|
|
52
|
+
* @param {number} limit Pagination param. Query limit
|
|
53
|
+
* */
|
|
54
|
+
/**
|
|
55
|
+
* Interface of data from event.
|
|
56
|
+
* @interface IEventFinishData
|
|
57
|
+
*
|
|
58
|
+
* @param {string} event The name of the event.
|
|
59
|
+
* @param {string} purpose A system variable that states the purpose of the event.
|
|
60
|
+
* @param {string} message_source A system variable that identifies the event source.
|
|
61
|
+
* @param {string} [ref_id] Custom unique value that identifies result of processed operation.
|
|
62
|
+
* */
|
|
63
|
+
/**
|
|
64
|
+
* Interface of data from event.
|
|
65
|
+
* @interface IEventSizeData
|
|
66
|
+
*
|
|
67
|
+
* @param {number} event The name of the event.
|
|
68
|
+
* @param {number} purpose A system variable that states the purpose of the event.
|
|
69
|
+
* @param {string} message_source A system variable that identifies the event source.
|
|
70
|
+
* @param {string} [ref_id] Custom unique value that identifies result of processed operation.
|
|
71
|
+
* @param {number} height Height of iFrame
|
|
72
|
+
* @param {number} width Width of iFrame
|
|
73
|
+
* */
|
|
74
|
+
/**
|
|
75
|
+
* List of available event's name
|
|
76
|
+
*
|
|
77
|
+
* @const EVENT
|
|
78
|
+
*
|
|
79
|
+
* @type {object}
|
|
80
|
+
* @param {string} AFTER_LOAD=afterLoad
|
|
81
|
+
* @param {string} SYSTEM_ERROR=systemError
|
|
82
|
+
* @param {string} SELECT=select
|
|
83
|
+
* @param {string} UNSELECT=unselect
|
|
84
|
+
* @param {string} NEXT=next
|
|
85
|
+
* @param {string} PREV=prev
|
|
86
|
+
* @param {string} META_CHANGE=metaChange
|
|
87
|
+
* @param {string} RESIZE=resize
|
|
88
|
+
*/
|
|
89
|
+
/**
|
|
90
|
+
* Class HtmlPaymentSourceWidget include method for working on html
|
|
91
|
+
* @constructor
|
|
92
|
+
* @extends PaymentSourceWidget
|
|
93
|
+
*
|
|
94
|
+
* @param {string} selector - Selector of html element. Container for widget
|
|
95
|
+
* @param {string} publicKey - PayDock users public key
|
|
96
|
+
* @param {string} queryToken - PayDock's query token that represents params to search customer by id or reference
|
|
97
|
+
* @example
|
|
98
|
+
* * var widget = new HtmlPaymentSourceWidget('#widget', 'publicKey','queryToken');
|
|
99
|
+
|
|
100
|
+
*/
|
|
101
|
+
class HtmlPaymentSourceWidget extends PaymentSourceWidget {
|
|
102
|
+
/** @constructs */ // constructs added for correct parse classes jsdoc2md
|
|
103
|
+
constructor(selector, publicKey, queryToken) {
|
|
104
|
+
super(publicKey, queryToken);
|
|
105
|
+
this.container = new Container(selector);
|
|
106
|
+
this.iFrame = new IFrame(this.container);
|
|
107
|
+
this.event = new IFrameEvent(window);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* The final method to beginning, the load process of widget to html
|
|
111
|
+
*
|
|
112
|
+
*/
|
|
113
|
+
load() {
|
|
114
|
+
this.iFrame.load(this.getIFrameUrl(), { title: 'Payment Sources' });
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* This callback will be called for each event in payment source widget
|
|
118
|
+
*
|
|
119
|
+
* @callback listener--PaymentSourceWidget
|
|
120
|
+
* @param {IEventData | IEventSelectData | IEventPaginationData | IEventAfterLoadData} response
|
|
121
|
+
*/
|
|
122
|
+
/**
|
|
123
|
+
* Listen to events of widget
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
*
|
|
127
|
+
* widget.on('select', function (data) {
|
|
128
|
+
* console.log(data);
|
|
129
|
+
* });
|
|
130
|
+
* @param {string} eventName - Available event names [EVENT]{@link EVENT}
|
|
131
|
+
* @param {listener--PaymentSourceWidget} cb
|
|
132
|
+
*/
|
|
133
|
+
on(eventName, cb) {
|
|
134
|
+
this.event.on(eventName, this.link.getParams().widget_id, cb);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Using this method you can hide widget after load
|
|
138
|
+
* @param {boolean} [saveSize=false] - using this param you can save iframe's size
|
|
139
|
+
*/
|
|
140
|
+
hide(saveSize) {
|
|
141
|
+
console.info('PayDock SDK');
|
|
142
|
+
this.iFrame.hide(saveSize);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Using this method you can show widget after using hide method
|
|
146
|
+
*
|
|
147
|
+
*/
|
|
148
|
+
show() {
|
|
149
|
+
this.iFrame.show();
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Using this method you can reload widget
|
|
153
|
+
*
|
|
154
|
+
*/
|
|
155
|
+
reload() {
|
|
156
|
+
this.iFrame.remove();
|
|
157
|
+
this.load();
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* After select event of widget, data (dataType) will be insert to input (selector)
|
|
161
|
+
*
|
|
162
|
+
* @param {string} selector - css selector . [] #
|
|
163
|
+
* @param {string} dataType - data type of [IEventSelectData]{@link IEventSelectData}.
|
|
164
|
+
*/
|
|
165
|
+
onSelectInsert(selector, dataType) {
|
|
166
|
+
this.on(EVENT.SELECT, (event) => {
|
|
167
|
+
EventHelper.insertToInput(selector, dataType, event);
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
export { HtmlPaymentSourceWidget };
|
|
172
|
+
//# sourceMappingURL=../../src/lib/payment-source-widget/html-payment-source-widget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-payment-source-widget.js","sourceRoot":"","sources":["../../payment-source-widget/html-payment-source-widget.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAc,KAAK,EAAE,WAAW,EAAC,MAAM,4BAA4B,CAAC;AAC3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B,CAAC;IAGD;;;OAGG;IACI,MAAM;QACT,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACrB,IAAI,CAAC,IAAI,EAAE,CAAC;IAChB,CAAC;IAGD;;;;;OAKG;IACI,cAAc,CAAC,QAAgB,EAAE,QAAgB;QACpD,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,KAAuB,EAAE,EAAE;YAC9C,WAAW,CAAC,aAAa,CAAmB,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;QAC3E,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export { PaymentSourceWidget } from './payment-source-widget';
|
|
2
|
+
export { HtmlPaymentSourceWidget } from './html-payment-source-widget';
|
|
3
|
+
/**
|
|
4
|
+
* Interface for classes that represent widget's styles.
|
|
5
|
+
* @interface IStyles
|
|
6
|
+
*
|
|
7
|
+
* @param {string} [background_color]
|
|
8
|
+
* @param {string} [background_active_color]
|
|
9
|
+
* @param {string} [text_color]
|
|
10
|
+
* @param {string} [border_color]
|
|
11
|
+
* @param {string} [font_size]
|
|
12
|
+
* @param {string} [icon_size]
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* List of available style params for widget
|
|
16
|
+
*
|
|
17
|
+
* @const STYLE
|
|
18
|
+
* @type {object}
|
|
19
|
+
* @param {string} BACKGROUND_COLOR=background_color
|
|
20
|
+
* @param {string} BACKGROUND_ACTIVE_COLOR=background_active_color
|
|
21
|
+
* @param {string} TEXT_COLOR=text_color
|
|
22
|
+
* @param {string} BORDER_COLOR=border_color
|
|
23
|
+
* @param {string} ICON_SIZE=icon_size
|
|
24
|
+
* @param {string} FONT_SIZE=font_size
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* List of available payment source types
|
|
28
|
+
*
|
|
29
|
+
* @const PAYMENT_SOURCE_TYPE
|
|
30
|
+
* @type {object}
|
|
31
|
+
* @param {string} CARD=card
|
|
32
|
+
* @param {string} BANK_ACCOUNT=bank_account
|
|
33
|
+
* @param {string} CHECKOUT=checkout
|
|
34
|
+
*/
|
|
35
|
+
//# sourceMappingURL=../../src/lib/payment-source-widget/index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../payment-source-widget/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAIvE;;;;;;;;;;GAUG;AAIH;;;;;;;;;;;GAWG;AAIH;;;;;;;;GAQG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../payment-source-widget/interfaces.ts"],"names":[],"mappings":"AAWC,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { AccessToken } from './../helper/access-token';
|
|
2
|
+
import { Link, PAYMENT_SOURCE_LINK } from '../components/link';
|
|
3
|
+
import { PAYMENT_SOURCE_TYPE, STYLE } from '../components/param';
|
|
4
|
+
import { ObjectHelper } from '../helper/object';
|
|
5
|
+
import { SDK } from '../configs/sdk';
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* Class PaymentSourceWidget include method for for creating iframe url
|
|
9
|
+
* @constructor
|
|
10
|
+
*
|
|
11
|
+
* @param {string} publicKey - PayDock users public key
|
|
12
|
+
* @param {string} customer - PayDock's customer_id or customer_reference (In order to use the customer_reference, you must explicitly specify useReference as true)
|
|
13
|
+
* @param {boolean} [useReference=false]
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* var widget = new PaymentSourceWidget('publicKey','customerId');
|
|
17
|
+
* // or
|
|
18
|
+
* var widget = new PaymentSourceWidget('publicKey', customerReference, true);
|
|
19
|
+
*/
|
|
20
|
+
class PaymentSourceWidget {
|
|
21
|
+
/** @constructs */ // constructs added for correct parse classes jsdoc2md
|
|
22
|
+
constructor(accessToken, queryToken) {
|
|
23
|
+
this.configs = [];
|
|
24
|
+
this.configTokens = [];
|
|
25
|
+
this.link = new Link(PAYMENT_SOURCE_LINK);
|
|
26
|
+
this.link.setParams(Object.assign({ query_token: queryToken }, (AccessToken.validateJWT(accessToken) ? { access_token: accessToken } : { public_key: accessToken })));
|
|
27
|
+
if (SDK.version) {
|
|
28
|
+
this.link.setParams({
|
|
29
|
+
sdk_version: SDK.version,
|
|
30
|
+
sdk_type: SDK.type,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Object contain styles for widget
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* widget.setStyles({
|
|
39
|
+
* background_color: 'rgb(0, 0, 0)',
|
|
40
|
+
* border_color: 'yellow',
|
|
41
|
+
* text_color: '#FFFFAA',
|
|
42
|
+
* icon_size: 'small',
|
|
43
|
+
* font_size: '20px'
|
|
44
|
+
* });
|
|
45
|
+
* @param {IStyles} fields - name of styles which can be shown in widget [STYLE]{@link STYLE}
|
|
46
|
+
*/
|
|
47
|
+
setStyles(styles) {
|
|
48
|
+
for (let index in styles) {
|
|
49
|
+
if (styles.hasOwnProperty(index))
|
|
50
|
+
this.setStyle(index, styles[index]);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
setStyle(param, value) {
|
|
54
|
+
if (ObjectHelper.values(STYLE).indexOf(param) !== -1)
|
|
55
|
+
this.link.setParams({ [param]: value });
|
|
56
|
+
else
|
|
57
|
+
console.warn(`Widget::setStyle[s: unsupported style param ${param}`);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Current method can set custom ID to identify the data in the future
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* widget.setRefId('id');
|
|
64
|
+
*
|
|
65
|
+
* @param {string} refId - custom id
|
|
66
|
+
*/
|
|
67
|
+
setRefId(refId) {
|
|
68
|
+
this.link.setParams({ ref_id: refId });
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Current method can set limit for payment sources count. In case when limit sets less then general count will be shown pagination buttons prev and next.
|
|
72
|
+
*
|
|
73
|
+
* @param {string} count - payment source count
|
|
74
|
+
*/
|
|
75
|
+
setLimit(count) {
|
|
76
|
+
this.link.setParams({ limit: count });
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Current method can change environment. By default environment = sandbox
|
|
80
|
+
* Also we can change domain alias for this environment. By default domain_alias = paydock.com
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* widget.setEnv('production');
|
|
84
|
+
* @param {string} env - sandbox, production
|
|
85
|
+
* @param {string} [alias] - Own domain alias
|
|
86
|
+
*/
|
|
87
|
+
setEnv(env, alias) {
|
|
88
|
+
this.link.setEnv(env, alias);
|
|
89
|
+
for (let index in this.configs) {
|
|
90
|
+
if (this.configs.hasOwnProperty(index))
|
|
91
|
+
this.configs[index].setEnv(env, alias);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
getEnv() {
|
|
95
|
+
this.link.getEnv();
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Method for getting iframe's url
|
|
99
|
+
*/
|
|
100
|
+
getIFrameUrl() {
|
|
101
|
+
return this.link.getUrl();
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Show payment source inside widget only with requested gateway ids
|
|
105
|
+
*
|
|
106
|
+
*
|
|
107
|
+
* @param {string[]} ids - List of gateway_id
|
|
108
|
+
*/
|
|
109
|
+
filterByGatewayIds(ids) {
|
|
110
|
+
this.link.setParams({ gateway_ids: ids.join(',') });
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* Show payment source inside widget only with requested payment source types
|
|
115
|
+
*
|
|
116
|
+
* @param types - List of payment source types. Available parameters [PAYMENT_TYPE]{@link PAYMENT_TYPE}
|
|
117
|
+
*/
|
|
118
|
+
filterByTypes(types) {
|
|
119
|
+
let supportedTypes = [];
|
|
120
|
+
for (let type of types) {
|
|
121
|
+
if (!types.hasOwnProperty(type))
|
|
122
|
+
continue;
|
|
123
|
+
if (ObjectHelper.values(PAYMENT_SOURCE_TYPE).indexOf(type) === -1)
|
|
124
|
+
console.warn(`PaymentSourceWidget::filterByTypes: unsupported type ${type}`);
|
|
125
|
+
else
|
|
126
|
+
supportedTypes.push(type);
|
|
127
|
+
}
|
|
128
|
+
this.link.setParams({ payment_source_types: supportedTypes.join(',') });
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Method for setting a custom language code
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* config.setLanguage('en');
|
|
135
|
+
* @param {string} code - ISO 639-1
|
|
136
|
+
*/
|
|
137
|
+
setLanguage(code) {
|
|
138
|
+
this.link.setParams({ language: code });
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
export { PaymentSourceWidget };
|
|
142
|
+
//# sourceMappingURL=../../src/lib/payment-source-widget/payment-source-widget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-source-widget.js","sourceRoot":"","sources":["../../payment-source-widget/payment-source-widget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,EAA6B,mBAAmB,EAAE,KAAK,EAAC,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAIrC;;;;;;;;;;;;;GAaG;AACH,MAAM,mBAAmB;IAOrB,kBAAkB,CAAC,sDAAsD;IACzE,YAAY,WAAmB,EAAE,UAAkB;QALzC,YAAO,GAAoB,E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SAAS,CAAC,EAAC,oBAAoB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,EAAC,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;OAMG;IACI,WAAW,CAAC,IAAI;QACnB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAA;IACzC,CAAC;CACJ;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SRC } from './secure-remote-commerce';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../secure-remote-commerce/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of available event's name in the SRC checkout lifecycle
|
|
3
|
+
* @enum EVENT
|
|
4
|
+
*
|
|
5
|
+
* @type {object}
|
|
6
|
+
* @param {string} CHECKOUT_BUTTON_LOADED=checkoutButtonLoaded
|
|
7
|
+
* @param {string} CHECKOUT_BUTTON_CLICKED=checkoutButtonClicked
|
|
8
|
+
* @param {string} IFRAME_LOADED=iframeLoaded
|
|
9
|
+
* @param {string} CHECKOUT_READY=checkoutReady
|
|
10
|
+
* @param {string} CHECKOUT_COMPLETED=checkoutCompleted
|
|
11
|
+
* @param {string} CHECKOUT_ERROR=checkoutError
|
|
12
|
+
*/
|
|
13
|
+
export declare enum EVENT {
|
|
14
|
+
CHECKOUT_BUTTON_LOADED = "checkoutButtonLoaded",
|
|
15
|
+
CHECKOUT_BUTTON_CLICKED = "checkoutButtonClicked",
|
|
16
|
+
IFRAME_LOADED = "iframeLoaded",
|
|
17
|
+
CHECKOUT_READY = "checkoutReady",
|
|
18
|
+
CHECKOUT_COMPLETED = "checkoutCompleted",
|
|
19
|
+
CHECKOUT_ERROR = "checkoutError"
|
|
20
|
+
}
|
|
21
|
+
export interface IVisaSRCMeta {
|
|
22
|
+
srci_transaction_id?: string;
|
|
23
|
+
dpa_data?: {
|
|
24
|
+
dpa_presentation_name?: string;
|
|
25
|
+
dpa_uri?: string;
|
|
26
|
+
};
|
|
27
|
+
dpa_transaction_options?: {
|
|
28
|
+
dpa_locale?: string;
|
|
29
|
+
dpa_accepted_billing_countries?: string[];
|
|
30
|
+
dpa_accepted_shipping_countries?: string[];
|
|
31
|
+
dpa_billing_preference?: DPA_SHIPPING_BILLING_PREFERENCE;
|
|
32
|
+
dpa_shipping_preference?: DPA_SHIPPING_BILLING_PREFERENCE;
|
|
33
|
+
consumer_name_requested?: boolean;
|
|
34
|
+
consumer_email_address_requested?: boolean;
|
|
35
|
+
consumer_phone_number_requested?: boolean;
|
|
36
|
+
payment_options?: {
|
|
37
|
+
dpa_dynamic_data_ttl_minutes?: number;
|
|
38
|
+
dynamic_data_type?: DPA_DYNAMIC_DATA_TYPE;
|
|
39
|
+
dpa_pan_requested?: boolean;
|
|
40
|
+
};
|
|
41
|
+
review_action?: REVIEW_ACTION;
|
|
42
|
+
checkout_description?: string;
|
|
43
|
+
transaction_type?: TRANSACTION_TYPE;
|
|
44
|
+
order_type?: ORDER_TYPE;
|
|
45
|
+
transaction_amount?: {
|
|
46
|
+
transaction_amount?: number;
|
|
47
|
+
transaction_currency_code?: string;
|
|
48
|
+
};
|
|
49
|
+
merchant_order_id?: string;
|
|
50
|
+
merchant_category_code?: string;
|
|
51
|
+
merchant_country_code?: string;
|
|
52
|
+
};
|
|
53
|
+
customizations: IStyles;
|
|
54
|
+
}
|
|
55
|
+
export declare type DPA_SHIPPING_BILLING_PREFERENCE = 'ALL' | 'POSTAL_COUNTRY' | 'NONE';
|
|
56
|
+
export declare type DPA_DYNAMIC_DATA_TYPE = 'TAVV' | 'DTVV';
|
|
57
|
+
export declare type REVIEW_ACTION = 'pay' | 'continue';
|
|
58
|
+
export declare type TRANSACTION_TYPE = 'PURCHASE' | 'BILL_PAYMENT' | 'MONEY_TRANSFER';
|
|
59
|
+
export declare type ORDER_TYPE = 'REAUTHORIZATION' | 'RECURRING' | 'INSTALLMENT';
|
|
60
|
+
export interface IStyles {
|
|
61
|
+
button_text_color?: string;
|
|
62
|
+
primary_color?: string;
|
|
63
|
+
font_family?: string;
|
|
64
|
+
card_schemes?: string[];
|
|
65
|
+
}
|
|
66
|
+
export declare const STYLE: {
|
|
67
|
+
BUTTON_TEXT_COLOR: string;
|
|
68
|
+
PRIMARY_COLOR: string;
|
|
69
|
+
FONT_FAMILY: string;
|
|
70
|
+
CARD_SCHEMES: string;
|
|
71
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of available event's name in the SRC checkout lifecycle
|
|
3
|
+
* @enum EVENT
|
|
4
|
+
*
|
|
5
|
+
* @type {object}
|
|
6
|
+
* @param {string} CHECKOUT_BUTTON_LOADED=checkoutButtonLoaded
|
|
7
|
+
* @param {string} CHECKOUT_BUTTON_CLICKED=checkoutButtonClicked
|
|
8
|
+
* @param {string} IFRAME_LOADED=iframeLoaded
|
|
9
|
+
* @param {string} CHECKOUT_READY=checkoutReady
|
|
10
|
+
* @param {string} CHECKOUT_COMPLETED=checkoutCompleted
|
|
11
|
+
* @param {string} CHECKOUT_ERROR=checkoutError
|
|
12
|
+
*/
|
|
13
|
+
export var EVENT;
|
|
14
|
+
(function (EVENT) {
|
|
15
|
+
EVENT["CHECKOUT_BUTTON_LOADED"] = "checkoutButtonLoaded";
|
|
16
|
+
EVENT["CHECKOUT_BUTTON_CLICKED"] = "checkoutButtonClicked";
|
|
17
|
+
EVENT["IFRAME_LOADED"] = "iframeLoaded";
|
|
18
|
+
EVENT["CHECKOUT_READY"] = "checkoutReady";
|
|
19
|
+
EVENT["CHECKOUT_COMPLETED"] = "checkoutCompleted";
|
|
20
|
+
EVENT["CHECKOUT_ERROR"] = "checkoutError";
|
|
21
|
+
})(EVENT || (EVENT = {}));
|
|
22
|
+
export const STYLE = {
|
|
23
|
+
BUTTON_TEXT_COLOR: 'button_text_color',
|
|
24
|
+
PRIMARY_COLOR: 'primary_color',
|
|
25
|
+
FONT_FAMILY: 'font_family',
|
|
26
|
+
CARD_SCHEMES: 'card_schemes',
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=../../src/lib/secure-remote-commerce/interfaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../secure-remote-commerce/interfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,CAAN,IAAY,KAOX;AAPD,WAAY,KAAK;IACb,wDAA+C,CAAA;IAC/C,0DAAiD,CAAA;IACjD,uCAA8B,CAAA;IAC9B,yCAAgC,CAAA;IAChC,iDAAwC,CAAA;IACxC,yCAAgC,CAAA;AACpC,CAAC,EAPW,KAAK,KAAL,KAAK,QAOhB;AAsDD,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB,iBAAiB,EAAE,mBAAmB;IACtC,aAAa,EAAE,eAAe;IAC9B,WAAW,EAAE,aAAa;IAC1B,YAAY,EAAC,cAAc;CAC9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=../../../src/lib/secure-remote-commerce/providers/src-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"src-provider.js","sourceRoot":"","sources":["../../../secure-remote-commerce/providers/src-provider.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const CARD_SCHEME = {
|
|
2
|
+
VISA: 'visa',
|
|
3
|
+
MASTERCARD: 'mastercard',
|
|
4
|
+
AMEX: 'amex',
|
|
5
|
+
DISCOVER: 'discover',
|
|
6
|
+
};
|
|
7
|
+
const CHEVRON_VMAD_IMG_PATH = '/images/visa-src/Chevron_Large_VMAD.png';
|
|
8
|
+
const CHEVRON_VMA_IMG_PATH = '/images/visa-src/Chevron_Large_VMA.png';
|
|
9
|
+
const CHEVRON_VM_IMG_PATH = '/images/visa-src/Chevron_Large_VM.png';
|
|
10
|
+
const CHEVRON_M_IMG_PATH = '/images/visa-src/Chevron_Large_M.png';
|
|
11
|
+
const CHEVRON_D_IMG_PATH = '/images/visa-src/Chevron_Large_D.png';
|
|
12
|
+
const CHEVRON_V_IMG_PATH = '/images/visa-src/Chevron_Large_V.png';
|
|
13
|
+
const VMAD_IMG_PATH = '/images/visa-src/vmad.svg';
|
|
14
|
+
const VMA_IMG_PATH = '/images/visa-src/logos/Networks_Large_VMA.png';
|
|
15
|
+
const VM_IMG_PATH = '/images/visa-src/logos/Networks_Large_VM.png';
|
|
16
|
+
const M_IMG_PATH = '/images/visa-src/logos/master-logo.png';
|
|
17
|
+
const D_IMG_PATH = '/images/visa-src/logos/Networks_Large_D.png';
|
|
18
|
+
const V_IMG_PATH = '/images/visa-src/logos/visa-logo.png';
|
|
19
|
+
export const GenerateCardSchemesLogo = (card_scheme, chevron = false) => {
|
|
20
|
+
if (!card_scheme || !Array.isArray(card_scheme))
|
|
21
|
+
return chevron ? CHEVRON_VMAD_IMG_PATH : VMAD_IMG_PATH;
|
|
22
|
+
const card_scheme_sort = card_scheme.sort();
|
|
23
|
+
if (includeArray([CARD_SCHEME.AMEX, CARD_SCHEME.MASTERCARD, CARD_SCHEME.VISA], card_scheme_sort))
|
|
24
|
+
return chevron ? CHEVRON_VMA_IMG_PATH : VMA_IMG_PATH;
|
|
25
|
+
if (includeArray([CARD_SCHEME.MASTERCARD, CARD_SCHEME.VISA], card_scheme_sort))
|
|
26
|
+
return chevron ? CHEVRON_VM_IMG_PATH : VM_IMG_PATH;
|
|
27
|
+
if (includeArray([CARD_SCHEME.MASTERCARD], card_scheme_sort))
|
|
28
|
+
return chevron ? CHEVRON_M_IMG_PATH : M_IMG_PATH;
|
|
29
|
+
if (includeArray([CARD_SCHEME.DISCOVER], card_scheme_sort))
|
|
30
|
+
return chevron ? CHEVRON_D_IMG_PATH : D_IMG_PATH;
|
|
31
|
+
if (includeArray([CARD_SCHEME.VISA], card_scheme_sort))
|
|
32
|
+
return chevron ? CHEVRON_V_IMG_PATH : V_IMG_PATH;
|
|
33
|
+
return chevron ? CHEVRON_V_IMG_PATH : VMAD_IMG_PATH;
|
|
34
|
+
};
|
|
35
|
+
const includeArray = (condition, card_scheme) => condition.every((card, index) => card === card_scheme[index]);
|
|
36
|
+
//# sourceMappingURL=../../../../src/lib/secure-remote-commerce/providers/visa-src/helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../../secure-remote-commerce/providers/visa-src/helper.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,YAAY;IACxB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;CACvB,CAAC;AAEF,MAAM,qBAAqB,GAAG,yCAAyC,CAAC;AACxE,MAAM,oBAAoB,GAAG,wCAAwC,CAAC;AACtE,MAAM,mBAAmB,GAAG,uCAAuC,CAAC;AACpE,MAAM,kBAAkB,GAAG,sCAAsC,CAAC;AAClE,MAAM,kBAAkB,GAAG,sCAAsC,CAAC;AAClE,MAAM,kBAAkB,GAAG,sCAAsC,CAAC;AAElE,MAAM,aAAa,GAAG,2BAA2B,CAAC;AAClD,MAAM,YAAY,GAAG,+CAA+C,CAAC;AACrE,MAAM,WAAW,GAAG,8CAA8C,CAAC;AACnE,MAAM,UAAU,GAAG,wCAAwC,CAAC;AAC5D,MAAM,UAAU,GAAG,6CAA6C,CAAC;AACjE,MAAM,UAAU,GAAG,sCAAsC,CAAC;AAE1D,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,WAAqB,EAAE,UAAmB,KAAK,EAAU,EAAE;IAC/F,IAAI,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC;QAC3C,OAAO,OAAO,CA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@@
|
|
|
1
|
+
export { VisaSRC } from './visa-src';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../secure-remote-commerce/providers/visa-src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -4,22 +4,24 @@ import { IFrame } from '../../../components/iframe';
|
|
|
4
4
|
import { IFrameEvent } from '../../../components/iframe-event';
|
|
5
5
|
import { EventEmitter } from "../../../helper/event-emitter";
|
|
6
6
|
import { SRCProvider } from '../src-provider';
|
|
7
|
-
import {
|
|
8
|
-
export declare class
|
|
9
|
-
protected meta:
|
|
7
|
+
import { IVisaSRCMeta } from '../../interfaces';
|
|
8
|
+
export declare class VisaSRC implements SRCProvider {
|
|
9
|
+
protected meta: IVisaSRCMeta;
|
|
10
10
|
protected eventEmitter: EventEmitter;
|
|
11
11
|
protected autoResize: any;
|
|
12
12
|
protected link: Link;
|
|
13
13
|
protected iFrameContainer: Container;
|
|
14
|
+
protected buttonContainer: Container;
|
|
14
15
|
protected iFrame: IFrame;
|
|
15
16
|
protected iFrameEvent: IFrameEvent;
|
|
16
|
-
constructor(iframe_selector: string, service_id: string, public_key: string, meta:
|
|
17
|
+
constructor(button_selector: string, iframe_selector: string, service_id: string, public_key: string, meta: IVisaSRCMeta, eventEmitter: EventEmitter, autoResize: any, env: string, alias: string);
|
|
17
18
|
private setupIFrameEvents;
|
|
18
19
|
load(): void;
|
|
19
20
|
getEnv(): string;
|
|
21
|
+
hideButton(_saveSize: boolean): void;
|
|
22
|
+
showButton(): void;
|
|
20
23
|
hideCheckout(saveSize: boolean): void;
|
|
21
24
|
showCheckout(): void;
|
|
22
25
|
reload(): void;
|
|
23
26
|
useAutoResize(force?: boolean): void;
|
|
24
27
|
}
|
|
25
|
-
//# sourceMappingURL=mastercard-src.d.ts.map
|