@paydock/client-sdk 1.104.3-beta → 1.105.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nvmrc +1 -0
- package/README.md +572 -290
- package/api.d.ts +1 -0
- package/api.js +1 -0
- package/bundles/widget.umd.js +9130 -8655
- package/bundles/widget.umd.min.js +1 -2
- package/canvas3ds.d.ts +1 -0
- package/canvas3ds.js +1 -0
- package/checkout-button.d.ts +1 -0
- package/checkout-button.js +1 -0
- package/inicialization-guide.md +7 -0
- package/{bundles/types → lib}/api/api-base.d.ts +1 -2
- package/lib/api/api-base.js +101 -0
- package/lib/api/api-base.js.map +1 -0
- package/{bundles/types → lib}/api/api-charge-internal.d.ts +0 -1
- package/lib/api/api-charge-internal.js +30 -0
- package/lib/api/api-charge-internal.js.map +1 -0
- package/{bundles/types → lib}/api/api-charge.d.ts +0 -1
- package/lib/api/api-charge.js +49 -0
- package/lib/api/api-charge.js.map +1 -0
- package/{bundles/types → lib}/api/api-internal.d.ts +0 -1
- package/lib/api/api-internal.js +13 -0
- package/lib/api/api-internal.js.map +1 -0
- package/{bundles/types → lib}/api/api-service-internal.d.ts +0 -1
- package/lib/api/api-service-internal.js +18 -0
- package/lib/api/api-service-internal.js.map +1 -0
- package/{bundles/types → lib}/api/api.d.ts +1 -2
- package/lib/api/api.js +62 -0
- package/lib/api/api.js.map +1 -0
- package/lib/api/index.d.ts +1 -0
- package/lib/api/index.js +2 -0
- package/lib/api/index.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/canvas-3ds.d.ts +1 -2
- package/lib/canvas-3ds/canvas-3ds.js +157 -0
- package/lib/canvas-3ds/canvas-3ds.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/index.d.ts +0 -1
- package/lib/canvas-3ds/index.js +2 -0
- package/lib/canvas-3ds/index.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/services/gpayments-service.d.ts +0 -1
- package/lib/canvas-3ds/services/gpayments-service.js +181 -0
- package/lib/canvas-3ds/services/gpayments-service.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/services/index.d.ts +0 -1
- package/lib/canvas-3ds/services/index.js +2 -0
- package/lib/canvas-3ds/services/index.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/services/standalone3ds-service.d.ts +0 -1
- package/lib/canvas-3ds/services/standalone3ds-service.js +32 -0
- package/lib/canvas-3ds/services/standalone3ds-service.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -2
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js +50 -0
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/afterpay/afterpay.runner.d.ts +0 -1
- package/lib/checkout-button/afterpay/afterpay.runner.js +41 -0
- package/lib/checkout-button/afterpay/afterpay.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/checkout-button.d.ts +1 -2
- package/{bundles/types → lib}/checkout-button/checkout-button.interface.d.ts +0 -1
- package/lib/checkout-button/checkout-button.interface.js +45 -0
- package/lib/checkout-button/checkout-button.interface.js.map +1 -0
- package/lib/checkout-button/checkout-button.js +266 -0
- package/lib/checkout-button/checkout-button.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/checkout-contextual-handler.d.ts +0 -1
- package/lib/checkout-button/checkout-contextual-handler.js +75 -0
- package/lib/checkout-button/checkout-contextual-handler.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/index.d.ts +1 -2
- package/lib/checkout-button/index.js +85 -0
- package/lib/checkout-button/index.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/paypal/paypal-checkout-button.d.ts +1 -2
- package/lib/checkout-button/paypal/paypal-checkout-button.js +25 -0
- package/lib/checkout-button/paypal/paypal-checkout-button.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/paypal/paypal.runner.d.ts +0 -1
- package/lib/checkout-button/paypal/paypal.runner.js +14 -0
- package/lib/checkout-button/paypal/paypal.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/base.runner.d.ts +3 -4
- package/lib/checkout-button/runner/base.runner.js +13 -0
- package/lib/checkout-button/runner/base.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/contextual.runner.d.ts +1 -2
- package/lib/checkout-button/runner/contextual.runner.js +40 -0
- package/lib/checkout-button/runner/contextual.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/index.d.ts +0 -1
- package/lib/checkout-button/runner/index.js +11 -0
- package/lib/checkout-button/runner/index.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/popup.runner.d.ts +1 -2
- package/lib/checkout-button/runner/popup.runner.js +68 -0
- package/lib/checkout-button/runner/popup.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/redirect.runner.d.ts +1 -2
- package/lib/checkout-button/runner/redirect.runner.js +15 -0
- package/lib/checkout-button/runner/redirect.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -2
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +64 -0
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +1 -2
- package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js +78 -0
- package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +1 -2
- package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js +49 -0
- package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.config.d.ts +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.config.js +4 -0
- package/lib/checkout-button/zipmoney/zipmoney.config.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.runner.d.ts +1 -2
- package/lib/checkout-button/zipmoney/zipmoney.runner.js +23 -0
- package/lib/checkout-button/zipmoney/zipmoney.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.types.d.ts +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.types.js +1 -0
- package/lib/checkout-button/zipmoney/zipmoney.types.js.map +1 -0
- package/{bundles/types → lib}/components/ability-guard.d.ts +0 -1
- package/lib/components/ability-guard.js +44 -0
- package/lib/components/ability-guard.js.map +1 -0
- package/{bundles/types → lib}/components/background.d.ts +0 -1
- package/lib/components/background.js +193 -0
- package/lib/components/background.js.map +1 -0
- package/{bundles/types → lib}/components/container.d.ts +1 -1
- package/lib/components/container.js +63 -0
- package/lib/components/container.js.map +1 -0
- package/{bundles/types → lib}/components/dispatcher.d.ts +1 -2
- package/lib/components/dispatcher.js +39 -0
- package/lib/components/dispatcher.js.map +1 -0
- package/{bundles/types → lib}/components/element-style.d.ts +1 -2
- package/lib/components/element-style.js +52 -0
- package/lib/components/element-style.js.map +1 -0
- package/{bundles/types → lib}/components/flypay-iframe-event.d.ts +0 -1
- package/lib/components/flypay-iframe-event.js +28 -0
- package/lib/components/flypay-iframe-event.js.map +1 -0
- package/{bundles/types/components/form-interceptor.d.ts → lib/components/form-Interceptor.d.ts} +0 -1
- package/lib/components/form-Interceptor.js +38 -0
- package/lib/components/form-Interceptor.js.map +1 -0
- package/{bundles/types → lib}/components/http-core.d.ts +0 -1
- package/lib/components/http-core.js +57 -0
- package/lib/components/http-core.js.map +1 -0
- package/{bundles/types → lib}/components/iframe-event.d.ts +15 -13
- package/lib/components/iframe-event.js +75 -0
- package/lib/components/iframe-event.js.map +1 -0
- package/{bundles/types → lib}/components/iframe.d.ts +0 -1
- package/lib/components/iframe.js +62 -0
- package/lib/components/iframe.js.map +1 -0
- package/{bundles/types → lib}/components/link.d.ts +1 -2
- package/lib/components/link.js +59 -0
- package/lib/components/link.js.map +1 -0
- package/{bundles/types → lib}/components/loader.d.ts +0 -1
- package/lib/components/loader.js +234 -0
- package/lib/components/loader.js.map +1 -0
- package/{bundles/types → lib}/components/param.d.ts +9 -12
- package/lib/components/param.js +147 -0
- package/lib/components/param.js.map +1 -0
- package/{bundles/types → lib}/components/popup.d.ts +0 -1
- package/lib/components/popup.js +104 -0
- package/lib/components/popup.js.map +1 -0
- package/{bundles/types → lib}/components/storage-dispatcher.d.ts +0 -1
- package/lib/components/storage-dispatcher.js +75 -0
- package/lib/components/storage-dispatcher.js.map +1 -0
- package/{bundles/types → lib}/components/trigger.d.ts +0 -1
- package/lib/components/trigger.js +49 -0
- package/lib/components/trigger.js.map +1 -0
- package/{bundles/types → lib}/components/vault-display-iframe-event.d.ts +0 -1
- package/lib/components/vault-display-iframe-event.js +27 -0
- package/lib/components/vault-display-iframe-event.js.map +1 -0
- package/{bundles/types → lib}/components/wallet-background.d.ts +2 -2
- package/lib/components/wallet-background.js +63 -0
- package/lib/components/wallet-background.js.map +1 -0
- package/{bundles/types → lib}/components/wallet-trigger.d.ts +0 -1
- package/lib/components/wallet-trigger.js +27 -0
- package/lib/components/wallet-trigger.js.map +1 -0
- package/{bundles/types/configs/env/environment.paydock.d.ts → lib/configs/env/env.d.ts} +8 -5
- package/lib/configs/env/env.js +117 -0
- package/lib/configs/env/env.js.map +1 -0
- package/{bundles/types → lib}/configs/sdk.d.ts +2 -3
- package/lib/configs/sdk.js +16 -0
- package/lib/configs/sdk.js.map +1 -0
- package/lib/constants/validators.d.ts +44 -0
- package/lib/constants/validators.js +42 -0
- package/lib/constants/validators.js.map +1 -0
- package/{bundles/types → lib}/external-checkout/builder.d.ts +0 -1
- package/lib/external-checkout/builder.js +45 -0
- package/lib/external-checkout/builder.js.map +1 -0
- package/{bundles/types → lib}/external-checkout/checker.d.ts +0 -1
- package/lib/external-checkout/checker.js +22 -0
- package/lib/external-checkout/checker.js.map +1 -0
- package/lib/external-checkout/index.d.ts +2 -0
- package/lib/external-checkout/index.js +3 -0
- package/lib/external-checkout/index.js.map +1 -0
- package/{bundles/types → lib}/helper/access-token.d.ts +0 -1
- package/lib/helper/access-token.js +44 -0
- package/lib/helper/access-token.js.map +1 -0
- package/{bundles/types → lib}/helper/browser.d.ts +0 -1
- package/lib/helper/browser.js +79 -0
- package/lib/helper/browser.js.map +1 -0
- package/{bundles/types → lib}/helper/event-emitter.d.ts +0 -1
- package/lib/helper/event-emitter.js +23 -0
- package/lib/helper/event-emitter.js.map +1 -0
- package/{bundles/types → lib}/helper/event.d.ts +0 -1
- package/lib/helper/event.js +23 -0
- package/lib/helper/event.js.map +1 -0
- package/{bundles/types → lib}/helper/ms.d.ts +0 -1
- package/lib/helper/ms.js +32 -0
- package/lib/helper/ms.js.map +1 -0
- package/{bundles/types → lib}/helper/object.d.ts +0 -1
- package/lib/helper/object.js +6 -0
- package/lib/helper/object.js.map +1 -0
- package/{bundles/types → lib}/helper/url.d.ts +0 -1
- package/lib/helper/url.js +11 -0
- package/lib/helper/url.js.map +1 -0
- package/{bundles/types → lib}/helper/uuid.d.ts +0 -1
- package/lib/helper/uuid.js +26 -0
- package/lib/helper/uuid.js.map +1 -0
- package/lib/index.d.ts +15 -0
- package/lib/index.js +15 -0
- package/lib/index.js.map +1 -0
- package/{bundles/types → lib}/payment-source/builder.d.ts +0 -1
- package/lib/payment-source/builder.js +49 -0
- package/lib/payment-source/builder.js.map +1 -0
- package/{bundles/types → lib}/payment-source/index.d.ts +0 -1
- package/lib/payment-source/index.js +2 -0
- package/lib/payment-source/index.js.map +1 -0
- package/{bundles/types → lib}/payment-source-widget/html-payment-source-widget.d.ts +17 -14
- package/lib/payment-source-widget/html-payment-source-widget.js +172 -0
- package/lib/payment-source-widget/html-payment-source-widget.js.map +1 -0
- package/{bundles/types → lib}/payment-source-widget/index.d.ts +0 -1
- package/lib/payment-source-widget/index.js +35 -0
- package/lib/payment-source-widget/index.js.map +1 -0
- package/{bundles/types → lib}/payment-source-widget/interfaces.d.ts +0 -1
- package/lib/payment-source-widget/interfaces.js +2 -0
- package/lib/payment-source-widget/interfaces.js.map +1 -0
- package/{bundles/types → lib}/payment-source-widget/payment-source-widget.d.ts +1 -2
- package/lib/payment-source-widget/payment-source-widget.js +142 -0
- package/lib/payment-source-widget/payment-source-widget.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/index.d.ts +0 -1
- package/lib/secure-remote-commerce/index.js +2 -0
- package/lib/secure-remote-commerce/index.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/interfaces.d.ts +5 -6
- package/lib/secure-remote-commerce/interfaces.js +28 -0
- package/lib/secure-remote-commerce/interfaces.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/providers/src-provider.d.ts +0 -1
- package/lib/secure-remote-commerce/providers/src-provider.js +1 -0
- package/lib/secure-remote-commerce/providers/src-provider.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/helper.js +36 -0
- package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/index.d.ts +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/index.js +2 -0
- package/lib/secure-remote-commerce/providers/visa-src/index.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/visa-src.d.ts +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +113 -0
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +10 -0
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/secure-remote-commerce.d.ts +1 -2
- package/lib/secure-remote-commerce/secure-remote-commerce.js +239 -0
- package/lib/secure-remote-commerce/secure-remote-commerce.js.map +1 -0
- package/{bundles/types → lib}/vault-display-widget/index.d.ts +0 -1
- package/lib/vault-display-widget/index.js +14 -0
- package/lib/vault-display-widget/index.js.map +1 -0
- package/{bundles/types → lib}/vault-display-widget/vault-display-widget.d.ts +1 -2
- package/lib/vault-display-widget/vault-display-widget.js +99 -0
- package/lib/vault-display-widget/vault-display-widget.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/afterpay.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/afterpay.wallet-service.js +152 -0
- package/lib/wallet-buttons/afterpay.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/apple.wallet-service.d.ts +2 -1
- package/lib/wallet-buttons/apple.wallet-service.js +324 -0
- package/lib/wallet-buttons/apple.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/flypay-v2.wallet-service.d.ts +9 -2
- package/lib/wallet-buttons/flypay-v2.wallet-service.js +165 -0
- package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/flypay.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/flypay.wallet-service.js +117 -0
- package/lib/wallet-buttons/flypay.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/google.wallet-service.d.ts +3 -1
- package/lib/wallet-buttons/google.wallet-service.js +301 -0
- package/lib/wallet-buttons/google.wallet-service.js.map +1 -0
- package/lib/wallet-buttons/helpers/flypay-v2.helper.d.ts +3 -0
- package/lib/wallet-buttons/helpers/flypay-v2.helper.js +151 -0
- package/lib/wallet-buttons/helpers/flypay-v2.helper.js.map +1 -0
- package/lib/wallet-buttons/index.d.ts +127 -0
- package/lib/wallet-buttons/index.js +128 -0
- package/lib/wallet-buttons/index.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/interfaces.d.ts +3 -1
- package/lib/wallet-buttons/interfaces.js +1 -0
- package/lib/wallet-buttons/interfaces.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/mastercard.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/mastercard.wallet-service.js +27 -0
- package/lib/wallet-buttons/mastercard.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/paypal.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/paypal.wallet-service.js +144 -0
- package/lib/wallet-buttons/paypal.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/stripe.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/stripe.wallet-service.js +100 -0
- package/lib/wallet-buttons/stripe.wallet-service.js.map +1 -0
- package/{bundles/types/wallet-buttons/wallet-cba-buttons.d.ts → lib/wallet-buttons/wallet-buttons.d.ts} +92 -115
- package/lib/wallet-buttons/wallet-buttons.js +479 -0
- package/lib/wallet-buttons/wallet-buttons.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/wallet-service.d.ts +7 -1
- package/lib/wallet-buttons/wallet-service.js +60 -0
- package/lib/wallet-buttons/wallet-service.js.map +1 -0
- package/{bundles/types → lib}/widget/configuration.d.ts +2 -3
- package/lib/widget/configuration.js +260 -0
- package/lib/widget/configuration.js.map +1 -0
- package/lib/widget/html-multi-widget.d.ts +336 -0
- package/lib/widget/html-multi-widget.js +422 -0
- package/lib/widget/html-multi-widget.js.map +1 -0
- package/{bundles/types → lib}/widget/html-widget.d.ts +1 -2
- package/lib/widget/html-widget.js +127 -0
- package/lib/widget/html-widget.js.map +1 -0
- package/{bundles/types → lib}/widget/index.d.ts +1 -2
- package/lib/widget/index.js +132 -0
- package/lib/widget/index.js.map +1 -0
- package/{bundles/types → lib}/widget/meta.d.ts +0 -1
- package/lib/widget/meta.js +8 -0
- package/lib/widget/meta.js.map +1 -0
- package/{bundles/types → lib}/widget/multi-widget.d.ts +1 -2
- package/lib/widget/multi-widget.js +437 -0
- package/lib/widget/multi-widget.js.map +1 -0
- package/{bundles/types → lib}/widget/style.d.ts +0 -1
- package/lib/widget/style.js +204 -0
- package/lib/widget/style.js.map +1 -0
- package/package.json +42 -164
- package/payment-source-widget.d.ts +1 -0
- package/payment-source-widget.js +1 -0
- package/slate.md +136 -107
- package/tslint.json +129 -0
- package/typings/globals/@auspayplus/open-payments-checkout/index.d.ts +43 -0
- package/typings/globals/jasmine/index.d.ts +576 -0
- package/typings/globals/jasmine-ajax/index.d.ts +83 -0
- package/typings/globals/jquery/index.d.ts +3759 -0
- package/typings/index.d.ts +4 -0
- package/vault-display-widget.d.ts +1 -0
- package/vault-display-widget.js +1 -0
- package/vendors/zipmoney.d.ts +18 -0
- package/vendors/zipmoney.js +2 -0
- package/widget.d.ts +1 -0
- package/widget.js +1 -0
- package/bundles/index.cjs +0 -10674
- package/bundles/index.cjs.d.ts +0 -3163
- package/bundles/index.cjs.map +0 -1
- package/bundles/index.mjs +0 -10642
- package/bundles/index.mjs.d.ts +0 -3163
- package/bundles/index.mjs.map +0 -1
- package/bundles/types/api/api-base.d.ts.map +0 -1
- package/bundles/types/api/api-charge-internal.d.ts.map +0 -1
- package/bundles/types/api/api-charge.d.ts.map +0 -1
- package/bundles/types/api/api-internal.d.ts.map +0 -1
- package/bundles/types/api/api-service-internal.d.ts.map +0 -1
- package/bundles/types/api/api.d.ts.map +0 -1
- package/bundles/types/api/index.d.ts +0 -2
- package/bundles/types/api/index.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/index.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/services/index.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +0 -1
- package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +0 -1
- package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/checkout-button.d.ts.map +0 -1
- package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +0 -1
- package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +0 -1
- package/bundles/types/checkout-button/index.d.ts.map +0 -1
- package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +0 -1
- package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/base.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/index.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/redirect.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/index.d.ts +0 -4
- package/bundles/types/checkout-button/zipmoney/index.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +0 -1
- package/bundles/types/components/ability-guard.d.ts.map +0 -1
- package/bundles/types/components/background.d.ts.map +0 -1
- package/bundles/types/components/container.d.ts.map +0 -1
- package/bundles/types/components/dispatcher.d.ts.map +0 -1
- package/bundles/types/components/element-style.d.ts.map +0 -1
- package/bundles/types/components/flypay-iframe-event.d.ts.map +0 -1
- package/bundles/types/components/form-interceptor.d.ts.map +0 -1
- package/bundles/types/components/http-core.d.ts.map +0 -1
- package/bundles/types/components/iframe-event.d.ts.map +0 -1
- package/bundles/types/components/iframe.d.ts.map +0 -1
- package/bundles/types/components/link.d.ts.map +0 -1
- package/bundles/types/components/loader.d.ts.map +0 -1
- package/bundles/types/components/param.d.ts.map +0 -1
- package/bundles/types/components/popup.d.ts.map +0 -1
- package/bundles/types/components/storage-dispatcher.d.ts.map +0 -1
- package/bundles/types/components/trigger.d.ts.map +0 -1
- package/bundles/types/components/vault-display-iframe-event.d.ts.map +0 -1
- package/bundles/types/components/wallet-background.d.ts.map +0 -1
- package/bundles/types/components/wallet-trigger.d.ts.map +0 -1
- package/bundles/types/configs/env/environment.cba.d.ts +0 -29
- package/bundles/types/configs/env/environment.cba.d.ts.map +0 -1
- package/bundles/types/configs/env/environment.interface.d.ts +0 -12
- package/bundles/types/configs/env/environment.interface.d.ts.map +0 -1
- package/bundles/types/configs/env/environment.paydock.d.ts.map +0 -1
- package/bundles/types/configs/env/index.d.ts +0 -3
- package/bundles/types/configs/env/index.d.ts.map +0 -1
- package/bundles/types/configs/sdk.d.ts.map +0 -1
- package/bundles/types/external-checkout/builder.d.ts.map +0 -1
- package/bundles/types/external-checkout/checker.d.ts.map +0 -1
- package/bundles/types/external-checkout/index.d.ts +0 -3
- package/bundles/types/external-checkout/index.d.ts.map +0 -1
- package/bundles/types/helper/access-token.d.ts.map +0 -1
- package/bundles/types/helper/browser.d.ts.map +0 -1
- package/bundles/types/helper/event-emitter.d.ts.map +0 -1
- package/bundles/types/helper/event.d.ts.map +0 -1
- package/bundles/types/helper/ms.d.ts.map +0 -1
- package/bundles/types/helper/object.d.ts.map +0 -1
- package/bundles/types/helper/url.d.ts.map +0 -1
- package/bundles/types/helper/uuid.d.ts.map +0 -1
- package/bundles/types/index-cba.d.ts +0 -13
- package/bundles/types/index-cba.d.ts.map +0 -1
- package/bundles/types/index.d.ts +0 -14
- package/bundles/types/index.d.ts.map +0 -1
- package/bundles/types/payment-source/builder.d.ts.map +0 -1
- package/bundles/types/payment-source/index.d.ts.map +0 -1
- package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +0 -1
- package/bundles/types/payment-source-widget/index.d.ts.map +0 -1
- package/bundles/types/payment-source-widget/interfaces.d.ts.map +0 -1
- package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/index.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +0 -1
- package/bundles/types/vault-display-widget/index.d.ts.map +0 -1
- package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/index-cba.d.ts +0 -2
- package/bundles/types/wallet-buttons/index-cba.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/index.d.ts +0 -2
- package/bundles/types/wallet-buttons/index.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/interfaces.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts +0 -366
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/wallet-service.d.ts.map +0 -1
- package/bundles/types/widget/configuration.d.ts.map +0 -1
- package/bundles/types/widget/html-multi-widget.d.ts +0 -266
- package/bundles/types/widget/html-multi-widget.d.ts.map +0 -1
- package/bundles/types/widget/html-widget.d.ts.map +0 -1
- package/bundles/types/widget/index.d.ts.map +0 -1
- package/bundles/types/widget/meta.d.ts.map +0 -1
- package/bundles/types/widget/multi-widget.d.ts.map +0 -1
- package/bundles/types/widget/style.d.ts.map +0 -1
- package/bundles/widget.umd.js.d.ts +0 -3163
- package/bundles/widget.umd.js.map +0 -1
- package/bundles/widget.umd.js.min.d.ts +0 -3163
- package/bundles/widget.umd.min.js.map +0 -1
- package/docs/api-canvas3ds.md +0 -158
- package/docs/api-checkout-button.md +0 -912
- package/docs/api-examples.md +0 -65
- package/docs/api-ps-widget.md +0 -585
- package/docs/api-vault-display.md +0 -94
- package/docs/api-widget.md +0 -2444
- package/docs/api-wrapper.md +0 -78
- package/docs/canvas3ds-examples.md +0 -242
- package/docs/cba-header.md +0 -13
- package/docs/cba-license.md +0 -2
- package/docs/checkout-examples.md +0 -248
- package/docs/header.md +0 -15
- package/docs/html/layout.html +0 -78
- package/docs/html/marked.js +0 -23
- package/docs/html/style.css +0 -365
- package/docs/install/npm.content.md +0 -16
- package/docs/install/npm.example.md +0 -24
- package/docs/install/umd.content.md +0 -20
- package/docs/install/umd.example.md +0 -6
- package/docs/install.md +0 -43
- package/docs/install.readme.t.md +0 -17
- package/docs/install.slate.t.md +0 -17
- package/docs/license.md +0 -2
- package/docs/partials/header.hbs +0 -3
- package/docs/ps-examples.md +0 -129
- package/docs/secure-remote-commerce-examples.md +0 -258
- package/docs/secure-remote-commerce.md +0 -265
- package/docs/vault-display-example.md +0 -132
- package/docs/wallet-buttons-examples.md +0 -580
- package/docs/wallet-buttons.md +0 -424
- package/docs/wallet-cba-buttons-examples.md +0 -388
- package/docs/widget-examples.md +0 -134
package/README.md
CHANGED
|
@@ -16,78 +16,76 @@ Also you will need added gateway ([see API Reference by gateway](https://docs.pa
|
|
|
16
16
|
|
|
17
17
|
## Get started
|
|
18
18
|
|
|
19
|
-
The Client SDK ships in JavaScript ES6 (EcmaScript 2015) in three different
|
|
20
|
-
formats (CJS, ESM and UMD) along with respective TypeScript declarations. Below,
|
|
21
|
-
we exemplify how to import each format.
|
|
22
|
-
|
|
23
19
|
### With package manager
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
`pnpm`, `bun`). Using `npm` the following command would add the Client SDK as a
|
|
27
|
-
production dependency.
|
|
21
|
+
To install with package manager, enter the following command:
|
|
28
22
|
|
|
29
|
-
|
|
30
|
-
npm install @paydock/client-sdk
|
|
31
|
-
```
|
|
23
|
+
`npm install @paydock/client-sdk`
|
|
32
24
|
|
|
33
|
-
After installation is complete, if you are developing in NodeJS environments or
|
|
34
|
-
using tools that expect your JavaScript code to be in CJS format (e.g., Jest,
|
|
35
|
-
Karma, RequireJS, Webpack), you can import the Client SDK using CommonJS modules.
|
|
36
|
-
For these environments the UMD format (`@paydock/client-sdk/bundles/widget.umd.js`)
|
|
37
|
-
can also be used as a fallback. Alternatively, in case you are developing in
|
|
38
|
-
projects that have access to modern bundlers such as Vite or others (e.g., SPA
|
|
39
|
-
libs or SSR Metaframeworks), you can import the Client SDK features using ESM
|
|
40
|
-
through named imports or namespaced imports.
|
|
41
25
|
|
|
26
|
+
You can use ES2015 or TypeScript modules
|
|
42
27
|
|
|
43
|
-
|
|
44
|
-
// module import - CommonJS/Node projects ✅
|
|
45
|
-
const paydock = require('@paydock/client-sdk')
|
|
46
|
-
const api = new paydock.Api('publicKey');
|
|
47
|
-
```
|
|
28
|
+
`@paydock/client-sdk/widget`
|
|
48
29
|
|
|
49
|
-
```mjs
|
|
50
|
-
// named import - ESM projects or TypeScript projects ✅
|
|
51
|
-
import { HtmlWidget } from '@paydock/client-sdk'
|
|
52
|
-
const widget = new HtmlWidget('#selector', 'publicKey', 'gatewayId');
|
|
53
|
-
```
|
|
54
30
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
31
|
+
Also can use UMD module (global visibility, see above)
|
|
32
|
+
|
|
33
|
+
`@paydock/client-sdk/bundles/widget.umd.js`
|
|
34
|
+
|
|
35
|
+
`@paydock/client-sdk/bundles/widget.umd.min.js`
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
```javascript--es2015
|
|
40
|
+
// ES2015 / TypeScript
|
|
41
|
+
|
|
42
|
+
import { HtmlWidget } from '@paydock/client-sdk/widget';
|
|
43
|
+
|
|
44
|
+
let widget = new HtmlWidget('#selector', 'publicKey', 'gatewayId');
|
|
59
45
|
```
|
|
60
46
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<script src="@paydock/client-sdk/bundles/widget.umd.min.js"></script>
|
|
50
|
+
<script>
|
|
51
|
+
var widget = new paydock.HtmlWidget('#tag', 'publicKey', 'gatewayId');
|
|
52
|
+
</script>
|
|
66
53
|
```
|
|
67
54
|
|
|
68
55
|
|
|
56
|
+
|
|
69
57
|
### Download from CDN
|
|
70
58
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
59
|
+
You should begin by including the library in your page.
|
|
60
|
+
|
|
61
|
+
Add this script tag to your page to get started with with the url below:
|
|
62
|
+
|
|
63
|
+
*Compressed version for production*
|
|
64
|
+
`https://widget.paydock.com/sdk/latest/widget.umd.min.js`
|
|
65
|
+
|
|
66
|
+
*Full version for development and debug*
|
|
67
|
+
`https://widget.paydock.com/sdk/latest/widget.umd.js`
|
|
75
68
|
|
|
76
|
-
For production we recommend using the compressed version (`.min.js`) since
|
|
77
|
-
it will result in faster loading times for your end users.
|
|
78
69
|
|
|
79
|
-
- *Compressed version for production: `https://widget.paydock.com/sdk/latest/widget.umd.min.js`*
|
|
80
70
|
|
|
81
|
-
- *Full version for development and debug: `https://widget.paydock.com/sdk/latest/widget.umd.js`*
|
|
82
71
|
|
|
83
|
-
|
|
84
|
-
and, the development version [here][max].
|
|
72
|
+
Also can download library the [production version][min] or the [development version][max]
|
|
85
73
|
|
|
86
74
|
[min]: https://widget.paydock.com/sdk/latest/widget.umd.min.js
|
|
87
75
|
[max]: https://widget.paydock.com/sdk/latest/widget.umd.js
|
|
88
76
|
|
|
89
|
-
|
|
90
|
-
|
|
77
|
+
|
|
78
|
+
The library will always be available via the global variable `paydock`.
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
Also for more advanced use, the library has [UMD](https://github.com/umdjs/umd) format, thus can be used in requireJs, webpack, etc.
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
91
89
|
|
|
92
90
|
|
|
93
91
|
```html
|
|
@@ -97,7 +95,6 @@ format that can be used in RequireJS, Webpack, etc.
|
|
|
97
95
|
</script>
|
|
98
96
|
```
|
|
99
97
|
|
|
100
|
-
|
|
101
98
|
## Widget
|
|
102
99
|
You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#widget-simple-example)
|
|
103
100
|
|
|
@@ -122,11 +119,11 @@ var widget = new paydock.HtmlWidget('#widget', 'publicKey');
|
|
|
122
119
|
widget.load();
|
|
123
120
|
```
|
|
124
121
|
|
|
125
|
-
```javascript
|
|
122
|
+
```javascript--es2015
|
|
126
123
|
// ES2015 | TypeScript
|
|
127
124
|
|
|
128
|
-
import { HtmlWidget } from '@paydock/client-sdk';
|
|
129
|
-
|
|
125
|
+
import { HtmlWidget } from '@paydock/client-sdk/widget';
|
|
126
|
+
|
|
130
127
|
var widget = new HtmlWidget('#widget', 'publicKey');
|
|
131
128
|
widget.load();
|
|
132
129
|
```
|
|
@@ -134,7 +131,7 @@ widget.load();
|
|
|
134
131
|
Then write only need 2 lines of code in js to initialize widget
|
|
135
132
|
|
|
136
133
|
|
|
137
|
-
### Full example
|
|
134
|
+
### Full example
|
|
138
135
|
|
|
139
136
|
```html
|
|
140
137
|
<!DOCTYPE html>
|
|
@@ -197,9 +194,9 @@ widget.setFormFields(['phone', 'email']); // add additional fields for form of w
|
|
|
197
194
|
widget.setSupportedCardIcons(['mastercard', 'visa']); // add icons of supported card types
|
|
198
195
|
```
|
|
199
196
|
|
|
200
|
-
This example shows how you can use a lot of other methods to settings your form
|
|
197
|
+
This example shows how you can use a lot of other methods to settings your form
|
|
201
198
|
|
|
202
|
-
### Full example
|
|
199
|
+
### Full example
|
|
203
200
|
|
|
204
201
|
```html
|
|
205
202
|
<!DOCTYPE html>
|
|
@@ -220,12 +217,12 @@ This example shows how you can use a lot of other methods to settings your form
|
|
|
220
217
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.js" ></script>
|
|
221
218
|
<script>
|
|
222
219
|
var widget = new paydock.HtmlWidget('#widget', 'publicKey', 'gatewayId');
|
|
223
|
-
|
|
220
|
+
|
|
224
221
|
widget.setSupportedCardIcons(['mastercard', 'visa']);
|
|
225
222
|
widget.setFormFields(['phone', 'email']);
|
|
226
223
|
widget.setRefId('custom-ref-id');
|
|
227
224
|
widget.onFinishInsert('input[name="payment_source_token"]', 'payment_source');z
|
|
228
|
-
|
|
225
|
+
|
|
229
226
|
widget.load();
|
|
230
227
|
</script>
|
|
231
228
|
</script>
|
|
@@ -286,6 +283,12 @@ This example shows how you can use a lot of other methods to settings your form
|
|
|
286
283
|
<dt><a href="#user-content-w_STYLABLE_ELEMENT_STATE">STYLABLE_ELEMENT_STATE</a> : <code>object</code></dt>
|
|
287
284
|
<dd><p>Current constant include available states of element for styling</p>
|
|
288
285
|
</dd>
|
|
286
|
+
<dt><a href="#user-content-w_CARD_VALIDATORS">CARD_VALIDATORS</a> : <code>Record.<string, string></code></dt>
|
|
287
|
+
<dd><p>List of available form field validators dedicated to cards and their definition</p>
|
|
288
|
+
</dd>
|
|
289
|
+
<dt><a href="#user-content-w_GENERIC_VALIDATORS">GENERIC_VALIDATORS</a> : <code>Record.<string, string></code></dt>
|
|
290
|
+
<dd><p>List of available generic form field validators and their definition</p>
|
|
291
|
+
</dd>
|
|
289
292
|
<dt><a href="#user-content-w_TRIGGER">TRIGGER</a> : <code>object</code></dt>
|
|
290
293
|
<dd><p>List of available triggers</p>
|
|
291
294
|
</dd>
|
|
@@ -298,7 +301,8 @@ This example shows how you can use a lot of other methods to settings your form
|
|
|
298
301
|
<dd><p>Interface of data from validation event.</p>
|
|
299
302
|
</dd>
|
|
300
303
|
<dt><a href="#user-content-w_IEventMetaData">IEventMetaData</a></dt>
|
|
301
|
-
<dd><p>
|
|
304
|
+
<dd><p>Contains basic information associated with the event and additional meta data
|
|
305
|
+
specific to the event. E.g., card info, gateway info, etc.</p>
|
|
302
306
|
</dd>
|
|
303
307
|
<dt><a href="#user-content-w_IEventAfterLoadData">IEventAfterLoadData</a></dt>
|
|
304
308
|
<dd><p>Interface of data from event.</p>
|
|
@@ -347,33 +351,34 @@ Interface of data from validation event.
|
|
|
347
351
|
|
|
348
352
|
| Param | Type | Description |
|
|
349
353
|
| --- | --- | --- |
|
|
350
|
-
| event | <code>string</code> |
|
|
351
|
-
|
|
|
352
|
-
|
|
|
353
|
-
| [ref_id] | <code>string</code> | Custom value
|
|
354
|
-
| [form_valid] | <code>boolean</code> |
|
|
355
|
-
| [invalid_fields] | <code>
|
|
356
|
-
| [invalid_showed_fields] | <code>
|
|
357
|
-
| [validators] | <code>
|
|
354
|
+
| event | <code>string</code> | The name of the event. |
|
|
355
|
+
| message_source | <code>string</code> | A system variable that identifies the event source. |
|
|
356
|
+
| purpose | <code>string</code> | A system variable that states the purpose of the event. |
|
|
357
|
+
| [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
|
|
358
|
+
| [form_valid] | <code>boolean</code> | Indicates wether or not the form is valid. |
|
|
359
|
+
| [invalid_fields] | <code>Array.<string></code> | Names of form fields with invalid data. |
|
|
360
|
+
| [invalid_showed_fields] | <code>Array.<string></code> | Names of invalid form fields which are already displaying the error. |
|
|
361
|
+
| [validators] | <code>Partial.<Record.<(CardValidatorValue\|GenericValidatorValue), Array.<string>>></code> | Object containing validator identifiers as keys and the fields subject to that validator as an array of form field names. See list of available [Generic Vallidators](#user-content-w_GENERIC_VALIDATORS) and [Card Validators](#user-content-w_CARD_VALIDATORS), |
|
|
358
362
|
|
|
359
363
|
<a name="w_IEventMetaData" id="w_IEventMetaData" href="#user-content-w_IEventMetaData"> </a>
|
|
360
364
|
|
|
361
365
|
## IEventMetaData
|
|
362
|
-
|
|
366
|
+
Contains basic information associated with the event and additional meta data
|
|
367
|
+
specific to the event. E.g., card info, gateway info, etc.
|
|
363
368
|
|
|
364
369
|
**Kind**: global interface
|
|
365
370
|
|
|
366
371
|
| Param | Type | Description |
|
|
367
372
|
| --- | --- | --- |
|
|
368
|
-
| event | <code>string</code> |
|
|
369
|
-
| purpose | <code>string</code> |
|
|
370
|
-
| message_source | <code>string</code> |
|
|
371
|
-
| [ref_id] | <code>string</code> | Custom value
|
|
373
|
+
| event | <code>string</code> | The name of the event. |
|
|
374
|
+
| purpose | <code>string</code> | A system variable that states the purpose of the event. |
|
|
375
|
+
| message_source | <code>string</code> | A system variable that identifies the event source. |
|
|
376
|
+
| [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
|
|
372
377
|
| configuration_token | <code>string</code> | Token received from our API with widget data |
|
|
373
378
|
| type | <code>string</code> | Payment type 'card', 'bank_account' |
|
|
374
379
|
| gateway_type | <code>string</code> | Gateway type |
|
|
375
380
|
| [card_number_last4] | <code>string</code> | Last 4 digit of your card |
|
|
376
|
-
| [card_scheme] | <code>string</code> | Card scheme |
|
|
381
|
+
| [card_scheme] | <code>string</code> | Card scheme, e.g., (Visa, Mastercard and American Express (AmEx)) |
|
|
377
382
|
| [card_number_length] | <code>number</code> | Card number length |
|
|
378
383
|
| [account_name] | <code>string</code> | Bank account account name |
|
|
379
384
|
| [account_number] | <code>string</code> | Bank account account number |
|
|
@@ -387,10 +392,10 @@ Interface of data from event.
|
|
|
387
392
|
|
|
388
393
|
| Param | Type | Description |
|
|
389
394
|
| --- | --- | --- |
|
|
390
|
-
| event | <code>string</code> |
|
|
391
|
-
| purpose | <code>string</code> |
|
|
392
|
-
| message_source | <code>string</code> |
|
|
393
|
-
| [ref_id] | <code>string</code> | Custom value
|
|
395
|
+
| event | <code>string</code> | The name of the event. |
|
|
396
|
+
| purpose | <code>string</code> | A system variable that states the purpose of the event. |
|
|
397
|
+
| message_source | <code>string</code> | A system variable that identifies the event source. |
|
|
398
|
+
| [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
|
|
394
399
|
|
|
395
400
|
<a name="w_IEventFinishData" id="w_IEventFinishData" href="#user-content-w_IEventFinishData"> </a>
|
|
396
401
|
|
|
@@ -401,10 +406,10 @@ Interface of data from event.
|
|
|
401
406
|
|
|
402
407
|
| Param | Type | Description |
|
|
403
408
|
| --- | --- | --- |
|
|
404
|
-
| event | <code>string</code> |
|
|
405
|
-
| purpose | <code>string</code> |
|
|
406
|
-
| message_source | <code>string</code> |
|
|
407
|
-
| [ref_id] | <code>string</code> | Custom value
|
|
409
|
+
| event | <code>string</code> | The name of the event. |
|
|
410
|
+
| purpose | <code>string</code> | A system variable that states the purpose of the event. |
|
|
411
|
+
| message_source | <code>string</code> | A system variable that identifies the event source. |
|
|
412
|
+
| [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
|
|
408
413
|
| payment_source | <code>string</code> | One time token. Result from this endpoint [API docs](https://docs.paydock.com/#tokens) |
|
|
409
414
|
|
|
410
415
|
<a name="w_IPayPalMeta" id="w_IPayPalMeta" href="#user-content-w_IPayPalMeta"> </a>
|
|
@@ -618,7 +623,7 @@ Class Widget include method for working on html and include extended by HtmlMult
|
|
|
618
623
|
* [.setFormElements(elements)](#user-content-w_HtmlWidget+setFormElements)
|
|
619
624
|
* [.setMeta(object)](#user-content-w_HtmlWidget+setMeta)
|
|
620
625
|
* [.load()](#user-content-w_HtmlMultiWidget+load)
|
|
621
|
-
* [.
|
|
626
|
+
* [.afterLoad()](#user-content-w_HtmlMultiWidget+afterLoad)
|
|
622
627
|
* [.trigger(triggers, data)](#user-content-w_HtmlMultiWidget+trigger)
|
|
623
628
|
* [.getValidationState()](#user-content-w_HtmlMultiWidget+getValidationState) ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
|
|
624
629
|
* [.isValidForm()](#user-content-w_HtmlMultiWidget+isValidForm) ⇒ <code>boolean</code>
|
|
@@ -631,6 +636,7 @@ Class Widget include method for working on html and include extended by HtmlMult
|
|
|
631
636
|
* [.hideElements(elements)](#user-content-w_HtmlMultiWidget+hideElements)
|
|
632
637
|
* [.showElements(elements)](#user-content-w_HtmlMultiWidget+showElements)
|
|
633
638
|
* [.updateFormValues(fieldValues)](#user-content-w_HtmlMultiWidget+updateFormValues)
|
|
639
|
+
* [.updateFormValue(key, value)](#user-content-w_HtmlMultiWidget+updateFormValue)
|
|
634
640
|
* [.onFinishInsert(selector, dataType)](#user-content-w_HtmlMultiWidget+onFinishInsert)
|
|
635
641
|
* [.interceptSubmitForm(selector)](#user-content-w_HtmlMultiWidget+interceptSubmitForm)
|
|
636
642
|
* [.useCheckoutAutoSubmit()](#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit)
|
|
@@ -642,7 +648,7 @@ Class Widget include method for working on html and include extended by HtmlMult
|
|
|
642
648
|
* [.setFormValues(fieldValues)](#user-content-w_MultiWidget+setFormValues)
|
|
643
649
|
* [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
|
|
644
650
|
* [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
|
|
645
|
-
*
|
|
651
|
+
* [.setIcons()](#user-content-w_MultiWidget+setIcons)
|
|
646
652
|
* [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
|
|
647
653
|
* [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
|
|
648
654
|
* [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
|
|
@@ -795,51 +801,38 @@ config.setMeta({
|
|
|
795
801
|
<a name="w_HtmlMultiWidget+load" id="w_HtmlMultiWidget+load" href="#user-content-w_HtmlMultiWidget+load"> </a>
|
|
796
802
|
|
|
797
803
|
### htmlWidget.load()
|
|
798
|
-
|
|
804
|
+
Loads the widget.
|
|
805
|
+
|
|
806
|
+
Calling this method results in an iframe element being inserted and rendered in the DOM.
|
|
799
807
|
|
|
800
808
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
801
809
|
**Overrides**: [<code>load</code>](#user-content-w_HtmlMultiWidget+load)
|
|
802
|
-
<a name="w_HtmlMultiWidget+
|
|
810
|
+
<a name="w_HtmlMultiWidget+afterLoad" id="w_HtmlMultiWidget+afterLoad" href="#user-content-w_HtmlMultiWidget+afterLoad"> </a>
|
|
803
811
|
|
|
804
|
-
### htmlWidget.
|
|
805
|
-
|
|
812
|
+
### htmlWidget.afterLoad()
|
|
813
|
+
Registers a form validation callback for validation events.
|
|
806
814
|
|
|
807
815
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
808
|
-
**Overrides**: [<code>
|
|
809
|
-
|
|
810
|
-
| Param | Type | Description |
|
|
811
|
-
| --- | --- | --- |
|
|
812
|
-
| eventName | <code>string</code> | Available event names [EVENT](#user-content-w_EVENT) |
|
|
813
|
-
| [cb] | <code>listener</code> | |
|
|
814
|
-
|
|
815
|
-
**Example**
|
|
816
|
-
|
|
817
|
-
```javascript
|
|
818
|
-
widget.on('form_submit', function (data) {
|
|
819
|
-
console.log(data);
|
|
820
|
-
});
|
|
821
|
-
// or
|
|
822
|
-
widget.on('form_submit').then(function (data) {
|
|
823
|
-
console.log(data);
|
|
824
|
-
});
|
|
825
|
-
```
|
|
816
|
+
**Overrides**: [<code>afterLoad</code>](#user-content-w_HtmlMultiWidget+afterLoad)
|
|
826
817
|
<a name="w_HtmlMultiWidget+trigger" id="w_HtmlMultiWidget+trigger" href="#user-content-w_HtmlMultiWidget+trigger"> </a>
|
|
827
818
|
|
|
828
819
|
### htmlWidget.trigger(triggers, data)
|
|
829
|
-
|
|
820
|
+
Registers callback that will be invoked for every trigger.
|
|
830
821
|
|
|
831
822
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
832
823
|
**Overrides**: [<code>trigger</code>](#user-content-w_HtmlMultiWidget+trigger)
|
|
833
824
|
|
|
834
825
|
| Param | Type | Description |
|
|
835
826
|
| --- | --- | --- |
|
|
836
|
-
| triggers | <code>
|
|
837
|
-
| data | [<code>ITriggerData</code>](#user-content-w_ITriggerData) |
|
|
827
|
+
| triggers | <code>'submit\_form'</code> \| <code>'tab'</code> | The Widget element identifier that caused the trigger. |
|
|
828
|
+
| data | [<code>ITriggerData</code>](#user-content-w_ITriggerData) | Data that will be sent to the widget when the trigger occurs. |
|
|
838
829
|
|
|
839
830
|
<a name="w_HtmlMultiWidget+getValidationState" id="w_HtmlMultiWidget+getValidationState" href="#user-content-w_HtmlMultiWidget+getValidationState"> </a>
|
|
840
831
|
|
|
841
832
|
### htmlWidget.getValidationState() ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
|
|
842
|
-
|
|
833
|
+
Gets a reference to the form current validation state.
|
|
834
|
+
|
|
835
|
+
!Warning: do not directly modify the values of the returned object.
|
|
843
836
|
|
|
844
837
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
845
838
|
**Overrides**: [<code>getValidationState</code>](#user-content-w_HtmlMultiWidget+getValidationState)
|
|
@@ -847,11 +840,13 @@ Using this method you can get validation state information
|
|
|
847
840
|
<a name="w_HtmlMultiWidget+isValidForm" id="w_HtmlMultiWidget+isValidForm" href="#user-content-w_HtmlMultiWidget+isValidForm"> </a>
|
|
848
841
|
|
|
849
842
|
### htmlWidget.isValidForm() ⇒ <code>boolean</code>
|
|
850
|
-
|
|
843
|
+
Checks if a given form is valid.
|
|
844
|
+
|
|
845
|
+
A form is valid if all form fields are valid.
|
|
851
846
|
|
|
852
847
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
853
848
|
**Overrides**: [<code>isValidForm</code>](#user-content-w_HtmlMultiWidget+isValidForm)
|
|
854
|
-
**Returns**: <code>boolean</code> -
|
|
849
|
+
**Returns**: <code>boolean</code> - Indicates wether or not form is valid.
|
|
855
850
|
<a name="w_HtmlMultiWidget+isInvalidField" id="w_HtmlMultiWidget+isInvalidField" href="#user-content-w_HtmlMultiWidget+isInvalidField"> </a>
|
|
856
851
|
|
|
857
852
|
### htmlWidget.isInvalidField(field) ⇒ <code>boolean</code>
|
|
@@ -868,92 +863,96 @@ Using this method you can check if a specific form field is invalid
|
|
|
868
863
|
<a name="w_HtmlMultiWidget+isFieldErrorShowed" id="w_HtmlMultiWidget+isFieldErrorShowed" href="#user-content-w_HtmlMultiWidget+isFieldErrorShowed"> </a>
|
|
869
864
|
|
|
870
865
|
### htmlWidget.isFieldErrorShowed(field) ⇒ <code>boolean</code>
|
|
871
|
-
|
|
866
|
+
Checks if a given form field is displaying an error.
|
|
872
867
|
|
|
873
868
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
874
869
|
**Overrides**: [<code>isFieldErrorShowed</code>](#user-content-w_HtmlMultiWidget+isFieldErrorShowed)
|
|
875
|
-
**Returns**: <code>boolean</code> - Error is
|
|
870
|
+
**Returns**: <code>boolean</code> - Indicates wether or not the Error message is being displayed on the associated field.
|
|
876
871
|
|
|
877
872
|
| Param | Type | Description |
|
|
878
873
|
| --- | --- | --- |
|
|
879
|
-
| field | <code>string</code> |
|
|
874
|
+
| field | <code>string</code> | The form field name |
|
|
880
875
|
|
|
881
876
|
<a name="w_HtmlMultiWidget+isInvalidFieldByValidator" id="w_HtmlMultiWidget+isInvalidFieldByValidator" href="#user-content-w_HtmlMultiWidget+isInvalidFieldByValidator"> </a>
|
|
882
877
|
|
|
883
878
|
### htmlWidget.isInvalidFieldByValidator(field, validator) ⇒ <code>boolean</code>
|
|
884
|
-
|
|
879
|
+
Checks if a given form field is valid or invalid by name.
|
|
885
880
|
|
|
886
881
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
887
882
|
**Overrides**: [<code>isInvalidFieldByValidator</code>](#user-content-w_HtmlMultiWidget+isInvalidFieldByValidator)
|
|
888
|
-
**Returns**: <code>boolean</code> -
|
|
883
|
+
**Returns**: <code>boolean</code> - Indicates wether or not the field is invalid based on validator intepretation.
|
|
889
884
|
|
|
890
885
|
| Param | Type | Description |
|
|
891
886
|
| --- | --- | --- |
|
|
892
|
-
| field | <code>string</code> |
|
|
893
|
-
| validator |
|
|
887
|
+
| field | <code>string</code> | The form field name |
|
|
888
|
+
| validator | | The name of the validator. |
|
|
894
889
|
|
|
895
890
|
<a name="w_HtmlMultiWidget+hide" id="w_HtmlMultiWidget+hide" href="#user-content-w_HtmlMultiWidget+hide"> </a>
|
|
896
891
|
|
|
897
892
|
### htmlWidget.hide([saveSize])
|
|
898
|
-
|
|
893
|
+
Hides the widget.
|
|
894
|
+
|
|
895
|
+
E.g., use this method to hide the widget after it loads.
|
|
899
896
|
|
|
900
897
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
901
898
|
**Overrides**: [<code>hide</code>](#user-content-w_HtmlMultiWidget+hide)
|
|
902
899
|
|
|
903
900
|
| Param | Type | Default | Description |
|
|
904
901
|
| --- | --- | --- | --- |
|
|
905
|
-
| [saveSize] | <code>boolean</code> | <code>false</code> |
|
|
902
|
+
| [saveSize] | <code>boolean</code> | <code>false</code> | Wether the original iframe element size should be saved before being hidden. |
|
|
906
903
|
|
|
907
904
|
<a name="w_HtmlMultiWidget+show" id="w_HtmlMultiWidget+show" href="#user-content-w_HtmlMultiWidget+show"> </a>
|
|
908
905
|
|
|
909
906
|
### htmlWidget.show()
|
|
910
|
-
|
|
907
|
+
Shows the widget.
|
|
908
|
+
|
|
909
|
+
E.g., use this method to show the widget after it was explicitly hidden.
|
|
911
910
|
|
|
912
911
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
913
912
|
**Overrides**: [<code>show</code>](#user-content-w_HtmlMultiWidget+show)
|
|
914
913
|
<a name="w_HtmlMultiWidget+reload" id="w_HtmlMultiWidget+reload" href="#user-content-w_HtmlMultiWidget+reload"> </a>
|
|
915
914
|
|
|
916
915
|
### htmlWidget.reload()
|
|
917
|
-
|
|
916
|
+
Reloads the widget.
|
|
918
917
|
|
|
919
918
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
920
919
|
**Overrides**: [<code>reload</code>](#user-content-w_HtmlMultiWidget+reload)
|
|
921
920
|
<a name="w_HtmlMultiWidget+hideElements" id="w_HtmlMultiWidget+hideElements" href="#user-content-w_HtmlMultiWidget+hideElements"> </a>
|
|
922
921
|
|
|
923
922
|
### htmlWidget.hideElements(elements)
|
|
924
|
-
|
|
923
|
+
Hides the specified Widget elements by their identifier.
|
|
925
924
|
|
|
926
925
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
927
926
|
**Overrides**: [<code>hideElements</code>](#user-content-w_HtmlMultiWidget+hideElements)
|
|
928
927
|
|
|
929
928
|
| Param | Type | Description |
|
|
930
929
|
| --- | --- | --- |
|
|
931
|
-
| elements | <code>Array.<string></code> |
|
|
930
|
+
| elements | <code>Array.<string></code> | List of element which can be hidden [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
|
|
932
931
|
|
|
933
932
|
**Example**
|
|
934
|
-
|
|
935
933
|
```javascript
|
|
936
934
|
widget.hideElements(['submit_button', 'email']);
|
|
937
935
|
```
|
|
938
936
|
<a name="w_HtmlMultiWidget+showElements" id="w_HtmlMultiWidget+showElements" href="#user-content-w_HtmlMultiWidget+showElements"> </a>
|
|
939
937
|
|
|
940
938
|
### htmlWidget.showElements(elements)
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
* @example
|
|
944
|
-
widget.showElements(['submit_button', 'email']);
|
|
939
|
+
Shows the specified Widget elements by their identifier.
|
|
945
940
|
|
|
946
941
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
947
942
|
**Overrides**: [<code>showElements</code>](#user-content-w_HtmlMultiWidget+showElements)
|
|
948
943
|
|
|
949
944
|
| Param | Type | Description |
|
|
950
945
|
| --- | --- | --- |
|
|
951
|
-
| elements | <code>Array.<string></code> |
|
|
946
|
+
| elements | <code>Array.<string></code> | List of elements which can be showed [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
|
|
952
947
|
|
|
948
|
+
**Example**
|
|
949
|
+
```javascript
|
|
950
|
+
widget.showElements(['submit_button', 'email']);
|
|
951
|
+
```
|
|
953
952
|
<a name="w_HtmlMultiWidget+updateFormValues" id="w_HtmlMultiWidget+updateFormValues" href="#user-content-w_HtmlMultiWidget+updateFormValues"> </a>
|
|
954
953
|
|
|
955
954
|
### htmlWidget.updateFormValues(fieldValues)
|
|
956
|
-
|
|
955
|
+
Updates the form field values inside the widget.
|
|
957
956
|
|
|
958
957
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
959
958
|
**Overrides**: [<code>updateFormValues</code>](#user-content-w_HtmlMultiWidget+updateFormValues)
|
|
@@ -963,53 +962,71 @@ Method for update values for form fields inside the widget
|
|
|
963
962
|
| fieldValues | <code>IFormValues</code> | Fields with values |
|
|
964
963
|
|
|
965
964
|
**Example**
|
|
966
|
-
|
|
967
965
|
```javascript
|
|
968
966
|
widget.updateFormValues({
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
967
|
+
email: 'predefined@email.com',
|
|
968
|
+
card_name: 'Houston'
|
|
969
|
+
});
|
|
970
|
+
```
|
|
971
|
+
<a name="w_HtmlMultiWidget+updateFormValue" id="w_HtmlMultiWidget+updateFormValue" href="#user-content-w_HtmlMultiWidget+updateFormValue"> </a>
|
|
972
|
+
|
|
973
|
+
### htmlWidget.updateFormValue(key, value)
|
|
974
|
+
Updates a single form field values inside the widget by the form field name.
|
|
975
|
+
|
|
976
|
+
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
977
|
+
**Overrides**: [<code>updateFormValue</code>](#user-content-w_HtmlMultiWidget+updateFormValue)
|
|
978
|
+
|
|
979
|
+
| Param | Type | Description |
|
|
980
|
+
| --- | --- | --- |
|
|
981
|
+
| key | <code>string</code> | The form field name |
|
|
982
|
+
| value | <code>string</code> | The form field value |
|
|
983
|
+
|
|
984
|
+
**Example**
|
|
985
|
+
```javascript
|
|
986
|
+
widget.updateFormValue("card_name", "John Doe");
|
|
972
987
|
```
|
|
973
988
|
<a name="w_HtmlMultiWidget+onFinishInsert" id="w_HtmlMultiWidget+onFinishInsert" href="#user-content-w_HtmlMultiWidget+onFinishInsert"> </a>
|
|
974
989
|
|
|
975
990
|
### htmlWidget.onFinishInsert(selector, dataType)
|
|
976
|
-
|
|
991
|
+
Inserts the event data (after finish event) onto the input field associated with the provided CSS selector.
|
|
977
992
|
|
|
978
993
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
979
994
|
**Overrides**: [<code>onFinishInsert</code>](#user-content-w_HtmlMultiWidget+onFinishInsert)
|
|
980
995
|
|
|
981
996
|
| Param | Type | Description |
|
|
982
997
|
| --- | --- | --- |
|
|
983
|
-
| selector | <code>string</code> |
|
|
984
|
-
| dataType | <code>string</code> | data type of IEventData object. |
|
|
998
|
+
| selector | <code>string</code> | A CSS selector. E.g., ".my-class", "#my-id", or others |
|
|
999
|
+
| dataType | <code>string</code> | The data type of IEventData object. |
|
|
985
1000
|
|
|
986
1001
|
<a name="w_HtmlMultiWidget+interceptSubmitForm" id="w_HtmlMultiWidget+interceptSubmitForm" href="#user-content-w_HtmlMultiWidget+interceptSubmitForm"> </a>
|
|
987
1002
|
|
|
988
1003
|
### htmlWidget.interceptSubmitForm(selector)
|
|
989
|
-
|
|
1004
|
+
Intercepts a form submission and delegates processing to the widget.
|
|
990
1005
|
|
|
991
|
-
|
|
1006
|
+
An simplified example of the process:
|
|
1007
|
+
- User clicks submit button in your form
|
|
1008
|
+
- This implicitly triggers a submission to the widget
|
|
1009
|
+
- The widget submits your form
|
|
992
1010
|
|
|
993
1011
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
994
1012
|
**Overrides**: [<code>interceptSubmitForm</code>](#user-content-w_HtmlMultiWidget+interceptSubmitForm)
|
|
995
|
-
**Note**: submit button
|
|
1013
|
+
**Note**: The widget's submit button will be hidden.
|
|
996
1014
|
|
|
997
1015
|
| Param | Type | Description |
|
|
998
1016
|
| --- | --- | --- |
|
|
999
1017
|
| selector | <code>string</code> | css selector of your form |
|
|
1000
1018
|
|
|
1001
1019
|
**Example**
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
<form id="myForm">
|
|
1020
|
+
```html
|
|
1021
|
+
<body>
|
|
1022
|
+
<form id="myForm">
|
|
1005
1023
|
<input name="amount">
|
|
1006
1024
|
<button type="submit">Submit</button>
|
|
1007
1025
|
</form>
|
|
1008
|
-
|
|
1009
|
-
-->
|
|
1010
|
-
<script>
|
|
1026
|
+
<script>
|
|
1011
1027
|
widget.interceptSubmitForm('#myForm');
|
|
1012
|
-
</script>
|
|
1028
|
+
</script>
|
|
1029
|
+
</body>
|
|
1013
1030
|
```
|
|
1014
1031
|
<a name="w_HtmlMultiWidget+useCheckoutAutoSubmit" id="w_HtmlMultiWidget+useCheckoutAutoSubmit" href="#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit"> </a>
|
|
1015
1032
|
|
|
@@ -1026,7 +1043,6 @@ Use this method for resize iFrame according content height
|
|
|
1026
1043
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
1027
1044
|
**Overrides**: [<code>useAutoResize</code>](#user-content-w_HtmlMultiWidget+useAutoResize)
|
|
1028
1045
|
**Example**
|
|
1029
|
-
|
|
1030
1046
|
```javascript
|
|
1031
1047
|
widget.useAutoResize();
|
|
1032
1048
|
```
|
|
@@ -1197,13 +1213,15 @@ widget.setFormPlaceholders({
|
|
|
1197
1213
|
```
|
|
1198
1214
|
<a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons"> </a>
|
|
1199
1215
|
|
|
1200
|
-
###
|
|
1201
|
-
***Deprecated***
|
|
1202
|
-
|
|
1216
|
+
### htmlWidget.setIcons()
|
|
1203
1217
|
The method to change the widget icons
|
|
1204
1218
|
|
|
1205
1219
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
1206
1220
|
**Overrides**: [<code>setIcons</code>](#user-content-w_MultiWidget+setIcons)
|
|
1221
|
+
**Todo**
|
|
1222
|
+
|
|
1223
|
+
- [ ] DEPRECATED
|
|
1224
|
+
|
|
1207
1225
|
<a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements"> </a>
|
|
1208
1226
|
|
|
1209
1227
|
### htmlWidget.setHiddenElements(elements)
|
|
@@ -1331,7 +1349,7 @@ Class HtmlMultiWidget include method for working with html
|
|
|
1331
1349
|
* [HtmlMultiWidget](#user-content-w_HtmlMultiWidget) ⇐ [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
1332
1350
|
* [new HtmlMultiWidget(selector, publicKey, conf)](#user-content-w_new_HtmlMultiWidget_new)
|
|
1333
1351
|
* [.load()](#user-content-w_HtmlMultiWidget+load)
|
|
1334
|
-
* [.
|
|
1352
|
+
* [.afterLoad()](#user-content-w_HtmlMultiWidget+afterLoad)
|
|
1335
1353
|
* [.trigger(triggers, data)](#user-content-w_HtmlMultiWidget+trigger)
|
|
1336
1354
|
* [.getValidationState()](#user-content-w_HtmlMultiWidget+getValidationState) ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
|
|
1337
1355
|
* [.isValidForm()](#user-content-w_HtmlMultiWidget+isValidForm) ⇒ <code>boolean</code>
|
|
@@ -1344,6 +1362,7 @@ Class HtmlMultiWidget include method for working with html
|
|
|
1344
1362
|
* [.hideElements(elements)](#user-content-w_HtmlMultiWidget+hideElements)
|
|
1345
1363
|
* [.showElements(elements)](#user-content-w_HtmlMultiWidget+showElements)
|
|
1346
1364
|
* [.updateFormValues(fieldValues)](#user-content-w_HtmlMultiWidget+updateFormValues)
|
|
1365
|
+
* [.updateFormValue(key, value)](#user-content-w_HtmlMultiWidget+updateFormValue)
|
|
1347
1366
|
* [.onFinishInsert(selector, dataType)](#user-content-w_HtmlMultiWidget+onFinishInsert)
|
|
1348
1367
|
* [.interceptSubmitForm(selector)](#user-content-w_HtmlMultiWidget+interceptSubmitForm)
|
|
1349
1368
|
* [.useCheckoutAutoSubmit()](#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit)
|
|
@@ -1356,7 +1375,7 @@ Class HtmlMultiWidget include method for working with html
|
|
|
1356
1375
|
* [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
|
|
1357
1376
|
* [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
|
|
1358
1377
|
* [.setFormElements(elements)](#user-content-w_MultiWidget+setFormElements)
|
|
1359
|
-
*
|
|
1378
|
+
* [.setIcons()](#user-content-w_MultiWidget+setIcons)
|
|
1360
1379
|
* [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
|
|
1361
1380
|
* [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
|
|
1362
1381
|
* [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
|
|
@@ -1394,58 +1413,47 @@ var widget = new MultiWidget('#widget', 'publicKey',[ With Configurations
|
|
|
1394
1413
|
<a name="w_HtmlMultiWidget+load" id="w_HtmlMultiWidget+load" href="#user-content-w_HtmlMultiWidget+load"> </a>
|
|
1395
1414
|
|
|
1396
1415
|
### htmlMultiWidget.load()
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1400
|
-
<a name="w_HtmlMultiWidget+on" id="w_HtmlMultiWidget+on" href="#user-content-w_HtmlMultiWidget+on"> </a>
|
|
1416
|
+
Loads the widget.
|
|
1401
1417
|
|
|
1402
|
-
|
|
1403
|
-
Listen to events of widget
|
|
1418
|
+
Calling this method results in an iframe element being inserted and rendered in the DOM.
|
|
1404
1419
|
|
|
1405
1420
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1421
|
+
<a name="w_HtmlMultiWidget+afterLoad" id="w_HtmlMultiWidget+afterLoad" href="#user-content-w_HtmlMultiWidget+afterLoad"> </a>
|
|
1406
1422
|
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
| eventName | <code>string</code> | Available event names [EVENT](#user-content-w_EVENT) |
|
|
1410
|
-
| [cb] | <code>listener</code> | |
|
|
1411
|
-
|
|
1412
|
-
**Example**
|
|
1423
|
+
### htmlMultiWidget.afterLoad()
|
|
1424
|
+
Registers a form validation callback for validation events.
|
|
1413
1425
|
|
|
1414
|
-
|
|
1415
|
-
widget.on('form_submit', function (data) {
|
|
1416
|
-
console.log(data);
|
|
1417
|
-
});
|
|
1418
|
-
// or
|
|
1419
|
-
widget.on('form_submit').then(function (data) {
|
|
1420
|
-
console.log(data);
|
|
1421
|
-
});
|
|
1422
|
-
```
|
|
1426
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1423
1427
|
<a name="w_HtmlMultiWidget+trigger" id="w_HtmlMultiWidget+trigger" href="#user-content-w_HtmlMultiWidget+trigger"> </a>
|
|
1424
1428
|
|
|
1425
1429
|
### htmlMultiWidget.trigger(triggers, data)
|
|
1426
|
-
|
|
1430
|
+
Registers callback that will be invoked for every trigger.
|
|
1427
1431
|
|
|
1428
1432
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1429
1433
|
|
|
1430
1434
|
| Param | Type | Description |
|
|
1431
1435
|
| --- | --- | --- |
|
|
1432
|
-
| triggers | <code>
|
|
1433
|
-
| data | [<code>ITriggerData</code>](#user-content-w_ITriggerData) |
|
|
1436
|
+
| triggers | <code>'submit\_form'</code> \| <code>'tab'</code> | The Widget element identifier that caused the trigger. |
|
|
1437
|
+
| data | [<code>ITriggerData</code>](#user-content-w_ITriggerData) | Data that will be sent to the widget when the trigger occurs. |
|
|
1434
1438
|
|
|
1435
1439
|
<a name="w_HtmlMultiWidget+getValidationState" id="w_HtmlMultiWidget+getValidationState" href="#user-content-w_HtmlMultiWidget+getValidationState"> </a>
|
|
1436
1440
|
|
|
1437
1441
|
### htmlMultiWidget.getValidationState() ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
|
|
1438
|
-
|
|
1442
|
+
Gets a reference to the form current validation state.
|
|
1443
|
+
|
|
1444
|
+
!Warning: do not directly modify the values of the returned object.
|
|
1439
1445
|
|
|
1440
1446
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1441
1447
|
**Returns**: [<code>IFormValidation</code>](#user-content-w_IFormValidation) - Form validation object
|
|
1442
1448
|
<a name="w_HtmlMultiWidget+isValidForm" id="w_HtmlMultiWidget+isValidForm" href="#user-content-w_HtmlMultiWidget+isValidForm"> </a>
|
|
1443
1449
|
|
|
1444
1450
|
### htmlMultiWidget.isValidForm() ⇒ <code>boolean</code>
|
|
1445
|
-
|
|
1451
|
+
Checks if a given form is valid.
|
|
1452
|
+
|
|
1453
|
+
A form is valid if all form fields are valid.
|
|
1446
1454
|
|
|
1447
1455
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1448
|
-
**Returns**: <code>boolean</code> -
|
|
1456
|
+
**Returns**: <code>boolean</code> - Indicates wether or not form is valid.
|
|
1449
1457
|
<a name="w_HtmlMultiWidget+isInvalidField" id="w_HtmlMultiWidget+isInvalidField" href="#user-content-w_HtmlMultiWidget+isInvalidField"> </a>
|
|
1450
1458
|
|
|
1451
1459
|
### htmlMultiWidget.isInvalidField(field) ⇒ <code>boolean</code>
|
|
@@ -1461,85 +1469,89 @@ Using this method you can check if a specific form field is invalid
|
|
|
1461
1469
|
<a name="w_HtmlMultiWidget+isFieldErrorShowed" id="w_HtmlMultiWidget+isFieldErrorShowed" href="#user-content-w_HtmlMultiWidget+isFieldErrorShowed"> </a>
|
|
1462
1470
|
|
|
1463
1471
|
### htmlMultiWidget.isFieldErrorShowed(field) ⇒ <code>boolean</code>
|
|
1464
|
-
|
|
1472
|
+
Checks if a given form field is displaying an error.
|
|
1465
1473
|
|
|
1466
1474
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1467
|
-
**Returns**: <code>boolean</code> - Error is
|
|
1475
|
+
**Returns**: <code>boolean</code> - Indicates wether or not the Error message is being displayed on the associated field.
|
|
1468
1476
|
|
|
1469
1477
|
| Param | Type | Description |
|
|
1470
1478
|
| --- | --- | --- |
|
|
1471
|
-
| field | <code>string</code> |
|
|
1479
|
+
| field | <code>string</code> | The form field name |
|
|
1472
1480
|
|
|
1473
1481
|
<a name="w_HtmlMultiWidget+isInvalidFieldByValidator" id="w_HtmlMultiWidget+isInvalidFieldByValidator" href="#user-content-w_HtmlMultiWidget+isInvalidFieldByValidator"> </a>
|
|
1474
1482
|
|
|
1475
1483
|
### htmlMultiWidget.isInvalidFieldByValidator(field, validator) ⇒ <code>boolean</code>
|
|
1476
|
-
|
|
1484
|
+
Checks if a given form field is valid or invalid by name.
|
|
1477
1485
|
|
|
1478
1486
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1479
|
-
**Returns**: <code>boolean</code> -
|
|
1487
|
+
**Returns**: <code>boolean</code> - Indicates wether or not the field is invalid based on validator intepretation.
|
|
1480
1488
|
|
|
1481
1489
|
| Param | Type | Description |
|
|
1482
1490
|
| --- | --- | --- |
|
|
1483
|
-
| field | <code>string</code> |
|
|
1484
|
-
| validator |
|
|
1491
|
+
| field | <code>string</code> | The form field name |
|
|
1492
|
+
| validator | | The name of the validator. |
|
|
1485
1493
|
|
|
1486
1494
|
<a name="w_HtmlMultiWidget+hide" id="w_HtmlMultiWidget+hide" href="#user-content-w_HtmlMultiWidget+hide"> </a>
|
|
1487
1495
|
|
|
1488
1496
|
### htmlMultiWidget.hide([saveSize])
|
|
1489
|
-
|
|
1497
|
+
Hides the widget.
|
|
1498
|
+
|
|
1499
|
+
E.g., use this method to hide the widget after it loads.
|
|
1490
1500
|
|
|
1491
1501
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1492
1502
|
|
|
1493
1503
|
| Param | Type | Default | Description |
|
|
1494
1504
|
| --- | --- | --- | --- |
|
|
1495
|
-
| [saveSize] | <code>boolean</code> | <code>false</code> |
|
|
1505
|
+
| [saveSize] | <code>boolean</code> | <code>false</code> | Wether the original iframe element size should be saved before being hidden. |
|
|
1496
1506
|
|
|
1497
1507
|
<a name="w_HtmlMultiWidget+show" id="w_HtmlMultiWidget+show" href="#user-content-w_HtmlMultiWidget+show"> </a>
|
|
1498
1508
|
|
|
1499
1509
|
### htmlMultiWidget.show()
|
|
1500
|
-
|
|
1510
|
+
Shows the widget.
|
|
1511
|
+
|
|
1512
|
+
E.g., use this method to show the widget after it was explicitly hidden.
|
|
1501
1513
|
|
|
1502
1514
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1503
1515
|
<a name="w_HtmlMultiWidget+reload" id="w_HtmlMultiWidget+reload" href="#user-content-w_HtmlMultiWidget+reload"> </a>
|
|
1504
1516
|
|
|
1505
1517
|
### htmlMultiWidget.reload()
|
|
1506
|
-
|
|
1518
|
+
Reloads the widget.
|
|
1507
1519
|
|
|
1508
1520
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1509
1521
|
<a name="w_HtmlMultiWidget+hideElements" id="w_HtmlMultiWidget+hideElements" href="#user-content-w_HtmlMultiWidget+hideElements"> </a>
|
|
1510
1522
|
|
|
1511
1523
|
### htmlMultiWidget.hideElements(elements)
|
|
1512
|
-
|
|
1524
|
+
Hides the specified Widget elements by their identifier.
|
|
1513
1525
|
|
|
1514
1526
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1515
1527
|
|
|
1516
1528
|
| Param | Type | Description |
|
|
1517
1529
|
| --- | --- | --- |
|
|
1518
|
-
| elements | <code>Array.<string></code> |
|
|
1530
|
+
| elements | <code>Array.<string></code> | List of element which can be hidden [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
|
|
1519
1531
|
|
|
1520
1532
|
**Example**
|
|
1521
|
-
|
|
1522
1533
|
```javascript
|
|
1523
1534
|
widget.hideElements(['submit_button', 'email']);
|
|
1524
1535
|
```
|
|
1525
1536
|
<a name="w_HtmlMultiWidget+showElements" id="w_HtmlMultiWidget+showElements" href="#user-content-w_HtmlMultiWidget+showElements"> </a>
|
|
1526
1537
|
|
|
1527
1538
|
### htmlMultiWidget.showElements(elements)
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
* @example
|
|
1531
|
-
widget.showElements(['submit_button', 'email']);
|
|
1539
|
+
Shows the specified Widget elements by their identifier.
|
|
1532
1540
|
|
|
1533
1541
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1534
1542
|
|
|
1535
1543
|
| Param | Type | Description |
|
|
1536
1544
|
| --- | --- | --- |
|
|
1537
|
-
| elements | <code>Array.<string></code> |
|
|
1545
|
+
| elements | <code>Array.<string></code> | List of elements which can be showed [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
|
|
1538
1546
|
|
|
1547
|
+
**Example**
|
|
1548
|
+
```javascript
|
|
1549
|
+
widget.showElements(['submit_button', 'email']);
|
|
1550
|
+
```
|
|
1539
1551
|
<a name="w_HtmlMultiWidget+updateFormValues" id="w_HtmlMultiWidget+updateFormValues" href="#user-content-w_HtmlMultiWidget+updateFormValues"> </a>
|
|
1540
1552
|
|
|
1541
1553
|
### htmlMultiWidget.updateFormValues(fieldValues)
|
|
1542
|
-
|
|
1554
|
+
Updates the form field values inside the widget.
|
|
1543
1555
|
|
|
1544
1556
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1545
1557
|
|
|
@@ -1548,51 +1560,68 @@ Method for update values for form fields inside the widget
|
|
|
1548
1560
|
| fieldValues | <code>IFormValues</code> | Fields with values |
|
|
1549
1561
|
|
|
1550
1562
|
**Example**
|
|
1551
|
-
|
|
1552
1563
|
```javascript
|
|
1553
1564
|
widget.updateFormValues({
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1565
|
+
email: 'predefined@email.com',
|
|
1566
|
+
card_name: 'Houston'
|
|
1567
|
+
});
|
|
1568
|
+
```
|
|
1569
|
+
<a name="w_HtmlMultiWidget+updateFormValue" id="w_HtmlMultiWidget+updateFormValue" href="#user-content-w_HtmlMultiWidget+updateFormValue"> </a>
|
|
1570
|
+
|
|
1571
|
+
### htmlMultiWidget.updateFormValue(key, value)
|
|
1572
|
+
Updates a single form field values inside the widget by the form field name.
|
|
1573
|
+
|
|
1574
|
+
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1575
|
+
|
|
1576
|
+
| Param | Type | Description |
|
|
1577
|
+
| --- | --- | --- |
|
|
1578
|
+
| key | <code>string</code> | The form field name |
|
|
1579
|
+
| value | <code>string</code> | The form field value |
|
|
1580
|
+
|
|
1581
|
+
**Example**
|
|
1582
|
+
```javascript
|
|
1583
|
+
widget.updateFormValue("card_name", "John Doe");
|
|
1557
1584
|
```
|
|
1558
1585
|
<a name="w_HtmlMultiWidget+onFinishInsert" id="w_HtmlMultiWidget+onFinishInsert" href="#user-content-w_HtmlMultiWidget+onFinishInsert"> </a>
|
|
1559
1586
|
|
|
1560
1587
|
### htmlMultiWidget.onFinishInsert(selector, dataType)
|
|
1561
|
-
|
|
1588
|
+
Inserts the event data (after finish event) onto the input field associated with the provided CSS selector.
|
|
1562
1589
|
|
|
1563
1590
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1564
1591
|
|
|
1565
1592
|
| Param | Type | Description |
|
|
1566
1593
|
| --- | --- | --- |
|
|
1567
|
-
| selector | <code>string</code> |
|
|
1568
|
-
| dataType | <code>string</code> | data type of IEventData object. |
|
|
1594
|
+
| selector | <code>string</code> | A CSS selector. E.g., ".my-class", "#my-id", or others |
|
|
1595
|
+
| dataType | <code>string</code> | The data type of IEventData object. |
|
|
1569
1596
|
|
|
1570
1597
|
<a name="w_HtmlMultiWidget+interceptSubmitForm" id="w_HtmlMultiWidget+interceptSubmitForm" href="#user-content-w_HtmlMultiWidget+interceptSubmitForm"> </a>
|
|
1571
1598
|
|
|
1572
1599
|
### htmlMultiWidget.interceptSubmitForm(selector)
|
|
1573
|
-
|
|
1600
|
+
Intercepts a form submission and delegates processing to the widget.
|
|
1574
1601
|
|
|
1575
|
-
|
|
1602
|
+
An simplified example of the process:
|
|
1603
|
+
- User clicks submit button in your form
|
|
1604
|
+
- This implicitly triggers a submission to the widget
|
|
1605
|
+
- The widget submits your form
|
|
1576
1606
|
|
|
1577
1607
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1578
|
-
**Note**: submit button
|
|
1608
|
+
**Note**: The widget's submit button will be hidden.
|
|
1579
1609
|
|
|
1580
1610
|
| Param | Type | Description |
|
|
1581
1611
|
| --- | --- | --- |
|
|
1582
1612
|
| selector | <code>string</code> | css selector of your form |
|
|
1583
1613
|
|
|
1584
1614
|
**Example**
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
<form id="myForm">
|
|
1615
|
+
```html
|
|
1616
|
+
<body>
|
|
1617
|
+
<form id="myForm">
|
|
1588
1618
|
<input name="amount">
|
|
1589
1619
|
<button type="submit">Submit</button>
|
|
1590
1620
|
</form>
|
|
1591
|
-
|
|
1592
|
-
-->
|
|
1593
|
-
<script>
|
|
1621
|
+
<script>
|
|
1594
1622
|
widget.interceptSubmitForm('#myForm');
|
|
1595
|
-
</script>
|
|
1623
|
+
</script>
|
|
1624
|
+
</body>
|
|
1596
1625
|
```
|
|
1597
1626
|
<a name="w_HtmlMultiWidget+useCheckoutAutoSubmit" id="w_HtmlMultiWidget+useCheckoutAutoSubmit" href="#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit"> </a>
|
|
1598
1627
|
|
|
@@ -1607,7 +1636,6 @@ Use this method for resize iFrame according content height
|
|
|
1607
1636
|
|
|
1608
1637
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1609
1638
|
**Example**
|
|
1610
|
-
|
|
1611
1639
|
```javascript
|
|
1612
1640
|
widget.useAutoResize();
|
|
1613
1641
|
```
|
|
@@ -1813,13 +1841,15 @@ widget.setFormElements([
|
|
|
1813
1841
|
```
|
|
1814
1842
|
<a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons"> </a>
|
|
1815
1843
|
|
|
1816
|
-
###
|
|
1817
|
-
***Deprecated***
|
|
1818
|
-
|
|
1844
|
+
### htmlMultiWidget.setIcons()
|
|
1819
1845
|
The method to change the widget icons
|
|
1820
1846
|
|
|
1821
1847
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1822
1848
|
**Overrides**: [<code>setIcons</code>](#user-content-w_MultiWidget+setIcons)
|
|
1849
|
+
**Todo**
|
|
1850
|
+
|
|
1851
|
+
- [ ] DEPRECATED
|
|
1852
|
+
|
|
1823
1853
|
<a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements"> </a>
|
|
1824
1854
|
|
|
1825
1855
|
### htmlMultiWidget.setHiddenElements(elements)
|
|
@@ -2132,7 +2162,7 @@ Class MultiWidget include method for for creating iframe url
|
|
|
2132
2162
|
* [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
|
|
2133
2163
|
* [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
|
|
2134
2164
|
* [.setFormElements(elements)](#user-content-w_MultiWidget+setFormElements)
|
|
2135
|
-
*
|
|
2165
|
+
* [.setIcons()](#user-content-w_MultiWidget+setIcons)
|
|
2136
2166
|
* [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
|
|
2137
2167
|
* [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
|
|
2138
2168
|
* [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
|
|
@@ -2358,12 +2388,14 @@ widget.setFormElements([
|
|
|
2358
2388
|
```
|
|
2359
2389
|
<a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons"> </a>
|
|
2360
2390
|
|
|
2361
|
-
###
|
|
2362
|
-
***Deprecated***
|
|
2363
|
-
|
|
2391
|
+
### multiWidget.setIcons()
|
|
2364
2392
|
The method to change the widget icons
|
|
2365
2393
|
|
|
2366
2394
|
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
2395
|
+
**Todo**
|
|
2396
|
+
|
|
2397
|
+
- [ ] DEPRECATED
|
|
2398
|
+
|
|
2367
2399
|
<a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements"> </a>
|
|
2368
2400
|
|
|
2369
2401
|
### multiWidget.setHiddenElements(elements)
|
|
@@ -2660,6 +2692,32 @@ Current constant include available states of element for styling
|
|
|
2660
2692
|
| FOCUS | <code>string</code> | <code>"focus"</code> | focus. This state applies to: input |
|
|
2661
2693
|
| HOVER | <code>string</code> | <code>"hover"</code> | focus. This state applies to: submit_button |
|
|
2662
2694
|
|
|
2695
|
+
<a name="w_CARD_VALIDATORS" id="w_CARD_VALIDATORS" href="#user-content-w_CARD_VALIDATORS"> </a>
|
|
2696
|
+
|
|
2697
|
+
## CARD\_VALIDATORS : <code>Record.<string, string></code>
|
|
2698
|
+
List of available form field validators dedicated to cards and their definition
|
|
2699
|
+
|
|
2700
|
+
**Kind**: global constant
|
|
2701
|
+
|
|
2702
|
+
| Param | Type | Default | Description |
|
|
2703
|
+
| --- | --- | --- | --- |
|
|
2704
|
+
| CVV | <code>string</code> | <code>"cardCvvValidation"</code> | Asserts that CVV contains zero or more digits and is a number |
|
|
2705
|
+
| EXPIRY_DATE | <code>string</code> | <code>"expireDateValidation"</code> | Asserts value is a date in the future with format MM/YY |
|
|
2706
|
+
| HOLDER_NAME | <code>string</code> | <code>"cardHoldernameValidation"</code> | Asserts value is a name that respects the ITU-T T.50 standard (@see https://www.itu.int/rec/T-REC-T.50/en) |
|
|
2707
|
+
| NUMBER | <code>string</code> | <code>"cardNumberValidation"</code> | Asserts the value matches a known card scheme and as a the correct length. E.g., matches a 13, 16 or 19 digit bank card, **or**, a 13 to 25 digit Vii Gift card |
|
|
2708
|
+
| PIN | <code>string</code> | <code>"cardPinValidation"</code> | Asserts the value is a number with exactly 4 digits |
|
|
2709
|
+
|
|
2710
|
+
<a name="w_GENERIC_VALIDATORS" id="w_GENERIC_VALIDATORS" href="#user-content-w_GENERIC_VALIDATORS"> </a>
|
|
2711
|
+
|
|
2712
|
+
## GENERIC\_VALIDATORS : <code>Record.<string, string></code>
|
|
2713
|
+
List of available generic form field validators and their definition
|
|
2714
|
+
|
|
2715
|
+
**Kind**: global constant
|
|
2716
|
+
|
|
2717
|
+
| Param | Type | Default | Description |
|
|
2718
|
+
| --- | --- | --- | --- |
|
|
2719
|
+
| REQUIRED | <code>string</code> | <code>"required"</code> | Asserts the input or form field has a value defined truthy value |
|
|
2720
|
+
|
|
2663
2721
|
<a name="w_TRIGGER" id="w_TRIGGER" href="#user-content-w_TRIGGER"> </a>
|
|
2664
2722
|
|
|
2665
2723
|
## TRIGGER : <code>object</code>
|
|
@@ -2707,10 +2765,10 @@ var list = new paydock.HtmlPaymentSourceWidget('#list', 'publicKey', 'queryToken
|
|
|
2707
2765
|
list.load();
|
|
2708
2766
|
```
|
|
2709
2767
|
|
|
2710
|
-
```javascript
|
|
2768
|
+
```javascript--es2015
|
|
2711
2769
|
// ES2015 | TypeScript
|
|
2712
2770
|
|
|
2713
|
-
import { HtmlPaymentSourceWidget } from '@paydock/client-sdk';
|
|
2771
|
+
import { HtmlPaymentSourceWidget } from '@paydock/client-sdk/payment-source-widget';
|
|
2714
2772
|
|
|
2715
2773
|
var list = new HtmlPaymentSourceWidget('#list', 'publicKey', 'queryToken');
|
|
2716
2774
|
list.load();
|
|
@@ -2916,10 +2974,10 @@ Interface of data from event.
|
|
|
2916
2974
|
|
|
2917
2975
|
| Param | Type | Description |
|
|
2918
2976
|
| --- | --- | --- |
|
|
2919
|
-
| event | <code>string</code> |
|
|
2920
|
-
| purpose | <code>string</code> |
|
|
2921
|
-
| message_source | <code>string</code> |
|
|
2922
|
-
| [ref_id] | <code>string</code> | Custom value
|
|
2977
|
+
| event | <code>string</code> | The name of the event. |
|
|
2978
|
+
| purpose | <code>string</code> | A system variable that states the purpose of the event. |
|
|
2979
|
+
| message_source | <code>string</code> | A system variable that identifies the event source. |
|
|
2980
|
+
| [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
|
|
2923
2981
|
| total_item | <code>number</code> | Pagination param. Total item count |
|
|
2924
2982
|
| skip | <code>number</code> | Pagination param. Skip items from first item |
|
|
2925
2983
|
| limit | <code>number</code> | Pagination param. Query limit |
|
|
@@ -2933,10 +2991,10 @@ Interface of data from event.
|
|
|
2933
2991
|
|
|
2934
2992
|
| Param | Type | Description |
|
|
2935
2993
|
| --- | --- | --- |
|
|
2936
|
-
| event | <code>string</code> |
|
|
2937
|
-
| purpose | <code>string</code> |
|
|
2938
|
-
| message_source | <code>string</code> |
|
|
2939
|
-
| [ref_id] | <code>string</code> | Custom value
|
|
2994
|
+
| event | <code>string</code> | The name of the event. |
|
|
2995
|
+
| purpose | <code>string</code> | A system variable that states the purpose of the event. |
|
|
2996
|
+
| message_source | <code>string</code> | A system variable that identifies the event source. |
|
|
2997
|
+
| [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
|
|
2940
2998
|
|
|
2941
2999
|
<a name="psw_IEventSizeData" id="psw_IEventSizeData" href="#user-content-psw_IEventSizeData"> </a>
|
|
2942
3000
|
|
|
@@ -2947,10 +3005,10 @@ Interface of data from event.
|
|
|
2947
3005
|
|
|
2948
3006
|
| Param | Type | Description |
|
|
2949
3007
|
| --- | --- | --- |
|
|
2950
|
-
| event | <code>number</code> |
|
|
2951
|
-
| purpose | <code>number</code> |
|
|
2952
|
-
| message_source | <code>string</code> |
|
|
2953
|
-
| [ref_id] | <code>string</code> | Custom value
|
|
3008
|
+
| event | <code>number</code> | The name of the event. |
|
|
3009
|
+
| purpose | <code>number</code> | A system variable that states the purpose of the event. |
|
|
3010
|
+
| message_source | <code>string</code> | A system variable that identifies the event source. |
|
|
3011
|
+
| [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
|
|
2954
3012
|
| height | <code>number</code> | Height of iFrame |
|
|
2955
3013
|
| width | <code>number</code> | Width of iFrame |
|
|
2956
3014
|
|
|
@@ -3423,7 +3481,7 @@ You must create a button to turn it into checkout-button
|
|
|
3423
3481
|
var button = new paydock.PaypalCheckoutButton('#button', 'publicKey', 'gatewayId');
|
|
3424
3482
|
```
|
|
3425
3483
|
|
|
3426
|
-
```javascript
|
|
3484
|
+
```javascript--es2015
|
|
3427
3485
|
// ES2015 | TypeScript
|
|
3428
3486
|
|
|
3429
3487
|
|
|
@@ -4566,11 +4624,11 @@ This wrapper helps you to work with paydock api emdpoints
|
|
|
4566
4624
|
var browserDetails = await new paydock.Api('publicKey').setEnv('env').getBrowserDetails();
|
|
4567
4625
|
```
|
|
4568
4626
|
|
|
4569
|
-
```javascript
|
|
4627
|
+
```javascript--es2015
|
|
4570
4628
|
// ES2015 | TypeScript
|
|
4571
4629
|
|
|
4572
|
-
import { Api } from '@paydock/client-sdk';
|
|
4573
|
-
|
|
4630
|
+
import { Api } from '@paydock/client-sdk/api';
|
|
4631
|
+
|
|
4574
4632
|
var browserDetails = await new paydock.Api('publicKey').setEnv('env').getBrowserDetails();
|
|
4575
4633
|
```
|
|
4576
4634
|
|
|
@@ -4583,11 +4641,11 @@ var response = await new paydock.Api('publicKey').setEnv('env').charge().preAuth
|
|
|
4583
4641
|
});
|
|
4584
4642
|
```
|
|
4585
4643
|
|
|
4586
|
-
```javascript
|
|
4644
|
+
```javascript--es2015
|
|
4587
4645
|
// ES2015 | TypeScript
|
|
4588
4646
|
|
|
4589
|
-
import { Api } from '@paydock/client-sdk';
|
|
4590
|
-
|
|
4647
|
+
import { Api } from '@paydock/client-sdk/api';
|
|
4648
|
+
|
|
4591
4649
|
var response = await new Api('publicKey').setEnv('env').charge().preAuth({
|
|
4592
4650
|
amount: 100,
|
|
4593
4651
|
currency: 'AUD',
|
|
@@ -4597,7 +4655,7 @@ var response = await new Api('publicKey').setEnv('env').charge().preAuth({
|
|
|
4597
4655
|
|
|
4598
4656
|
Then write only need 2 lines of code in js to make request
|
|
4599
4657
|
|
|
4600
|
-
### Initialization full example
|
|
4658
|
+
### Initialization full example
|
|
4601
4659
|
|
|
4602
4660
|
```html
|
|
4603
4661
|
<!DOCTYPE html>
|
|
@@ -4644,10 +4702,10 @@ var canvas3ds = new paydock.Canvas3ds('#widget', 'token');
|
|
|
4644
4702
|
canvas3ds.load();
|
|
4645
4703
|
```
|
|
4646
4704
|
|
|
4647
|
-
```javascript
|
|
4705
|
+
```javascript--es2015
|
|
4648
4706
|
// ES2015 | TypeScript
|
|
4649
4707
|
|
|
4650
|
-
import { Canvas3ds } from '@paydock/client-sdk';
|
|
4708
|
+
import { Canvas3ds } from '@paydock/client-sdk/canvas3ds';
|
|
4651
4709
|
|
|
4652
4710
|
var list = new Canvas3ds('#widget', 'token');
|
|
4653
4711
|
list.load();
|
|
@@ -4868,7 +4926,7 @@ After you initialized the standalone 3ds charge via `v1/charges/standalone-3ds`
|
|
|
4868
4926
|
## Vault Display Widget
|
|
4869
4927
|
You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#vault-display-widget)
|
|
4870
4928
|
|
|
4871
|
-
The vault display form allows viewing card number and CVV. The form can be customised according to your needs.
|
|
4929
|
+
The vault display form allows viewing card number and CVV. The form can be customised according to your needs.
|
|
4872
4930
|
You can set styles as well as subscribe to widget events that help monitor user’s actions in real time.
|
|
4873
4931
|
|
|
4874
4932
|
## Vault Display Widget simple example
|
|
@@ -4888,18 +4946,18 @@ var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
|
4888
4946
|
widget.load();
|
|
4889
4947
|
```
|
|
4890
4948
|
|
|
4891
|
-
```javascript
|
|
4949
|
+
```javascript--es2015
|
|
4892
4950
|
// ES2015 | TypeScript
|
|
4893
4951
|
|
|
4894
|
-
import { VaultDisplayWidget } from '@paydock/client-sdk';
|
|
4895
|
-
|
|
4952
|
+
import { VaultDisplayWidget } from '@paydock/client-sdk/vault-display-widget';
|
|
4953
|
+
|
|
4896
4954
|
var widget = new VaultDisplayWidget('#widget', 'token');
|
|
4897
4955
|
widget.load();
|
|
4898
4956
|
```
|
|
4899
4957
|
|
|
4900
4958
|
Then write only need 2 lines of code in js to initialize widget
|
|
4901
4959
|
|
|
4902
|
-
### Full example
|
|
4960
|
+
### Full example
|
|
4903
4961
|
|
|
4904
4962
|
```html
|
|
4905
4963
|
<!DOCTYPE html>
|
|
@@ -4910,9 +4968,9 @@ Then write only need 2 lines of code in js to initialize widget
|
|
|
4910
4968
|
<style>iframe {border: 0;width: 100%;height: 300px;}</style>
|
|
4911
4969
|
</head>
|
|
4912
4970
|
<body>
|
|
4913
|
-
|
|
4971
|
+
|
|
4914
4972
|
<div id="widget"></div>
|
|
4915
|
-
|
|
4973
|
+
|
|
4916
4974
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
4917
4975
|
<script>
|
|
4918
4976
|
var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
@@ -4950,9 +5008,9 @@ widget.setStyles({
|
|
|
4950
5008
|
});
|
|
4951
5009
|
```
|
|
4952
5010
|
|
|
4953
|
-
This example shows how you can use a lot of other methods to settings your form
|
|
5011
|
+
This example shows how you can use a lot of other methods to settings your form
|
|
4954
5012
|
|
|
4955
|
-
### Full example
|
|
5013
|
+
### Full example
|
|
4956
5014
|
|
|
4957
5015
|
```html
|
|
4958
5016
|
<!DOCTYPE html>
|
|
@@ -4963,27 +5021,27 @@ This example shows how you can use a lot of other methods to settings your form
|
|
|
4963
5021
|
<style>iframe {border: 0;width: 40%;height: 450px;}</style>
|
|
4964
5022
|
</head>
|
|
4965
5023
|
<body>
|
|
4966
|
-
|
|
5024
|
+
|
|
4967
5025
|
<div id="widget"></div>
|
|
4968
|
-
|
|
5026
|
+
|
|
4969
5027
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
4970
5028
|
<script>
|
|
4971
5029
|
var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
4972
5030
|
|
|
4973
5031
|
widget.setEnv('sandbox');
|
|
4974
|
-
|
|
5032
|
+
|
|
4975
5033
|
widget.on('after_load', function (data) {
|
|
4976
5034
|
console.log(data);
|
|
4977
5035
|
});
|
|
4978
|
-
|
|
5036
|
+
|
|
4979
5037
|
widget.on('cvv_secure_code_requested', function (data) {
|
|
4980
5038
|
console.log(data);
|
|
4981
5039
|
});
|
|
4982
|
-
|
|
5040
|
+
|
|
4983
5041
|
widget.on('card_number_secure_code_requested', function (data) {
|
|
4984
5042
|
console.log(data);
|
|
4985
5043
|
});
|
|
4986
|
-
|
|
5044
|
+
|
|
4987
5045
|
widget.setStyles({
|
|
4988
5046
|
background_color: 'rgb(0, 0, 0)',
|
|
4989
5047
|
border_color: 'yellow',
|
|
@@ -5127,7 +5185,7 @@ let button = new paydock.WalletButtons(
|
|
|
5127
5185
|
button.load();
|
|
5128
5186
|
```
|
|
5129
5187
|
|
|
5130
|
-
```javascript
|
|
5188
|
+
```javascript--es2015
|
|
5131
5189
|
// ES2015 | TypeScript
|
|
5132
5190
|
import { WalletButtons } from '@paydock/client-sdk';
|
|
5133
5191
|
|
|
@@ -5152,7 +5210,7 @@ let button = new paydock.WalletButtons(
|
|
|
5152
5210
|
button.load();
|
|
5153
5211
|
```
|
|
5154
5212
|
|
|
5155
|
-
```javascript
|
|
5213
|
+
```javascript--es2015
|
|
5156
5214
|
// ES2015 | TypeScript
|
|
5157
5215
|
import { WalletButtons } from '@paydock/client-sdk';
|
|
5158
5216
|
|
|
@@ -5176,7 +5234,7 @@ let button = new paydock.WalletButtons(
|
|
|
5176
5234
|
button.load();
|
|
5177
5235
|
```
|
|
5178
5236
|
|
|
5179
|
-
```javascript
|
|
5237
|
+
```javascript--es2015
|
|
5180
5238
|
// ES2015 | TypeScript
|
|
5181
5239
|
import { WalletButtons } from '@paydock/client-sdk';
|
|
5182
5240
|
|
|
@@ -5245,6 +5303,14 @@ In some situations you may want to forcibly close the checkout so that your user
|
|
|
5245
5303
|
button.close();
|
|
5246
5304
|
```
|
|
5247
5305
|
|
|
5306
|
+
### Performing actions when the wallet button is clicked
|
|
5307
|
+
|
|
5308
|
+
In some situations you may want to perform some validations or actions when the user clicks on the wallet button, for which you can use this method. Currently supported by Paypal, ApplePay and GooglePay wallets.
|
|
5309
|
+
|
|
5310
|
+
```javascript
|
|
5311
|
+
button.onClick(() => console.log("Perform actions on button click"));
|
|
5312
|
+
```
|
|
5313
|
+
|
|
5248
5314
|
### Performing actions when shipping info is updated
|
|
5249
5315
|
|
|
5250
5316
|
In Flypay, Paypal, ApplePay via MPGS and GooglePay via MPGS integrations after each shipping info update the `onUpdate(data)` will be called with the selected shipping address information, plus selected shipping method when applicable for Paypal, ApplePay and GooglePay. Merchants should handle this callback, recalculate shipping costs in their server by analyzing the new data, and submit a backend to backend request to `POST charges/:id` with the new total amount and shipping amount (you can find the documentation of this call in the PayDock API documentation).
|
|
@@ -5372,30 +5438,51 @@ _(Required `meta` fields: - . Optional `meta` fields: `request_shipping`, `pay_l
|
|
|
5372
5438
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
5373
5439
|
<script>
|
|
5374
5440
|
let button = new paydock.WalletButtons(
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5441
|
+
"#widget",
|
|
5442
|
+
charge_token,
|
|
5443
|
+
{
|
|
5444
|
+
request_shipping: true,
|
|
5445
|
+
pay_later: true,
|
|
5446
|
+
standalone: false,
|
|
5447
|
+
style: {
|
|
5448
|
+
layout: 'horizontal',
|
|
5449
|
+
color: 'blue',
|
|
5450
|
+
shape: 'rect',
|
|
5451
|
+
label: 'paypal',
|
|
5452
|
+
},
|
|
5453
|
+
}
|
|
5454
|
+
);
|
|
5389
5455
|
button.setEnv('sandbox');
|
|
5390
5456
|
button.onUnavailable(() => console.log("No wallet buttons available"));
|
|
5391
5457
|
button.onUpdate((data) => {
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5458
|
+
console.log("Updating amount via a backend to backend call to POST charges/:id");
|
|
5459
|
+
// call `POST charges/:id` to modify charge
|
|
5460
|
+
button.update({ success: true });
|
|
5461
|
+
});
|
|
5396
5462
|
button.onPaymentSuccessful((data) => console.log("The payment was successful"));
|
|
5397
5463
|
button.onPaymentError((data) => console.log("The payment was not successful"));
|
|
5398
5464
|
button.onPaymentInReview((data) => console.log("The payment is on fraud review"));
|
|
5465
|
+
|
|
5466
|
+
// Example 1: Asynchronous onClick handler
|
|
5467
|
+
const asyncLogic = async () => {
|
|
5468
|
+
// Perform asynchronous logic. Expectation is that a Promise is returned and attached to response via `attachResult`,
|
|
5469
|
+
// and resolve or reject of it will dictate how wallet behaves.
|
|
5470
|
+
}
|
|
5471
|
+
|
|
5472
|
+
button.onClick(({ data: { attachResult } }) => {
|
|
5473
|
+
// Promise is attached to the result. On Paypal, when promise is resolved, the user Journey will continue.
|
|
5474
|
+
// If no promise is attached then the Paypal journey will not depend on the promise being resolved or rejected
|
|
5475
|
+
attachResult(asyncLogic());
|
|
5476
|
+
});
|
|
5477
|
+
|
|
5478
|
+
// Example 2: Synchronous onClick handler
|
|
5479
|
+
// button.onClick(({ data: { attachResult } }) => {
|
|
5480
|
+
// // Perform synchronous logic
|
|
5481
|
+
// console.log("Synchronous onClick: Button clicked");
|
|
5482
|
+
// // Optionally return a boolean flag to halt the operation
|
|
5483
|
+
// attachResult(false);
|
|
5484
|
+
// });
|
|
5485
|
+
|
|
5399
5486
|
button.load();
|
|
5400
5487
|
</script>
|
|
5401
5488
|
</html>
|
|
@@ -5529,6 +5616,7 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `ra
|
|
|
5529
5616
|
button.onUnavailable(() => console.log("No wallet buttons available"));
|
|
5530
5617
|
button.onPaymentSuccessful((data) => console.log("The payment was successful"));
|
|
5531
5618
|
button.onPaymentError((data) => console.log("The payment was not successful"));
|
|
5619
|
+
button.onClick(() => console.log("On WalletButton Click"));
|
|
5532
5620
|
button.onUpdate((data) => {
|
|
5533
5621
|
console.log("Updating amount via a backend to backend call to POST charges/:id");
|
|
5534
5622
|
// call `POST charges/:id` to modify charge
|
|
@@ -5561,7 +5649,6 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `ra
|
|
|
5561
5649
|
Also, for **ApplePay via MPGS** you can initialize the `ApplePayPaymentRequest` with your own values instead of using the default ones. Below you can see an example on how to initialize the `ApplePayPaymentRequest` with the `raw_data_initialization` meta field.
|
|
5562
5650
|
|
|
5563
5651
|
Similarly, for **GooglePay via MPGS** you can initialize the `PaymentMethodSpecification` with your own values instead of using the default ones. Below you can see an example on how to initialize the `PaymentMethodSpecification` with the `raw_data_initialization` meta field.
|
|
5564
|
-
|
|
5565
5652
|
### ApplePay and GooglePay via MPGS Raw data initialization example
|
|
5566
5653
|
|
|
5567
5654
|
```html
|
|
@@ -5693,6 +5780,24 @@ Similarly, for **GooglePay via MPGS** you can initialize the `PaymentMethodSpeci
|
|
|
5693
5780
|
## Interfaces
|
|
5694
5781
|
|
|
5695
5782
|
<dl>
|
|
5783
|
+
<dt><a href="#IEventData">IEventData</a></dt>
|
|
5784
|
+
<dd><p>Interface of data from events.</p>
|
|
5785
|
+
</dd>
|
|
5786
|
+
<dt><a href="#IWalletPaymentSuccessful">IWalletPaymentSuccessful</a></dt>
|
|
5787
|
+
<dd><p>Interface of data from a successful payment result.</p>
|
|
5788
|
+
</dd>
|
|
5789
|
+
<dt><a href="#IWalletUpdate">IWalletUpdate</a></dt>
|
|
5790
|
+
<dd><p>Interface of data from an update event.</p>
|
|
5791
|
+
</dd>
|
|
5792
|
+
<dt><a href="#IWalletOnClick">IWalletOnClick</a></dt>
|
|
5793
|
+
<dd><p>Interface of data from a wallet onClick event.</p>
|
|
5794
|
+
</dd>
|
|
5795
|
+
<dt><a href="#IWalletUnavailable">IWalletUnavailable</a></dt>
|
|
5796
|
+
<dd><p>Interface of data from an unavailable event.</p>
|
|
5797
|
+
</dd>
|
|
5798
|
+
<dt><a href="#IWalletUpdateData">IWalletUpdateData</a></dt>
|
|
5799
|
+
<dd><p>Interface of data for wallet button <code>update</code> call.</p>
|
|
5800
|
+
</dd>
|
|
5696
5801
|
<dt><a href="#IWalletMeta">IWalletMeta</a> : <code>object</code></dt>
|
|
5697
5802
|
<dd><p>Interface of data used by the wallet checkout and payment proccess.</p>
|
|
5698
5803
|
</dd>
|
|
@@ -5707,6 +5812,100 @@ Similarly, for **GooglePay via MPGS** you can initialize the `PaymentMethodSpeci
|
|
|
5707
5812
|
</dd>
|
|
5708
5813
|
</dl>
|
|
5709
5814
|
|
|
5815
|
+
<a name="IEventData" id="IEventData" href="#IEventData"> </a>
|
|
5816
|
+
|
|
5817
|
+
## IEventData
|
|
5818
|
+
Interface of data from events.
|
|
5819
|
+
|
|
5820
|
+
**Kind**: global interface
|
|
5821
|
+
|
|
5822
|
+
| Param | Type |
|
|
5823
|
+
| --- | --- |
|
|
5824
|
+
| event | <code>string</code> |
|
|
5825
|
+
| data | <code>void</code> \| [<code>IWalletPaymentSuccessful</code>](#IWalletPaymentSuccessful) \| [<code>IWalletUpdate</code>](#IWalletUpdate) \| [<code>IWalletUnavailable</code>](#IWalletUnavailable) \| [<code>IWalletOnClick</code>](#IWalletOnClick) \| <code>any</code> |
|
|
5826
|
+
|
|
5827
|
+
<a name="IWalletPaymentSuccessful" id="IWalletPaymentSuccessful" href="#IWalletPaymentSuccessful"> </a>
|
|
5828
|
+
|
|
5829
|
+
## IWalletPaymentSuccessful
|
|
5830
|
+
Interface of data from a successful payment result.
|
|
5831
|
+
|
|
5832
|
+
**Kind**: global interface
|
|
5833
|
+
|
|
5834
|
+
| Param | Type |
|
|
5835
|
+
| --- | --- |
|
|
5836
|
+
| id | <code>string</code> |
|
|
5837
|
+
| amount | <code>number</code> |
|
|
5838
|
+
| currency | <code>string</code> |
|
|
5839
|
+
| status | <code>string</code> |
|
|
5840
|
+
| [payer_name] | <code>string</code> |
|
|
5841
|
+
| [payer_email] | <code>string</code> |
|
|
5842
|
+
| [payer_phone] | <code>string</code> |
|
|
5843
|
+
|
|
5844
|
+
<a name="IWalletUpdate" id="IWalletUpdate" href="#IWalletUpdate"> </a>
|
|
5845
|
+
|
|
5846
|
+
## IWalletUpdate
|
|
5847
|
+
Interface of data from an update event.
|
|
5848
|
+
|
|
5849
|
+
**Kind**: global interface
|
|
5850
|
+
|
|
5851
|
+
| Param | Type |
|
|
5852
|
+
| --- | --- |
|
|
5853
|
+
| [wallet_response_code] | <code>string</code> |
|
|
5854
|
+
| [wallet_session_id] | <code>string</code> |
|
|
5855
|
+
| [payment_source] | <code>object</code> |
|
|
5856
|
+
| [payment_source.wallet_payment_method_id] | <code>string</code> |
|
|
5857
|
+
| [payment_source.card_number_last4] | <code>string</code> |
|
|
5858
|
+
| [payment_source.card_scheme] | <code>string</code> |
|
|
5859
|
+
| [wallet_loyalty_account] | <code>object</code> |
|
|
5860
|
+
| [wallet_loyalty_account.id] | <code>string</code> |
|
|
5861
|
+
| [wallet_loyalty_account.barcode] | <code>string</code> |
|
|
5862
|
+
| [shipping] | <code>object</code> |
|
|
5863
|
+
| [shipping.address_line1] | <code>string</code> |
|
|
5864
|
+
| [shipping.address_line2] | <code>string</code> |
|
|
5865
|
+
| [shipping.address_postcode] | <code>string</code> |
|
|
5866
|
+
| [shipping.address_city] | <code>string</code> |
|
|
5867
|
+
| [shipping.address_state] | <code>string</code> |
|
|
5868
|
+
| [shipping.address_country] | <code>string</code> |
|
|
5869
|
+
| [shipping.address_company] | <code>string</code> |
|
|
5870
|
+
| [shipping.post_office_box_number] | <code>string</code> |
|
|
5871
|
+
| [shipping.wallet_address_id] | <code>string</code> |
|
|
5872
|
+
| [shipping.wallet_address_name] | <code>string</code> |
|
|
5873
|
+
| [shipping.wallet_address_created_timestamp] | <code>string</code> |
|
|
5874
|
+
| [shipping.wallet_address_updated_timestamp] | <code>string</code> |
|
|
5875
|
+
|
|
5876
|
+
<a name="IWalletOnClick" id="IWalletOnClick" href="#IWalletOnClick"> </a>
|
|
5877
|
+
|
|
5878
|
+
## IWalletOnClick
|
|
5879
|
+
Interface of data from a wallet onClick event.
|
|
5880
|
+
|
|
5881
|
+
**Kind**: global interface
|
|
5882
|
+
|
|
5883
|
+
| Param | Description |
|
|
5884
|
+
| --- | --- |
|
|
5885
|
+
| attachResult | Method to be called that attaches a result to the wallet onClick operation. When handler is synchronous, this method is optionally called with a boolean flag indicating validation result. When handler executes asynchronous operations, this method must be called with the Promise to have the wallet process wait for its completion or rejection. |
|
|
5886
|
+
|
|
5887
|
+
<a name="IWalletUnavailable" id="IWalletUnavailable" href="#IWalletUnavailable"> </a>
|
|
5888
|
+
|
|
5889
|
+
## IWalletUnavailable
|
|
5890
|
+
Interface of data from an unavailable event.
|
|
5891
|
+
|
|
5892
|
+
**Kind**: global interface
|
|
5893
|
+
|
|
5894
|
+
| Param | Type | Description |
|
|
5895
|
+
| --- | --- | --- |
|
|
5896
|
+
| [wallet] | <code>string</code> | For gateways with more than one wallet button available (e.g: MPGS with ApplePay and GooglePay). Possible values for wallet are 'apple' or 'google'. |
|
|
5897
|
+
|
|
5898
|
+
<a name="IWalletUpdateData" id="IWalletUpdateData" href="#IWalletUpdateData"> </a>
|
|
5899
|
+
|
|
5900
|
+
## IWalletUpdateData
|
|
5901
|
+
Interface of data for wallet button `update` call.
|
|
5902
|
+
|
|
5903
|
+
**Kind**: global interface
|
|
5904
|
+
|
|
5905
|
+
| Param | Type |
|
|
5906
|
+
| --- | --- |
|
|
5907
|
+
| success | <code>boolean</code> |
|
|
5908
|
+
|
|
5710
5909
|
<a name="IWalletMeta" id="IWalletMeta" href="#IWalletMeta"> </a>
|
|
5711
5910
|
|
|
5712
5911
|
## IWalletMeta : <code>object</code>
|
|
@@ -5791,14 +5990,19 @@ Class WalletButtons to work with different E-Wallets within html (currently supp
|
|
|
5791
5990
|
* [.load()](#WalletButtons+load)
|
|
5792
5991
|
* [.update()](#WalletButtons+update)
|
|
5793
5992
|
* [.setEnv(env, [alias])](#WalletButtons+setEnv)
|
|
5993
|
+
* [.enable()](#WalletButtons+enable)
|
|
5994
|
+
* [.disable()](#WalletButtons+disable)
|
|
5794
5995
|
* [.close()](#WalletButtons+close)
|
|
5795
|
-
* [.on(eventName, [cb])](#WalletButtons+on) ⇒ <code>Promise.<IEventData></code> \| <code>void</code>
|
|
5996
|
+
* [.on(eventName, [cb])](#WalletButtons+on) ⇒ [<code>Promise.<IEventData></code>](#IEventData) \| <code>void</code>
|
|
5796
5997
|
* [.onUnavailable([handler])](#WalletButtons+onUnavailable)
|
|
5797
5998
|
* [.onUpdate([handler])](#WalletButtons+onUpdate)
|
|
5798
5999
|
* [.onPaymentSuccessful([handler])](#WalletButtons+onPaymentSuccessful)
|
|
5799
6000
|
* [.onPaymentInReview([handler])](#WalletButtons+onPaymentInReview)
|
|
5800
6001
|
* [.onPaymentError([handler])](#WalletButtons+onPaymentError)
|
|
5801
6002
|
* [.onAuthTokensChanged([handler])](#WalletButtons+onAuthTokensChanged)
|
|
6003
|
+
* [.onClick(handler)](#WalletButtons+onClick)
|
|
6004
|
+
* [.onCheckoutOpen(handler)](#WalletButtons+onCheckoutOpen)
|
|
6005
|
+
* [.onCheckoutClose(handler)](#WalletButtons+onCheckoutClose)
|
|
5802
6006
|
|
|
5803
6007
|
<a name="new_WalletButtons_new" id="new_WalletButtons_new" href="#new_WalletButtons_new"> </a>
|
|
5804
6008
|
|
|
@@ -5909,6 +6113,26 @@ Bear in mind that you must set an environment before calling `button.load()`.
|
|
|
5909
6113
|
```js
|
|
5910
6114
|
button.setEnv('production', 'paydock.com');
|
|
5911
6115
|
```
|
|
6116
|
+
<a name="WalletButtons+enable" id="WalletButtons+enable" href="#WalletButtons+enable"> </a>
|
|
6117
|
+
|
|
6118
|
+
### walletButtons.enable()
|
|
6119
|
+
Current method can enable the payment button. This method is only supported for Flypay V2.
|
|
6120
|
+
|
|
6121
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
6122
|
+
**Example**
|
|
6123
|
+
```js
|
|
6124
|
+
button.enable();
|
|
6125
|
+
```
|
|
6126
|
+
<a name="WalletButtons+disable" id="WalletButtons+disable" href="#WalletButtons+disable"> </a>
|
|
6127
|
+
|
|
6128
|
+
### walletButtons.disable()
|
|
6129
|
+
Current method can disable the payment button. This method is only supported for Flypay V2.
|
|
6130
|
+
|
|
6131
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
6132
|
+
**Example**
|
|
6133
|
+
```js
|
|
6134
|
+
button.disable('production', 'paydock.com');
|
|
6135
|
+
```
|
|
5912
6136
|
<a name="WalletButtons+close" id="WalletButtons+close" href="#WalletButtons+close"> </a>
|
|
5913
6137
|
|
|
5914
6138
|
### walletButtons.close()
|
|
@@ -5921,7 +6145,7 @@ button.close();
|
|
|
5921
6145
|
```
|
|
5922
6146
|
<a name="WalletButtons+on" id="WalletButtons+on" href="#WalletButtons+on"> </a>
|
|
5923
6147
|
|
|
5924
|
-
### walletButtons.on(eventName, [cb]) ⇒ <code>Promise.<IEventData></code> \| <code>void</code>
|
|
6148
|
+
### walletButtons.on(eventName, [cb]) ⇒ [<code>Promise.<IEventData></code>](#IEventData) \| <code>void</code>
|
|
5925
6149
|
Listen to events of button. `unavailable` returns no data, `paymentSuccessful` returns IWalletPaymentSuccessful
|
|
5926
6150
|
for Stripe or full response for Flypay, and `paymentError` an error.
|
|
5927
6151
|
|
|
@@ -6084,6 +6308,63 @@ button.onAuthTokensChanged().then((eventData) => {
|
|
|
6084
6308
|
console.log('Authentication tokens changed:', eventData);
|
|
6085
6309
|
});
|
|
6086
6310
|
```
|
|
6311
|
+
<a name="WalletButtons+onClick" id="WalletButtons+onClick" href="#WalletButtons+onClick"> </a>
|
|
6312
|
+
|
|
6313
|
+
### walletButtons.onClick(handler)
|
|
6314
|
+
Registers a callback function to be invoked when the wallet button gets clicked.
|
|
6315
|
+
There are two operational modes supported, Synchronous and Asynchronous.
|
|
6316
|
+
When asynchronous operations need to occur on the callback handler, attaching the Promise via `attachResult` is required to have the wallet wait for a result.
|
|
6317
|
+
When synchronous operations occur on the callback handler, attaching a boolean result via `attachResult` is optional to control the execution flow.
|
|
6318
|
+
Note this is supported for Paypal, GooglePay and ApplePay wallet buttons at the moment.
|
|
6319
|
+
|
|
6320
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
6321
|
+
|
|
6322
|
+
| Param | Type | Description |
|
|
6323
|
+
| --- | --- | --- |
|
|
6324
|
+
| handler | <code>listener</code> | Function to be called when the wallet button is clicked. |
|
|
6325
|
+
|
|
6326
|
+
**Example**
|
|
6327
|
+
```js
|
|
6328
|
+
button.onClick((data) => {
|
|
6329
|
+
performValidationLogic();
|
|
6330
|
+
});
|
|
6331
|
+
```
|
|
6332
|
+
<a name="WalletButtons+onCheckoutOpen" id="WalletButtons+onCheckoutOpen" href="#WalletButtons+onCheckoutOpen"> </a>
|
|
6333
|
+
|
|
6334
|
+
### walletButtons.onCheckoutOpen(handler)
|
|
6335
|
+
Registers a callback function to be invoked when the wallet checkout opens.
|
|
6336
|
+
Note this is supported for FlypayV2 wallet button at the moment.
|
|
6337
|
+
|
|
6338
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
6339
|
+
|
|
6340
|
+
| Param | Type | Description |
|
|
6341
|
+
| --- | --- | --- |
|
|
6342
|
+
| handler | <code>listener</code> | Function to be called when the wallet checkout opens. |
|
|
6343
|
+
|
|
6344
|
+
**Example**
|
|
6345
|
+
```js
|
|
6346
|
+
button.onCheckoutOpen((data) => {
|
|
6347
|
+
console.log('Checkout opens');
|
|
6348
|
+
});
|
|
6349
|
+
```
|
|
6350
|
+
<a name="WalletButtons+onCheckoutClose" id="WalletButtons+onCheckoutClose" href="#WalletButtons+onCheckoutClose"> </a>
|
|
6351
|
+
|
|
6352
|
+
### walletButtons.onCheckoutClose(handler)
|
|
6353
|
+
Registers a callback function to be invoked when the wallet checkout closes.
|
|
6354
|
+
Note this is supported for FlypayV2 wallet button at the moment.
|
|
6355
|
+
|
|
6356
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
6357
|
+
|
|
6358
|
+
| Param | Type | Description |
|
|
6359
|
+
| --- | --- | --- |
|
|
6360
|
+
| handler | <code>listener</code> | Function to be called when the wallet checkout closes. |
|
|
6361
|
+
|
|
6362
|
+
**Example**
|
|
6363
|
+
```js
|
|
6364
|
+
button.onCheckoutClose(() => {
|
|
6365
|
+
console.log('Wallet checkout closes');
|
|
6366
|
+
});
|
|
6367
|
+
```
|
|
6087
6368
|
<a name="EVENT" id="EVENT" href="#EVENT"> </a>
|
|
6088
6369
|
|
|
6089
6370
|
## EVENT : <code>object</code>
|
|
@@ -6097,6 +6378,7 @@ List of available event's name in the wallet button lifecycle
|
|
|
6097
6378
|
| UPDATE | <code>string</code> | <code>"update"</code> |
|
|
6098
6379
|
| PAYMENT_SUCCESSFUL | <code>string</code> | <code>"paymentSuccessful"</code> |
|
|
6099
6380
|
| PAYMENT_ERROR | <code>string</code> | <code>"paymentError"</code> |
|
|
6381
|
+
| ON_CLICK | <code>string</code> | <code>"onClick"</code> |
|
|
6100
6382
|
|
|
6101
6383
|
|
|
6102
6384
|
## Secure Remote Commerce
|
|
@@ -6128,7 +6410,7 @@ var src = new paydock.SRC(
|
|
|
6128
6410
|
src.load();
|
|
6129
6411
|
```
|
|
6130
6412
|
|
|
6131
|
-
```javascript
|
|
6413
|
+
```javascript--es2015
|
|
6132
6414
|
// ES2015 | TypeScript
|
|
6133
6415
|
|
|
6134
6416
|
import { SRC } from '@paydock/client-sdk';
|