@paydock/client-sdk 1.103.1 → 1.104.1-beta
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/README.md +102 -104
- package/bundles/index.cjs +10674 -0
- package/bundles/index.cjs.d.ts +3163 -0
- package/bundles/index.cjs.map +1 -0
- package/bundles/index.mjs +10642 -0
- package/bundles/index.mjs.d.ts +3163 -0
- package/bundles/index.mjs.map +1 -0
- package/{lib → bundles/types}/api/api-base.d.ts +2 -1
- package/bundles/types/api/api-base.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api-charge-internal.d.ts +1 -0
- package/bundles/types/api/api-charge-internal.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api-charge.d.ts +1 -0
- package/bundles/types/api/api-charge.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api-internal.d.ts +1 -0
- package/bundles/types/api/api-internal.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api-service-internal.d.ts +1 -0
- package/bundles/types/api/api-service-internal.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api.d.ts +1 -0
- package/bundles/types/api/api.d.ts.map +1 -0
- package/bundles/types/api/index.d.ts +2 -0
- package/bundles/types/api/index.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/canvas-3ds.d.ts +1 -0
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/index.d.ts +1 -0
- package/bundles/types/canvas-3ds/index.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/services/gpayments-service.d.ts +1 -0
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/services/index.d.ts +1 -0
- package/bundles/types/canvas-3ds/services/index.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/services/standalone3ds-service.d.ts +1 -0
- package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -0
- package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/afterpay/afterpay.runner.d.ts +1 -0
- package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/checkout-button.d.ts +1 -0
- package/bundles/types/checkout-button/checkout-button.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/checkout-button.interface.d.ts +1 -0
- package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/checkout-contextual-handler.d.ts +1 -0
- package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/index.d.ts +2 -1
- package/bundles/types/checkout-button/index.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/paypal/paypal-checkout-button.d.ts +1 -0
- package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/paypal/paypal.runner.d.ts +1 -0
- package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/base.runner.d.ts +4 -3
- package/bundles/types/checkout-button/runner/base.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/contextual.runner.d.ts +2 -1
- package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/index.d.ts +1 -0
- package/bundles/types/checkout-button/runner/index.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/popup.runner.d.ts +2 -1
- package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/redirect.runner.d.ts +2 -1
- package/bundles/types/checkout-button/runner/redirect.runner.d.ts.map +1 -0
- package/bundles/types/checkout-button/zipmoney/index.d.ts +4 -0
- package/bundles/types/checkout-button/zipmoney/index.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +2 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +2 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.config.d.ts +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.runner.d.ts +2 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.types.d.ts +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +1 -0
- package/{lib → bundles/types}/components/ability-guard.d.ts +1 -0
- package/bundles/types/components/ability-guard.d.ts.map +1 -0
- package/{lib → bundles/types}/components/background.d.ts +1 -0
- package/bundles/types/components/background.d.ts.map +1 -0
- package/{lib → bundles/types}/components/container.d.ts +1 -0
- package/bundles/types/components/container.d.ts.map +1 -0
- package/{lib → bundles/types}/components/dispatcher.d.ts +2 -1
- package/bundles/types/components/dispatcher.d.ts.map +1 -0
- package/{lib → bundles/types}/components/element-style.d.ts +2 -1
- package/bundles/types/components/element-style.d.ts.map +1 -0
- package/{lib → bundles/types}/components/flypay-iframe-event.d.ts +1 -0
- package/bundles/types/components/flypay-iframe-event.d.ts.map +1 -0
- package/{lib → bundles/types}/components/form-Interceptor.d.ts +1 -0
- package/bundles/types/components/form-Interceptor.d.ts.map +1 -0
- package/{lib → bundles/types}/components/http-core.d.ts +1 -0
- package/bundles/types/components/http-core.d.ts.map +1 -0
- package/{lib → bundles/types}/components/iframe-event.d.ts +2 -0
- package/bundles/types/components/iframe-event.d.ts.map +1 -0
- package/{lib → bundles/types}/components/iframe.d.ts +1 -0
- package/bundles/types/components/iframe.d.ts.map +1 -0
- package/{lib → bundles/types}/components/link.d.ts +2 -1
- package/bundles/types/components/link.d.ts.map +1 -0
- package/{lib → bundles/types}/components/loader.d.ts +1 -0
- package/bundles/types/components/loader.d.ts.map +1 -0
- package/{lib → bundles/types}/components/param.d.ts +6 -5
- package/bundles/types/components/param.d.ts.map +1 -0
- package/{lib → bundles/types}/components/popup.d.ts +1 -0
- package/bundles/types/components/popup.d.ts.map +1 -0
- package/{lib → bundles/types}/components/storage-dispatcher.d.ts +1 -0
- package/bundles/types/components/storage-dispatcher.d.ts.map +1 -0
- package/{lib → bundles/types}/components/trigger.d.ts +1 -0
- package/bundles/types/components/trigger.d.ts.map +1 -0
- package/{lib → bundles/types}/components/vault-display-iframe-event.d.ts +1 -0
- package/bundles/types/components/vault-display-iframe-event.d.ts.map +1 -0
- package/{lib → bundles/types}/components/wallet-background.d.ts +1 -0
- package/bundles/types/components/wallet-background.d.ts.map +1 -0
- package/{lib → bundles/types}/components/wallet-trigger.d.ts +1 -0
- package/bundles/types/components/wallet-trigger.d.ts.map +1 -0
- package/bundles/types/configs/env/environment.cba.d.ts +29 -0
- package/bundles/types/configs/env/environment.cba.d.ts.map +1 -0
- package/bundles/types/configs/env/environment.interface.d.ts +12 -0
- package/bundles/types/configs/env/environment.interface.d.ts.map +1 -0
- package/{lib/configs/env/env.d.ts → bundles/types/configs/env/environment.paydock.d.ts} +5 -8
- package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -0
- package/bundles/types/configs/env/index.d.ts +3 -0
- package/bundles/types/configs/env/index.d.ts.map +1 -0
- package/{lib → bundles/types}/configs/sdk.d.ts +3 -2
- package/bundles/types/configs/sdk.d.ts.map +1 -0
- package/{lib → bundles/types}/external-checkout/builder.d.ts +1 -0
- package/bundles/types/external-checkout/builder.d.ts.map +1 -0
- package/{lib → bundles/types}/external-checkout/checker.d.ts +1 -0
- package/bundles/types/external-checkout/checker.d.ts.map +1 -0
- package/bundles/types/external-checkout/index.d.ts +3 -0
- package/bundles/types/external-checkout/index.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/access-token.d.ts +1 -0
- package/bundles/types/helper/access-token.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/browser.d.ts +1 -0
- package/bundles/types/helper/browser.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/event-emitter.d.ts +1 -0
- package/bundles/types/helper/event-emitter.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/event.d.ts +1 -0
- package/bundles/types/helper/event.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/ms.d.ts +1 -0
- package/bundles/types/helper/ms.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/object.d.ts +1 -0
- package/bundles/types/helper/object.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/url.d.ts +1 -0
- package/bundles/types/helper/url.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/uuid.d.ts +1 -0
- package/bundles/types/helper/uuid.d.ts.map +1 -0
- package/bundles/types/index-cba.d.ts +13 -0
- package/bundles/types/index-cba.d.ts.map +1 -0
- package/bundles/types/index.d.ts +14 -0
- package/bundles/types/index.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source/builder.d.ts +1 -0
- package/bundles/types/payment-source/builder.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source/index.d.ts +1 -0
- package/bundles/types/payment-source/index.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source-widget/html-payment-source-widget.d.ts +1 -0
- package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source-widget/index.d.ts +1 -0
- package/bundles/types/payment-source-widget/index.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source-widget/interfaces.d.ts +1 -0
- package/bundles/types/payment-source-widget/interfaces.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source-widget/payment-source-widget.d.ts +1 -0
- package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/index.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/interfaces.d.ts +6 -5
- package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/src-provider.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/helper.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/index.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/visa-src.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/secure-remote-commerce.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +1 -0
- package/{lib → bundles/types}/vault-display-widget/index.d.ts +1 -0
- package/bundles/types/vault-display-widget/index.d.ts.map +1 -0
- package/{lib → bundles/types}/vault-display-widget/vault-display-widget.d.ts +1 -0
- package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/afterpay.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/apple.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/flypay-v2.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/flypay.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/google.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/index-cba.d.ts +2 -0
- package/bundles/types/wallet-buttons/index-cba.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/index.d.ts +1 -0
- package/bundles/types/wallet-buttons/index.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/interfaces.d.ts +1 -0
- package/bundles/types/wallet-buttons/interfaces.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/mastercard.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/paypal.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/stripe.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/wallet-buttons.d.ts +1 -0
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts +330 -0
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/configuration.d.ts +2 -1
- package/bundles/types/widget/configuration.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/html-multi-widget.d.ts +1 -0
- package/bundles/types/widget/html-multi-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/html-widget.d.ts +1 -0
- package/bundles/types/widget/html-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/index.d.ts +2 -1
- package/bundles/types/widget/index.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/meta.d.ts +1 -0
- package/bundles/types/widget/meta.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/multi-widget.d.ts +2 -1
- package/bundles/types/widget/multi-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/style.d.ts +1 -0
- package/bundles/types/widget/style.d.ts.map +1 -0
- package/bundles/widget.umd.js +6813 -6963
- package/bundles/widget.umd.js.d.ts +3163 -0
- package/bundles/widget.umd.js.map +1 -0
- package/bundles/widget.umd.js.min.d.ts +3163 -0
- package/bundles/widget.umd.min.js +2 -1
- package/bundles/widget.umd.min.js.map +1 -0
- package/docs/api-canvas3ds.md +158 -0
- package/docs/api-checkout-button.md +912 -0
- package/docs/api-examples.md +65 -0
- package/docs/api-ps-widget.md +585 -0
- package/docs/api-vault-display.md +94 -0
- package/docs/api-widget.md +2444 -0
- package/docs/api-wrapper.md +78 -0
- package/docs/canvas3ds-examples.md +242 -0
- package/docs/cba-header.md +13 -0
- package/docs/cba-license.md +2 -0
- package/docs/checkout-examples.md +248 -0
- package/docs/header.md +15 -0
- package/docs/html/layout.html +78 -0
- package/docs/html/marked.js +23 -0
- package/docs/html/style.css +365 -0
- package/docs/install/npm.content.md +16 -0
- package/docs/install/npm.example.md +24 -0
- package/docs/install/umd.content.md +21 -0
- package/docs/install/umd.example.md +6 -0
- package/docs/install.md +53 -0
- package/docs/install.readme.t.md +17 -0
- package/docs/install.slate.t.md +17 -0
- package/docs/license.md +2 -0
- package/docs/partials/header.hbs +3 -0
- package/docs/ps-examples.md +129 -0
- package/docs/secure-remote-commerce-examples.md +258 -0
- package/docs/secure-remote-commerce.md +265 -0
- package/docs/vault-display-example.md +132 -0
- package/docs/wallet-buttons-examples.md +580 -0
- package/docs/wallet-buttons.md +424 -0
- package/docs/wallet-cba-buttons-examples.md +388 -0
- package/docs/widget-examples.md +134 -0
- package/package.json +164 -42
- package/slate.md +89 -88
- package/.nvmrc +0 -1
- package/api.d.ts +0 -1
- package/api.js +0 -1
- package/canvas3ds.d.ts +0 -1
- package/canvas3ds.js +0 -1
- package/checkout-button.d.ts +0 -1
- package/checkout-button.js +0 -1
- package/inicialization-guide.md +0 -7
- package/lib/api/api-base.js +0 -101
- package/lib/api/api-base.js.map +0 -1
- package/lib/api/api-charge-internal.js +0 -30
- package/lib/api/api-charge-internal.js.map +0 -1
- package/lib/api/api-charge.js +0 -49
- package/lib/api/api-charge.js.map +0 -1
- package/lib/api/api-internal.js +0 -13
- package/lib/api/api-internal.js.map +0 -1
- package/lib/api/api-service-internal.js +0 -18
- package/lib/api/api-service-internal.js.map +0 -1
- package/lib/api/api.js +0 -61
- package/lib/api/api.js.map +0 -1
- package/lib/api/index.d.ts +0 -1
- package/lib/api/index.js +0 -2
- package/lib/api/index.js.map +0 -1
- package/lib/canvas-3ds/canvas-3ds.js +0 -156
- package/lib/canvas-3ds/canvas-3ds.js.map +0 -1
- package/lib/canvas-3ds/index.js +0 -2
- package/lib/canvas-3ds/index.js.map +0 -1
- package/lib/canvas-3ds/services/gpayments-service.js +0 -181
- package/lib/canvas-3ds/services/gpayments-service.js.map +0 -1
- package/lib/canvas-3ds/services/index.js +0 -2
- package/lib/canvas-3ds/services/index.js.map +0 -1
- package/lib/canvas-3ds/services/standalone3ds-service.js +0 -32
- package/lib/canvas-3ds/services/standalone3ds-service.js.map +0 -1
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js +0 -49
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +0 -1
- package/lib/checkout-button/afterpay/afterpay.runner.js +0 -41
- package/lib/checkout-button/afterpay/afterpay.runner.js.map +0 -1
- package/lib/checkout-button/checkout-button.interface.js +0 -45
- package/lib/checkout-button/checkout-button.interface.js.map +0 -1
- package/lib/checkout-button/checkout-button.js +0 -265
- package/lib/checkout-button/checkout-button.js.map +0 -1
- package/lib/checkout-button/checkout-contextual-handler.js +0 -75
- package/lib/checkout-button/checkout-contextual-handler.js.map +0 -1
- package/lib/checkout-button/index.js +0 -85
- package/lib/checkout-button/index.js.map +0 -1
- package/lib/checkout-button/paypal/paypal-checkout-button.js +0 -24
- package/lib/checkout-button/paypal/paypal-checkout-button.js.map +0 -1
- package/lib/checkout-button/paypal/paypal.runner.js +0 -14
- package/lib/checkout-button/paypal/paypal.runner.js.map +0 -1
- package/lib/checkout-button/runner/base.runner.js +0 -13
- package/lib/checkout-button/runner/base.runner.js.map +0 -1
- package/lib/checkout-button/runner/contextual.runner.js +0 -40
- package/lib/checkout-button/runner/contextual.runner.js.map +0 -1
- package/lib/checkout-button/runner/index.js +0 -11
- package/lib/checkout-button/runner/index.js.map +0 -1
- package/lib/checkout-button/runner/popup.runner.js +0 -68
- package/lib/checkout-button/runner/popup.runner.js.map +0 -1
- package/lib/checkout-button/runner/redirect.runner.js +0 -15
- package/lib/checkout-button/runner/redirect.runner.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +0 -63
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js +0 -78
- package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js +0 -49
- package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.config.js +0 -4
- package/lib/checkout-button/zipmoney/zipmoney.config.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.runner.js +0 -23
- package/lib/checkout-button/zipmoney/zipmoney.runner.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.types.js +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.types.js.map +0 -1
- package/lib/components/ability-guard.js +0 -44
- package/lib/components/ability-guard.js.map +0 -1
- package/lib/components/background.js +0 -193
- package/lib/components/background.js.map +0 -1
- package/lib/components/container.js +0 -60
- package/lib/components/container.js.map +0 -1
- package/lib/components/dispatcher.js +0 -39
- package/lib/components/dispatcher.js.map +0 -1
- package/lib/components/element-style.js +0 -52
- package/lib/components/element-style.js.map +0 -1
- package/lib/components/flypay-iframe-event.js +0 -28
- package/lib/components/flypay-iframe-event.js.map +0 -1
- package/lib/components/form-Interceptor.js +0 -38
- package/lib/components/form-Interceptor.js.map +0 -1
- package/lib/components/http-core.js +0 -57
- package/lib/components/http-core.js.map +0 -1
- package/lib/components/iframe-event.js +0 -84
- package/lib/components/iframe-event.js.map +0 -1
- package/lib/components/iframe.js +0 -62
- package/lib/components/iframe.js.map +0 -1
- package/lib/components/link.js +0 -59
- package/lib/components/link.js.map +0 -1
- package/lib/components/loader.js +0 -234
- package/lib/components/loader.js.map +0 -1
- package/lib/components/param.js +0 -147
- package/lib/components/param.js.map +0 -1
- package/lib/components/popup.js +0 -104
- package/lib/components/popup.js.map +0 -1
- package/lib/components/storage-dispatcher.js +0 -75
- package/lib/components/storage-dispatcher.js.map +0 -1
- package/lib/components/trigger.js +0 -49
- package/lib/components/trigger.js.map +0 -1
- package/lib/components/vault-display-iframe-event.js +0 -27
- package/lib/components/vault-display-iframe-event.js.map +0 -1
- package/lib/components/wallet-background.js +0 -60
- package/lib/components/wallet-background.js.map +0 -1
- package/lib/components/wallet-trigger.js +0 -27
- package/lib/components/wallet-trigger.js.map +0 -1
- package/lib/configs/env/env.js +0 -117
- package/lib/configs/env/env.js.map +0 -1
- package/lib/configs/sdk.js +0 -16
- package/lib/configs/sdk.js.map +0 -1
- package/lib/external-checkout/builder.js +0 -45
- package/lib/external-checkout/builder.js.map +0 -1
- package/lib/external-checkout/checker.js +0 -22
- package/lib/external-checkout/checker.js.map +0 -1
- package/lib/external-checkout/index.d.ts +0 -2
- package/lib/external-checkout/index.js +0 -3
- package/lib/external-checkout/index.js.map +0 -1
- package/lib/helper/access-token.js +0 -44
- package/lib/helper/access-token.js.map +0 -1
- package/lib/helper/browser.js +0 -79
- package/lib/helper/browser.js.map +0 -1
- package/lib/helper/event-emitter.js +0 -23
- package/lib/helper/event-emitter.js.map +0 -1
- package/lib/helper/event.js +0 -23
- package/lib/helper/event.js.map +0 -1
- package/lib/helper/ms.js +0 -32
- package/lib/helper/ms.js.map +0 -1
- package/lib/helper/object.js +0 -6
- package/lib/helper/object.js.map +0 -1
- package/lib/helper/url.js +0 -11
- package/lib/helper/url.js.map +0 -1
- package/lib/helper/uuid.js +0 -26
- package/lib/helper/uuid.js.map +0 -1
- package/lib/index.d.ts +0 -15
- package/lib/index.js +0 -15
- package/lib/index.js.map +0 -1
- package/lib/payment-source/builder.js +0 -49
- package/lib/payment-source/builder.js.map +0 -1
- package/lib/payment-source/index.js +0 -2
- package/lib/payment-source/index.js.map +0 -1
- package/lib/payment-source-widget/html-payment-source-widget.js +0 -167
- package/lib/payment-source-widget/html-payment-source-widget.js.map +0 -1
- package/lib/payment-source-widget/index.js +0 -35
- package/lib/payment-source-widget/index.js.map +0 -1
- package/lib/payment-source-widget/interfaces.js +0 -2
- package/lib/payment-source-widget/interfaces.js.map +0 -1
- package/lib/payment-source-widget/payment-source-widget.js +0 -141
- package/lib/payment-source-widget/payment-source-widget.js.map +0 -1
- package/lib/secure-remote-commerce/index.js +0 -2
- package/lib/secure-remote-commerce/index.js.map +0 -1
- package/lib/secure-remote-commerce/interfaces.js +0 -28
- package/lib/secure-remote-commerce/interfaces.js.map +0 -1
- package/lib/secure-remote-commerce/providers/src-provider.js +0 -1
- package/lib/secure-remote-commerce/providers/src-provider.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/helper.js +0 -36
- package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/index.js +0 -2
- package/lib/secure-remote-commerce/providers/visa-src/index.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +0 -113
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +0 -10
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +0 -1
- package/lib/secure-remote-commerce/secure-remote-commerce.js +0 -238
- package/lib/secure-remote-commerce/secure-remote-commerce.js.map +0 -1
- package/lib/vault-display-widget/index.js +0 -14
- package/lib/vault-display-widget/index.js.map +0 -1
- package/lib/vault-display-widget/vault-display-widget.js +0 -98
- package/lib/vault-display-widget/vault-display-widget.js.map +0 -1
- package/lib/wallet-buttons/afterpay.wallet-service.js +0 -152
- package/lib/wallet-buttons/afterpay.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/apple.wallet-service.js +0 -291
- package/lib/wallet-buttons/apple.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/flypay-v2.wallet-service.js +0 -192
- package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/flypay.wallet-service.js +0 -117
- package/lib/wallet-buttons/flypay.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/google.wallet-service.js +0 -268
- package/lib/wallet-buttons/google.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/index.js +0 -2
- package/lib/wallet-buttons/index.js.map +0 -1
- package/lib/wallet-buttons/interfaces.js +0 -1
- package/lib/wallet-buttons/interfaces.js.map +0 -1
- package/lib/wallet-buttons/mastercard.wallet-service.js +0 -27
- package/lib/wallet-buttons/mastercard.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/paypal.wallet-service.js +0 -129
- package/lib/wallet-buttons/paypal.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/stripe.wallet-service.js +0 -100
- package/lib/wallet-buttons/stripe.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/wallet-buttons.js +0 -454
- package/lib/wallet-buttons/wallet-buttons.js.map +0 -1
- package/lib/wallet-buttons/wallet-service.js +0 -49
- package/lib/wallet-buttons/wallet-service.js.map +0 -1
- package/lib/widget/configuration.js +0 -259
- package/lib/widget/configuration.js.map +0 -1
- package/lib/widget/html-multi-widget.js +0 -380
- package/lib/widget/html-multi-widget.js.map +0 -1
- package/lib/widget/html-widget.js +0 -126
- package/lib/widget/html-widget.js.map +0 -1
- package/lib/widget/index.js +0 -132
- package/lib/widget/index.js.map +0 -1
- package/lib/widget/meta.js +0 -8
- package/lib/widget/meta.js.map +0 -1
- package/lib/widget/multi-widget.js +0 -436
- package/lib/widget/multi-widget.js.map +0 -1
- package/lib/widget/style.js +0 -204
- package/lib/widget/style.js.map +0 -1
- package/payment-source-widget.d.ts +0 -1
- package/payment-source-widget.js +0 -1
- package/tslint.json +0 -130
- package/typings/globals/@auspayplus/open-payments-checkout/index.d.ts +0 -43
- package/typings/globals/jasmine/index.d.ts +0 -576
- package/typings/globals/jasmine-ajax/index.d.ts +0 -83
- package/typings/globals/jquery/index.d.ts +0 -3759
- package/typings/index.d.ts +0 -4
- package/vault-display-widget.d.ts +0 -1
- package/vault-display-widget.js +0 -1
- package/vendors/zipmoney.d.ts +0 -18
- package/vendors/zipmoney.js +0 -2
- package/widget.d.ts +0 -1
- package/widget.js +0 -1
|
@@ -0,0 +1,2444 @@
|
|
|
1
|
+
## Classes
|
|
2
|
+
|
|
3
|
+
<dl>
|
|
4
|
+
<dt><a href="#user-content-w_HtmlWidget">HtmlWidget</a> ⇐ <code><a href="#user-content-w_HtmlMultiWidget">HtmlMultiWidget</a></code></dt>
|
|
5
|
+
<dd><p>Class Widget include method for working on html and include extended by HtmlMultiWidget methods</p>
|
|
6
|
+
</dd>
|
|
7
|
+
<dt><a href="#user-content-w_HtmlMultiWidget">HtmlMultiWidget</a> ⇐ <code><a href="#user-content-w_MultiWidget">MultiWidget</a></code></dt>
|
|
8
|
+
<dd><p>Class HtmlMultiWidget include method for working with html</p>
|
|
9
|
+
</dd>
|
|
10
|
+
<dt><a href="#user-content-w_Configuration">Configuration</a></dt>
|
|
11
|
+
<dd><p>Class Configuration include methods for creating configuration token</p>
|
|
12
|
+
</dd>
|
|
13
|
+
<dt><a href="#user-content-w_MultiWidget">MultiWidget</a></dt>
|
|
14
|
+
<dd><p>Class MultiWidget include method for for creating iframe url</p>
|
|
15
|
+
</dd>
|
|
16
|
+
</dl>
|
|
17
|
+
|
|
18
|
+
## Constants
|
|
19
|
+
|
|
20
|
+
<dl>
|
|
21
|
+
<dt><a href="#user-content-w_EVENT">EVENT</a> : <code>object</code></dt>
|
|
22
|
+
<dd><p>List of available event's name</p>
|
|
23
|
+
</dd>
|
|
24
|
+
<dt><a href="#user-content-w_VAULT_DISPLAY_EVENT">VAULT_DISPLAY_EVENT</a> : <code>object</code></dt>
|
|
25
|
+
<dd><p>List of available event's name</p>
|
|
26
|
+
</dd>
|
|
27
|
+
<dt><a href="#user-content-w_PAYMENT_TYPE">PAYMENT_TYPE</a> : <code>object</code></dt>
|
|
28
|
+
<dd><p>List of available payment source types</p>
|
|
29
|
+
</dd>
|
|
30
|
+
<dt><a href="#user-content-w_PURPOSE">PURPOSE</a> : <code>object</code></dt>
|
|
31
|
+
<dd><p>Purposes</p>
|
|
32
|
+
</dd>
|
|
33
|
+
<dt><a href="#user-content-w_FORM_FIELD">FORM_FIELD</a> : <code>object</code></dt>
|
|
34
|
+
<dd><p>Current constant include available type of fields which can be included to widget</p>
|
|
35
|
+
</dd>
|
|
36
|
+
<dt><a href="#user-content-w_STYLE">STYLE</a> : <code>object</code></dt>
|
|
37
|
+
<dd><p>List of available style params for widget</p>
|
|
38
|
+
</dd>
|
|
39
|
+
<dt><a href="#user-content-w_TEXT">TEXT</a> : <code>object</code></dt>
|
|
40
|
+
<dd><p>List of available text item params for widget</p>
|
|
41
|
+
</dd>
|
|
42
|
+
<dt><a href="#user-content-w_ELEMENT">ELEMENT</a> : <code>object</code></dt>
|
|
43
|
+
<dd><p>List of available params for hide elements</p>
|
|
44
|
+
</dd>
|
|
45
|
+
<dt><a href="#user-content-w_SUPPORTED_CARD_TYPES">SUPPORTED_CARD_TYPES</a> : <code>object</code></dt>
|
|
46
|
+
<dd><p>The list of available parameters for showing card icons</p>
|
|
47
|
+
</dd>
|
|
48
|
+
<dt><a href="#user-content-w_STYLABLE_ELEMENT">STYLABLE_ELEMENT</a> : <code>object</code></dt>
|
|
49
|
+
<dd><p>Current constant include available type of element for styling</p>
|
|
50
|
+
</dd>
|
|
51
|
+
<dt><a href="#user-content-w_STYLABLE_ELEMENT_STATE">STYLABLE_ELEMENT_STATE</a> : <code>object</code></dt>
|
|
52
|
+
<dd><p>Current constant include available states of element for styling</p>
|
|
53
|
+
</dd>
|
|
54
|
+
<dt><a href="#user-content-w_TRIGGER">TRIGGER</a> : <code>object</code></dt>
|
|
55
|
+
<dd><p>List of available triggers</p>
|
|
56
|
+
</dd>
|
|
57
|
+
</dl>
|
|
58
|
+
|
|
59
|
+
## Interfaces
|
|
60
|
+
|
|
61
|
+
<dl>
|
|
62
|
+
<dt><a href="#user-content-w_IFormValidation">IFormValidation</a></dt>
|
|
63
|
+
<dd><p>Interface of data from validation event.</p>
|
|
64
|
+
</dd>
|
|
65
|
+
<dt><a href="#user-content-w_IEventMetaData">IEventMetaData</a></dt>
|
|
66
|
+
<dd><p>Interface of data from event.</p>
|
|
67
|
+
</dd>
|
|
68
|
+
<dt><a href="#user-content-w_IEventAfterLoadData">IEventAfterLoadData</a></dt>
|
|
69
|
+
<dd><p>Interface of data from event.</p>
|
|
70
|
+
</dd>
|
|
71
|
+
<dt><a href="#user-content-w_IEventFinishData">IEventFinishData</a></dt>
|
|
72
|
+
<dd><p>Interface of data from event.</p>
|
|
73
|
+
</dd>
|
|
74
|
+
<dt><a href="#user-content-w_IPayPalMeta">IPayPalMeta</a></dt>
|
|
75
|
+
<dd><p>Interface for PayPal checkout meta information</p>
|
|
76
|
+
</dd>
|
|
77
|
+
<dt><a href="#user-content-w_IStyles">IStyles</a></dt>
|
|
78
|
+
<dd><p>Interface for classes that represent widget's styles.</p>
|
|
79
|
+
</dd>
|
|
80
|
+
<dt><a href="#user-content-w_ITexts">ITexts</a></dt>
|
|
81
|
+
<dd><p>Interface for classes that represent widget's text.</p>
|
|
82
|
+
</dd>
|
|
83
|
+
<dt><a href="#user-content-w_IBamboraMeta">IBamboraMeta</a></dt>
|
|
84
|
+
<dd><p>Interface for Bamboora meta information</p>
|
|
85
|
+
</dd>
|
|
86
|
+
<dt><a href="#user-content-w_IElementStyleInput">IElementStyleInput</a></dt>
|
|
87
|
+
<dd><p>Interface for styling input element.</p>
|
|
88
|
+
</dd>
|
|
89
|
+
<dt><a href="#user-content-w_IElementStyleSubmitButton">IElementStyleSubmitButton</a></dt>
|
|
90
|
+
<dd><p>Interface for styling submit_button element.</p>
|
|
91
|
+
</dd>
|
|
92
|
+
<dt><a href="#user-content-w_IElementStyleLabel">IElementStyleLabel</a></dt>
|
|
93
|
+
<dd><p>Interface for styling label element.</p>
|
|
94
|
+
</dd>
|
|
95
|
+
<dt><a href="#user-content-w_IElementStyleTitle">IElementStyleTitle</a></dt>
|
|
96
|
+
<dd><p>Interface for styling title element.</p>
|
|
97
|
+
</dd>
|
|
98
|
+
<dt><a href="#user-content-w_IElementStyleTitleDescription">IElementStyleTitleDescription</a></dt>
|
|
99
|
+
<dd><p>Interface for styling title_description element.</p>
|
|
100
|
+
</dd>
|
|
101
|
+
<dt><a href="#user-content-w_ITriggerData">ITriggerData</a></dt>
|
|
102
|
+
<dd><p>Interface for classes that represent a trigger data.</p>
|
|
103
|
+
</dd>
|
|
104
|
+
</dl>
|
|
105
|
+
|
|
106
|
+
<a name="w_IFormValidation" id="w_IFormValidation" href="#user-content-w_IFormValidation"> </a>
|
|
107
|
+
|
|
108
|
+
## IFormValidation
|
|
109
|
+
Interface of data from validation event.
|
|
110
|
+
|
|
111
|
+
**Kind**: global interface
|
|
112
|
+
|
|
113
|
+
| Param | Type | Description |
|
|
114
|
+
| --- | --- | --- |
|
|
115
|
+
| event | <code>string</code> | Event name |
|
|
116
|
+
| purpose | <code>string</code> | System variable. Purpose of event |
|
|
117
|
+
| message_source | <code>string</code> | System variable. Event source |
|
|
118
|
+
| [ref_id] | <code>string</code> | Custom value for identify result of processed operation |
|
|
119
|
+
| [form_valid] | <code>boolean</code> | Form is valid |
|
|
120
|
+
| [invalid_fields] | <code>array</code> | Invalid form fields |
|
|
121
|
+
| [invalid_showed_fields] | <code>array</code> | List of fields on which the error is already displayed |
|
|
122
|
+
| [validators] | <code>array</code> | List of validators with fields |
|
|
123
|
+
|
|
124
|
+
<a name="w_IEventMetaData" id="w_IEventMetaData" href="#user-content-w_IEventMetaData"> </a>
|
|
125
|
+
|
|
126
|
+
## IEventMetaData
|
|
127
|
+
Interface of data from event.
|
|
128
|
+
|
|
129
|
+
**Kind**: global interface
|
|
130
|
+
|
|
131
|
+
| Param | Type | Description |
|
|
132
|
+
| --- | --- | --- |
|
|
133
|
+
| event | <code>string</code> | Event name |
|
|
134
|
+
| purpose | <code>string</code> | System variable. Purpose of event |
|
|
135
|
+
| message_source | <code>string</code> | System variable. Event source |
|
|
136
|
+
| [ref_id] | <code>string</code> | Custom value for identify result of processed operation |
|
|
137
|
+
| configuration_token | <code>string</code> | Token received from our API with widget data |
|
|
138
|
+
| type | <code>string</code> | Payment type 'card', 'bank_account' |
|
|
139
|
+
| gateway_type | <code>string</code> | Gateway type |
|
|
140
|
+
| [card_number_last4] | <code>string</code> | Last 4 digit of your card |
|
|
141
|
+
| [card_scheme] | <code>string</code> | Card scheme |
|
|
142
|
+
| [card_number_length] | <code>number</code> | Card number length |
|
|
143
|
+
| [account_name] | <code>string</code> | Bank account account name |
|
|
144
|
+
| [account_number] | <code>string</code> | Bank account account number |
|
|
145
|
+
|
|
146
|
+
<a name="w_IEventAfterLoadData" id="w_IEventAfterLoadData" href="#user-content-w_IEventAfterLoadData"> </a>
|
|
147
|
+
|
|
148
|
+
## IEventAfterLoadData
|
|
149
|
+
Interface of data from event.
|
|
150
|
+
|
|
151
|
+
**Kind**: global interface
|
|
152
|
+
|
|
153
|
+
| Param | Type | Description |
|
|
154
|
+
| --- | --- | --- |
|
|
155
|
+
| event | <code>string</code> | Event name |
|
|
156
|
+
| purpose | <code>string</code> | System variable. Purpose of event |
|
|
157
|
+
| message_source | <code>string</code> | System variable. Event source |
|
|
158
|
+
| [ref_id] | <code>string</code> | Custom value for identify result of processed operation |
|
|
159
|
+
|
|
160
|
+
<a name="w_IEventFinishData" id="w_IEventFinishData" href="#user-content-w_IEventFinishData"> </a>
|
|
161
|
+
|
|
162
|
+
## IEventFinishData
|
|
163
|
+
Interface of data from event.
|
|
164
|
+
|
|
165
|
+
**Kind**: global interface
|
|
166
|
+
|
|
167
|
+
| Param | Type | Description |
|
|
168
|
+
| --- | --- | --- |
|
|
169
|
+
| event | <code>string</code> | Event name |
|
|
170
|
+
| purpose | <code>string</code> | System variable. Purpose of event |
|
|
171
|
+
| message_source | <code>string</code> | System variable. Event source |
|
|
172
|
+
| [ref_id] | <code>string</code> | Custom value for identify result of processed operation |
|
|
173
|
+
| payment_source | <code>string</code> | One time token. Result from this endpoint [API docs](https://docs.paydock.com/#tokens) |
|
|
174
|
+
|
|
175
|
+
<a name="w_IPayPalMeta" id="w_IPayPalMeta" href="#user-content-w_IPayPalMeta"> </a>
|
|
176
|
+
|
|
177
|
+
## IPayPalMeta
|
|
178
|
+
Interface for PayPal checkout meta information
|
|
179
|
+
|
|
180
|
+
**Kind**: global interface
|
|
181
|
+
|
|
182
|
+
| Param | Type | Description |
|
|
183
|
+
| --- | --- | --- |
|
|
184
|
+
| [brand_name] | <code>string</code> | A label that overrides the business name in the PayPal account on the PayPal hosted checkout pages |
|
|
185
|
+
| [cart_border_color] | <code>string</code> | The HTML hex code for your principal identifying color |
|
|
186
|
+
| [reference] | <code>string</code> | Merchant Customer Service number displayed on the PayPal pages |
|
|
187
|
+
| [email] | <code>string</code> | The consumer’s email |
|
|
188
|
+
| [hdr_img] | <code>string</code> | URL for the image you want to appear at the top left of the payment page |
|
|
189
|
+
| [logo_img] | <code>string</code> | A URL to your logo image |
|
|
190
|
+
| [pay_flow_color] | <code>string</code> | Sets the background color for the payment page. By default, the color is white. |
|
|
191
|
+
| [first_name] | <code>string</code> | The consumer’s given names |
|
|
192
|
+
| [last_name] | <code>string</code> | The consumer’s surname |
|
|
193
|
+
| [address_line] | <code>string</code> | Street address |
|
|
194
|
+
| [address_line2] | <code>string</code> | Second line of the address |
|
|
195
|
+
| [address_city] | <code>string</code> | City |
|
|
196
|
+
| [address_state] | <code>string</code> | State |
|
|
197
|
+
| [address_postcode] | <code>string</code> | Postcode |
|
|
198
|
+
| [address_country] | <code>string</code> | Country |
|
|
199
|
+
| [phone] | <code>string</code> | The consumer’s phone number in E.164 international notation (Example: +12345678901) |
|
|
200
|
+
| [hide_shipping_address] | <code>boolean</code> | Determines whether PayPal displays shipping address fields on the PayPal pages |
|
|
201
|
+
|
|
202
|
+
<a name="w_IStyles" id="w_IStyles" href="#user-content-w_IStyles"> </a>
|
|
203
|
+
|
|
204
|
+
## IStyles
|
|
205
|
+
Interface for classes that represent widget's styles.
|
|
206
|
+
|
|
207
|
+
**Kind**: global interface
|
|
208
|
+
|
|
209
|
+
| Param | Type |
|
|
210
|
+
| --- | --- |
|
|
211
|
+
| [background_color] | <code>string</code> |
|
|
212
|
+
| [text_color] | <code>string</code> |
|
|
213
|
+
| [border_color] | <code>string</code> |
|
|
214
|
+
| [button_color] | <code>string</code> |
|
|
215
|
+
| [error_color] | <code>string</code> |
|
|
216
|
+
| [success_color] | <code>string</code> |
|
|
217
|
+
| [font_size] | <code>string</code> |
|
|
218
|
+
| [font_family] | <code>string</code> |
|
|
219
|
+
|
|
220
|
+
<a name="w_ITexts" id="w_ITexts" href="#user-content-w_ITexts"> </a>
|
|
221
|
+
|
|
222
|
+
## ITexts
|
|
223
|
+
Interface for classes that represent widget's text.
|
|
224
|
+
|
|
225
|
+
**Kind**: global interface
|
|
226
|
+
|
|
227
|
+
| Param | Type |
|
|
228
|
+
| --- | --- |
|
|
229
|
+
| [title] | <code>string</code> |
|
|
230
|
+
| [title_h1] | <code>string</code> |
|
|
231
|
+
| [title_h2] | <code>string</code> |
|
|
232
|
+
| [title_h3] | <code>string</code> |
|
|
233
|
+
| [title_h4] | <code>string</code> |
|
|
234
|
+
| [title_h5] | <code>string</code> |
|
|
235
|
+
| [title_h6] | <code>string</code> |
|
|
236
|
+
| [finish_text] | <code>string</code> |
|
|
237
|
+
| [title_description] | <code>string</code> |
|
|
238
|
+
| [submit_button] | <code>string</code> |
|
|
239
|
+
| [submit_button_processing] | <code>string</code> |
|
|
240
|
+
|
|
241
|
+
<a name="w_IBamboraMeta" id="w_IBamboraMeta" href="#user-content-w_IBamboraMeta"> </a>
|
|
242
|
+
|
|
243
|
+
## IBamboraMeta
|
|
244
|
+
Interface for Bamboora meta information
|
|
245
|
+
|
|
246
|
+
**Kind**: global interface
|
|
247
|
+
|
|
248
|
+
| Param | Type | Description |
|
|
249
|
+
| --- | --- | --- |
|
|
250
|
+
| [customer_storage_number] | <code>string</code> | Customer storage number |
|
|
251
|
+
| [tokenise_algorithm] | <code>number</code> | Tokenise algorithm |
|
|
252
|
+
|
|
253
|
+
<a name="w_IElementStyleInput" id="w_IElementStyleInput" href="#user-content-w_IElementStyleInput"> </a>
|
|
254
|
+
|
|
255
|
+
## IElementStyleInput
|
|
256
|
+
Interface for styling input element.
|
|
257
|
+
|
|
258
|
+
**Kind**: global interface
|
|
259
|
+
|
|
260
|
+
| Param | Type | Description |
|
|
261
|
+
| --- | --- | --- |
|
|
262
|
+
| [color] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/color) |
|
|
263
|
+
| [border] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/border) |
|
|
264
|
+
| [border_radius] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius) |
|
|
265
|
+
| [background_color] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color) |
|
|
266
|
+
| [height] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/height) |
|
|
267
|
+
| [text_decoration] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) |
|
|
268
|
+
| [font_size] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) |
|
|
269
|
+
| [font_family] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) |
|
|
270
|
+
| [transition] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/transition) |
|
|
271
|
+
| [line_height] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height) |
|
|
272
|
+
| [font_weight] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) |
|
|
273
|
+
| [padding] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) |
|
|
274
|
+
| [margin] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/margin) |
|
|
275
|
+
|
|
276
|
+
<a name="w_IElementStyleSubmitButton" id="w_IElementStyleSubmitButton" href="#user-content-w_IElementStyleSubmitButton"> </a>
|
|
277
|
+
|
|
278
|
+
## IElementStyleSubmitButton
|
|
279
|
+
Interface for styling submit_button element.
|
|
280
|
+
|
|
281
|
+
**Kind**: global interface
|
|
282
|
+
|
|
283
|
+
| Param | Type | Description |
|
|
284
|
+
| --- | --- | --- |
|
|
285
|
+
| [color] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/color) |
|
|
286
|
+
| [border] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/border) |
|
|
287
|
+
| [border_radius] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius) |
|
|
288
|
+
| [background_color] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color) |
|
|
289
|
+
| [text_decoration] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) |
|
|
290
|
+
| [font_size] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) |
|
|
291
|
+
| [font_family] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) |
|
|
292
|
+
| [padding] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) |
|
|
293
|
+
| [margin] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/margin) |
|
|
294
|
+
| [transition] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/transition) |
|
|
295
|
+
| [line_height] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height) |
|
|
296
|
+
| [font_weight] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) |
|
|
297
|
+
| [opacity] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/opacity) |
|
|
298
|
+
|
|
299
|
+
<a name="w_IElementStyleLabel" id="w_IElementStyleLabel" href="#user-content-w_IElementStyleLabel"> </a>
|
|
300
|
+
|
|
301
|
+
## IElementStyleLabel
|
|
302
|
+
Interface for styling label element.
|
|
303
|
+
|
|
304
|
+
**Kind**: global interface
|
|
305
|
+
|
|
306
|
+
| Param | Type | Description |
|
|
307
|
+
| --- | --- | --- |
|
|
308
|
+
| [color] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/color) |
|
|
309
|
+
| [text_decoration] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) |
|
|
310
|
+
| [font_size] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) |
|
|
311
|
+
| [font_family] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) |
|
|
312
|
+
| [line_height] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height) |
|
|
313
|
+
| [font_weight] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) |
|
|
314
|
+
| [padding] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) |
|
|
315
|
+
| [margin] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/margin) |
|
|
316
|
+
|
|
317
|
+
<a name="w_IElementStyleTitle" id="w_IElementStyleTitle" href="#user-content-w_IElementStyleTitle"> </a>
|
|
318
|
+
|
|
319
|
+
## IElementStyleTitle
|
|
320
|
+
Interface for styling title element.
|
|
321
|
+
|
|
322
|
+
**Kind**: global interface
|
|
323
|
+
|
|
324
|
+
| Param | Type | Description |
|
|
325
|
+
| --- | --- | --- |
|
|
326
|
+
| [color] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/color) |
|
|
327
|
+
| [text_decoration] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) |
|
|
328
|
+
| [font_size] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) |
|
|
329
|
+
| [font_family] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) |
|
|
330
|
+
| [line_height] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height) |
|
|
331
|
+
| [font_weight] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) |
|
|
332
|
+
| [padding] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) |
|
|
333
|
+
| [margin] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/margin) |
|
|
334
|
+
| ['text-align',] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align) |
|
|
335
|
+
|
|
336
|
+
<a name="w_IElementStyleTitleDescription" id="w_IElementStyleTitleDescription" href="#user-content-w_IElementStyleTitleDescription"> </a>
|
|
337
|
+
|
|
338
|
+
## IElementStyleTitleDescription
|
|
339
|
+
Interface for styling title_description element.
|
|
340
|
+
|
|
341
|
+
**Kind**: global interface
|
|
342
|
+
|
|
343
|
+
| Param | Type | Description |
|
|
344
|
+
| --- | --- | --- |
|
|
345
|
+
| [color] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/color) |
|
|
346
|
+
| [text_decoration] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) |
|
|
347
|
+
| [font_size] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) |
|
|
348
|
+
| [font_family] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) |
|
|
349
|
+
| [line_height] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height) |
|
|
350
|
+
| [font_weight] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) |
|
|
351
|
+
| [padding] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) |
|
|
352
|
+
| [margin] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/margin) |
|
|
353
|
+
| ['text-align',] | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align) |
|
|
354
|
+
|
|
355
|
+
<a name="w_ITriggerData" id="w_ITriggerData" href="#user-content-w_ITriggerData"> </a>
|
|
356
|
+
|
|
357
|
+
## ITriggerData
|
|
358
|
+
Interface for classes that represent a trigger data.
|
|
359
|
+
|
|
360
|
+
**Kind**: global interface
|
|
361
|
+
|
|
362
|
+
| Param | Type |
|
|
363
|
+
| --- | --- |
|
|
364
|
+
| [configuration_token] | <code>string</code> |
|
|
365
|
+
| [tab_number] | <code>string</code> |
|
|
366
|
+
| [elements] | <code>string</code> |
|
|
367
|
+
| [form_values] | <code>string</code> |
|
|
368
|
+
|
|
369
|
+
<a name="w_HtmlWidget" id="w_HtmlWidget" href="#user-content-w_HtmlWidget"> </a>
|
|
370
|
+
|
|
371
|
+
## HtmlWidget ⇐ [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
372
|
+
Class Widget include method for working on html and include extended by HtmlMultiWidget methods
|
|
373
|
+
|
|
374
|
+
**Kind**: global class
|
|
375
|
+
**Extends**: [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget), [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
376
|
+
|
|
377
|
+
* [HtmlWidget](#user-content-w_HtmlWidget) ⇐ [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
378
|
+
* [new HtmlWidget(selector, publicKey, [gatewayID], [paymentType], [purpose])](#user-content-w_new_HtmlWidget_new)
|
|
379
|
+
* [.setWebHookDestination(url)](#user-content-w_HtmlWidget+setWebHookDestination)
|
|
380
|
+
* [.setSuccessRedirectUrl(url)](#user-content-w_HtmlWidget+setSuccessRedirectUrl)
|
|
381
|
+
* [.setErrorRedirectUrl(url)](#user-content-w_HtmlWidget+setErrorRedirectUrl)
|
|
382
|
+
* [.setFormFields(fields)](#user-content-w_HtmlWidget+setFormFields)
|
|
383
|
+
* [.setFormElements(elements)](#user-content-w_HtmlWidget+setFormElements)
|
|
384
|
+
* [.setMeta(object)](#user-content-w_HtmlWidget+setMeta)
|
|
385
|
+
* [.load()](#user-content-w_HtmlMultiWidget+load)
|
|
386
|
+
* [.on(eventName, [cb])](#user-content-w_HtmlMultiWidget+on) ⇒ <code>Promise.<(IEventData\|IEventMetaData\|IEventFinishData\|IFormValidation)></code> \| <code>void</code>
|
|
387
|
+
* [.trigger(triggers, data)](#user-content-w_HtmlMultiWidget+trigger)
|
|
388
|
+
* [.getValidationState()](#user-content-w_HtmlMultiWidget+getValidationState) ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
|
|
389
|
+
* [.isValidForm()](#user-content-w_HtmlMultiWidget+isValidForm) ⇒ <code>boolean</code>
|
|
390
|
+
* [.isInvalidField(field)](#user-content-w_HtmlMultiWidget+isInvalidField) ⇒ <code>boolean</code>
|
|
391
|
+
* [.isFieldErrorShowed(field)](#user-content-w_HtmlMultiWidget+isFieldErrorShowed) ⇒ <code>boolean</code>
|
|
392
|
+
* [.isInvalidFieldByValidator(field, validator)](#user-content-w_HtmlMultiWidget+isInvalidFieldByValidator) ⇒ <code>boolean</code>
|
|
393
|
+
* [.hide([saveSize])](#user-content-w_HtmlMultiWidget+hide)
|
|
394
|
+
* [.show()](#user-content-w_HtmlMultiWidget+show)
|
|
395
|
+
* [.reload()](#user-content-w_HtmlMultiWidget+reload)
|
|
396
|
+
* [.hideElements(elements)](#user-content-w_HtmlMultiWidget+hideElements)
|
|
397
|
+
* [.showElements(elements)](#user-content-w_HtmlMultiWidget+showElements)
|
|
398
|
+
* [.updateFormValues(fieldValues)](#user-content-w_HtmlMultiWidget+updateFormValues)
|
|
399
|
+
* [.onFinishInsert(selector, dataType)](#user-content-w_HtmlMultiWidget+onFinishInsert)
|
|
400
|
+
* [.interceptSubmitForm(selector)](#user-content-w_HtmlMultiWidget+interceptSubmitForm)
|
|
401
|
+
* [.useCheckoutAutoSubmit()](#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit)
|
|
402
|
+
* [.useAutoResize()](#user-content-w_HtmlMultiWidget+useAutoResize)
|
|
403
|
+
* [.setStyles(fields)](#user-content-w_MultiWidget+setStyles)
|
|
404
|
+
* [.usePhoneCountryMask([options])](#user-content-w_MultiWidget+usePhoneCountryMask)
|
|
405
|
+
* [.setTexts(fields)](#user-content-w_MultiWidget+setTexts)
|
|
406
|
+
* [.setElementStyle(element, [state], styles)](#user-content-w_MultiWidget+setElementStyle)
|
|
407
|
+
* [.setFormValues(fieldValues)](#user-content-w_MultiWidget+setFormValues)
|
|
408
|
+
* [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
|
|
409
|
+
* [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
|
|
410
|
+
* ~~[.setIcons()](#user-content-w_MultiWidget+setIcons)~~
|
|
411
|
+
* [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
|
|
412
|
+
* [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
|
|
413
|
+
* [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
|
|
414
|
+
* [.setSupportedCardIcons(elements, validateCardNumberInput)](#user-content-w_MultiWidget+setSupportedCardIcons)
|
|
415
|
+
* [.setEnv(env, [alias])](#user-content-w_MultiWidget+setEnv)
|
|
416
|
+
* [.loadIFrameUrl()](#user-content-w_MultiWidget+loadIFrameUrl)
|
|
417
|
+
* [.setLanguage(code)](#user-content-w_MultiWidget+setLanguage)
|
|
418
|
+
|
|
419
|
+
<a name="w_new_HtmlWidget_new" id="w_new_HtmlWidget_new" href="#user-content-w_new_HtmlWidget_new"> </a>
|
|
420
|
+
|
|
421
|
+
### new HtmlWidget(selector, publicKey, [gatewayID], [paymentType], [purpose])
|
|
422
|
+
|
|
423
|
+
| Param | Type | Default | Description |
|
|
424
|
+
| --- | --- | --- | --- |
|
|
425
|
+
| selector | <code>string</code> | | Selector of html element. Container for widget |
|
|
426
|
+
| publicKey | <code>string</code> | | PayDock users public key |
|
|
427
|
+
| [gatewayID] | <code>string</code> | <code>"default"</code> | ID of a gateway connected to PayDock. 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. |
|
|
428
|
+
| [paymentType] | <code>string</code> | <code>"card"</code> | Type of payment source which shows in widget form. Available parameters : “card”, “bank_account”. |
|
|
429
|
+
| [purpose] | <code>string</code> | <code>"payment_source"</code> | Purpose of widget form. Available parameters: ‘payment_source’, ‘card_payment_source_with_cvv’, ‘card_payment_source_without_cvv’ |
|
|
430
|
+
|
|
431
|
+
**Example**
|
|
432
|
+
|
|
433
|
+
```javascript
|
|
434
|
+
var widget = new HtmlWidget('#widget', 'publicKey', 'gatewayID'); // short
|
|
435
|
+
|
|
436
|
+
var widget = new HtmlWidget('#widget', 'publicKey', 'gatewayID', 'bank_account', 'payment_source'); // extend
|
|
437
|
+
|
|
438
|
+
var widget = new HtmlWidget('#widget', 'publicKey', 'not_configured'); // without gateway
|
|
439
|
+
```
|
|
440
|
+
<a name="w_HtmlWidget+setWebHookDestination" id="w_HtmlWidget+setWebHookDestination" href="#user-content-w_HtmlWidget+setWebHookDestination"> </a>
|
|
441
|
+
|
|
442
|
+
### htmlWidget.setWebHookDestination(url)
|
|
443
|
+
Destination, where customer will receive all successful responses.
|
|
444
|
+
Response will contain “data” object with “payment_source” or other parameters, in depending on 'purpose'
|
|
445
|
+
|
|
446
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
447
|
+
|
|
448
|
+
| Param | Type | Description |
|
|
449
|
+
| --- | --- | --- |
|
|
450
|
+
| url | <code>string</code> | Your endpoint for post request. |
|
|
451
|
+
|
|
452
|
+
**Example**
|
|
453
|
+
|
|
454
|
+
```javascript
|
|
455
|
+
widget.setWebHookDestination('http://google.com');
|
|
456
|
+
```
|
|
457
|
+
<a name="w_HtmlWidget+setSuccessRedirectUrl" id="w_HtmlWidget+setSuccessRedirectUrl" href="#user-content-w_HtmlWidget+setSuccessRedirectUrl"> </a>
|
|
458
|
+
|
|
459
|
+
### htmlWidget.setSuccessRedirectUrl(url)
|
|
460
|
+
URL to which the Customer will be redirected to after the success finish
|
|
461
|
+
|
|
462
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
463
|
+
|
|
464
|
+
| Param | Type |
|
|
465
|
+
| --- | --- |
|
|
466
|
+
| url | <code>string</code> |
|
|
467
|
+
|
|
468
|
+
**Example**
|
|
469
|
+
|
|
470
|
+
```javascript
|
|
471
|
+
widget.setSuccessRedirectUrl('google.com/search?q=success');
|
|
472
|
+
```
|
|
473
|
+
<a name="w_HtmlWidget+setErrorRedirectUrl" id="w_HtmlWidget+setErrorRedirectUrl" href="#user-content-w_HtmlWidget+setErrorRedirectUrl"> </a>
|
|
474
|
+
|
|
475
|
+
### htmlWidget.setErrorRedirectUrl(url)
|
|
476
|
+
URL to which the Customer will be redirected to if an error is triggered in the process of operation
|
|
477
|
+
|
|
478
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
479
|
+
|
|
480
|
+
| Param | Type |
|
|
481
|
+
| --- | --- |
|
|
482
|
+
| url | <code>string</code> |
|
|
483
|
+
|
|
484
|
+
**Example**
|
|
485
|
+
|
|
486
|
+
```javascript
|
|
487
|
+
widget.setErrorRedirectUrl('google.com/search?q=error');
|
|
488
|
+
```
|
|
489
|
+
<a name="w_HtmlWidget+setFormFields" id="w_HtmlWidget+setFormFields" href="#user-content-w_HtmlWidget+setFormFields"> </a>
|
|
490
|
+
|
|
491
|
+
### htmlWidget.setFormFields(fields)
|
|
492
|
+
Set list with widget form field, which will be shown in form. Also you can set the required validation for these fields
|
|
493
|
+
|
|
494
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
495
|
+
|
|
496
|
+
| Param | Type | Description |
|
|
497
|
+
| --- | --- | --- |
|
|
498
|
+
| fields | <code>Array.<string></code> | name of fields which can be shown in a widget. If after a name of a field, you put “*”, this field will be required on client-side. (For validation, you can specify any fields, even those that are shown by default: card_number, expiration, etc... ) [FORM_FIELD](#user-content-w_FORM_FIELD) |
|
|
499
|
+
|
|
500
|
+
**Example**
|
|
501
|
+
|
|
502
|
+
```javascript
|
|
503
|
+
widget.setFormFields(['phone', 'email', 'first_name*']);
|
|
504
|
+
```
|
|
505
|
+
<a name="w_HtmlWidget+setFormElements" id="w_HtmlWidget+setFormElements" href="#user-content-w_HtmlWidget+setFormElements"> </a>
|
|
506
|
+
|
|
507
|
+
### htmlWidget.setFormElements(elements)
|
|
508
|
+
The method to set the full configuration for the all specific form elements (visibility, required, label, placeholder, value)
|
|
509
|
+
You can also use the other method for the partial configuration like: setFormFields, setFormValues, setFormPlaceholder, setFormLabel
|
|
510
|
+
|
|
511
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
512
|
+
**Overrides**: [<code>setFormElements</code>](#user-content-w_MultiWidget+setFormElements)
|
|
513
|
+
|
|
514
|
+
| Param | Type | Description |
|
|
515
|
+
| --- | --- | --- |
|
|
516
|
+
| elements | <code>Array.<Object></code> | List of elements |
|
|
517
|
+
| elements[].field | <code>string</code> | Field name of element. If after a name of a field, you put “*”, this field will be required on client-side. (For validation, you can specify any fields, even those that are shown by default: card_number, expiration, etc... ) [FORM_FIELD](#user-content-w_FORM_FIELD) |
|
|
518
|
+
| elements[].placeholder | <code>string</code> | Set custom placeholders in form fields |
|
|
519
|
+
| elements[].label | <code>string</code> | Set a custom labels near the form field |
|
|
520
|
+
| elements[].value | <code>string</code> | Set predefined values for the form field |
|
|
521
|
+
|
|
522
|
+
**Example**
|
|
523
|
+
|
|
524
|
+
```javascript
|
|
525
|
+
widget.setFormElements([
|
|
526
|
+
{
|
|
527
|
+
field: 'card_name*',
|
|
528
|
+
placeholder: 'Input your card holder name...',
|
|
529
|
+
label: 'Card Holder Name',
|
|
530
|
+
value: 'Houston',
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
field: 'email',
|
|
534
|
+
placeholder: 'Input your email, like test@example.com',
|
|
535
|
+
label: 'Email for the receipt',
|
|
536
|
+
value: 'predefined@email.com',
|
|
537
|
+
},
|
|
538
|
+
])
|
|
539
|
+
```
|
|
540
|
+
<a name="w_HtmlWidget+setMeta" id="w_HtmlWidget+setMeta" href="#user-content-w_HtmlWidget+setMeta"> </a>
|
|
541
|
+
|
|
542
|
+
### htmlWidget.setMeta(object)
|
|
543
|
+
The method to set meta information for the checkout page
|
|
544
|
+
|
|
545
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
546
|
+
|
|
547
|
+
| Param | Type | Description |
|
|
548
|
+
| --- | --- | --- |
|
|
549
|
+
| object | [<code>IPayPalMeta</code>](#user-content-w_IPayPalMeta) \| [<code>IBamboraMeta</code>](#user-content-w_IBamboraMeta) | data which can be shown on checkout page [IPayPalMeta](#user-content-w_IPayPalMeta) [IBamboraMeta](#user-content-w_IBamboraMeta) |
|
|
550
|
+
|
|
551
|
+
**Example**
|
|
552
|
+
|
|
553
|
+
```javascript
|
|
554
|
+
config.setMeta({
|
|
555
|
+
brand_name: 'paydock',
|
|
556
|
+
reference: '15',
|
|
557
|
+
email: 'wault@paydock.com'
|
|
558
|
+
});
|
|
559
|
+
```
|
|
560
|
+
<a name="w_HtmlMultiWidget+load" id="w_HtmlMultiWidget+load" href="#user-content-w_HtmlMultiWidget+load"> </a>
|
|
561
|
+
|
|
562
|
+
### htmlWidget.load()
|
|
563
|
+
The final method to beginning, the load process of widget to html
|
|
564
|
+
|
|
565
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
566
|
+
**Overrides**: [<code>load</code>](#user-content-w_HtmlMultiWidget+load)
|
|
567
|
+
<a name="w_HtmlMultiWidget+on" id="w_HtmlMultiWidget+on" href="#user-content-w_HtmlMultiWidget+on"> </a>
|
|
568
|
+
|
|
569
|
+
### htmlWidget.on(eventName, [cb]) ⇒ <code>Promise.<(IEventData\|IEventMetaData\|IEventFinishData\|IFormValidation)></code> \| <code>void</code>
|
|
570
|
+
Listen to events of widget
|
|
571
|
+
|
|
572
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
573
|
+
**Overrides**: [<code>on</code>](#user-content-w_HtmlMultiWidget+on)
|
|
574
|
+
|
|
575
|
+
| Param | Type | Description |
|
|
576
|
+
| --- | --- | --- |
|
|
577
|
+
| eventName | <code>string</code> | Available event names [EVENT](#user-content-w_EVENT) |
|
|
578
|
+
| [cb] | <code>listener</code> | |
|
|
579
|
+
|
|
580
|
+
**Example**
|
|
581
|
+
|
|
582
|
+
```javascript
|
|
583
|
+
widget.on('form_submit', function (data) {
|
|
584
|
+
console.log(data);
|
|
585
|
+
});
|
|
586
|
+
// or
|
|
587
|
+
widget.on('form_submit').then(function (data) {
|
|
588
|
+
console.log(data);
|
|
589
|
+
});
|
|
590
|
+
```
|
|
591
|
+
<a name="w_HtmlMultiWidget+trigger" id="w_HtmlMultiWidget+trigger" href="#user-content-w_HtmlMultiWidget+trigger"> </a>
|
|
592
|
+
|
|
593
|
+
### htmlWidget.trigger(triggers, data)
|
|
594
|
+
This callback will be called for every trigger
|
|
595
|
+
|
|
596
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
597
|
+
**Overrides**: [<code>trigger</code>](#user-content-w_HtmlMultiWidget+trigger)
|
|
598
|
+
|
|
599
|
+
| Param | Type | Description |
|
|
600
|
+
| --- | --- | --- |
|
|
601
|
+
| triggers | <code>triggerName</code> | submit_form, tab |
|
|
602
|
+
| data | [<code>ITriggerData</code>](#user-content-w_ITriggerData) | which will be sending to widget |
|
|
603
|
+
|
|
604
|
+
<a name="w_HtmlMultiWidget+getValidationState" id="w_HtmlMultiWidget+getValidationState" href="#user-content-w_HtmlMultiWidget+getValidationState"> </a>
|
|
605
|
+
|
|
606
|
+
### htmlWidget.getValidationState() ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
|
|
607
|
+
Using this method you can get validation state information
|
|
608
|
+
|
|
609
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
610
|
+
**Overrides**: [<code>getValidationState</code>](#user-content-w_HtmlMultiWidget+getValidationState)
|
|
611
|
+
**Returns**: [<code>IFormValidation</code>](#user-content-w_IFormValidation) - Form validation object
|
|
612
|
+
<a name="w_HtmlMultiWidget+isValidForm" id="w_HtmlMultiWidget+isValidForm" href="#user-content-w_HtmlMultiWidget+isValidForm"> </a>
|
|
613
|
+
|
|
614
|
+
### htmlWidget.isValidForm() ⇒ <code>boolean</code>
|
|
615
|
+
Using this method you can check if the form is valid
|
|
616
|
+
|
|
617
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
618
|
+
**Overrides**: [<code>isValidForm</code>](#user-content-w_HtmlMultiWidget+isValidForm)
|
|
619
|
+
**Returns**: <code>boolean</code> - Form is valid
|
|
620
|
+
<a name="w_HtmlMultiWidget+isInvalidField" id="w_HtmlMultiWidget+isInvalidField" href="#user-content-w_HtmlMultiWidget+isInvalidField"> </a>
|
|
621
|
+
|
|
622
|
+
### htmlWidget.isInvalidField(field) ⇒ <code>boolean</code>
|
|
623
|
+
Using this method you can check if a specific form field is invalid
|
|
624
|
+
|
|
625
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
626
|
+
**Overrides**: [<code>isInvalidField</code>](#user-content-w_HtmlMultiWidget+isInvalidField)
|
|
627
|
+
**Returns**: <code>boolean</code> - Field is invalid
|
|
628
|
+
|
|
629
|
+
| Param | Type | Description |
|
|
630
|
+
| --- | --- | --- |
|
|
631
|
+
| field | <code>string</code> | Field name |
|
|
632
|
+
|
|
633
|
+
<a name="w_HtmlMultiWidget+isFieldErrorShowed" id="w_HtmlMultiWidget+isFieldErrorShowed" href="#user-content-w_HtmlMultiWidget+isFieldErrorShowed"> </a>
|
|
634
|
+
|
|
635
|
+
### htmlWidget.isFieldErrorShowed(field) ⇒ <code>boolean</code>
|
|
636
|
+
Using this method you can check if an error is displayed on a specific field
|
|
637
|
+
|
|
638
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
639
|
+
**Overrides**: [<code>isFieldErrorShowed</code>](#user-content-w_HtmlMultiWidget+isFieldErrorShowed)
|
|
640
|
+
**Returns**: <code>boolean</code> - Error is showed on field
|
|
641
|
+
|
|
642
|
+
| Param | Type | Description |
|
|
643
|
+
| --- | --- | --- |
|
|
644
|
+
| field | <code>string</code> | Field name |
|
|
645
|
+
|
|
646
|
+
<a name="w_HtmlMultiWidget+isInvalidFieldByValidator" id="w_HtmlMultiWidget+isInvalidFieldByValidator" href="#user-content-w_HtmlMultiWidget+isInvalidFieldByValidator"> </a>
|
|
647
|
+
|
|
648
|
+
### htmlWidget.isInvalidFieldByValidator(field, validator) ⇒ <code>boolean</code>
|
|
649
|
+
Using this method you can check if a specific field is invalid
|
|
650
|
+
|
|
651
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
652
|
+
**Overrides**: [<code>isInvalidFieldByValidator</code>](#user-content-w_HtmlMultiWidget+isInvalidFieldByValidator)
|
|
653
|
+
**Returns**: <code>boolean</code> - Field is invalid by validator
|
|
654
|
+
|
|
655
|
+
| Param | Type | Description |
|
|
656
|
+
| --- | --- | --- |
|
|
657
|
+
| field | <code>string</code> | Field name |
|
|
658
|
+
| validator | <code>string</code> | Validator name. Available validators: `required, cardNumberValidator, expireDateValidation` |
|
|
659
|
+
|
|
660
|
+
<a name="w_HtmlMultiWidget+hide" id="w_HtmlMultiWidget+hide" href="#user-content-w_HtmlMultiWidget+hide"> </a>
|
|
661
|
+
|
|
662
|
+
### htmlWidget.hide([saveSize])
|
|
663
|
+
Using this method you can hide widget after load
|
|
664
|
+
|
|
665
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
666
|
+
**Overrides**: [<code>hide</code>](#user-content-w_HtmlMultiWidget+hide)
|
|
667
|
+
|
|
668
|
+
| Param | Type | Default | Description |
|
|
669
|
+
| --- | --- | --- | --- |
|
|
670
|
+
| [saveSize] | <code>boolean</code> | <code>false</code> | using this param you can save iframe's size |
|
|
671
|
+
|
|
672
|
+
<a name="w_HtmlMultiWidget+show" id="w_HtmlMultiWidget+show" href="#user-content-w_HtmlMultiWidget+show"> </a>
|
|
673
|
+
|
|
674
|
+
### htmlWidget.show()
|
|
675
|
+
Using this method you can show widget after using hide method
|
|
676
|
+
|
|
677
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
678
|
+
**Overrides**: [<code>show</code>](#user-content-w_HtmlMultiWidget+show)
|
|
679
|
+
<a name="w_HtmlMultiWidget+reload" id="w_HtmlMultiWidget+reload" href="#user-content-w_HtmlMultiWidget+reload"> </a>
|
|
680
|
+
|
|
681
|
+
### htmlWidget.reload()
|
|
682
|
+
Using this method you can reload widget
|
|
683
|
+
|
|
684
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
685
|
+
**Overrides**: [<code>reload</code>](#user-content-w_HtmlMultiWidget+reload)
|
|
686
|
+
<a name="w_HtmlMultiWidget+hideElements" id="w_HtmlMultiWidget+hideElements" href="#user-content-w_HtmlMultiWidget+hideElements"> </a>
|
|
687
|
+
|
|
688
|
+
### htmlWidget.hideElements(elements)
|
|
689
|
+
Using this method you can hide any elements inside widget
|
|
690
|
+
|
|
691
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
692
|
+
**Overrides**: [<code>hideElements</code>](#user-content-w_HtmlMultiWidget+hideElements)
|
|
693
|
+
|
|
694
|
+
| Param | Type | Description |
|
|
695
|
+
| --- | --- | --- |
|
|
696
|
+
| elements | <code>Array.<string></code> | list of element which can be hidden [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
|
|
697
|
+
|
|
698
|
+
**Example**
|
|
699
|
+
|
|
700
|
+
```javascript
|
|
701
|
+
widget.hideElements(['submit_button', 'email']);
|
|
702
|
+
```
|
|
703
|
+
<a name="w_HtmlMultiWidget+showElements" id="w_HtmlMultiWidget+showElements" href="#user-content-w_HtmlMultiWidget+showElements"> </a>
|
|
704
|
+
|
|
705
|
+
### htmlWidget.showElements(elements)
|
|
706
|
+
Using this method you can show any elements inside widget
|
|
707
|
+
|
|
708
|
+
* @example
|
|
709
|
+
widget.showElements(['submit_button', 'email']);
|
|
710
|
+
|
|
711
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
712
|
+
**Overrides**: [<code>showElements</code>](#user-content-w_HtmlMultiWidget+showElements)
|
|
713
|
+
|
|
714
|
+
| Param | Type | Description |
|
|
715
|
+
| --- | --- | --- |
|
|
716
|
+
| elements | <code>Array.<string></code> | list of element which can be showed [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
|
|
717
|
+
|
|
718
|
+
<a name="w_HtmlMultiWidget+updateFormValues" id="w_HtmlMultiWidget+updateFormValues" href="#user-content-w_HtmlMultiWidget+updateFormValues"> </a>
|
|
719
|
+
|
|
720
|
+
### htmlWidget.updateFormValues(fieldValues)
|
|
721
|
+
Method for update values for form fields inside the widget
|
|
722
|
+
|
|
723
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
724
|
+
**Overrides**: [<code>updateFormValues</code>](#user-content-w_HtmlMultiWidget+updateFormValues)
|
|
725
|
+
|
|
726
|
+
| Param | Type | Description |
|
|
727
|
+
| --- | --- | --- |
|
|
728
|
+
| fieldValues | <code>IFormValues</code> | Fields with values |
|
|
729
|
+
|
|
730
|
+
**Example**
|
|
731
|
+
|
|
732
|
+
```javascript
|
|
733
|
+
widget.updateFormValues({
|
|
734
|
+
email: 'predefined@email.com',
|
|
735
|
+
card_name: 'Houston'
|
|
736
|
+
});
|
|
737
|
+
```
|
|
738
|
+
<a name="w_HtmlMultiWidget+onFinishInsert" id="w_HtmlMultiWidget+onFinishInsert" href="#user-content-w_HtmlMultiWidget+onFinishInsert"> </a>
|
|
739
|
+
|
|
740
|
+
### htmlWidget.onFinishInsert(selector, dataType)
|
|
741
|
+
After finish event of widget, data (dataType) will be insert to input (selector)
|
|
742
|
+
|
|
743
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
744
|
+
**Overrides**: [<code>onFinishInsert</code>](#user-content-w_HtmlMultiWidget+onFinishInsert)
|
|
745
|
+
|
|
746
|
+
| Param | Type | Description |
|
|
747
|
+
| --- | --- | --- |
|
|
748
|
+
| selector | <code>string</code> | css selector . [] # |
|
|
749
|
+
| dataType | <code>string</code> | data type of IEventData object. |
|
|
750
|
+
|
|
751
|
+
<a name="w_HtmlMultiWidget+interceptSubmitForm" id="w_HtmlMultiWidget+interceptSubmitForm" href="#user-content-w_HtmlMultiWidget+interceptSubmitForm"> </a>
|
|
752
|
+
|
|
753
|
+
### htmlWidget.interceptSubmitForm(selector)
|
|
754
|
+
Widget will intercept submit of your form for processing widget
|
|
755
|
+
|
|
756
|
+
Process: click by submit button in your form --> submit widget ---> submit your form
|
|
757
|
+
|
|
758
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
759
|
+
**Overrides**: [<code>interceptSubmitForm</code>](#user-content-w_HtmlMultiWidget+interceptSubmitForm)
|
|
760
|
+
**Note**: submit button in widget will be hidden.
|
|
761
|
+
|
|
762
|
+
| Param | Type | Description |
|
|
763
|
+
| --- | --- | --- |
|
|
764
|
+
| selector | <code>string</code> | css selector of your form |
|
|
765
|
+
|
|
766
|
+
**Example**
|
|
767
|
+
|
|
768
|
+
```javascript
|
|
769
|
+
<form id="myForm">
|
|
770
|
+
<input name="amount">
|
|
771
|
+
<button type="submit">Submit</button>
|
|
772
|
+
</form>
|
|
773
|
+
<!--
|
|
774
|
+
-->
|
|
775
|
+
<script>
|
|
776
|
+
widget.interceptSubmitForm('#myForm');
|
|
777
|
+
</script>
|
|
778
|
+
```
|
|
779
|
+
<a name="w_HtmlMultiWidget+useCheckoutAutoSubmit" id="w_HtmlMultiWidget+useCheckoutAutoSubmit" href="#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit"> </a>
|
|
780
|
+
|
|
781
|
+
### htmlWidget.useCheckoutAutoSubmit()
|
|
782
|
+
This method hides a submit button and automatically execute form submit
|
|
783
|
+
|
|
784
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
785
|
+
**Overrides**: [<code>useCheckoutAutoSubmit</code>](#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit)
|
|
786
|
+
<a name="w_HtmlMultiWidget+useAutoResize" id="w_HtmlMultiWidget+useAutoResize" href="#user-content-w_HtmlMultiWidget+useAutoResize"> </a>
|
|
787
|
+
|
|
788
|
+
### htmlWidget.useAutoResize()
|
|
789
|
+
Use this method for resize iFrame according content height
|
|
790
|
+
|
|
791
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
792
|
+
**Overrides**: [<code>useAutoResize</code>](#user-content-w_HtmlMultiWidget+useAutoResize)
|
|
793
|
+
**Example**
|
|
794
|
+
|
|
795
|
+
```javascript
|
|
796
|
+
widget.useAutoResize();
|
|
797
|
+
```
|
|
798
|
+
<a name="w_MultiWidget+setStyles" id="w_MultiWidget+setStyles" href="#user-content-w_MultiWidget+setStyles"> </a>
|
|
799
|
+
|
|
800
|
+
### htmlWidget.setStyles(fields)
|
|
801
|
+
Object contain styles for widget
|
|
802
|
+
|
|
803
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
804
|
+
**Overrides**: [<code>setStyles</code>](#user-content-w_MultiWidget+setStyles)
|
|
805
|
+
|
|
806
|
+
| Param | Type | Description |
|
|
807
|
+
| --- | --- | --- |
|
|
808
|
+
| fields | [<code>IStyles</code>](#user-content-w_IStyles) | name of styles which can be shown in widget [STYLE](#user-content-w_STYLE) |
|
|
809
|
+
|
|
810
|
+
**Example**
|
|
811
|
+
|
|
812
|
+
```javascript
|
|
813
|
+
widget.setStyles({
|
|
814
|
+
background_color: 'rgb(0, 0, 0)',
|
|
815
|
+
border_color: 'yellow',
|
|
816
|
+
text_color: '#FFFFAA',
|
|
817
|
+
button_color: 'rgba(255, 255, 255, 0.9)',
|
|
818
|
+
font_size: '20px'
|
|
819
|
+
fort_family: 'fantasy'
|
|
820
|
+
});
|
|
821
|
+
```
|
|
822
|
+
<a name="w_MultiWidget+usePhoneCountryMask" id="w_MultiWidget+usePhoneCountryMask" href="#user-content-w_MultiWidget+usePhoneCountryMask"> </a>
|
|
823
|
+
|
|
824
|
+
### htmlWidget.usePhoneCountryMask([options])
|
|
825
|
+
Method to set a country code mask for the phone input.
|
|
826
|
+
|
|
827
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
828
|
+
**Overrides**: [<code>usePhoneCountryMask</code>](#user-content-w_MultiWidget+usePhoneCountryMask)
|
|
829
|
+
|
|
830
|
+
| Param | Type | Description |
|
|
831
|
+
| --- | --- | --- |
|
|
832
|
+
| [options] | <code>object</code> | Options for configure the phone mask. |
|
|
833
|
+
| [options.default_country] | <code>string</code> | Set a default country for the mask. |
|
|
834
|
+
| [options.preferred_countries] | <code>Array.<string></code> | Set list of preferred countries for the top of the select box . |
|
|
835
|
+
| [options.only_countries] | <code>Array.<string></code> | Set list of countries to show in the select box. |
|
|
836
|
+
|
|
837
|
+
**Example**
|
|
838
|
+
|
|
839
|
+
```javascript
|
|
840
|
+
widget.usePhoneCountryMask();
|
|
841
|
+
```
|
|
842
|
+
**Example**
|
|
843
|
+
|
|
844
|
+
```javascript
|
|
845
|
+
widget.usePhoneCountryMask({
|
|
846
|
+
default_country: 'au',
|
|
847
|
+
preferred_countries: ['au', 'gb'],
|
|
848
|
+
only_countries: ['au', 'gb', 'us', 'ua']
|
|
849
|
+
});
|
|
850
|
+
```
|
|
851
|
+
<a name="w_MultiWidget+setTexts" id="w_MultiWidget+setTexts" href="#user-content-w_MultiWidget+setTexts"> </a>
|
|
852
|
+
|
|
853
|
+
### htmlWidget.setTexts(fields)
|
|
854
|
+
Method for set different texts inside the widget
|
|
855
|
+
|
|
856
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
857
|
+
**Overrides**: [<code>setTexts</code>](#user-content-w_MultiWidget+setTexts)
|
|
858
|
+
|
|
859
|
+
| Param | Type | Description |
|
|
860
|
+
| --- | --- | --- |
|
|
861
|
+
| fields | [<code>ITexts</code>](#user-content-w_ITexts) | name of text items which can be shown in widget [TEXT](#user-content-w_TEXT) |
|
|
862
|
+
|
|
863
|
+
**Example**
|
|
864
|
+
|
|
865
|
+
```javascript
|
|
866
|
+
widget.setTexts({
|
|
867
|
+
title: 'Your card',
|
|
868
|
+
finish_text: 'Payment resource was successfully accepted',
|
|
869
|
+
title_description: '* indicates required field',
|
|
870
|
+
submit_button: 'Save',
|
|
871
|
+
submit_button_processing: 'Load...',
|
|
872
|
+
});
|
|
873
|
+
```
|
|
874
|
+
<a name="w_MultiWidget+setElementStyle" id="w_MultiWidget+setElementStyle" href="#user-content-w_MultiWidget+setElementStyle"> </a>
|
|
875
|
+
|
|
876
|
+
### htmlWidget.setElementStyle(element, [state], styles)
|
|
877
|
+
Method for set styles for different elements and states
|
|
878
|
+
|
|
879
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
880
|
+
**Overrides**: [<code>setElementStyle</code>](#user-content-w_MultiWidget+setElementStyle)
|
|
881
|
+
|
|
882
|
+
| Param | Type | Description |
|
|
883
|
+
| --- | --- | --- |
|
|
884
|
+
| element | <code>string</code> | type of element for styling. These elements are available [STYLABLE_ELEMENT](#user-content-w_STYLABLE_ELEMENT) |
|
|
885
|
+
| [state] | <code>string</code> | state of element for styling. These states are available [STYLABLE_ELEMENT_STATE](#user-content-w_STYLABLE_ELEMENT_STATE) |
|
|
886
|
+
| styles | [<code>IElementStyleInput</code>](#user-content-w_IElementStyleInput) \| [<code>IElementStyleSubmitButton</code>](#user-content-w_IElementStyleSubmitButton) \| [<code>IElementStyleLabel</code>](#user-content-w_IElementStyleLabel) \| [<code>IElementStyleTitle</code>](#user-content-w_IElementStyleTitle) \| [<code>IElementStyleTitleDescription</code>](#user-content-w_IElementStyleTitleDescription) | styles list |
|
|
887
|
+
|
|
888
|
+
**Example**
|
|
889
|
+
|
|
890
|
+
```javascript
|
|
891
|
+
widget.setElementStyle('input', {
|
|
892
|
+
border: 'green solid 1px'
|
|
893
|
+
});
|
|
894
|
+
|
|
895
|
+
widget.setElementStyle('input', 'focus', {
|
|
896
|
+
border: 'blue solid 1px'
|
|
897
|
+
});
|
|
898
|
+
|
|
899
|
+
widget.setElementStyle('input', 'error', {
|
|
900
|
+
border: 'red solid 1px'
|
|
901
|
+
});
|
|
902
|
+
```
|
|
903
|
+
<a name="w_MultiWidget+setFormValues" id="w_MultiWidget+setFormValues" href="#user-content-w_MultiWidget+setFormValues"> </a>
|
|
904
|
+
|
|
905
|
+
### htmlWidget.setFormValues(fieldValues)
|
|
906
|
+
The method to set the predefined values for the form fields inside the widget
|
|
907
|
+
|
|
908
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
909
|
+
**Overrides**: [<code>setFormValues</code>](#user-content-w_MultiWidget+setFormValues)
|
|
910
|
+
|
|
911
|
+
| Param | Type | Description |
|
|
912
|
+
| --- | --- | --- |
|
|
913
|
+
| fieldValues | <code>Object</code> | Key of object is one of [FORM_FIELD](#user-content-w_FORM_FIELD), The object value is what we are expecting |
|
|
914
|
+
|
|
915
|
+
**Example**
|
|
916
|
+
|
|
917
|
+
```javascript
|
|
918
|
+
widget.setFormValues({
|
|
919
|
+
email: 'predefined@email.com',
|
|
920
|
+
card_name: 'Houston'
|
|
921
|
+
});
|
|
922
|
+
```
|
|
923
|
+
<a name="w_MultiWidget+setFormLabels" id="w_MultiWidget+setFormLabels" href="#user-content-w_MultiWidget+setFormLabels"> </a>
|
|
924
|
+
|
|
925
|
+
### htmlWidget.setFormLabels(fieldLabels)
|
|
926
|
+
The method to set custom form field labels
|
|
927
|
+
|
|
928
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
929
|
+
**Overrides**: [<code>setFormLabels</code>](#user-content-w_MultiWidget+setFormLabels)
|
|
930
|
+
|
|
931
|
+
| Param | Type | Description |
|
|
932
|
+
| --- | --- | --- |
|
|
933
|
+
| fieldLabels | <code>Object</code> | Key of object is one of [FORM_FIELD](#user-content-w_FORM_FIELD), The object value is what we are expecting |
|
|
934
|
+
|
|
935
|
+
**Example**
|
|
936
|
+
|
|
937
|
+
```javascript
|
|
938
|
+
widget.setFormPlaceholders({
|
|
939
|
+
card_name: 'Card Holder Name',
|
|
940
|
+
email: 'Email For Receipt'
|
|
941
|
+
})
|
|
942
|
+
```
|
|
943
|
+
<a name="w_MultiWidget+setFormPlaceholders" id="w_MultiWidget+setFormPlaceholders" href="#user-content-w_MultiWidget+setFormPlaceholders"> </a>
|
|
944
|
+
|
|
945
|
+
### htmlWidget.setFormPlaceholders(fieldPlaceholders)
|
|
946
|
+
The method to set custom form fields placeholders
|
|
947
|
+
|
|
948
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
949
|
+
**Overrides**: [<code>setFormPlaceholders</code>](#user-content-w_MultiWidget+setFormPlaceholders)
|
|
950
|
+
|
|
951
|
+
| Param | Type | Description |
|
|
952
|
+
| --- | --- | --- |
|
|
953
|
+
| fieldPlaceholders | <code>Object</code> | Key of object is one of [FORM_FIELD](#user-content-w_FORM_FIELD), Value of object is expected placeholder |
|
|
954
|
+
|
|
955
|
+
**Example**
|
|
956
|
+
|
|
957
|
+
```javascript
|
|
958
|
+
widget.setFormPlaceholders({
|
|
959
|
+
card_name: 'Input your card holder name...',
|
|
960
|
+
email: 'Input your email, like test@example.com'
|
|
961
|
+
})
|
|
962
|
+
```
|
|
963
|
+
<a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons"> </a>
|
|
964
|
+
|
|
965
|
+
### ~~htmlWidget.setIcons()~~
|
|
966
|
+
***Deprecated***
|
|
967
|
+
|
|
968
|
+
The method to change the widget icons
|
|
969
|
+
|
|
970
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
971
|
+
**Overrides**: [<code>setIcons</code>](#user-content-w_MultiWidget+setIcons)
|
|
972
|
+
<a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements"> </a>
|
|
973
|
+
|
|
974
|
+
### htmlWidget.setHiddenElements(elements)
|
|
975
|
+
Using this method you can set hidden elements inside widget
|
|
976
|
+
|
|
977
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
978
|
+
**Overrides**: [<code>setHiddenElements</code>](#user-content-w_MultiWidget+setHiddenElements)
|
|
979
|
+
|
|
980
|
+
| Param | Type | Description |
|
|
981
|
+
| --- | --- | --- |
|
|
982
|
+
| elements | <code>Array.<string></code> | list of element which can be hidden [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
|
|
983
|
+
|
|
984
|
+
**Example**
|
|
985
|
+
|
|
986
|
+
```javascript
|
|
987
|
+
widget.setHiddenElements(['submit_button', 'email']);
|
|
988
|
+
```
|
|
989
|
+
<a name="w_MultiWidget+setRefId" id="w_MultiWidget+setRefId" href="#user-content-w_MultiWidget+setRefId"> </a>
|
|
990
|
+
|
|
991
|
+
### htmlWidget.setRefId(refId)
|
|
992
|
+
Current method can set custom ID to identify the data in the future
|
|
993
|
+
|
|
994
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
995
|
+
**Overrides**: [<code>setRefId</code>](#user-content-w_MultiWidget+setRefId)
|
|
996
|
+
|
|
997
|
+
| Param | Type | Description |
|
|
998
|
+
| --- | --- | --- |
|
|
999
|
+
| refId | <code>string</code> | custom id |
|
|
1000
|
+
|
|
1001
|
+
**Example**
|
|
1002
|
+
|
|
1003
|
+
```javascript
|
|
1004
|
+
widget.setRefId('id');
|
|
1005
|
+
```
|
|
1006
|
+
<a name="w_MultiWidget+useGatewayFieldValidation" id="w_MultiWidget+useGatewayFieldValidation" href="#user-content-w_MultiWidget+useGatewayFieldValidation"> </a>
|
|
1007
|
+
|
|
1008
|
+
### htmlWidget.useGatewayFieldValidation()
|
|
1009
|
+
Current method can add visual validation from gateway to widget's form fields
|
|
1010
|
+
|
|
1011
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
1012
|
+
**Overrides**: [<code>useGatewayFieldValidation</code>](#user-content-w_MultiWidget+useGatewayFieldValidation)
|
|
1013
|
+
**Example**
|
|
1014
|
+
|
|
1015
|
+
```javascript
|
|
1016
|
+
widget.useGatewayFieldValidation();
|
|
1017
|
+
```
|
|
1018
|
+
<a name="w_MultiWidget+setSupportedCardIcons" id="w_MultiWidget+setSupportedCardIcons" href="#user-content-w_MultiWidget+setSupportedCardIcons"> </a>
|
|
1019
|
+
|
|
1020
|
+
### htmlWidget.setSupportedCardIcons(elements, validateCardNumberInput)
|
|
1021
|
+
Current method can set icons of supported card types
|
|
1022
|
+
|
|
1023
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
1024
|
+
**Overrides**: [<code>setSupportedCardIcons</code>](#user-content-w_MultiWidget+setSupportedCardIcons)
|
|
1025
|
+
|
|
1026
|
+
| Param | Type | Description |
|
|
1027
|
+
| --- | --- | --- |
|
|
1028
|
+
| elements | <code>Array.<string></code> | [SUPPORTED_CARD_TYPES](#user-content-w_SUPPORTED_CARD_TYPES) |
|
|
1029
|
+
| validateCardNumberInput | <code>boolean</code> | [validateCardNumberInput=false] - using this param you allow validation for card number input on supported card types |
|
|
1030
|
+
|
|
1031
|
+
**Example**
|
|
1032
|
+
|
|
1033
|
+
```javascript
|
|
1034
|
+
widget.setSupportedCardIcons(['mastercard', 'visa'], validateCardNumberInput);
|
|
1035
|
+
```
|
|
1036
|
+
<a name="w_MultiWidget+setEnv" id="w_MultiWidget+setEnv" href="#user-content-w_MultiWidget+setEnv"> </a>
|
|
1037
|
+
|
|
1038
|
+
### htmlWidget.setEnv(env, [alias])
|
|
1039
|
+
Current method can change environment. By default environment = sandbox.
|
|
1040
|
+
Also we can change domain alias for this environment. By default domain_alias = paydock.com
|
|
1041
|
+
|
|
1042
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
1043
|
+
**Overrides**: [<code>setEnv</code>](#user-content-w_MultiWidget+setEnv)
|
|
1044
|
+
|
|
1045
|
+
| Param | Type | Description |
|
|
1046
|
+
| --- | --- | --- |
|
|
1047
|
+
| env | <code>string</code> | sandbox, production |
|
|
1048
|
+
| [alias] | <code>string</code> | Own domain alias |
|
|
1049
|
+
|
|
1050
|
+
**Example**
|
|
1051
|
+
|
|
1052
|
+
```javascript
|
|
1053
|
+
widget.setEnv('production', 'paydock.com');
|
|
1054
|
+
```
|
|
1055
|
+
<a name="w_MultiWidget+loadIFrameUrl" id="w_MultiWidget+loadIFrameUrl" href="#user-content-w_MultiWidget+loadIFrameUrl"> </a>
|
|
1056
|
+
|
|
1057
|
+
### htmlWidget.loadIFrameUrl()
|
|
1058
|
+
Method for creating iframe url
|
|
1059
|
+
|
|
1060
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
1061
|
+
**Overrides**: [<code>loadIFrameUrl</code>](#user-content-w_MultiWidget+loadIFrameUrl)
|
|
1062
|
+
**Example**
|
|
1063
|
+
|
|
1064
|
+
```javascript
|
|
1065
|
+
widget.loadIFrameUrl(function (url) {
|
|
1066
|
+
console.log(url);
|
|
1067
|
+
}, function (errors) {
|
|
1068
|
+
console.log(errors);
|
|
1069
|
+
});
|
|
1070
|
+
```
|
|
1071
|
+
<a name="w_MultiWidget+setLanguage" id="w_MultiWidget+setLanguage" href="#user-content-w_MultiWidget+setLanguage"> </a>
|
|
1072
|
+
|
|
1073
|
+
### htmlWidget.setLanguage(code)
|
|
1074
|
+
Method for setting a custom language code
|
|
1075
|
+
|
|
1076
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
1077
|
+
**Overrides**: [<code>setLanguage</code>](#user-content-w_MultiWidget+setLanguage)
|
|
1078
|
+
|
|
1079
|
+
| Param | Type | Description |
|
|
1080
|
+
| --- | --- | --- |
|
|
1081
|
+
| code | <code>string</code> | ISO 639-1 |
|
|
1082
|
+
|
|
1083
|
+
**Example**
|
|
1084
|
+
|
|
1085
|
+
```javascript
|
|
1086
|
+
config.setLanguage('en');
|
|
1087
|
+
```
|
|
1088
|
+
<a name="w_HtmlMultiWidget" id="w_HtmlMultiWidget" href="#user-content-w_HtmlMultiWidget"> </a>
|
|
1089
|
+
|
|
1090
|
+
## HtmlMultiWidget ⇐ [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
1091
|
+
Class HtmlMultiWidget include method for working with html
|
|
1092
|
+
|
|
1093
|
+
**Kind**: global class
|
|
1094
|
+
**Extends**: [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
1095
|
+
|
|
1096
|
+
* [HtmlMultiWidget](#user-content-w_HtmlMultiWidget) ⇐ [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
1097
|
+
* [new HtmlMultiWidget(selector, publicKey, conf)](#user-content-w_new_HtmlMultiWidget_new)
|
|
1098
|
+
* [.load()](#user-content-w_HtmlMultiWidget+load)
|
|
1099
|
+
* [.on(eventName, [cb])](#user-content-w_HtmlMultiWidget+on) ⇒ <code>Promise.<(IEventData\|IEventMetaData\|IEventFinishData\|IFormValidation)></code> \| <code>void</code>
|
|
1100
|
+
* [.trigger(triggers, data)](#user-content-w_HtmlMultiWidget+trigger)
|
|
1101
|
+
* [.getValidationState()](#user-content-w_HtmlMultiWidget+getValidationState) ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
|
|
1102
|
+
* [.isValidForm()](#user-content-w_HtmlMultiWidget+isValidForm) ⇒ <code>boolean</code>
|
|
1103
|
+
* [.isInvalidField(field)](#user-content-w_HtmlMultiWidget+isInvalidField) ⇒ <code>boolean</code>
|
|
1104
|
+
* [.isFieldErrorShowed(field)](#user-content-w_HtmlMultiWidget+isFieldErrorShowed) ⇒ <code>boolean</code>
|
|
1105
|
+
* [.isInvalidFieldByValidator(field, validator)](#user-content-w_HtmlMultiWidget+isInvalidFieldByValidator) ⇒ <code>boolean</code>
|
|
1106
|
+
* [.hide([saveSize])](#user-content-w_HtmlMultiWidget+hide)
|
|
1107
|
+
* [.show()](#user-content-w_HtmlMultiWidget+show)
|
|
1108
|
+
* [.reload()](#user-content-w_HtmlMultiWidget+reload)
|
|
1109
|
+
* [.hideElements(elements)](#user-content-w_HtmlMultiWidget+hideElements)
|
|
1110
|
+
* [.showElements(elements)](#user-content-w_HtmlMultiWidget+showElements)
|
|
1111
|
+
* [.updateFormValues(fieldValues)](#user-content-w_HtmlMultiWidget+updateFormValues)
|
|
1112
|
+
* [.onFinishInsert(selector, dataType)](#user-content-w_HtmlMultiWidget+onFinishInsert)
|
|
1113
|
+
* [.interceptSubmitForm(selector)](#user-content-w_HtmlMultiWidget+interceptSubmitForm)
|
|
1114
|
+
* [.useCheckoutAutoSubmit()](#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit)
|
|
1115
|
+
* [.useAutoResize()](#user-content-w_HtmlMultiWidget+useAutoResize)
|
|
1116
|
+
* [.setStyles(fields)](#user-content-w_MultiWidget+setStyles)
|
|
1117
|
+
* [.usePhoneCountryMask([options])](#user-content-w_MultiWidget+usePhoneCountryMask)
|
|
1118
|
+
* [.setTexts(fields)](#user-content-w_MultiWidget+setTexts)
|
|
1119
|
+
* [.setElementStyle(element, [state], styles)](#user-content-w_MultiWidget+setElementStyle)
|
|
1120
|
+
* [.setFormValues(fieldValues)](#user-content-w_MultiWidget+setFormValues)
|
|
1121
|
+
* [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
|
|
1122
|
+
* [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
|
|
1123
|
+
* [.setFormElements(elements)](#user-content-w_MultiWidget+setFormElements)
|
|
1124
|
+
* ~~[.setIcons()](#user-content-w_MultiWidget+setIcons)~~
|
|
1125
|
+
* [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
|
|
1126
|
+
* [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
|
|
1127
|
+
* [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
|
|
1128
|
+
* [.setSupportedCardIcons(elements, validateCardNumberInput)](#user-content-w_MultiWidget+setSupportedCardIcons)
|
|
1129
|
+
* [.setEnv(env, [alias])](#user-content-w_MultiWidget+setEnv)
|
|
1130
|
+
* [.loadIFrameUrl()](#user-content-w_MultiWidget+loadIFrameUrl)
|
|
1131
|
+
* [.setLanguage(code)](#user-content-w_MultiWidget+setLanguage)
|
|
1132
|
+
|
|
1133
|
+
<a name="w_new_HtmlMultiWidget_new" id="w_new_HtmlMultiWidget_new" href="#user-content-w_new_HtmlMultiWidget_new"> </a>
|
|
1134
|
+
|
|
1135
|
+
### new HtmlMultiWidget(selector, publicKey, conf)
|
|
1136
|
+
|
|
1137
|
+
| Param | Type | Description |
|
|
1138
|
+
| --- | --- | --- |
|
|
1139
|
+
| selector | <code>string</code> | Selector of html element. Container for widget |
|
|
1140
|
+
| publicKey | <code>string</code> | PayDock users public key |
|
|
1141
|
+
| conf | [<code>Configuration</code>](#user-content-w_Configuration) \| <code>string</code> \| [<code>Array.<Configuration></code>](#user-content-w_Configuration) \| <code>Array.<string></code> | exemplar[s] Configuration class OR configuration token |
|
|
1142
|
+
|
|
1143
|
+
**Example**
|
|
1144
|
+
|
|
1145
|
+
```javascript
|
|
1146
|
+
var widget = new MultiWidget('#widget', 'publicKey','configurationToken'); // With a pre-created configuration token
|
|
1147
|
+
|
|
1148
|
+
var widget = new MultiWidget('#widget', 'publicKey',['configurationToken', 'configurationToken2']); // With pre-created configuration tokens
|
|
1149
|
+
|
|
1150
|
+
var widget = new MultiWidget('#widget', 'publicKey', new Configuration('gatewayId')); With Configuration
|
|
1151
|
+
|
|
1152
|
+
var widget = new MultiWidget('#widget', 'publicKey',[ With Configurations
|
|
1153
|
+
Configuration(), // default gateway_id,
|
|
1154
|
+
Configuration('not_configured'), // without gateway,
|
|
1155
|
+
Configuration('gatewayId'),
|
|
1156
|
+
Configuration('gatewayId', 'bank_account')
|
|
1157
|
+
]);
|
|
1158
|
+
```
|
|
1159
|
+
<a name="w_HtmlMultiWidget+load" id="w_HtmlMultiWidget+load" href="#user-content-w_HtmlMultiWidget+load"> </a>
|
|
1160
|
+
|
|
1161
|
+
### htmlMultiWidget.load()
|
|
1162
|
+
The final method to beginning, the load process of widget to html
|
|
1163
|
+
|
|
1164
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1165
|
+
<a name="w_HtmlMultiWidget+on" id="w_HtmlMultiWidget+on" href="#user-content-w_HtmlMultiWidget+on"> </a>
|
|
1166
|
+
|
|
1167
|
+
### htmlMultiWidget.on(eventName, [cb]) ⇒ <code>Promise.<(IEventData\|IEventMetaData\|IEventFinishData\|IFormValidation)></code> \| <code>void</code>
|
|
1168
|
+
Listen to events of widget
|
|
1169
|
+
|
|
1170
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1171
|
+
|
|
1172
|
+
| Param | Type | Description |
|
|
1173
|
+
| --- | --- | --- |
|
|
1174
|
+
| eventName | <code>string</code> | Available event names [EVENT](#user-content-w_EVENT) |
|
|
1175
|
+
| [cb] | <code>listener</code> | |
|
|
1176
|
+
|
|
1177
|
+
**Example**
|
|
1178
|
+
|
|
1179
|
+
```javascript
|
|
1180
|
+
widget.on('form_submit', function (data) {
|
|
1181
|
+
console.log(data);
|
|
1182
|
+
});
|
|
1183
|
+
// or
|
|
1184
|
+
widget.on('form_submit').then(function (data) {
|
|
1185
|
+
console.log(data);
|
|
1186
|
+
});
|
|
1187
|
+
```
|
|
1188
|
+
<a name="w_HtmlMultiWidget+trigger" id="w_HtmlMultiWidget+trigger" href="#user-content-w_HtmlMultiWidget+trigger"> </a>
|
|
1189
|
+
|
|
1190
|
+
### htmlMultiWidget.trigger(triggers, data)
|
|
1191
|
+
This callback will be called for every trigger
|
|
1192
|
+
|
|
1193
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1194
|
+
|
|
1195
|
+
| Param | Type | Description |
|
|
1196
|
+
| --- | --- | --- |
|
|
1197
|
+
| triggers | <code>triggerName</code> | submit_form, tab |
|
|
1198
|
+
| data | [<code>ITriggerData</code>](#user-content-w_ITriggerData) | which will be sending to widget |
|
|
1199
|
+
|
|
1200
|
+
<a name="w_HtmlMultiWidget+getValidationState" id="w_HtmlMultiWidget+getValidationState" href="#user-content-w_HtmlMultiWidget+getValidationState"> </a>
|
|
1201
|
+
|
|
1202
|
+
### htmlMultiWidget.getValidationState() ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
|
|
1203
|
+
Using this method you can get validation state information
|
|
1204
|
+
|
|
1205
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1206
|
+
**Returns**: [<code>IFormValidation</code>](#user-content-w_IFormValidation) - Form validation object
|
|
1207
|
+
<a name="w_HtmlMultiWidget+isValidForm" id="w_HtmlMultiWidget+isValidForm" href="#user-content-w_HtmlMultiWidget+isValidForm"> </a>
|
|
1208
|
+
|
|
1209
|
+
### htmlMultiWidget.isValidForm() ⇒ <code>boolean</code>
|
|
1210
|
+
Using this method you can check if the form is valid
|
|
1211
|
+
|
|
1212
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1213
|
+
**Returns**: <code>boolean</code> - Form is valid
|
|
1214
|
+
<a name="w_HtmlMultiWidget+isInvalidField" id="w_HtmlMultiWidget+isInvalidField" href="#user-content-w_HtmlMultiWidget+isInvalidField"> </a>
|
|
1215
|
+
|
|
1216
|
+
### htmlMultiWidget.isInvalidField(field) ⇒ <code>boolean</code>
|
|
1217
|
+
Using this method you can check if a specific form field is invalid
|
|
1218
|
+
|
|
1219
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1220
|
+
**Returns**: <code>boolean</code> - Field is invalid
|
|
1221
|
+
|
|
1222
|
+
| Param | Type | Description |
|
|
1223
|
+
| --- | --- | --- |
|
|
1224
|
+
| field | <code>string</code> | Field name |
|
|
1225
|
+
|
|
1226
|
+
<a name="w_HtmlMultiWidget+isFieldErrorShowed" id="w_HtmlMultiWidget+isFieldErrorShowed" href="#user-content-w_HtmlMultiWidget+isFieldErrorShowed"> </a>
|
|
1227
|
+
|
|
1228
|
+
### htmlMultiWidget.isFieldErrorShowed(field) ⇒ <code>boolean</code>
|
|
1229
|
+
Using this method you can check if an error is displayed on a specific field
|
|
1230
|
+
|
|
1231
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1232
|
+
**Returns**: <code>boolean</code> - Error is showed on field
|
|
1233
|
+
|
|
1234
|
+
| Param | Type | Description |
|
|
1235
|
+
| --- | --- | --- |
|
|
1236
|
+
| field | <code>string</code> | Field name |
|
|
1237
|
+
|
|
1238
|
+
<a name="w_HtmlMultiWidget+isInvalidFieldByValidator" id="w_HtmlMultiWidget+isInvalidFieldByValidator" href="#user-content-w_HtmlMultiWidget+isInvalidFieldByValidator"> </a>
|
|
1239
|
+
|
|
1240
|
+
### htmlMultiWidget.isInvalidFieldByValidator(field, validator) ⇒ <code>boolean</code>
|
|
1241
|
+
Using this method you can check if a specific field is invalid
|
|
1242
|
+
|
|
1243
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1244
|
+
**Returns**: <code>boolean</code> - Field is invalid by validator
|
|
1245
|
+
|
|
1246
|
+
| Param | Type | Description |
|
|
1247
|
+
| --- | --- | --- |
|
|
1248
|
+
| field | <code>string</code> | Field name |
|
|
1249
|
+
| validator | <code>string</code> | Validator name. Available validators: `required, cardNumberValidator, expireDateValidation` |
|
|
1250
|
+
|
|
1251
|
+
<a name="w_HtmlMultiWidget+hide" id="w_HtmlMultiWidget+hide" href="#user-content-w_HtmlMultiWidget+hide"> </a>
|
|
1252
|
+
|
|
1253
|
+
### htmlMultiWidget.hide([saveSize])
|
|
1254
|
+
Using this method you can hide widget after load
|
|
1255
|
+
|
|
1256
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1257
|
+
|
|
1258
|
+
| Param | Type | Default | Description |
|
|
1259
|
+
| --- | --- | --- | --- |
|
|
1260
|
+
| [saveSize] | <code>boolean</code> | <code>false</code> | using this param you can save iframe's size |
|
|
1261
|
+
|
|
1262
|
+
<a name="w_HtmlMultiWidget+show" id="w_HtmlMultiWidget+show" href="#user-content-w_HtmlMultiWidget+show"> </a>
|
|
1263
|
+
|
|
1264
|
+
### htmlMultiWidget.show()
|
|
1265
|
+
Using this method you can show widget after using hide method
|
|
1266
|
+
|
|
1267
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1268
|
+
<a name="w_HtmlMultiWidget+reload" id="w_HtmlMultiWidget+reload" href="#user-content-w_HtmlMultiWidget+reload"> </a>
|
|
1269
|
+
|
|
1270
|
+
### htmlMultiWidget.reload()
|
|
1271
|
+
Using this method you can reload widget
|
|
1272
|
+
|
|
1273
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1274
|
+
<a name="w_HtmlMultiWidget+hideElements" id="w_HtmlMultiWidget+hideElements" href="#user-content-w_HtmlMultiWidget+hideElements"> </a>
|
|
1275
|
+
|
|
1276
|
+
### htmlMultiWidget.hideElements(elements)
|
|
1277
|
+
Using this method you can hide any elements inside widget
|
|
1278
|
+
|
|
1279
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1280
|
+
|
|
1281
|
+
| Param | Type | Description |
|
|
1282
|
+
| --- | --- | --- |
|
|
1283
|
+
| elements | <code>Array.<string></code> | list of element which can be hidden [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
|
|
1284
|
+
|
|
1285
|
+
**Example**
|
|
1286
|
+
|
|
1287
|
+
```javascript
|
|
1288
|
+
widget.hideElements(['submit_button', 'email']);
|
|
1289
|
+
```
|
|
1290
|
+
<a name="w_HtmlMultiWidget+showElements" id="w_HtmlMultiWidget+showElements" href="#user-content-w_HtmlMultiWidget+showElements"> </a>
|
|
1291
|
+
|
|
1292
|
+
### htmlMultiWidget.showElements(elements)
|
|
1293
|
+
Using this method you can show any elements inside widget
|
|
1294
|
+
|
|
1295
|
+
* @example
|
|
1296
|
+
widget.showElements(['submit_button', 'email']);
|
|
1297
|
+
|
|
1298
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1299
|
+
|
|
1300
|
+
| Param | Type | Description |
|
|
1301
|
+
| --- | --- | --- |
|
|
1302
|
+
| elements | <code>Array.<string></code> | list of element which can be showed [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
|
|
1303
|
+
|
|
1304
|
+
<a name="w_HtmlMultiWidget+updateFormValues" id="w_HtmlMultiWidget+updateFormValues" href="#user-content-w_HtmlMultiWidget+updateFormValues"> </a>
|
|
1305
|
+
|
|
1306
|
+
### htmlMultiWidget.updateFormValues(fieldValues)
|
|
1307
|
+
Method for update values for form fields inside the widget
|
|
1308
|
+
|
|
1309
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1310
|
+
|
|
1311
|
+
| Param | Type | Description |
|
|
1312
|
+
| --- | --- | --- |
|
|
1313
|
+
| fieldValues | <code>IFormValues</code> | Fields with values |
|
|
1314
|
+
|
|
1315
|
+
**Example**
|
|
1316
|
+
|
|
1317
|
+
```javascript
|
|
1318
|
+
widget.updateFormValues({
|
|
1319
|
+
email: 'predefined@email.com',
|
|
1320
|
+
card_name: 'Houston'
|
|
1321
|
+
});
|
|
1322
|
+
```
|
|
1323
|
+
<a name="w_HtmlMultiWidget+onFinishInsert" id="w_HtmlMultiWidget+onFinishInsert" href="#user-content-w_HtmlMultiWidget+onFinishInsert"> </a>
|
|
1324
|
+
|
|
1325
|
+
### htmlMultiWidget.onFinishInsert(selector, dataType)
|
|
1326
|
+
After finish event of widget, data (dataType) will be insert to input (selector)
|
|
1327
|
+
|
|
1328
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1329
|
+
|
|
1330
|
+
| Param | Type | Description |
|
|
1331
|
+
| --- | --- | --- |
|
|
1332
|
+
| selector | <code>string</code> | css selector . [] # |
|
|
1333
|
+
| dataType | <code>string</code> | data type of IEventData object. |
|
|
1334
|
+
|
|
1335
|
+
<a name="w_HtmlMultiWidget+interceptSubmitForm" id="w_HtmlMultiWidget+interceptSubmitForm" href="#user-content-w_HtmlMultiWidget+interceptSubmitForm"> </a>
|
|
1336
|
+
|
|
1337
|
+
### htmlMultiWidget.interceptSubmitForm(selector)
|
|
1338
|
+
Widget will intercept submit of your form for processing widget
|
|
1339
|
+
|
|
1340
|
+
Process: click by submit button in your form --> submit widget ---> submit your form
|
|
1341
|
+
|
|
1342
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1343
|
+
**Note**: submit button in widget will be hidden.
|
|
1344
|
+
|
|
1345
|
+
| Param | Type | Description |
|
|
1346
|
+
| --- | --- | --- |
|
|
1347
|
+
| selector | <code>string</code> | css selector of your form |
|
|
1348
|
+
|
|
1349
|
+
**Example**
|
|
1350
|
+
|
|
1351
|
+
```javascript
|
|
1352
|
+
<form id="myForm">
|
|
1353
|
+
<input name="amount">
|
|
1354
|
+
<button type="submit">Submit</button>
|
|
1355
|
+
</form>
|
|
1356
|
+
<!--
|
|
1357
|
+
-->
|
|
1358
|
+
<script>
|
|
1359
|
+
widget.interceptSubmitForm('#myForm');
|
|
1360
|
+
</script>
|
|
1361
|
+
```
|
|
1362
|
+
<a name="w_HtmlMultiWidget+useCheckoutAutoSubmit" id="w_HtmlMultiWidget+useCheckoutAutoSubmit" href="#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit"> </a>
|
|
1363
|
+
|
|
1364
|
+
### htmlMultiWidget.useCheckoutAutoSubmit()
|
|
1365
|
+
This method hides a submit button and automatically execute form submit
|
|
1366
|
+
|
|
1367
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1368
|
+
<a name="w_HtmlMultiWidget+useAutoResize" id="w_HtmlMultiWidget+useAutoResize" href="#user-content-w_HtmlMultiWidget+useAutoResize"> </a>
|
|
1369
|
+
|
|
1370
|
+
### htmlMultiWidget.useAutoResize()
|
|
1371
|
+
Use this method for resize iFrame according content height
|
|
1372
|
+
|
|
1373
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1374
|
+
**Example**
|
|
1375
|
+
|
|
1376
|
+
```javascript
|
|
1377
|
+
widget.useAutoResize();
|
|
1378
|
+
```
|
|
1379
|
+
<a name="w_MultiWidget+setStyles" id="w_MultiWidget+setStyles" href="#user-content-w_MultiWidget+setStyles"> </a>
|
|
1380
|
+
|
|
1381
|
+
### htmlMultiWidget.setStyles(fields)
|
|
1382
|
+
Object contain styles for widget
|
|
1383
|
+
|
|
1384
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1385
|
+
**Overrides**: [<code>setStyles</code>](#user-content-w_MultiWidget+setStyles)
|
|
1386
|
+
|
|
1387
|
+
| Param | Type | Description |
|
|
1388
|
+
| --- | --- | --- |
|
|
1389
|
+
| fields | [<code>IStyles</code>](#user-content-w_IStyles) | name of styles which can be shown in widget [STYLE](#user-content-w_STYLE) |
|
|
1390
|
+
|
|
1391
|
+
**Example**
|
|
1392
|
+
|
|
1393
|
+
```javascript
|
|
1394
|
+
widget.setStyles({
|
|
1395
|
+
background_color: 'rgb(0, 0, 0)',
|
|
1396
|
+
border_color: 'yellow',
|
|
1397
|
+
text_color: '#FFFFAA',
|
|
1398
|
+
button_color: 'rgba(255, 255, 255, 0.9)',
|
|
1399
|
+
font_size: '20px'
|
|
1400
|
+
fort_family: 'fantasy'
|
|
1401
|
+
});
|
|
1402
|
+
```
|
|
1403
|
+
<a name="w_MultiWidget+usePhoneCountryMask" id="w_MultiWidget+usePhoneCountryMask" href="#user-content-w_MultiWidget+usePhoneCountryMask"> </a>
|
|
1404
|
+
|
|
1405
|
+
### htmlMultiWidget.usePhoneCountryMask([options])
|
|
1406
|
+
Method to set a country code mask for the phone input.
|
|
1407
|
+
|
|
1408
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1409
|
+
**Overrides**: [<code>usePhoneCountryMask</code>](#user-content-w_MultiWidget+usePhoneCountryMask)
|
|
1410
|
+
|
|
1411
|
+
| Param | Type | Description |
|
|
1412
|
+
| --- | --- | --- |
|
|
1413
|
+
| [options] | <code>object</code> | Options for configure the phone mask. |
|
|
1414
|
+
| [options.default_country] | <code>string</code> | Set a default country for the mask. |
|
|
1415
|
+
| [options.preferred_countries] | <code>Array.<string></code> | Set list of preferred countries for the top of the select box . |
|
|
1416
|
+
| [options.only_countries] | <code>Array.<string></code> | Set list of countries to show in the select box. |
|
|
1417
|
+
|
|
1418
|
+
**Example**
|
|
1419
|
+
|
|
1420
|
+
```javascript
|
|
1421
|
+
widget.usePhoneCountryMask();
|
|
1422
|
+
```
|
|
1423
|
+
**Example**
|
|
1424
|
+
|
|
1425
|
+
```javascript
|
|
1426
|
+
widget.usePhoneCountryMask({
|
|
1427
|
+
default_country: 'au',
|
|
1428
|
+
preferred_countries: ['au', 'gb'],
|
|
1429
|
+
only_countries: ['au', 'gb', 'us', 'ua']
|
|
1430
|
+
});
|
|
1431
|
+
```
|
|
1432
|
+
<a name="w_MultiWidget+setTexts" id="w_MultiWidget+setTexts" href="#user-content-w_MultiWidget+setTexts"> </a>
|
|
1433
|
+
|
|
1434
|
+
### htmlMultiWidget.setTexts(fields)
|
|
1435
|
+
Method for set different texts inside the widget
|
|
1436
|
+
|
|
1437
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1438
|
+
**Overrides**: [<code>setTexts</code>](#user-content-w_MultiWidget+setTexts)
|
|
1439
|
+
|
|
1440
|
+
| Param | Type | Description |
|
|
1441
|
+
| --- | --- | --- |
|
|
1442
|
+
| fields | [<code>ITexts</code>](#user-content-w_ITexts) | name of text items which can be shown in widget [TEXT](#user-content-w_TEXT) |
|
|
1443
|
+
|
|
1444
|
+
**Example**
|
|
1445
|
+
|
|
1446
|
+
```javascript
|
|
1447
|
+
widget.setTexts({
|
|
1448
|
+
title: 'Your card',
|
|
1449
|
+
finish_text: 'Payment resource was successfully accepted',
|
|
1450
|
+
title_description: '* indicates required field',
|
|
1451
|
+
submit_button: 'Save',
|
|
1452
|
+
submit_button_processing: 'Load...',
|
|
1453
|
+
});
|
|
1454
|
+
```
|
|
1455
|
+
<a name="w_MultiWidget+setElementStyle" id="w_MultiWidget+setElementStyle" href="#user-content-w_MultiWidget+setElementStyle"> </a>
|
|
1456
|
+
|
|
1457
|
+
### htmlMultiWidget.setElementStyle(element, [state], styles)
|
|
1458
|
+
Method for set styles for different elements and states
|
|
1459
|
+
|
|
1460
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1461
|
+
**Overrides**: [<code>setElementStyle</code>](#user-content-w_MultiWidget+setElementStyle)
|
|
1462
|
+
|
|
1463
|
+
| Param | Type | Description |
|
|
1464
|
+
| --- | --- | --- |
|
|
1465
|
+
| element | <code>string</code> | type of element for styling. These elements are available [STYLABLE_ELEMENT](#user-content-w_STYLABLE_ELEMENT) |
|
|
1466
|
+
| [state] | <code>string</code> | state of element for styling. These states are available [STYLABLE_ELEMENT_STATE](#user-content-w_STYLABLE_ELEMENT_STATE) |
|
|
1467
|
+
| styles | [<code>IElementStyleInput</code>](#user-content-w_IElementStyleInput) \| [<code>IElementStyleSubmitButton</code>](#user-content-w_IElementStyleSubmitButton) \| [<code>IElementStyleLabel</code>](#user-content-w_IElementStyleLabel) \| [<code>IElementStyleTitle</code>](#user-content-w_IElementStyleTitle) \| [<code>IElementStyleTitleDescription</code>](#user-content-w_IElementStyleTitleDescription) | styles list |
|
|
1468
|
+
|
|
1469
|
+
**Example**
|
|
1470
|
+
|
|
1471
|
+
```javascript
|
|
1472
|
+
widget.setElementStyle('input', {
|
|
1473
|
+
border: 'green solid 1px'
|
|
1474
|
+
});
|
|
1475
|
+
|
|
1476
|
+
widget.setElementStyle('input', 'focus', {
|
|
1477
|
+
border: 'blue solid 1px'
|
|
1478
|
+
});
|
|
1479
|
+
|
|
1480
|
+
widget.setElementStyle('input', 'error', {
|
|
1481
|
+
border: 'red solid 1px'
|
|
1482
|
+
});
|
|
1483
|
+
```
|
|
1484
|
+
<a name="w_MultiWidget+setFormValues" id="w_MultiWidget+setFormValues" href="#user-content-w_MultiWidget+setFormValues"> </a>
|
|
1485
|
+
|
|
1486
|
+
### htmlMultiWidget.setFormValues(fieldValues)
|
|
1487
|
+
The method to set the predefined values for the form fields inside the widget
|
|
1488
|
+
|
|
1489
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1490
|
+
**Overrides**: [<code>setFormValues</code>](#user-content-w_MultiWidget+setFormValues)
|
|
1491
|
+
|
|
1492
|
+
| Param | Type | Description |
|
|
1493
|
+
| --- | --- | --- |
|
|
1494
|
+
| fieldValues | <code>Object</code> | Key of object is one of [FORM_FIELD](#user-content-w_FORM_FIELD), The object value is what we are expecting |
|
|
1495
|
+
|
|
1496
|
+
**Example**
|
|
1497
|
+
|
|
1498
|
+
```javascript
|
|
1499
|
+
widget.setFormValues({
|
|
1500
|
+
email: 'predefined@email.com',
|
|
1501
|
+
card_name: 'Houston'
|
|
1502
|
+
});
|
|
1503
|
+
```
|
|
1504
|
+
<a name="w_MultiWidget+setFormLabels" id="w_MultiWidget+setFormLabels" href="#user-content-w_MultiWidget+setFormLabels"> </a>
|
|
1505
|
+
|
|
1506
|
+
### htmlMultiWidget.setFormLabels(fieldLabels)
|
|
1507
|
+
The method to set custom form field labels
|
|
1508
|
+
|
|
1509
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1510
|
+
**Overrides**: [<code>setFormLabels</code>](#user-content-w_MultiWidget+setFormLabels)
|
|
1511
|
+
|
|
1512
|
+
| Param | Type | Description |
|
|
1513
|
+
| --- | --- | --- |
|
|
1514
|
+
| fieldLabels | <code>Object</code> | Key of object is one of [FORM_FIELD](#user-content-w_FORM_FIELD), The object value is what we are expecting |
|
|
1515
|
+
|
|
1516
|
+
**Example**
|
|
1517
|
+
|
|
1518
|
+
```javascript
|
|
1519
|
+
widget.setFormPlaceholders({
|
|
1520
|
+
card_name: 'Card Holder Name',
|
|
1521
|
+
email: 'Email For Receipt'
|
|
1522
|
+
})
|
|
1523
|
+
```
|
|
1524
|
+
<a name="w_MultiWidget+setFormPlaceholders" id="w_MultiWidget+setFormPlaceholders" href="#user-content-w_MultiWidget+setFormPlaceholders"> </a>
|
|
1525
|
+
|
|
1526
|
+
### htmlMultiWidget.setFormPlaceholders(fieldPlaceholders)
|
|
1527
|
+
The method to set custom form fields placeholders
|
|
1528
|
+
|
|
1529
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1530
|
+
**Overrides**: [<code>setFormPlaceholders</code>](#user-content-w_MultiWidget+setFormPlaceholders)
|
|
1531
|
+
|
|
1532
|
+
| Param | Type | Description |
|
|
1533
|
+
| --- | --- | --- |
|
|
1534
|
+
| fieldPlaceholders | <code>Object</code> | Key of object is one of [FORM_FIELD](#user-content-w_FORM_FIELD), Value of object is expected placeholder |
|
|
1535
|
+
|
|
1536
|
+
**Example**
|
|
1537
|
+
|
|
1538
|
+
```javascript
|
|
1539
|
+
widget.setFormPlaceholders({
|
|
1540
|
+
card_name: 'Input your card holder name...',
|
|
1541
|
+
email: 'Input your email, like test@example.com'
|
|
1542
|
+
})
|
|
1543
|
+
```
|
|
1544
|
+
<a name="w_MultiWidget+setFormElements" id="w_MultiWidget+setFormElements" href="#user-content-w_MultiWidget+setFormElements"> </a>
|
|
1545
|
+
|
|
1546
|
+
### htmlMultiWidget.setFormElements(elements)
|
|
1547
|
+
The method to set the full configuration for the all specific form elements (label, placeholder, value)
|
|
1548
|
+
You can also use the other method for the partial configuration like: setFormValues, setFormPlaceholder, setFormLabel
|
|
1549
|
+
|
|
1550
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1551
|
+
**Overrides**: [<code>setFormElements</code>](#user-content-w_MultiWidget+setFormElements)
|
|
1552
|
+
|
|
1553
|
+
| Param | Type | Description |
|
|
1554
|
+
| --- | --- | --- |
|
|
1555
|
+
| elements | <code>string</code> | The list of elements |
|
|
1556
|
+
| elements[].field | <code>string</code> | Field name of the element [FORM_FIELD](#user-content-w_FORM_FIELD) |
|
|
1557
|
+
| elements[].placeholder | <code>string</code> | Set custom form field placeholder |
|
|
1558
|
+
| elements[].label | <code>string</code> | Set custom labels near form field |
|
|
1559
|
+
| elements[].value | <code>string</code> | Set predefined values for the form field |
|
|
1560
|
+
|
|
1561
|
+
**Example**
|
|
1562
|
+
|
|
1563
|
+
```javascript
|
|
1564
|
+
widget.setFormElements([
|
|
1565
|
+
{
|
|
1566
|
+
field: 'card_name',
|
|
1567
|
+
placeholder: 'Input your card holder name...',
|
|
1568
|
+
label: 'Card Holder Name',
|
|
1569
|
+
value: 'Houston',
|
|
1570
|
+
},
|
|
1571
|
+
{
|
|
1572
|
+
field: 'email',
|
|
1573
|
+
placeholder: 'Input your email, like test@example.com',
|
|
1574
|
+
label: 'Email For Receipt',
|
|
1575
|
+
value: 'predefined@email.com',
|
|
1576
|
+
},
|
|
1577
|
+
])
|
|
1578
|
+
```
|
|
1579
|
+
<a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons"> </a>
|
|
1580
|
+
|
|
1581
|
+
### ~~htmlMultiWidget.setIcons()~~
|
|
1582
|
+
***Deprecated***
|
|
1583
|
+
|
|
1584
|
+
The method to change the widget icons
|
|
1585
|
+
|
|
1586
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1587
|
+
**Overrides**: [<code>setIcons</code>](#user-content-w_MultiWidget+setIcons)
|
|
1588
|
+
<a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements"> </a>
|
|
1589
|
+
|
|
1590
|
+
### htmlMultiWidget.setHiddenElements(elements)
|
|
1591
|
+
Using this method you can set hidden elements inside widget
|
|
1592
|
+
|
|
1593
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1594
|
+
**Overrides**: [<code>setHiddenElements</code>](#user-content-w_MultiWidget+setHiddenElements)
|
|
1595
|
+
|
|
1596
|
+
| Param | Type | Description |
|
|
1597
|
+
| --- | --- | --- |
|
|
1598
|
+
| elements | <code>Array.<string></code> | list of element which can be hidden [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
|
|
1599
|
+
|
|
1600
|
+
**Example**
|
|
1601
|
+
|
|
1602
|
+
```javascript
|
|
1603
|
+
widget.setHiddenElements(['submit_button', 'email']);
|
|
1604
|
+
```
|
|
1605
|
+
<a name="w_MultiWidget+setRefId" id="w_MultiWidget+setRefId" href="#user-content-w_MultiWidget+setRefId"> </a>
|
|
1606
|
+
|
|
1607
|
+
### htmlMultiWidget.setRefId(refId)
|
|
1608
|
+
Current method can set custom ID to identify the data in the future
|
|
1609
|
+
|
|
1610
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1611
|
+
**Overrides**: [<code>setRefId</code>](#user-content-w_MultiWidget+setRefId)
|
|
1612
|
+
|
|
1613
|
+
| Param | Type | Description |
|
|
1614
|
+
| --- | --- | --- |
|
|
1615
|
+
| refId | <code>string</code> | custom id |
|
|
1616
|
+
|
|
1617
|
+
**Example**
|
|
1618
|
+
|
|
1619
|
+
```javascript
|
|
1620
|
+
widget.setRefId('id');
|
|
1621
|
+
```
|
|
1622
|
+
<a name="w_MultiWidget+useGatewayFieldValidation" id="w_MultiWidget+useGatewayFieldValidation" href="#user-content-w_MultiWidget+useGatewayFieldValidation"> </a>
|
|
1623
|
+
|
|
1624
|
+
### htmlMultiWidget.useGatewayFieldValidation()
|
|
1625
|
+
Current method can add visual validation from gateway to widget's form fields
|
|
1626
|
+
|
|
1627
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1628
|
+
**Overrides**: [<code>useGatewayFieldValidation</code>](#user-content-w_MultiWidget+useGatewayFieldValidation)
|
|
1629
|
+
**Example**
|
|
1630
|
+
|
|
1631
|
+
```javascript
|
|
1632
|
+
widget.useGatewayFieldValidation();
|
|
1633
|
+
```
|
|
1634
|
+
<a name="w_MultiWidget+setSupportedCardIcons" id="w_MultiWidget+setSupportedCardIcons" href="#user-content-w_MultiWidget+setSupportedCardIcons"> </a>
|
|
1635
|
+
|
|
1636
|
+
### htmlMultiWidget.setSupportedCardIcons(elements, validateCardNumberInput)
|
|
1637
|
+
Current method can set icons of supported card types
|
|
1638
|
+
|
|
1639
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1640
|
+
**Overrides**: [<code>setSupportedCardIcons</code>](#user-content-w_MultiWidget+setSupportedCardIcons)
|
|
1641
|
+
|
|
1642
|
+
| Param | Type | Description |
|
|
1643
|
+
| --- | --- | --- |
|
|
1644
|
+
| elements | <code>Array.<string></code> | [SUPPORTED_CARD_TYPES](#user-content-w_SUPPORTED_CARD_TYPES) |
|
|
1645
|
+
| validateCardNumberInput | <code>boolean</code> | [validateCardNumberInput=false] - using this param you allow validation for card number input on supported card types |
|
|
1646
|
+
|
|
1647
|
+
**Example**
|
|
1648
|
+
|
|
1649
|
+
```javascript
|
|
1650
|
+
widget.setSupportedCardIcons(['mastercard', 'visa'], validateCardNumberInput);
|
|
1651
|
+
```
|
|
1652
|
+
<a name="w_MultiWidget+setEnv" id="w_MultiWidget+setEnv" href="#user-content-w_MultiWidget+setEnv"> </a>
|
|
1653
|
+
|
|
1654
|
+
### htmlMultiWidget.setEnv(env, [alias])
|
|
1655
|
+
Current method can change environment. By default environment = sandbox.
|
|
1656
|
+
Also we can change domain alias for this environment. By default domain_alias = paydock.com
|
|
1657
|
+
|
|
1658
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1659
|
+
**Overrides**: [<code>setEnv</code>](#user-content-w_MultiWidget+setEnv)
|
|
1660
|
+
|
|
1661
|
+
| Param | Type | Description |
|
|
1662
|
+
| --- | --- | --- |
|
|
1663
|
+
| env | <code>string</code> | sandbox, production |
|
|
1664
|
+
| [alias] | <code>string</code> | Own domain alias |
|
|
1665
|
+
|
|
1666
|
+
**Example**
|
|
1667
|
+
|
|
1668
|
+
```javascript
|
|
1669
|
+
widget.setEnv('production', 'paydock.com');
|
|
1670
|
+
```
|
|
1671
|
+
<a name="w_MultiWidget+loadIFrameUrl" id="w_MultiWidget+loadIFrameUrl" href="#user-content-w_MultiWidget+loadIFrameUrl"> </a>
|
|
1672
|
+
|
|
1673
|
+
### htmlMultiWidget.loadIFrameUrl()
|
|
1674
|
+
Method for creating iframe url
|
|
1675
|
+
|
|
1676
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1677
|
+
**Overrides**: [<code>loadIFrameUrl</code>](#user-content-w_MultiWidget+loadIFrameUrl)
|
|
1678
|
+
**Example**
|
|
1679
|
+
|
|
1680
|
+
```javascript
|
|
1681
|
+
widget.loadIFrameUrl(function (url) {
|
|
1682
|
+
console.log(url);
|
|
1683
|
+
}, function (errors) {
|
|
1684
|
+
console.log(errors);
|
|
1685
|
+
});
|
|
1686
|
+
```
|
|
1687
|
+
<a name="w_MultiWidget+setLanguage" id="w_MultiWidget+setLanguage" href="#user-content-w_MultiWidget+setLanguage"> </a>
|
|
1688
|
+
|
|
1689
|
+
### htmlMultiWidget.setLanguage(code)
|
|
1690
|
+
Method for setting a custom language code
|
|
1691
|
+
|
|
1692
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1693
|
+
**Overrides**: [<code>setLanguage</code>](#user-content-w_MultiWidget+setLanguage)
|
|
1694
|
+
|
|
1695
|
+
| Param | Type | Description |
|
|
1696
|
+
| --- | --- | --- |
|
|
1697
|
+
| code | <code>string</code> | ISO 639-1 |
|
|
1698
|
+
|
|
1699
|
+
**Example**
|
|
1700
|
+
|
|
1701
|
+
```javascript
|
|
1702
|
+
config.setLanguage('en');
|
|
1703
|
+
```
|
|
1704
|
+
<a name="w_Configuration" id="w_Configuration" href="#user-content-w_Configuration"> </a>
|
|
1705
|
+
|
|
1706
|
+
## Configuration
|
|
1707
|
+
Class Configuration include methods for creating configuration token
|
|
1708
|
+
|
|
1709
|
+
**Kind**: global class
|
|
1710
|
+
|
|
1711
|
+
* [Configuration](#user-content-w_Configuration)
|
|
1712
|
+
* [new Configuration([gatewayID], paymentType, purpose)](#user-content-w_new_Configuration_new)
|
|
1713
|
+
* [.setWebHookDestination(url)](#user-content-w_Configuration+setWebHookDestination)
|
|
1714
|
+
* [.setSuccessRedirectUrl(url)](#user-content-w_Configuration+setSuccessRedirectUrl)
|
|
1715
|
+
* [.setErrorRedirectUrl(url)](#user-content-w_Configuration+setErrorRedirectUrl)
|
|
1716
|
+
* [.setFormFields(fields)](#user-content-w_Configuration+setFormFields)
|
|
1717
|
+
* [.setMeta(object)](#user-content-w_Configuration+setMeta)
|
|
1718
|
+
* [.setEnv(env, [alias])](#user-content-w_Configuration+setEnv)
|
|
1719
|
+
* [.setLabel(label)](#user-content-w_Configuration+setLabel)
|
|
1720
|
+
* [.createToken(accessToken, cb, errorCb)](#user-content-w_Configuration+createToken)
|
|
1721
|
+
|
|
1722
|
+
<a name="w_new_Configuration_new" id="w_new_Configuration_new" href="#user-content-w_new_Configuration_new"> </a>
|
|
1723
|
+
|
|
1724
|
+
### new Configuration([gatewayID], paymentType, purpose)
|
|
1725
|
+
|
|
1726
|
+
| Param | Type | Default | Description |
|
|
1727
|
+
| --- | --- | --- | --- |
|
|
1728
|
+
| [gatewayID] | <code>string</code> | <code>"default"</code> | 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. |
|
|
1729
|
+
| paymentType | <code>string</code> | | Type of payment source which shows in widget form. Available parameters [PAYMENT_TYPE](#user-content-w_PAYMENT_TYPE) |
|
|
1730
|
+
| purpose | <code>string</code> | | Param which describes payment purpose. By default uses Available parameters [PURPOSE](#user-content-w_PURPOSE) |
|
|
1731
|
+
|
|
1732
|
+
**Example**
|
|
1733
|
+
|
|
1734
|
+
```javascript
|
|
1735
|
+
var config = new Configuration('gatewayId'); // short
|
|
1736
|
+
|
|
1737
|
+
var config = new Configuration('gatewayId', 'bank_account', 'paymentSource'); // extend
|
|
1738
|
+
|
|
1739
|
+
var config = new Configuration('not_configured'); // without gateway
|
|
1740
|
+
```
|
|
1741
|
+
<a name="w_Configuration+setWebHookDestination" id="w_Configuration+setWebHookDestination" href="#user-content-w_Configuration+setWebHookDestination"> </a>
|
|
1742
|
+
|
|
1743
|
+
### configuration.setWebHookDestination(url)
|
|
1744
|
+
Destination, where customer will receive all successful responses.
|
|
1745
|
+
Response will contain “data” object with “payment_source” or other parameters, in depending on 'purpose'
|
|
1746
|
+
|
|
1747
|
+
**Kind**: instance method of [<code>Configuration</code>](#user-content-w_Configuration)
|
|
1748
|
+
|
|
1749
|
+
| Param | Type | Description |
|
|
1750
|
+
| --- | --- | --- |
|
|
1751
|
+
| url | <code>string</code> | Your endpoint for post request. |
|
|
1752
|
+
|
|
1753
|
+
**Example**
|
|
1754
|
+
|
|
1755
|
+
```javascript
|
|
1756
|
+
config.setWebHookDestination('http://google.com');
|
|
1757
|
+
```
|
|
1758
|
+
<a name="w_Configuration+setSuccessRedirectUrl" id="w_Configuration+setSuccessRedirectUrl" href="#user-content-w_Configuration+setSuccessRedirectUrl"> </a>
|
|
1759
|
+
|
|
1760
|
+
### configuration.setSuccessRedirectUrl(url)
|
|
1761
|
+
URL to which the Customer will be redirected to after the success finish
|
|
1762
|
+
|
|
1763
|
+
**Kind**: instance method of [<code>Configuration</code>](#user-content-w_Configuration)
|
|
1764
|
+
|
|
1765
|
+
| Param | Type |
|
|
1766
|
+
| --- | --- |
|
|
1767
|
+
| url | <code>string</code> |
|
|
1768
|
+
|
|
1769
|
+
**Example**
|
|
1770
|
+
|
|
1771
|
+
```javascript
|
|
1772
|
+
config.setSuccessRedirectUrl('google.com/search?q=success');
|
|
1773
|
+
```
|
|
1774
|
+
<a name="w_Configuration+setErrorRedirectUrl" id="w_Configuration+setErrorRedirectUrl" href="#user-content-w_Configuration+setErrorRedirectUrl"> </a>
|
|
1775
|
+
|
|
1776
|
+
### configuration.setErrorRedirectUrl(url)
|
|
1777
|
+
URL to which the Customer will be redirected to if an error is triggered in the process of operation
|
|
1778
|
+
|
|
1779
|
+
**Kind**: instance method of [<code>Configuration</code>](#user-content-w_Configuration)
|
|
1780
|
+
|
|
1781
|
+
| Param | Type |
|
|
1782
|
+
| --- | --- |
|
|
1783
|
+
| url | <code>string</code> |
|
|
1784
|
+
|
|
1785
|
+
**Example**
|
|
1786
|
+
|
|
1787
|
+
```javascript
|
|
1788
|
+
config.setErrorRedirectUrl('google.com/search?q=error');
|
|
1789
|
+
```
|
|
1790
|
+
<a name="w_Configuration+setFormFields" id="w_Configuration+setFormFields" href="#user-content-w_Configuration+setFormFields"> </a>
|
|
1791
|
+
|
|
1792
|
+
### configuration.setFormFields(fields)
|
|
1793
|
+
Set list with widget form field, which will be shown in form. Also you can set the required validation for these fields
|
|
1794
|
+
|
|
1795
|
+
**Kind**: instance method of [<code>Configuration</code>](#user-content-w_Configuration)
|
|
1796
|
+
|
|
1797
|
+
| Param | Type | Description |
|
|
1798
|
+
| --- | --- | --- |
|
|
1799
|
+
| fields | <code>Array.<string></code> | name of fields which can be shown in a widget. If after a name of a field, you put “*”, this field will be required on client-side. (For validation, you can specify any fields, even those that are shown by default: card_number, expiration, etc... ) [FORM_FIELD](#user-content-w_FORM_FIELD) |
|
|
1800
|
+
|
|
1801
|
+
**Example**
|
|
1802
|
+
|
|
1803
|
+
```javascript
|
|
1804
|
+
config.setFormFields(['phone', 'email', 'first_name*']);
|
|
1805
|
+
```
|
|
1806
|
+
<a name="w_Configuration+setMeta" id="w_Configuration+setMeta" href="#user-content-w_Configuration+setMeta"> </a>
|
|
1807
|
+
|
|
1808
|
+
### configuration.setMeta(object)
|
|
1809
|
+
Method for setting meta information for checkout page
|
|
1810
|
+
|
|
1811
|
+
**Kind**: instance method of [<code>Configuration</code>](#user-content-w_Configuration)
|
|
1812
|
+
|
|
1813
|
+
| Param | Type | Description |
|
|
1814
|
+
| --- | --- | --- |
|
|
1815
|
+
| object | [<code>IPayPalMeta</code>](#user-content-w_IPayPalMeta) \| <code>IZipmoneyMeta</code> \| <code>IAfterpayMeta</code> \| [<code>IBamboraMeta</code>](#user-content-w_IBamboraMeta) | data which can be shown on checkout page [IPayPalMeta](#user-content-w_IPayPalMeta) [IZipmoneyMeta](IZipmoneyMeta) [IAfterpayMeta](IAfterpayMeta) [IBamboraMeta](#user-content-w_IBamboraMeta) |
|
|
1816
|
+
|
|
1817
|
+
**Example**
|
|
1818
|
+
|
|
1819
|
+
```javascript
|
|
1820
|
+
config.setMeta({
|
|
1821
|
+
brand_name: 'paydock',
|
|
1822
|
+
reference: '15',
|
|
1823
|
+
email: 'wault@paydock.com'
|
|
1824
|
+
});
|
|
1825
|
+
```
|
|
1826
|
+
<a name="w_Configuration+setEnv" id="w_Configuration+setEnv" href="#user-content-w_Configuration+setEnv"> </a>
|
|
1827
|
+
|
|
1828
|
+
### configuration.setEnv(env, [alias])
|
|
1829
|
+
Current method can change environment. By default environment = sandbox.
|
|
1830
|
+
Also we can change domain alias for this environment. By default domain_alias = paydock.com
|
|
1831
|
+
|
|
1832
|
+
**Kind**: instance method of [<code>Configuration</code>](#user-content-w_Configuration)
|
|
1833
|
+
|
|
1834
|
+
| Param | Type | Description |
|
|
1835
|
+
| --- | --- | --- |
|
|
1836
|
+
| env | <code>string</code> | sandbox, production |
|
|
1837
|
+
| [alias] | <code>string</code> | Own domain alias |
|
|
1838
|
+
|
|
1839
|
+
**Example**
|
|
1840
|
+
|
|
1841
|
+
```javascript
|
|
1842
|
+
config.setEnv('production');
|
|
1843
|
+
```
|
|
1844
|
+
<a name="w_Configuration+setLabel" id="w_Configuration+setLabel" href="#user-content-w_Configuration+setLabel"> </a>
|
|
1845
|
+
|
|
1846
|
+
### configuration.setLabel(label)
|
|
1847
|
+
Title for tab which can be set instead of default
|
|
1848
|
+
|
|
1849
|
+
**Kind**: instance method of [<code>Configuration</code>](#user-content-w_Configuration)
|
|
1850
|
+
|
|
1851
|
+
| Param | Type | Description |
|
|
1852
|
+
| --- | --- | --- |
|
|
1853
|
+
| label | <code>string</code> | Text label for tab |
|
|
1854
|
+
|
|
1855
|
+
**Example**
|
|
1856
|
+
|
|
1857
|
+
```javascript
|
|
1858
|
+
config.setLabel('custom label');
|
|
1859
|
+
```
|
|
1860
|
+
<a name="w_Configuration+createToken" id="w_Configuration+createToken" href="#user-content-w_Configuration+createToken"> </a>
|
|
1861
|
+
|
|
1862
|
+
### configuration.createToken(accessToken, cb, errorCb)
|
|
1863
|
+
createToken - method which exactly create payment one time token
|
|
1864
|
+
|
|
1865
|
+
**Kind**: instance method of [<code>Configuration</code>](#user-content-w_Configuration)
|
|
1866
|
+
|
|
1867
|
+
| Param | Type | Description |
|
|
1868
|
+
| --- | --- | --- |
|
|
1869
|
+
| accessToken | <code>string</code> | Customer access token or public key which provided for each client |
|
|
1870
|
+
| cb | <code>createToken~requestCallback</code> | The callback that handles the success response. |
|
|
1871
|
+
| errorCb | <code>createToken~requestCallback</code> | The callback that handles the failed response. |
|
|
1872
|
+
|
|
1873
|
+
**Example**
|
|
1874
|
+
|
|
1875
|
+
```javascript
|
|
1876
|
+
config.createToken('582035346f65cdd57ee81192d6e5w65w4e5',
|
|
1877
|
+
function (data) {
|
|
1878
|
+
console.log(data);
|
|
1879
|
+
}, function (error) {
|
|
1880
|
+
console.log(error);
|
|
1881
|
+
});
|
|
1882
|
+
```
|
|
1883
|
+
<a name="w_MultiWidget" id="w_MultiWidget" href="#user-content-w_MultiWidget"> </a>
|
|
1884
|
+
|
|
1885
|
+
## MultiWidget
|
|
1886
|
+
Class MultiWidget include method for for creating iframe url
|
|
1887
|
+
|
|
1888
|
+
**Kind**: global class
|
|
1889
|
+
|
|
1890
|
+
* [MultiWidget](#user-content-w_MultiWidget)
|
|
1891
|
+
* [new MultiWidget(accessToken, conf)](#user-content-w_new_MultiWidget_new)
|
|
1892
|
+
* [.setStyles(fields)](#user-content-w_MultiWidget+setStyles)
|
|
1893
|
+
* [.usePhoneCountryMask([options])](#user-content-w_MultiWidget+usePhoneCountryMask)
|
|
1894
|
+
* [.setTexts(fields)](#user-content-w_MultiWidget+setTexts)
|
|
1895
|
+
* [.setElementStyle(element, [state], styles)](#user-content-w_MultiWidget+setElementStyle)
|
|
1896
|
+
* [.setFormValues(fieldValues)](#user-content-w_MultiWidget+setFormValues)
|
|
1897
|
+
* [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
|
|
1898
|
+
* [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
|
|
1899
|
+
* [.setFormElements(elements)](#user-content-w_MultiWidget+setFormElements)
|
|
1900
|
+
* ~~[.setIcons()](#user-content-w_MultiWidget+setIcons)~~
|
|
1901
|
+
* [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
|
|
1902
|
+
* [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
|
|
1903
|
+
* [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
|
|
1904
|
+
* [.setSupportedCardIcons(elements, validateCardNumberInput)](#user-content-w_MultiWidget+setSupportedCardIcons)
|
|
1905
|
+
* [.setEnv(env, [alias])](#user-content-w_MultiWidget+setEnv)
|
|
1906
|
+
* [.loadIFrameUrl()](#user-content-w_MultiWidget+loadIFrameUrl)
|
|
1907
|
+
* [.setLanguage(code)](#user-content-w_MultiWidget+setLanguage)
|
|
1908
|
+
|
|
1909
|
+
<a name="w_new_MultiWidget_new" id="w_new_MultiWidget_new" href="#user-content-w_new_MultiWidget_new"> </a>
|
|
1910
|
+
|
|
1911
|
+
### new MultiWidget(accessToken, conf)
|
|
1912
|
+
|
|
1913
|
+
| Param | Type | Description |
|
|
1914
|
+
| --- | --- | --- |
|
|
1915
|
+
| accessToken | <code>string</code> | PayDock users access token or public key |
|
|
1916
|
+
| conf | [<code>Configuration</code>](#user-content-w_Configuration) \| <code>string</code> \| [<code>Array.<Configuration></code>](#user-content-w_Configuration) \| <code>Array.<string></code> | exemplar[s] Configuration class OR configuration token |
|
|
1917
|
+
|
|
1918
|
+
**Example**
|
|
1919
|
+
|
|
1920
|
+
```javascript
|
|
1921
|
+
var widget = new MultiWidget('accessToken','configurationToken'); // With a pre-created configuration token
|
|
1922
|
+
|
|
1923
|
+
var widget = new MultiWidget('accessToken',['configurationToken', 'configurationToken2']); // With pre-created configuration tokens
|
|
1924
|
+
|
|
1925
|
+
var widget = new MultiWidget('accessToken', new Configuration('gatewayId')); With Configuration
|
|
1926
|
+
|
|
1927
|
+
var widget = new MultiWidget('accessToken',[ With Configurations
|
|
1928
|
+
Configuration('gatewayId'),
|
|
1929
|
+
Configuration('gatewayId', 'bank_account')
|
|
1930
|
+
]);
|
|
1931
|
+
```
|
|
1932
|
+
<a name="w_MultiWidget+setStyles" id="w_MultiWidget+setStyles" href="#user-content-w_MultiWidget+setStyles"> </a>
|
|
1933
|
+
|
|
1934
|
+
### multiWidget.setStyles(fields)
|
|
1935
|
+
Object contain styles for widget
|
|
1936
|
+
|
|
1937
|
+
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
1938
|
+
|
|
1939
|
+
| Param | Type | Description |
|
|
1940
|
+
| --- | --- | --- |
|
|
1941
|
+
| fields | [<code>IStyles</code>](#user-content-w_IStyles) | name of styles which can be shown in widget [STYLE](#user-content-w_STYLE) |
|
|
1942
|
+
|
|
1943
|
+
**Example**
|
|
1944
|
+
|
|
1945
|
+
```javascript
|
|
1946
|
+
widget.setStyles({
|
|
1947
|
+
background_color: 'rgb(0, 0, 0)',
|
|
1948
|
+
border_color: 'yellow',
|
|
1949
|
+
text_color: '#FFFFAA',
|
|
1950
|
+
button_color: 'rgba(255, 255, 255, 0.9)',
|
|
1951
|
+
font_size: '20px'
|
|
1952
|
+
fort_family: 'fantasy'
|
|
1953
|
+
});
|
|
1954
|
+
```
|
|
1955
|
+
<a name="w_MultiWidget+usePhoneCountryMask" id="w_MultiWidget+usePhoneCountryMask" href="#user-content-w_MultiWidget+usePhoneCountryMask"> </a>
|
|
1956
|
+
|
|
1957
|
+
### multiWidget.usePhoneCountryMask([options])
|
|
1958
|
+
Method to set a country code mask for the phone input.
|
|
1959
|
+
|
|
1960
|
+
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
1961
|
+
|
|
1962
|
+
| Param | Type | Description |
|
|
1963
|
+
| --- | --- | --- |
|
|
1964
|
+
| [options] | <code>object</code> | Options for configure the phone mask. |
|
|
1965
|
+
| [options.default_country] | <code>string</code> | Set a default country for the mask. |
|
|
1966
|
+
| [options.preferred_countries] | <code>Array.<string></code> | Set list of preferred countries for the top of the select box . |
|
|
1967
|
+
| [options.only_countries] | <code>Array.<string></code> | Set list of countries to show in the select box. |
|
|
1968
|
+
|
|
1969
|
+
**Example**
|
|
1970
|
+
|
|
1971
|
+
```javascript
|
|
1972
|
+
widget.usePhoneCountryMask();
|
|
1973
|
+
```
|
|
1974
|
+
**Example**
|
|
1975
|
+
|
|
1976
|
+
```javascript
|
|
1977
|
+
widget.usePhoneCountryMask({
|
|
1978
|
+
default_country: 'au',
|
|
1979
|
+
preferred_countries: ['au', 'gb'],
|
|
1980
|
+
only_countries: ['au', 'gb', 'us', 'ua']
|
|
1981
|
+
});
|
|
1982
|
+
```
|
|
1983
|
+
<a name="w_MultiWidget+setTexts" id="w_MultiWidget+setTexts" href="#user-content-w_MultiWidget+setTexts"> </a>
|
|
1984
|
+
|
|
1985
|
+
### multiWidget.setTexts(fields)
|
|
1986
|
+
Method for set different texts inside the widget
|
|
1987
|
+
|
|
1988
|
+
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
1989
|
+
|
|
1990
|
+
| Param | Type | Description |
|
|
1991
|
+
| --- | --- | --- |
|
|
1992
|
+
| fields | [<code>ITexts</code>](#user-content-w_ITexts) | name of text items which can be shown in widget [TEXT](#user-content-w_TEXT) |
|
|
1993
|
+
|
|
1994
|
+
**Example**
|
|
1995
|
+
|
|
1996
|
+
```javascript
|
|
1997
|
+
widget.setTexts({
|
|
1998
|
+
title: 'Your card',
|
|
1999
|
+
finish_text: 'Payment resource was successfully accepted',
|
|
2000
|
+
title_description: '* indicates required field',
|
|
2001
|
+
submit_button: 'Save',
|
|
2002
|
+
submit_button_processing: 'Load...',
|
|
2003
|
+
});
|
|
2004
|
+
```
|
|
2005
|
+
<a name="w_MultiWidget+setElementStyle" id="w_MultiWidget+setElementStyle" href="#user-content-w_MultiWidget+setElementStyle"> </a>
|
|
2006
|
+
|
|
2007
|
+
### multiWidget.setElementStyle(element, [state], styles)
|
|
2008
|
+
Method for set styles for different elements and states
|
|
2009
|
+
|
|
2010
|
+
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
2011
|
+
|
|
2012
|
+
| Param | Type | Description |
|
|
2013
|
+
| --- | --- | --- |
|
|
2014
|
+
| element | <code>string</code> | type of element for styling. These elements are available [STYLABLE_ELEMENT](#user-content-w_STYLABLE_ELEMENT) |
|
|
2015
|
+
| [state] | <code>string</code> | state of element for styling. These states are available [STYLABLE_ELEMENT_STATE](#user-content-w_STYLABLE_ELEMENT_STATE) |
|
|
2016
|
+
| styles | [<code>IElementStyleInput</code>](#user-content-w_IElementStyleInput) \| [<code>IElementStyleSubmitButton</code>](#user-content-w_IElementStyleSubmitButton) \| [<code>IElementStyleLabel</code>](#user-content-w_IElementStyleLabel) \| [<code>IElementStyleTitle</code>](#user-content-w_IElementStyleTitle) \| [<code>IElementStyleTitleDescription</code>](#user-content-w_IElementStyleTitleDescription) | styles list |
|
|
2017
|
+
|
|
2018
|
+
**Example**
|
|
2019
|
+
|
|
2020
|
+
```javascript
|
|
2021
|
+
widget.setElementStyle('input', {
|
|
2022
|
+
border: 'green solid 1px'
|
|
2023
|
+
});
|
|
2024
|
+
|
|
2025
|
+
widget.setElementStyle('input', 'focus', {
|
|
2026
|
+
border: 'blue solid 1px'
|
|
2027
|
+
});
|
|
2028
|
+
|
|
2029
|
+
widget.setElementStyle('input', 'error', {
|
|
2030
|
+
border: 'red solid 1px'
|
|
2031
|
+
});
|
|
2032
|
+
```
|
|
2033
|
+
<a name="w_MultiWidget+setFormValues" id="w_MultiWidget+setFormValues" href="#user-content-w_MultiWidget+setFormValues"> </a>
|
|
2034
|
+
|
|
2035
|
+
### multiWidget.setFormValues(fieldValues)
|
|
2036
|
+
The method to set the predefined values for the form fields inside the widget
|
|
2037
|
+
|
|
2038
|
+
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
2039
|
+
|
|
2040
|
+
| Param | Type | Description |
|
|
2041
|
+
| --- | --- | --- |
|
|
2042
|
+
| fieldValues | <code>Object</code> | Key of object is one of [FORM_FIELD](#user-content-w_FORM_FIELD), The object value is what we are expecting |
|
|
2043
|
+
|
|
2044
|
+
**Example**
|
|
2045
|
+
|
|
2046
|
+
```javascript
|
|
2047
|
+
widget.setFormValues({
|
|
2048
|
+
email: 'predefined@email.com',
|
|
2049
|
+
card_name: 'Houston'
|
|
2050
|
+
});
|
|
2051
|
+
```
|
|
2052
|
+
<a name="w_MultiWidget+setFormLabels" id="w_MultiWidget+setFormLabels" href="#user-content-w_MultiWidget+setFormLabels"> </a>
|
|
2053
|
+
|
|
2054
|
+
### multiWidget.setFormLabels(fieldLabels)
|
|
2055
|
+
The method to set custom form field labels
|
|
2056
|
+
|
|
2057
|
+
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
2058
|
+
|
|
2059
|
+
| Param | Type | Description |
|
|
2060
|
+
| --- | --- | --- |
|
|
2061
|
+
| fieldLabels | <code>Object</code> | Key of object is one of [FORM_FIELD](#user-content-w_FORM_FIELD), The object value is what we are expecting |
|
|
2062
|
+
|
|
2063
|
+
**Example**
|
|
2064
|
+
|
|
2065
|
+
```javascript
|
|
2066
|
+
widget.setFormPlaceholders({
|
|
2067
|
+
card_name: 'Card Holder Name',
|
|
2068
|
+
email: 'Email For Receipt'
|
|
2069
|
+
})
|
|
2070
|
+
```
|
|
2071
|
+
<a name="w_MultiWidget+setFormPlaceholders" id="w_MultiWidget+setFormPlaceholders" href="#user-content-w_MultiWidget+setFormPlaceholders"> </a>
|
|
2072
|
+
|
|
2073
|
+
### multiWidget.setFormPlaceholders(fieldPlaceholders)
|
|
2074
|
+
The method to set custom form fields placeholders
|
|
2075
|
+
|
|
2076
|
+
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
2077
|
+
|
|
2078
|
+
| Param | Type | Description |
|
|
2079
|
+
| --- | --- | --- |
|
|
2080
|
+
| fieldPlaceholders | <code>Object</code> | Key of object is one of [FORM_FIELD](#user-content-w_FORM_FIELD), Value of object is expected placeholder |
|
|
2081
|
+
|
|
2082
|
+
**Example**
|
|
2083
|
+
|
|
2084
|
+
```javascript
|
|
2085
|
+
widget.setFormPlaceholders({
|
|
2086
|
+
card_name: 'Input your card holder name...',
|
|
2087
|
+
email: 'Input your email, like test@example.com'
|
|
2088
|
+
})
|
|
2089
|
+
```
|
|
2090
|
+
<a name="w_MultiWidget+setFormElements" id="w_MultiWidget+setFormElements" href="#user-content-w_MultiWidget+setFormElements"> </a>
|
|
2091
|
+
|
|
2092
|
+
### multiWidget.setFormElements(elements)
|
|
2093
|
+
The method to set the full configuration for the all specific form elements (label, placeholder, value)
|
|
2094
|
+
You can also use the other method for the partial configuration like: setFormValues, setFormPlaceholder, setFormLabel
|
|
2095
|
+
|
|
2096
|
+
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
2097
|
+
|
|
2098
|
+
| Param | Type | Description |
|
|
2099
|
+
| --- | --- | --- |
|
|
2100
|
+
| elements | <code>string</code> | The list of elements |
|
|
2101
|
+
| elements[].field | <code>string</code> | Field name of the element [FORM_FIELD](#user-content-w_FORM_FIELD) |
|
|
2102
|
+
| elements[].placeholder | <code>string</code> | Set custom form field placeholder |
|
|
2103
|
+
| elements[].label | <code>string</code> | Set custom labels near form field |
|
|
2104
|
+
| elements[].value | <code>string</code> | Set predefined values for the form field |
|
|
2105
|
+
|
|
2106
|
+
**Example**
|
|
2107
|
+
|
|
2108
|
+
```javascript
|
|
2109
|
+
widget.setFormElements([
|
|
2110
|
+
{
|
|
2111
|
+
field: 'card_name',
|
|
2112
|
+
placeholder: 'Input your card holder name...',
|
|
2113
|
+
label: 'Card Holder Name',
|
|
2114
|
+
value: 'Houston',
|
|
2115
|
+
},
|
|
2116
|
+
{
|
|
2117
|
+
field: 'email',
|
|
2118
|
+
placeholder: 'Input your email, like test@example.com',
|
|
2119
|
+
label: 'Email For Receipt',
|
|
2120
|
+
value: 'predefined@email.com',
|
|
2121
|
+
},
|
|
2122
|
+
])
|
|
2123
|
+
```
|
|
2124
|
+
<a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons"> </a>
|
|
2125
|
+
|
|
2126
|
+
### ~~multiWidget.setIcons()~~
|
|
2127
|
+
***Deprecated***
|
|
2128
|
+
|
|
2129
|
+
The method to change the widget icons
|
|
2130
|
+
|
|
2131
|
+
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
2132
|
+
<a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements"> </a>
|
|
2133
|
+
|
|
2134
|
+
### multiWidget.setHiddenElements(elements)
|
|
2135
|
+
Using this method you can set hidden elements inside widget
|
|
2136
|
+
|
|
2137
|
+
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
2138
|
+
|
|
2139
|
+
| Param | Type | Description |
|
|
2140
|
+
| --- | --- | --- |
|
|
2141
|
+
| elements | <code>Array.<string></code> | list of element which can be hidden [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
|
|
2142
|
+
|
|
2143
|
+
**Example**
|
|
2144
|
+
|
|
2145
|
+
```javascript
|
|
2146
|
+
widget.setHiddenElements(['submit_button', 'email']);
|
|
2147
|
+
```
|
|
2148
|
+
<a name="w_MultiWidget+setRefId" id="w_MultiWidget+setRefId" href="#user-content-w_MultiWidget+setRefId"> </a>
|
|
2149
|
+
|
|
2150
|
+
### multiWidget.setRefId(refId)
|
|
2151
|
+
Current method can set custom ID to identify the data in the future
|
|
2152
|
+
|
|
2153
|
+
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
2154
|
+
|
|
2155
|
+
| Param | Type | Description |
|
|
2156
|
+
| --- | --- | --- |
|
|
2157
|
+
| refId | <code>string</code> | custom id |
|
|
2158
|
+
|
|
2159
|
+
**Example**
|
|
2160
|
+
|
|
2161
|
+
```javascript
|
|
2162
|
+
widget.setRefId('id');
|
|
2163
|
+
```
|
|
2164
|
+
<a name="w_MultiWidget+useGatewayFieldValidation" id="w_MultiWidget+useGatewayFieldValidation" href="#user-content-w_MultiWidget+useGatewayFieldValidation"> </a>
|
|
2165
|
+
|
|
2166
|
+
### multiWidget.useGatewayFieldValidation()
|
|
2167
|
+
Current method can add visual validation from gateway to widget's form fields
|
|
2168
|
+
|
|
2169
|
+
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
2170
|
+
**Example**
|
|
2171
|
+
|
|
2172
|
+
```javascript
|
|
2173
|
+
widget.useGatewayFieldValidation();
|
|
2174
|
+
```
|
|
2175
|
+
<a name="w_MultiWidget+setSupportedCardIcons" id="w_MultiWidget+setSupportedCardIcons" href="#user-content-w_MultiWidget+setSupportedCardIcons"> </a>
|
|
2176
|
+
|
|
2177
|
+
### multiWidget.setSupportedCardIcons(elements, validateCardNumberInput)
|
|
2178
|
+
Current method can set icons of supported card types
|
|
2179
|
+
|
|
2180
|
+
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
2181
|
+
|
|
2182
|
+
| Param | Type | Description |
|
|
2183
|
+
| --- | --- | --- |
|
|
2184
|
+
| elements | <code>Array.<string></code> | [SUPPORTED_CARD_TYPES](#user-content-w_SUPPORTED_CARD_TYPES) |
|
|
2185
|
+
| validateCardNumberInput | <code>boolean</code> | [validateCardNumberInput=false] - using this param you allow validation for card number input on supported card types |
|
|
2186
|
+
|
|
2187
|
+
**Example**
|
|
2188
|
+
|
|
2189
|
+
```javascript
|
|
2190
|
+
widget.setSupportedCardIcons(['mastercard', 'visa'], validateCardNumberInput);
|
|
2191
|
+
```
|
|
2192
|
+
<a name="w_MultiWidget+setEnv" id="w_MultiWidget+setEnv" href="#user-content-w_MultiWidget+setEnv"> </a>
|
|
2193
|
+
|
|
2194
|
+
### multiWidget.setEnv(env, [alias])
|
|
2195
|
+
Current method can change environment. By default environment = sandbox.
|
|
2196
|
+
Also we can change domain alias for this environment. By default domain_alias = paydock.com
|
|
2197
|
+
|
|
2198
|
+
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
2199
|
+
|
|
2200
|
+
| Param | Type | Description |
|
|
2201
|
+
| --- | --- | --- |
|
|
2202
|
+
| env | <code>string</code> | sandbox, production |
|
|
2203
|
+
| [alias] | <code>string</code> | Own domain alias |
|
|
2204
|
+
|
|
2205
|
+
**Example**
|
|
2206
|
+
|
|
2207
|
+
```javascript
|
|
2208
|
+
widget.setEnv('production', 'paydock.com');
|
|
2209
|
+
```
|
|
2210
|
+
<a name="w_MultiWidget+loadIFrameUrl" id="w_MultiWidget+loadIFrameUrl" href="#user-content-w_MultiWidget+loadIFrameUrl"> </a>
|
|
2211
|
+
|
|
2212
|
+
### multiWidget.loadIFrameUrl()
|
|
2213
|
+
Method for creating iframe url
|
|
2214
|
+
|
|
2215
|
+
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
2216
|
+
**Example**
|
|
2217
|
+
|
|
2218
|
+
```javascript
|
|
2219
|
+
widget.loadIFrameUrl(function (url) {
|
|
2220
|
+
console.log(url);
|
|
2221
|
+
}, function (errors) {
|
|
2222
|
+
console.log(errors);
|
|
2223
|
+
});
|
|
2224
|
+
```
|
|
2225
|
+
<a name="w_MultiWidget+setLanguage" id="w_MultiWidget+setLanguage" href="#user-content-w_MultiWidget+setLanguage"> </a>
|
|
2226
|
+
|
|
2227
|
+
### multiWidget.setLanguage(code)
|
|
2228
|
+
Method for setting a custom language code
|
|
2229
|
+
|
|
2230
|
+
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
2231
|
+
|
|
2232
|
+
| Param | Type | Description |
|
|
2233
|
+
| --- | --- | --- |
|
|
2234
|
+
| code | <code>string</code> | ISO 639-1 |
|
|
2235
|
+
|
|
2236
|
+
**Example**
|
|
2237
|
+
|
|
2238
|
+
```javascript
|
|
2239
|
+
config.setLanguage('en');
|
|
2240
|
+
```
|
|
2241
|
+
<a name="w_EVENT" id="w_EVENT" href="#user-content-w_EVENT"> </a>
|
|
2242
|
+
|
|
2243
|
+
## EVENT : <code>object</code>
|
|
2244
|
+
List of available event's name
|
|
2245
|
+
|
|
2246
|
+
**Kind**: global constant
|
|
2247
|
+
|
|
2248
|
+
| Param | Type | Default |
|
|
2249
|
+
| --- | --- | --- |
|
|
2250
|
+
| AFTER_LOAD | <code>string</code> | <code>"afterLoad"</code> |
|
|
2251
|
+
| SUBMIT | <code>string</code> | <code>"submit"</code> |
|
|
2252
|
+
| FINISH | <code>string</code> | <code>"finish"</code> |
|
|
2253
|
+
| VALIDATION | <code>string</code> | <code>"validation"</code> |
|
|
2254
|
+
| VALIDATION_ERROR | <code>string</code> | <code>"validationError"</code> |
|
|
2255
|
+
| SYSTEM_ERROR | <code>string</code> | <code>"systemError"</code> |
|
|
2256
|
+
| META_CHANGE | <code>string</code> | <code>"metaChange"</code> |
|
|
2257
|
+
| RESIZE | <code>string</code> | <code>"resize"</code> |
|
|
2258
|
+
|
|
2259
|
+
<a name="w_VAULT_DISPLAY_EVENT" id="w_VAULT_DISPLAY_EVENT" href="#user-content-w_VAULT_DISPLAY_EVENT"> </a>
|
|
2260
|
+
|
|
2261
|
+
## VAULT\_DISPLAY\_EVENT : <code>object</code>
|
|
2262
|
+
List of available event's name
|
|
2263
|
+
|
|
2264
|
+
**Kind**: global constant
|
|
2265
|
+
|
|
2266
|
+
| Param | Type | Default |
|
|
2267
|
+
| --- | --- | --- |
|
|
2268
|
+
| AFTER_LOAD | <code>string</code> | <code>"afterLoad"</code> |
|
|
2269
|
+
| SYSTEM_ERROR | <code>string</code> | <code>"system_error"</code> |
|
|
2270
|
+
| CVV_SECURE_CODE_REQUESTED | <code>string</code> | <code>"cvv_secure_code_requested"</code> |
|
|
2271
|
+
| CARD_NUMBER_SECURE_CODE_REQUESTED | <code>string</code> | <code>"card_number_secure_code_requested"</code> |
|
|
2272
|
+
| ACCESS_FORBIDDEN | <code>string</code> | <code>"access_forbidden"</code> |
|
|
2273
|
+
| SESSION_EXPIRED | <code>string</code> | <code>"systemError"</code> |
|
|
2274
|
+
| SYSTEM_ERROR | <code>string</code> | <code>"session_expired"</code> |
|
|
2275
|
+
| OPERATION_FORBIDDEN | <code>string</code> | <code>"operation_forbidden"</code> |
|
|
2276
|
+
|
|
2277
|
+
<a name="w_PAYMENT_TYPE" id="w_PAYMENT_TYPE" href="#user-content-w_PAYMENT_TYPE"> </a>
|
|
2278
|
+
|
|
2279
|
+
## PAYMENT\_TYPE : <code>object</code>
|
|
2280
|
+
List of available payment source types
|
|
2281
|
+
|
|
2282
|
+
**Kind**: global constant
|
|
2283
|
+
|
|
2284
|
+
| Param | Type | Default |
|
|
2285
|
+
| --- | --- | --- |
|
|
2286
|
+
| CARD | <code>string</code> | <code>"card"</code> |
|
|
2287
|
+
| BANK_ACCOUNT | <code>string</code> | <code>"bank_account"</code> |
|
|
2288
|
+
| CHECKOUT | <code>string</code> | <code>"checkout"</code> |
|
|
2289
|
+
|
|
2290
|
+
<a name="w_PURPOSE" id="w_PURPOSE" href="#user-content-w_PURPOSE"> </a>
|
|
2291
|
+
|
|
2292
|
+
## PURPOSE : <code>object</code>
|
|
2293
|
+
Purposes
|
|
2294
|
+
|
|
2295
|
+
**Kind**: global constant
|
|
2296
|
+
|
|
2297
|
+
| Param | Type | Default |
|
|
2298
|
+
| --- | --- | --- |
|
|
2299
|
+
| PAYMENT_SOURCE | <code>string</code> | <code>"payment_source"</code> |
|
|
2300
|
+
| CARD_PAYMENT_SOURCE_WITH_CVV | <code>string</code> | <code>"card_payment_source_with_cvv"</code> |
|
|
2301
|
+
| CARD_PAYMENT_SOURCE_WITHOUT_CVV | <code>string</code> | <code>"card_payment_source_without_cvv"</code> |
|
|
2302
|
+
|
|
2303
|
+
<a name="w_FORM_FIELD" id="w_FORM_FIELD" href="#user-content-w_FORM_FIELD"> </a>
|
|
2304
|
+
|
|
2305
|
+
## FORM\_FIELD : <code>object</code>
|
|
2306
|
+
Current constant include available type of fields which can be included to widget
|
|
2307
|
+
|
|
2308
|
+
**Kind**: global constant
|
|
2309
|
+
|
|
2310
|
+
| Param | Type | Default |
|
|
2311
|
+
| --- | --- | --- |
|
|
2312
|
+
| CARD_NAME | <code>string</code> | <code>"card_name"</code> |
|
|
2313
|
+
| CARD_NUMBER | <code>string</code> | <code>"card_number"</code> |
|
|
2314
|
+
| EXPIRE_MONTH | <code>string</code> | <code>"expire_month"</code> |
|
|
2315
|
+
| EXPIRE_YEAR | <code>string</code> | <code>"expire_year"</code> |
|
|
2316
|
+
| CARD_CCV | <code>string</code> | <code>"card_ccv"</code> |
|
|
2317
|
+
| CARD_PIN | <code>string</code> | <code>"card_pin"</code> |
|
|
2318
|
+
| ACCOUNT_NAME | <code>string</code> | <code>"account_name"</code> |
|
|
2319
|
+
| ACCOUNT_BSB | <code>string</code> | <code>"account_bsb"</code> |
|
|
2320
|
+
| ACCOUNT_NUMBER | <code>string</code> | <code>"account_number"</code> |
|
|
2321
|
+
| ACCOUNT_ROUTING | <code>string</code> | <code>"account_routing"</code> |
|
|
2322
|
+
| ACCOUNT_HOLDER_TYPE | <code>string</code> | <code>"account_holder_type"</code> |
|
|
2323
|
+
| ACCOUNT_BANK_NAME | <code>string</code> | <code>"account_bank_name"</code> |
|
|
2324
|
+
| ACCOUNT_TYPE | <code>string</code> | <code>"account_type"</code> |
|
|
2325
|
+
| FIRST_NAME | <code>string</code> | <code>"first_name"</code> |
|
|
2326
|
+
| LAST_NAME | <code>string</code> | <code>"last_name"</code> |
|
|
2327
|
+
| EMAIL | <code>string</code> | <code>"email"</code> |
|
|
2328
|
+
| PHONE | <code>string</code> | <code>"phone"</code> |
|
|
2329
|
+
| PHONE2 | <code>string</code> | <code>"phone2"</code> |
|
|
2330
|
+
| ADDRESS_LINE1 | <code>string</code> | <code>"address_line1"</code> |
|
|
2331
|
+
| ADDRESS_LINE2 | <code>string</code> | <code>"address_line2"</code> |
|
|
2332
|
+
| ADDRESS_STATE | <code>string</code> | <code>"address_state"</code> |
|
|
2333
|
+
| ADDRESS_COUNTRY | <code>string</code> | <code>"address_country"</code> |
|
|
2334
|
+
| ADDRESS_CITY | <code>string</code> | <code>"address_city"</code> |
|
|
2335
|
+
| ADDRESS_POSTCODE | <code>string</code> | <code>"address_postcode"</code> |
|
|
2336
|
+
| ADDRESS_COMPANY | <code>string</code> | <code>"address_company"</code> |
|
|
2337
|
+
|
|
2338
|
+
<a name="w_STYLE" id="w_STYLE" href="#user-content-w_STYLE"> </a>
|
|
2339
|
+
|
|
2340
|
+
## STYLE : <code>object</code>
|
|
2341
|
+
List of available style params for widget
|
|
2342
|
+
|
|
2343
|
+
**Kind**: global constant
|
|
2344
|
+
|
|
2345
|
+
| Param | Type | Default |
|
|
2346
|
+
| --- | --- | --- |
|
|
2347
|
+
| BACKGROUND_COLOR | <code>string</code> | <code>"background_color"</code> |
|
|
2348
|
+
| TEXT_COLOR | <code>string</code> | <code>"text_color"</code> |
|
|
2349
|
+
| BORDER_COLOR | <code>string</code> | <code>"border_color"</code> |
|
|
2350
|
+
| BUTTON_COLOR | <code>string</code> | <code>"button_color"</code> |
|
|
2351
|
+
| ERROR_COLOR | <code>string</code> | <code>"error_color"</code> |
|
|
2352
|
+
| SUCCESS_COLOR | <code>string</code> | <code>"success_color"</code> |
|
|
2353
|
+
| FONT_SIZE | <code>string</code> | <code>"font_size"</code> |
|
|
2354
|
+
| FONT_FAMILY | <code>string</code> | <code>"font_family"</code> |
|
|
2355
|
+
|
|
2356
|
+
<a name="w_TEXT" id="w_TEXT" href="#user-content-w_TEXT"> </a>
|
|
2357
|
+
|
|
2358
|
+
## TEXT : <code>object</code>
|
|
2359
|
+
List of available text item params for widget
|
|
2360
|
+
|
|
2361
|
+
**Kind**: global constant
|
|
2362
|
+
|
|
2363
|
+
| Param | Type | Default |
|
|
2364
|
+
| --- | --- | --- |
|
|
2365
|
+
| TITLE | <code>string</code> | <code>"title"</code> |
|
|
2366
|
+
| FINISH | <code>string</code> | <code>"finish_text"</code> |
|
|
2367
|
+
|
|
2368
|
+
<a name="w_ELEMENT" id="w_ELEMENT" href="#user-content-w_ELEMENT"> </a>
|
|
2369
|
+
|
|
2370
|
+
## ELEMENT : <code>object</code>
|
|
2371
|
+
List of available params for hide elements
|
|
2372
|
+
|
|
2373
|
+
**Kind**: global constant
|
|
2374
|
+
|
|
2375
|
+
| Param | Type | Default |
|
|
2376
|
+
| --- | --- | --- |
|
|
2377
|
+
| SUBMIT_BUTTON | <code>string</code> | <code>"submit_button"</code> |
|
|
2378
|
+
| TABS | <code>string</code> | <code>"tabs"</code> |
|
|
2379
|
+
|
|
2380
|
+
<a name="w_SUPPORTED_CARD_TYPES" id="w_SUPPORTED_CARD_TYPES" href="#user-content-w_SUPPORTED_CARD_TYPES"> </a>
|
|
2381
|
+
|
|
2382
|
+
## SUPPORTED\_CARD\_TYPES : <code>object</code>
|
|
2383
|
+
The list of available parameters for showing card icons
|
|
2384
|
+
|
|
2385
|
+
**Kind**: global constant
|
|
2386
|
+
|
|
2387
|
+
| Param | Type | Default |
|
|
2388
|
+
| --- | --- | --- |
|
|
2389
|
+
| AMEX | <code>string</code> | <code>"amex"</code> |
|
|
2390
|
+
| AUSBC | <code>string</code> | <code>"ausbc"</code> |
|
|
2391
|
+
| DINERS | <code>string</code> | <code>"diners"</code> |
|
|
2392
|
+
| DISCOVER | <code>string</code> | <code>"discover"</code> |
|
|
2393
|
+
| JAPCB | <code>string</code> | <code>"japcb"</code> |
|
|
2394
|
+
| LASER | <code>string</code> | <code>"laser"</code> |
|
|
2395
|
+
| MASTERCARD | <code>string</code> | <code>"mastercard"</code> |
|
|
2396
|
+
| SOLO | <code>string</code> | <code>"solo"</code> |
|
|
2397
|
+
| VISA | <code>string</code> | <code>"visa"</code> |
|
|
2398
|
+
| VISA_WHITE | <code>string</code> | <code>"visa_white"</code> |
|
|
2399
|
+
|
|
2400
|
+
<a name="w_STYLABLE_ELEMENT" id="w_STYLABLE_ELEMENT" href="#user-content-w_STYLABLE_ELEMENT"> </a>
|
|
2401
|
+
|
|
2402
|
+
## STYLABLE\_ELEMENT : <code>object</code>
|
|
2403
|
+
Current constant include available type of element for styling
|
|
2404
|
+
|
|
2405
|
+
**Kind**: global constant
|
|
2406
|
+
|
|
2407
|
+
| Param | Type | Default | Description |
|
|
2408
|
+
| --- | --- | --- | --- |
|
|
2409
|
+
| INPUT | <code>string</code> | <code>"input."</code> | These states are available: [STYLABLE_ELEMENT_STATE.ERROR](#user-content-w_STYLABLE_ELEMENT_STATE), [STYLABLE_ELEMENT_STATE.FOCUS](#user-content-w_STYLABLE_ELEMENT_STATE). These styles are available [IElementStyleInput](#user-content-w_IElementStyleInput) |
|
|
2410
|
+
| SUBMIT_BUTTON | <code>string</code> | <code>"submit_button"</code> | These states are available: [STYLABLE_ELEMENT_STATE.HOVER](#user-content-w_STYLABLE_ELEMENT_STATE). These styles are available [IElementStyleSubmitButton](#user-content-w_IElementStyleSubmitButton) |
|
|
2411
|
+
| LABEL | <code>string</code> | <code>"label."</code> | These styles are available [IElementStyleLabel](#user-content-w_IElementStyleLabel) |
|
|
2412
|
+
| TITLE | <code>string</code> | <code>"title."</code> | These styles are available [IElementStyleTitle](#user-content-w_IElementStyleTitle) |
|
|
2413
|
+
| TITLE_DESCRIPTION | <code>string</code> | <code>"title_description."</code> | These styles are available [IElementStyleTitleDescription](#user-content-w_IElementStyleTitleDescription) |
|
|
2414
|
+
|
|
2415
|
+
<a name="w_STYLABLE_ELEMENT_STATE" id="w_STYLABLE_ELEMENT_STATE" href="#user-content-w_STYLABLE_ELEMENT_STATE"> </a>
|
|
2416
|
+
|
|
2417
|
+
## STYLABLE\_ELEMENT\_STATE : <code>object</code>
|
|
2418
|
+
Current constant include available states of element for styling
|
|
2419
|
+
|
|
2420
|
+
**Kind**: global constant
|
|
2421
|
+
|
|
2422
|
+
| Param | Type | Default | Description |
|
|
2423
|
+
| --- | --- | --- | --- |
|
|
2424
|
+
| ERROR | <code>string</code> | <code>"error"</code> | client|server validation. This state applies to: input |
|
|
2425
|
+
| FOCUS | <code>string</code> | <code>"focus"</code> | focus. This state applies to: input |
|
|
2426
|
+
| HOVER | <code>string</code> | <code>"hover"</code> | focus. This state applies to: submit_button |
|
|
2427
|
+
|
|
2428
|
+
<a name="w_TRIGGER" id="w_TRIGGER" href="#user-content-w_TRIGGER"> </a>
|
|
2429
|
+
|
|
2430
|
+
## TRIGGER : <code>object</code>
|
|
2431
|
+
List of available triggers
|
|
2432
|
+
|
|
2433
|
+
**Kind**: global constant
|
|
2434
|
+
|
|
2435
|
+
| Param | Type | Default |
|
|
2436
|
+
| --- | --- | --- |
|
|
2437
|
+
| SUBMIT_FORM | <code>string</code> | <code>"submit_form"</code> |
|
|
2438
|
+
| CHANGE_TAB | <code>string</code> | <code>"tab"</code> |
|
|
2439
|
+
| HIDE_ELEMENTS | <code>string</code> | <code>"hide_elements"</code> |
|
|
2440
|
+
| SHOW_ELEMENTS | <code>string</code> | <code>"show_elements"</code> |
|
|
2441
|
+
| REFRESH_CHECKOUT | <code>string</code> | <code>"refresh_checkout"</code> |
|
|
2442
|
+
| UPDATE_FORM_VALUES | <code>string</code> | <code>"update_form_values"</code> |
|
|
2443
|
+
| INIT_CHECKOUT | <code>string</code> | <code>"init_checkout"</code> |
|
|
2444
|
+
|