@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,60 @@
|
|
|
1
|
+
import { DEFAULT_ENV } from '../configs/env/env';
|
|
2
|
+
import { EventEmitter } from "../helper/event-emitter";
|
|
3
|
+
import { ObjectHelper } from "../helper/object";
|
|
4
|
+
export const WALLET_EVENT = {
|
|
5
|
+
UNAVAILABLE: 'unavailable',
|
|
6
|
+
UPDATE: 'update',
|
|
7
|
+
PAYMENT_METHOD_SELECTED: 'payment_method_selected',
|
|
8
|
+
PAYMENT_SUCCESS: 'payment_success',
|
|
9
|
+
PAYMENT_IN_REVIEW: 'payment_in_review',
|
|
10
|
+
PAYMENT_ERROR: 'payment_error',
|
|
11
|
+
CALLBACK: 'callback',
|
|
12
|
+
AUTH_TOKENS_CHANGED: 'auth_tokens_changed',
|
|
13
|
+
BUTTON_CLICK: 'button_click',
|
|
14
|
+
CHECKOUT_OPEN: 'checkout_open',
|
|
15
|
+
CHECKOUT_CLOSE: 'checkout_close',
|
|
16
|
+
};
|
|
17
|
+
export class WalletService {
|
|
18
|
+
constructor(publicKey, meta) {
|
|
19
|
+
this.publicKey = publicKey;
|
|
20
|
+
this.meta = meta;
|
|
21
|
+
this.env = DEFAULT_ENV;
|
|
22
|
+
this.eventEmitter = new EventEmitter();
|
|
23
|
+
this.initializeChildWallets();
|
|
24
|
+
}
|
|
25
|
+
initializeChildWallets() {
|
|
26
|
+
this.childWallets = [];
|
|
27
|
+
}
|
|
28
|
+
getGatewayName() {
|
|
29
|
+
// required for Google Pay direct integrations
|
|
30
|
+
throw new Error("Method not implemented");
|
|
31
|
+
}
|
|
32
|
+
setEnv(env) {
|
|
33
|
+
this.env = env;
|
|
34
|
+
return this;
|
|
35
|
+
}
|
|
36
|
+
load(container) {
|
|
37
|
+
this.childWallets.forEach((child) => child.load(container));
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
update(data) {
|
|
41
|
+
// do nothing unless current wallet service overrides this method;
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
enable() {
|
|
45
|
+
// do nothing unless current wallet service overrides this method;
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
disable() {
|
|
49
|
+
// do nothing unless current wallet service overrides this method;
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
on(eventName, cb) {
|
|
53
|
+
if (ObjectHelper.values(WALLET_EVENT).indexOf(eventName) === -1)
|
|
54
|
+
throw (new Error("invalid wallet event"));
|
|
55
|
+
if (typeof cb === 'function')
|
|
56
|
+
return this.eventEmitter.subscribe(eventName, cb);
|
|
57
|
+
return new Promise((resolve) => this.eventEmitter.subscribe(eventName, (res) => resolve(res)));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=../../src/lib/wallet-buttons/wallet-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet-service.js","sourceRoot":"","sources":["../../wallet-buttons/wallet-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAY,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAwEhD,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,WAAW,EAAE,aAAa;IAC1B,MAAM,EAAE,QAAQ;IAChB,uBAAuB,EAAE,yBAAyB;IAClD,eAAe,EAAE,iBAAiB;IAClC,iBAAiB,EAAE,mBAAmB;IACtC,aAAa,EAAE,eAAe;IAC9B,QAAQ,EAAE,UAAU;IACpB,mBAAmB,EAAE,qBAAqB;IAC1C,YAAY,EAAE,cAAc;IAC5B,aAAa,EAAE,eAAe;IAC9B,cAAc,EAAE,gBAAgB;CACnC,CAAA;AAuCD,MAAM,OAAgB,aAAa;IAK/B,YAAsB,SAAiB,EAAY,IAAwB;QAArD,cAAS,GAAT,SAAS,CAAQ;QAAY,SAAI,GAAJ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,CAAC;IACnG,CAAC;CACJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IPayPalMeta, IZipmoneyMeta, IAfterpayMeta, IBamboraMeta } from "../components/param";
|
|
2
2
|
/**
|
|
3
3
|
* List of available payment source types
|
|
4
4
|
*
|
|
@@ -158,4 +158,3 @@ declare class Configuration {
|
|
|
158
158
|
setGiftCardSchemeData(giftCardScheme: any, processingNetwork: any): void;
|
|
159
159
|
}
|
|
160
160
|
export { Configuration };
|
|
161
|
-
//# sourceMappingURL=configuration.d.ts.map
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { AccessToken } from './../helper/access-token';
|
|
2
|
+
import { API_URL, Env } from '../configs/env/env';
|
|
3
|
+
import { SDK } from '../configs/sdk';
|
|
4
|
+
import { ObjectHelper } from '../helper/object';
|
|
5
|
+
import { FORM_FIELD, SUPPORTED_CHECKOUT_META_COLLECTION, } from "../components/param";
|
|
6
|
+
/**
|
|
7
|
+
* List of available payment source types
|
|
8
|
+
*
|
|
9
|
+
* @type {object}
|
|
10
|
+
* @param {string} CARD=card
|
|
11
|
+
* @param {string} BANK_ACCOUNT=bank_account
|
|
12
|
+
* @param {string} CHECKOUT=checkout
|
|
13
|
+
*/
|
|
14
|
+
export const PAYMENT_TYPE = {
|
|
15
|
+
CARD: 'card',
|
|
16
|
+
GIFT_CARD: 'gift_card',
|
|
17
|
+
BANK_ACCOUNT: 'bank_account',
|
|
18
|
+
CHECKOUT: 'checkout',
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Purposes
|
|
22
|
+
* @type {object}
|
|
23
|
+
* @param {string} PAYMENT_SOURCE=payment_source
|
|
24
|
+
* @param {string} CARD_PAYMENT_SOURCE_WITH_CVV=card_payment_source_with_cvv
|
|
25
|
+
* @param {string} CARD_PAYMENT_SOURCE_WITHOUT_CVV=card_payment_source_without_cvv
|
|
26
|
+
* */
|
|
27
|
+
export const PURPOSE = {
|
|
28
|
+
PAYMENT_SOURCE: 'payment_source',
|
|
29
|
+
CARD_PAYMENT_SOURCE_WITH_CVV: 'card_payment_source_with_cvv',
|
|
30
|
+
CARD_PAYMENT_SOURCE_WITHOUT_CVV: 'card_payment_source_without_cvv',
|
|
31
|
+
};
|
|
32
|
+
const CONFIGURATION_LINK = '/v1/remote-action/configs';
|
|
33
|
+
/**
|
|
34
|
+
* Class Configuration include methods for creating configuration token
|
|
35
|
+
* @constructor
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* var config = new Configuration('gatewayId'); // short
|
|
39
|
+
*
|
|
40
|
+
* var config = new Configuration('gatewayId', 'bank_account', 'paymentSource'); // extend
|
|
41
|
+
*
|
|
42
|
+
* var config = new Configuration('not_configured'); // without gateway
|
|
43
|
+
*
|
|
44
|
+
* @param {string} [gatewayID=default] - gateway ID. By default or if put 'default', it will use the selected default gateway. If put 'not_configured', it won’t use gateway to create downstream token.
|
|
45
|
+
* @param {string} paymentType - Type of payment source which shows in widget form. Available parameters [PAYMENT_TYPE]{@link PAYMENT_TYPE}
|
|
46
|
+
* @param {string} purpose - Param which describes payment purpose. By default uses Available parameters [PURPOSE]{@link PURPOSE}
|
|
47
|
+
*/
|
|
48
|
+
class Configuration {
|
|
49
|
+
/** @constructs */ // constructs added for correct parse classes jsdoc2md
|
|
50
|
+
constructor(gatewayID = 'default', paymentType = PAYMENT_TYPE.CARD, purpose = PURPOSE.PAYMENT_SOURCE) {
|
|
51
|
+
if (ObjectHelper.values(PAYMENT_TYPE).indexOf(paymentType) === -1)
|
|
52
|
+
throw new Error('unsupported payment type');
|
|
53
|
+
else if (paymentType === PAYMENT_TYPE.CHECKOUT)
|
|
54
|
+
throw new Error('Payment type "checkout" is deprecated. Use CheckoutButton for this type of payments https://www.npmjs.com/package/@paydock/client-sdk#checkout-button');
|
|
55
|
+
if (ObjectHelper.values(PURPOSE).indexOf(purpose) === -1)
|
|
56
|
+
throw new Error('unsupported purpose');
|
|
57
|
+
this.env = new Env(API_URL);
|
|
58
|
+
this.configs = {
|
|
59
|
+
purpose: purpose,
|
|
60
|
+
meta: {},
|
|
61
|
+
dynamic_fields_position: true,
|
|
62
|
+
predefined_fields: {
|
|
63
|
+
gateway_id: gatewayID,
|
|
64
|
+
type: paymentType,
|
|
65
|
+
card_scheme: null,
|
|
66
|
+
card_processing_network: null,
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
static createEachToken(accessToken, configs, cb, errorCb = (errors) => { }) {
|
|
71
|
+
let tokens = new Array(configs.length);
|
|
72
|
+
let errors = [];
|
|
73
|
+
let counter = 0;
|
|
74
|
+
for (let index in configs) {
|
|
75
|
+
if (configs.hasOwnProperty(index))
|
|
76
|
+
configs[index].createToken(accessToken, (token) => {
|
|
77
|
+
tokens[index] = token;
|
|
78
|
+
counter++;
|
|
79
|
+
if (configs.length === counter)
|
|
80
|
+
Configuration.finishCreatingEachToken(tokens, errors, cb, errorCb);
|
|
81
|
+
}, (err) => {
|
|
82
|
+
errors.push(`gateway: ${configs[index].getConfigs().predefined_fields.gateway_id} | ${err}`);
|
|
83
|
+
counter++;
|
|
84
|
+
if (configs.length === counter)
|
|
85
|
+
Configuration.finishCreatingEachToken(tokens, errors, cb, errorCb);
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
static finishCreatingEachToken(tokens, errors, cb, errorCb) {
|
|
90
|
+
if (errors.length >= 1)
|
|
91
|
+
errorCb(errors);
|
|
92
|
+
else
|
|
93
|
+
cb(tokens);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Destination, where customer will receive all successful responses.
|
|
97
|
+
* Response will contain “data” object with “payment_source” or other parameters, in depending on 'purpose'
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* config.setWebHookDestination('http://google.com');
|
|
101
|
+
*
|
|
102
|
+
* @param {string} url - Your endpoint for post request.
|
|
103
|
+
*/
|
|
104
|
+
setWebHookDestination(url) {
|
|
105
|
+
this.configs.webhook_destination = url;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* URL to which the Customer will be redirected to after the success finish
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* config.setSuccessRedirectUrl('google.com/search?q=success');
|
|
112
|
+
*
|
|
113
|
+
* @param {string} url
|
|
114
|
+
*/
|
|
115
|
+
setSuccessRedirectUrl(url) {
|
|
116
|
+
this.configs.success_redirect_url = url;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* URL to which the Customer will be redirected to if an error is triggered in the process of operation
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* config.setErrorRedirectUrl('google.com/search?q=error');
|
|
123
|
+
*
|
|
124
|
+
* @param {string} url
|
|
125
|
+
*/
|
|
126
|
+
setErrorRedirectUrl(url) {
|
|
127
|
+
this.configs.error_redirect_url = url;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Set list with widget form field, which will be shown in form. Also you can set the required validation for these fields
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* config.setFormFields(['phone', 'email', 'first_name*']);
|
|
134
|
+
*
|
|
135
|
+
* @param {string[]} fields - name of fields which can be shown in a widget.
|
|
136
|
+
* If after a name of a field, you put “*”, this field will be required on client-side.
|
|
137
|
+
* (For validation, you can specify any fields, even those that are shown by default: card_number, expiration, etc... ) [FORM_FIELD]{@link FORM_FIELD}
|
|
138
|
+
*/
|
|
139
|
+
setFormFields(fields) {
|
|
140
|
+
if (!Array.isArray(this.configs.defined_form_fields))
|
|
141
|
+
this.configs.defined_form_fields = [];
|
|
142
|
+
for (let index in fields) {
|
|
143
|
+
if (!fields.hasOwnProperty(index))
|
|
144
|
+
continue;
|
|
145
|
+
if (ObjectHelper.values(FORM_FIELD).indexOf(fields[index].replace('*', '')) !== -1)
|
|
146
|
+
this.configs.defined_form_fields.push(fields[index]);
|
|
147
|
+
else
|
|
148
|
+
console.warn(`Configuration::setFormFields: unsupported form field ${fields[index]}`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Method for setting meta information for checkout page
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* config.setMeta({
|
|
156
|
+
brand_name: 'paydock',
|
|
157
|
+
reference: '15',
|
|
158
|
+
email: 'wault@paydock.com'
|
|
159
|
+
});
|
|
160
|
+
*
|
|
161
|
+
* @param {IPayPalMeta | IZipmoneyMeta | IAfterpayMeta | IBamboraMeta} object -
|
|
162
|
+
* data which can be shown on checkout page [IPayPalMeta]{@link IPayPalMeta} [IZipmoneyMeta]{@link IZipmoneyMeta} [IAfterpayMeta]{@link IAfterpayMeta} [IBamboraMeta]{@link IBamboraMeta}
|
|
163
|
+
*/
|
|
164
|
+
setMeta(meta) {
|
|
165
|
+
for (let key in meta) {
|
|
166
|
+
if (!meta.hasOwnProperty(key))
|
|
167
|
+
continue;
|
|
168
|
+
if (SUPPORTED_CHECKOUT_META_COLLECTION.indexOf(key) !== -1)
|
|
169
|
+
this.configs.meta[key] = meta[key];
|
|
170
|
+
else
|
|
171
|
+
console.warn(`Configuration::setMeta: unsupported meta key ${key}`);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Current method can change environment. By default environment = sandbox.
|
|
176
|
+
* Also we can change domain alias for this environment. By default domain_alias = paydock.com
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* config.setEnv('production');
|
|
180
|
+
* @param {string} env - sandbox, production
|
|
181
|
+
* @param {string} [alias] - Own domain alias
|
|
182
|
+
*/
|
|
183
|
+
setEnv(env, alias) {
|
|
184
|
+
this.env.setEnv(env, alias);
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Title for tab which can be set instead of default
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* config.setLabel('custom label');
|
|
191
|
+
*
|
|
192
|
+
* @param {string} label - Text label for tab
|
|
193
|
+
*/
|
|
194
|
+
setLabel(label) {
|
|
195
|
+
this.configs.label = label;
|
|
196
|
+
}
|
|
197
|
+
getEnv() {
|
|
198
|
+
return this.env.getEnv();
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* createToken - method which exactly create payment one time token
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* config.createToken('582035346f65cdd57ee81192d6e5w65w4e5',
|
|
205
|
+
* function (data) {
|
|
206
|
+
* console.log(data);
|
|
207
|
+
* }, function (error) {
|
|
208
|
+
* console.log(error);
|
|
209
|
+
* });
|
|
210
|
+
*
|
|
211
|
+
* @param {string} accessToken - Customer access token or public key which provided for each client
|
|
212
|
+
* @param {createToken~requestCallback} cb - The callback that handles the success response.
|
|
213
|
+
* @param {createToken~requestCallback} errorCb - The callback that handles the failed response.
|
|
214
|
+
*/
|
|
215
|
+
createToken(accessToken, cb, errorCb = (err) => { }) {
|
|
216
|
+
this.send(accessToken, (data, status) => {
|
|
217
|
+
if (status >= 200 && status < 300)
|
|
218
|
+
return cb(data.resource.data.configuration_token);
|
|
219
|
+
if (typeof data.error === "undefined" || typeof data.error.message === "undefined")
|
|
220
|
+
errorCb('unknown error');
|
|
221
|
+
else
|
|
222
|
+
errorCb(data.error.message);
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
send(accessToken, cb) {
|
|
226
|
+
let request = new XMLHttpRequest();
|
|
227
|
+
request.open('POST', this.getUrl(), true);
|
|
228
|
+
request.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');
|
|
229
|
+
request.setRequestHeader(AccessToken.getAccessHeaderNameByToken(accessToken), accessToken);
|
|
230
|
+
if (SDK.version) {
|
|
231
|
+
request.setRequestHeader(SDK.headerKeys.version, SDK.version);
|
|
232
|
+
request.setRequestHeader(SDK.headerKeys.type, SDK.type);
|
|
233
|
+
}
|
|
234
|
+
request.send(JSON.stringify(this.getConfigs()));
|
|
235
|
+
request.onload = () => {
|
|
236
|
+
let res = {};
|
|
237
|
+
try {
|
|
238
|
+
res = JSON.parse(request.responseText);
|
|
239
|
+
}
|
|
240
|
+
catch (e) { }
|
|
241
|
+
cb(res, request.status);
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
getConfigs() {
|
|
245
|
+
return this.configs;
|
|
246
|
+
}
|
|
247
|
+
getUrl() {
|
|
248
|
+
return this.env.getConf().url + CONFIGURATION_LINK;
|
|
249
|
+
}
|
|
250
|
+
setGiftCardSchemeData(giftCardScheme, processingNetwork) {
|
|
251
|
+
if (this.configs.predefined_fields.type !== PAYMENT_TYPE.GIFT_CARD)
|
|
252
|
+
throw new Error('unsupported payment type');
|
|
253
|
+
if (!giftCardScheme || !processingNetwork)
|
|
254
|
+
throw new Error('');
|
|
255
|
+
this.configs.predefined_fields.card_scheme = giftCardScheme;
|
|
256
|
+
this.configs.predefined_fields.card_processing_network = processingNetwork;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
export { Configuration };
|
|
260
|
+
//# sourceMappingURL=../../src/lib/widget/configuration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../widget/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,GAAG,EAAO,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACH,UAAU,EAA6C,kCAAkC,GAE5F,MAAM,qBAAqB,CAAC;AAG7B;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,WAAW;IACtB,YAAY,EAAE,cAAc;IAC5B,QAAQ,EAAE,UAAU;CACvB,CAAA;AAED;;;;;;KAMK;AACL,MAAM,CAAC,MAAM,OAAO,GAAG;IACnB,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
|
|
1
1
|
import { MultiWidget } from "./multi-widget";
|
|
2
2
|
import { Container } from "../components/container";
|
|
3
3
|
import { IFrame } from "../components/iframe";
|
|
4
|
-
import { IFrameEvent,
|
|
5
|
-
import { Trigger,
|
|
6
|
-
import {
|
|
4
|
+
import { IFrameEvent, IEventData } from "../components/iframe-event";
|
|
5
|
+
import { Trigger, ITriggerData } from "../components/trigger";
|
|
6
|
+
import { IFormValidation, IFormValues, ValidatorFieldsMapKey } from '../components/param';
|
|
7
7
|
export interface IEventMetaData extends IEventData {
|
|
8
8
|
configuration_token: string;
|
|
9
9
|
type: string;
|
|
@@ -334,4 +334,3 @@ declare class HtmlMultiWidget extends MultiWidget {
|
|
|
334
334
|
useAutoResize(): void;
|
|
335
335
|
}
|
|
336
336
|
export { HtmlMultiWidget };
|
|
337
|
-
//# sourceMappingURL=html-multi-widget.d.ts.map
|