@paydock/client-sdk 1.103.11-beta → 1.104.3-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +122 -349
- package/bundles/index.cjs +10674 -0
- package/bundles/index.cjs.d.ts +3163 -0
- package/bundles/index.cjs.map +1 -0
- package/bundles/index.mjs +10642 -0
- package/bundles/index.mjs.d.ts +3163 -0
- package/bundles/index.mjs.map +1 -0
- package/{lib → bundles/types}/api/api-base.d.ts +2 -1
- package/bundles/types/api/api-base.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api-charge-internal.d.ts +1 -0
- package/bundles/types/api/api-charge-internal.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api-charge.d.ts +1 -0
- package/bundles/types/api/api-charge.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api-internal.d.ts +1 -0
- package/bundles/types/api/api-internal.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api-service-internal.d.ts +1 -0
- package/bundles/types/api/api-service-internal.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api.d.ts +1 -0
- package/bundles/types/api/api.d.ts.map +1 -0
- package/bundles/types/api/index.d.ts +2 -0
- package/bundles/types/api/index.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/canvas-3ds.d.ts +1 -0
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/index.d.ts +1 -0
- package/bundles/types/canvas-3ds/index.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/services/gpayments-service.d.ts +1 -0
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/services/index.d.ts +1 -0
- package/bundles/types/canvas-3ds/services/index.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/services/standalone3ds-service.d.ts +1 -0
- package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -0
- package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/afterpay/afterpay.runner.d.ts +1 -0
- package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/checkout-button.d.ts +1 -0
- package/bundles/types/checkout-button/checkout-button.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/checkout-button.interface.d.ts +1 -0
- package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/checkout-contextual-handler.d.ts +1 -0
- package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/index.d.ts +2 -1
- package/bundles/types/checkout-button/index.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/paypal/paypal-checkout-button.d.ts +1 -0
- package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/paypal/paypal.runner.d.ts +1 -0
- package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/base.runner.d.ts +4 -3
- package/bundles/types/checkout-button/runner/base.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/contextual.runner.d.ts +2 -1
- package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/index.d.ts +1 -0
- package/bundles/types/checkout-button/runner/index.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/popup.runner.d.ts +2 -1
- package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/redirect.runner.d.ts +2 -1
- package/bundles/types/checkout-button/runner/redirect.runner.d.ts.map +1 -0
- package/bundles/types/checkout-button/zipmoney/index.d.ts +4 -0
- package/bundles/types/checkout-button/zipmoney/index.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +2 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +2 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.config.d.ts +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.runner.d.ts +2 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.types.d.ts +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +1 -0
- package/{lib → bundles/types}/components/ability-guard.d.ts +1 -0
- package/bundles/types/components/ability-guard.d.ts.map +1 -0
- package/{lib → bundles/types}/components/background.d.ts +1 -0
- package/bundles/types/components/background.d.ts.map +1 -0
- package/{lib → bundles/types}/components/container.d.ts +1 -1
- package/bundles/types/components/container.d.ts.map +1 -0
- package/{lib → bundles/types}/components/dispatcher.d.ts +2 -1
- package/bundles/types/components/dispatcher.d.ts.map +1 -0
- package/{lib → bundles/types}/components/element-style.d.ts +2 -1
- package/bundles/types/components/element-style.d.ts.map +1 -0
- package/{lib → bundles/types}/components/flypay-iframe-event.d.ts +1 -0
- package/bundles/types/components/flypay-iframe-event.d.ts.map +1 -0
- package/{lib/components/form-Interceptor.d.ts → bundles/types/components/form-interceptor.d.ts} +1 -0
- package/bundles/types/components/form-interceptor.d.ts.map +1 -0
- package/{lib → bundles/types}/components/http-core.d.ts +1 -0
- package/bundles/types/components/http-core.d.ts.map +1 -0
- package/{lib → bundles/types}/components/iframe-event.d.ts +2 -0
- package/bundles/types/components/iframe-event.d.ts.map +1 -0
- package/{lib → bundles/types}/components/iframe.d.ts +1 -0
- package/bundles/types/components/iframe.d.ts.map +1 -0
- package/{lib → bundles/types}/components/link.d.ts +2 -1
- package/bundles/types/components/link.d.ts.map +1 -0
- package/{lib → bundles/types}/components/loader.d.ts +1 -0
- package/bundles/types/components/loader.d.ts.map +1 -0
- package/{lib → bundles/types}/components/param.d.ts +6 -5
- package/bundles/types/components/param.d.ts.map +1 -0
- package/{lib → bundles/types}/components/popup.d.ts +1 -0
- package/bundles/types/components/popup.d.ts.map +1 -0
- package/{lib → bundles/types}/components/storage-dispatcher.d.ts +1 -0
- package/bundles/types/components/storage-dispatcher.d.ts.map +1 -0
- package/{lib → bundles/types}/components/trigger.d.ts +1 -0
- package/bundles/types/components/trigger.d.ts.map +1 -0
- package/{lib → bundles/types}/components/vault-display-iframe-event.d.ts +1 -0
- package/bundles/types/components/vault-display-iframe-event.d.ts.map +1 -0
- package/{lib → bundles/types}/components/wallet-background.d.ts +2 -2
- package/bundles/types/components/wallet-background.d.ts.map +1 -0
- package/{lib → bundles/types}/components/wallet-trigger.d.ts +1 -0
- package/bundles/types/components/wallet-trigger.d.ts.map +1 -0
- package/bundles/types/configs/env/environment.cba.d.ts +29 -0
- package/bundles/types/configs/env/environment.cba.d.ts.map +1 -0
- package/bundles/types/configs/env/environment.interface.d.ts +12 -0
- package/bundles/types/configs/env/environment.interface.d.ts.map +1 -0
- package/{lib/configs/env/env.d.ts → bundles/types/configs/env/environment.paydock.d.ts} +5 -8
- package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -0
- package/bundles/types/configs/env/index.d.ts +3 -0
- package/bundles/types/configs/env/index.d.ts.map +1 -0
- package/{lib → bundles/types}/configs/sdk.d.ts +3 -2
- package/bundles/types/configs/sdk.d.ts.map +1 -0
- package/{lib → bundles/types}/external-checkout/builder.d.ts +1 -0
- package/bundles/types/external-checkout/builder.d.ts.map +1 -0
- package/{lib → bundles/types}/external-checkout/checker.d.ts +1 -0
- package/bundles/types/external-checkout/checker.d.ts.map +1 -0
- package/bundles/types/external-checkout/index.d.ts +3 -0
- package/bundles/types/external-checkout/index.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/access-token.d.ts +1 -0
- package/bundles/types/helper/access-token.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/browser.d.ts +1 -0
- package/bundles/types/helper/browser.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/event-emitter.d.ts +1 -0
- package/bundles/types/helper/event-emitter.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/event.d.ts +1 -0
- package/bundles/types/helper/event.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/ms.d.ts +1 -0
- package/bundles/types/helper/ms.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/object.d.ts +1 -0
- package/bundles/types/helper/object.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/url.d.ts +1 -0
- package/bundles/types/helper/url.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/uuid.d.ts +1 -0
- package/bundles/types/helper/uuid.d.ts.map +1 -0
- package/bundles/types/index-cba.d.ts +13 -0
- package/bundles/types/index-cba.d.ts.map +1 -0
- package/bundles/types/index.d.ts +14 -0
- package/bundles/types/index.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source/builder.d.ts +1 -0
- package/bundles/types/payment-source/builder.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source/index.d.ts +1 -0
- package/bundles/types/payment-source/index.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source-widget/html-payment-source-widget.d.ts +1 -0
- package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source-widget/index.d.ts +1 -0
- package/bundles/types/payment-source-widget/index.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source-widget/interfaces.d.ts +1 -0
- package/bundles/types/payment-source-widget/interfaces.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source-widget/payment-source-widget.d.ts +1 -0
- package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/index.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/interfaces.d.ts +6 -5
- package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/src-provider.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/helper.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/index.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/visa-src.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/secure-remote-commerce.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +1 -0
- package/{lib → bundles/types}/vault-display-widget/index.d.ts +1 -0
- package/bundles/types/vault-display-widget/index.d.ts.map +1 -0
- package/{lib → bundles/types}/vault-display-widget/vault-display-widget.d.ts +1 -0
- package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/afterpay.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/apple.wallet-service.d.ts +1 -2
- package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/flypay-v2.wallet-service.d.ts +2 -9
- package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/flypay.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/google.wallet-service.d.ts +1 -3
- package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/index-cba.d.ts +2 -0
- package/bundles/types/wallet-buttons/index-cba.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/index.d.ts +2 -0
- package/bundles/types/wallet-buttons/index.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/interfaces.d.ts +1 -3
- package/bundles/types/wallet-buttons/interfaces.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/mastercard.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/paypal.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/stripe.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts +366 -0
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +1 -0
- package/{lib/wallet-buttons/wallet-buttons.d.ts → bundles/types/wallet-buttons/wallet-cba-buttons.d.ts} +114 -91
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/wallet-service.d.ts +1 -7
- package/bundles/types/wallet-buttons/wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/configuration.d.ts +2 -1
- package/bundles/types/widget/configuration.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/html-multi-widget.d.ts +1 -0
- package/bundles/types/widget/html-multi-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/html-widget.d.ts +1 -0
- package/bundles/types/widget/html-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/index.d.ts +2 -1
- package/bundles/types/widget/index.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/meta.d.ts +1 -0
- package/bundles/types/widget/meta.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/multi-widget.d.ts +2 -1
- package/bundles/types/widget/multi-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/style.d.ts +1 -0
- package/bundles/types/widget/style.d.ts.map +1 -0
- package/bundles/widget.umd.js +6977 -7400
- package/bundles/widget.umd.js.d.ts +3163 -0
- package/bundles/widget.umd.js.map +1 -0
- package/bundles/widget.umd.js.min.d.ts +3163 -0
- package/bundles/widget.umd.min.js +2 -1
- package/bundles/widget.umd.min.js.map +1 -0
- package/docs/api-canvas3ds.md +158 -0
- package/docs/api-checkout-button.md +912 -0
- package/docs/api-examples.md +65 -0
- package/docs/api-ps-widget.md +585 -0
- package/docs/api-vault-display.md +94 -0
- package/docs/api-widget.md +2444 -0
- package/docs/api-wrapper.md +78 -0
- package/docs/canvas3ds-examples.md +242 -0
- package/docs/cba-header.md +13 -0
- package/docs/cba-license.md +2 -0
- package/docs/checkout-examples.md +248 -0
- package/docs/header.md +15 -0
- package/docs/html/layout.html +78 -0
- package/docs/html/marked.js +23 -0
- package/docs/html/style.css +365 -0
- package/docs/install/npm.content.md +16 -0
- package/docs/install/npm.example.md +24 -0
- package/docs/install/umd.content.md +20 -0
- package/docs/install/umd.example.md +6 -0
- package/docs/install.md +43 -0
- package/docs/install.readme.t.md +17 -0
- package/docs/install.slate.t.md +17 -0
- package/docs/license.md +2 -0
- package/docs/partials/header.hbs +3 -0
- package/docs/ps-examples.md +129 -0
- package/docs/secure-remote-commerce-examples.md +258 -0
- package/docs/secure-remote-commerce.md +265 -0
- package/docs/vault-display-example.md +132 -0
- package/docs/wallet-buttons-examples.md +580 -0
- package/docs/wallet-buttons.md +424 -0
- package/docs/wallet-cba-buttons-examples.md +388 -0
- package/docs/widget-examples.md +134 -0
- package/package.json +164 -42
- package/slate.md +107 -136
- package/.nvmrc +0 -1
- package/api.d.ts +0 -1
- package/api.js +0 -1
- package/canvas3ds.d.ts +0 -1
- package/canvas3ds.js +0 -1
- package/checkout-button.d.ts +0 -1
- package/checkout-button.js +0 -1
- package/inicialization-guide.md +0 -7
- package/lib/api/api-base.js +0 -101
- package/lib/api/api-base.js.map +0 -1
- package/lib/api/api-charge-internal.js +0 -30
- package/lib/api/api-charge-internal.js.map +0 -1
- package/lib/api/api-charge.js +0 -49
- package/lib/api/api-charge.js.map +0 -1
- package/lib/api/api-internal.js +0 -13
- package/lib/api/api-internal.js.map +0 -1
- package/lib/api/api-service-internal.js +0 -18
- package/lib/api/api-service-internal.js.map +0 -1
- package/lib/api/api.js +0 -61
- package/lib/api/api.js.map +0 -1
- package/lib/api/index.d.ts +0 -1
- package/lib/api/index.js +0 -2
- package/lib/api/index.js.map +0 -1
- package/lib/canvas-3ds/canvas-3ds.js +0 -156
- package/lib/canvas-3ds/canvas-3ds.js.map +0 -1
- package/lib/canvas-3ds/index.js +0 -2
- package/lib/canvas-3ds/index.js.map +0 -1
- package/lib/canvas-3ds/services/gpayments-service.js +0 -181
- package/lib/canvas-3ds/services/gpayments-service.js.map +0 -1
- package/lib/canvas-3ds/services/index.js +0 -2
- package/lib/canvas-3ds/services/index.js.map +0 -1
- package/lib/canvas-3ds/services/standalone3ds-service.js +0 -32
- package/lib/canvas-3ds/services/standalone3ds-service.js.map +0 -1
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js +0 -49
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +0 -1
- package/lib/checkout-button/afterpay/afterpay.runner.js +0 -41
- package/lib/checkout-button/afterpay/afterpay.runner.js.map +0 -1
- package/lib/checkout-button/checkout-button.interface.js +0 -45
- package/lib/checkout-button/checkout-button.interface.js.map +0 -1
- package/lib/checkout-button/checkout-button.js +0 -265
- package/lib/checkout-button/checkout-button.js.map +0 -1
- package/lib/checkout-button/checkout-contextual-handler.js +0 -75
- package/lib/checkout-button/checkout-contextual-handler.js.map +0 -1
- package/lib/checkout-button/index.js +0 -85
- package/lib/checkout-button/index.js.map +0 -1
- package/lib/checkout-button/paypal/paypal-checkout-button.js +0 -24
- package/lib/checkout-button/paypal/paypal-checkout-button.js.map +0 -1
- package/lib/checkout-button/paypal/paypal.runner.js +0 -14
- package/lib/checkout-button/paypal/paypal.runner.js.map +0 -1
- package/lib/checkout-button/runner/base.runner.js +0 -13
- package/lib/checkout-button/runner/base.runner.js.map +0 -1
- package/lib/checkout-button/runner/contextual.runner.js +0 -40
- package/lib/checkout-button/runner/contextual.runner.js.map +0 -1
- package/lib/checkout-button/runner/index.js +0 -11
- package/lib/checkout-button/runner/index.js.map +0 -1
- package/lib/checkout-button/runner/popup.runner.js +0 -68
- package/lib/checkout-button/runner/popup.runner.js.map +0 -1
- package/lib/checkout-button/runner/redirect.runner.js +0 -15
- package/lib/checkout-button/runner/redirect.runner.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +0 -63
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js +0 -78
- package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js +0 -49
- package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.config.js +0 -4
- package/lib/checkout-button/zipmoney/zipmoney.config.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.runner.js +0 -23
- package/lib/checkout-button/zipmoney/zipmoney.runner.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.types.js +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.types.js.map +0 -1
- package/lib/components/ability-guard.js +0 -44
- package/lib/components/ability-guard.js.map +0 -1
- package/lib/components/background.js +0 -193
- package/lib/components/background.js.map +0 -1
- package/lib/components/container.js +0 -63
- package/lib/components/container.js.map +0 -1
- package/lib/components/dispatcher.js +0 -39
- package/lib/components/dispatcher.js.map +0 -1
- package/lib/components/element-style.js +0 -52
- package/lib/components/element-style.js.map +0 -1
- package/lib/components/flypay-iframe-event.js +0 -28
- package/lib/components/flypay-iframe-event.js.map +0 -1
- package/lib/components/form-Interceptor.js +0 -38
- package/lib/components/form-Interceptor.js.map +0 -1
- package/lib/components/http-core.js +0 -57
- package/lib/components/http-core.js.map +0 -1
- package/lib/components/iframe-event.js +0 -84
- package/lib/components/iframe-event.js.map +0 -1
- package/lib/components/iframe.js +0 -62
- package/lib/components/iframe.js.map +0 -1
- package/lib/components/link.js +0 -59
- package/lib/components/link.js.map +0 -1
- package/lib/components/loader.js +0 -234
- package/lib/components/loader.js.map +0 -1
- package/lib/components/param.js +0 -147
- package/lib/components/param.js.map +0 -1
- package/lib/components/popup.js +0 -104
- package/lib/components/popup.js.map +0 -1
- package/lib/components/storage-dispatcher.js +0 -75
- package/lib/components/storage-dispatcher.js.map +0 -1
- package/lib/components/trigger.js +0 -49
- package/lib/components/trigger.js.map +0 -1
- package/lib/components/vault-display-iframe-event.js +0 -27
- package/lib/components/vault-display-iframe-event.js.map +0 -1
- package/lib/components/wallet-background.js +0 -63
- package/lib/components/wallet-background.js.map +0 -1
- package/lib/components/wallet-trigger.js +0 -27
- package/lib/components/wallet-trigger.js.map +0 -1
- package/lib/configs/env/env.js +0 -117
- package/lib/configs/env/env.js.map +0 -1
- package/lib/configs/sdk.js +0 -16
- package/lib/configs/sdk.js.map +0 -1
- package/lib/external-checkout/builder.js +0 -45
- package/lib/external-checkout/builder.js.map +0 -1
- package/lib/external-checkout/checker.js +0 -22
- package/lib/external-checkout/checker.js.map +0 -1
- package/lib/external-checkout/index.d.ts +0 -2
- package/lib/external-checkout/index.js +0 -3
- package/lib/external-checkout/index.js.map +0 -1
- package/lib/helper/access-token.js +0 -44
- package/lib/helper/access-token.js.map +0 -1
- package/lib/helper/browser.js +0 -79
- package/lib/helper/browser.js.map +0 -1
- package/lib/helper/event-emitter.js +0 -23
- package/lib/helper/event-emitter.js.map +0 -1
- package/lib/helper/event.js +0 -23
- package/lib/helper/event.js.map +0 -1
- package/lib/helper/ms.js +0 -32
- package/lib/helper/ms.js.map +0 -1
- package/lib/helper/object.js +0 -6
- package/lib/helper/object.js.map +0 -1
- package/lib/helper/url.js +0 -11
- package/lib/helper/url.js.map +0 -1
- package/lib/helper/uuid.js +0 -26
- package/lib/helper/uuid.js.map +0 -1
- package/lib/index.d.ts +0 -15
- package/lib/index.js +0 -15
- package/lib/index.js.map +0 -1
- package/lib/payment-source/builder.js +0 -49
- package/lib/payment-source/builder.js.map +0 -1
- package/lib/payment-source/index.js +0 -2
- package/lib/payment-source/index.js.map +0 -1
- package/lib/payment-source-widget/html-payment-source-widget.js +0 -167
- package/lib/payment-source-widget/html-payment-source-widget.js.map +0 -1
- package/lib/payment-source-widget/index.js +0 -35
- package/lib/payment-source-widget/index.js.map +0 -1
- package/lib/payment-source-widget/interfaces.js +0 -2
- package/lib/payment-source-widget/interfaces.js.map +0 -1
- package/lib/payment-source-widget/payment-source-widget.js +0 -141
- package/lib/payment-source-widget/payment-source-widget.js.map +0 -1
- package/lib/secure-remote-commerce/index.js +0 -2
- package/lib/secure-remote-commerce/index.js.map +0 -1
- package/lib/secure-remote-commerce/interfaces.js +0 -28
- package/lib/secure-remote-commerce/interfaces.js.map +0 -1
- package/lib/secure-remote-commerce/providers/src-provider.js +0 -1
- package/lib/secure-remote-commerce/providers/src-provider.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/helper.js +0 -36
- package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/index.js +0 -2
- package/lib/secure-remote-commerce/providers/visa-src/index.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +0 -113
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +0 -10
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +0 -1
- package/lib/secure-remote-commerce/secure-remote-commerce.js +0 -238
- package/lib/secure-remote-commerce/secure-remote-commerce.js.map +0 -1
- package/lib/vault-display-widget/index.js +0 -14
- package/lib/vault-display-widget/index.js.map +0 -1
- package/lib/vault-display-widget/vault-display-widget.js +0 -98
- package/lib/vault-display-widget/vault-display-widget.js.map +0 -1
- package/lib/wallet-buttons/afterpay.wallet-service.js +0 -152
- package/lib/wallet-buttons/afterpay.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/apple.wallet-service.js +0 -324
- package/lib/wallet-buttons/apple.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/flypay-v2.wallet-service.js +0 -165
- package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/flypay.wallet-service.js +0 -117
- package/lib/wallet-buttons/flypay.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/google.wallet-service.js +0 -301
- package/lib/wallet-buttons/google.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/helpers/flypay-v2.helper.d.ts +0 -3
- package/lib/wallet-buttons/helpers/flypay-v2.helper.js +0 -151
- package/lib/wallet-buttons/helpers/flypay-v2.helper.js.map +0 -1
- package/lib/wallet-buttons/index.d.ts +0 -127
- package/lib/wallet-buttons/index.js +0 -128
- package/lib/wallet-buttons/index.js.map +0 -1
- package/lib/wallet-buttons/interfaces.js +0 -1
- package/lib/wallet-buttons/interfaces.js.map +0 -1
- package/lib/wallet-buttons/mastercard.wallet-service.js +0 -27
- package/lib/wallet-buttons/mastercard.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/paypal.wallet-service.js +0 -144
- package/lib/wallet-buttons/paypal.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/stripe.wallet-service.js +0 -100
- package/lib/wallet-buttons/stripe.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/wallet-buttons.js +0 -478
- package/lib/wallet-buttons/wallet-buttons.js.map +0 -1
- package/lib/wallet-buttons/wallet-service.js +0 -60
- package/lib/wallet-buttons/wallet-service.js.map +0 -1
- package/lib/widget/configuration.js +0 -259
- package/lib/widget/configuration.js.map +0 -1
- package/lib/widget/html-multi-widget.js +0 -380
- package/lib/widget/html-multi-widget.js.map +0 -1
- package/lib/widget/html-widget.js +0 -126
- package/lib/widget/html-widget.js.map +0 -1
- package/lib/widget/index.js +0 -132
- package/lib/widget/index.js.map +0 -1
- package/lib/widget/meta.js +0 -8
- package/lib/widget/meta.js.map +0 -1
- package/lib/widget/multi-widget.js +0 -436
- package/lib/widget/multi-widget.js.map +0 -1
- package/lib/widget/style.js +0 -204
- package/lib/widget/style.js.map +0 -1
- package/payment-source-widget.d.ts +0 -1
- package/payment-source-widget.js +0 -1
- package/tslint.json +0 -130
- package/typings/globals/@auspayplus/open-payments-checkout/index.d.ts +0 -43
- package/typings/globals/jasmine/index.d.ts +0 -576
- package/typings/globals/jasmine-ajax/index.d.ts +0 -83
- package/typings/globals/jquery/index.d.ts +0 -3759
- package/typings/index.d.ts +0 -4
- package/vault-display-widget.d.ts +0 -1
- package/vault-display-widget.js +0 -1
- package/vendors/zipmoney.d.ts +0 -18
- package/vendors/zipmoney.js +0 -2
- package/widget.d.ts +0 -1
- package/widget.js +0 -1
package/README.md
CHANGED
|
@@ -16,76 +16,78 @@ Also you will need added gateway ([see API Reference by gateway](https://docs.pa
|
|
|
16
16
|
|
|
17
17
|
## Get started
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
`npm install @paydock/client-sdk`
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
You can use ES2015 or TypeScript modules
|
|
27
|
-
|
|
28
|
-
`@paydock/client-sdk/widget`
|
|
29
|
-
|
|
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.
|
|
30
22
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
`@paydock/client-sdk/bundles/widget.umd.js`
|
|
34
|
-
|
|
35
|
-
`@paydock/client-sdk/bundles/widget.umd.min.js`
|
|
23
|
+
### With package manager
|
|
36
24
|
|
|
25
|
+
Our NPM package is compatible with all package managers (e.g., `npm`, `yarn`,
|
|
26
|
+
`pnpm`, `bun`). Using `npm` the following command would add the Client SDK as a
|
|
27
|
+
production dependency.
|
|
37
28
|
|
|
29
|
+
```bash
|
|
30
|
+
npm install @paydock/client-sdk
|
|
31
|
+
```
|
|
38
32
|
|
|
39
|
-
|
|
40
|
-
|
|
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
41
|
|
|
42
|
-
import { HtmlWidget } from '@paydock/client-sdk/widget';
|
|
43
42
|
|
|
44
|
-
|
|
43
|
+
```cjs
|
|
44
|
+
// module import - CommonJS/Node projects ✅
|
|
45
|
+
const paydock = require('@paydock/client-sdk')
|
|
46
|
+
const api = new paydock.Api('publicKey');
|
|
45
47
|
```
|
|
46
48
|
|
|
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
|
+
```
|
|
47
54
|
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</script>
|
|
55
|
+
```mjs
|
|
56
|
+
// namespaced import - ESM projects or TypeScript projects ✅
|
|
57
|
+
import * as Paydock from '@paydock/client-sdk'
|
|
58
|
+
const widget = new Paydock.HtmlWidget('#selector', 'publicKey', 'gatewayId');
|
|
53
59
|
```
|
|
54
60
|
|
|
61
|
+
```js
|
|
62
|
+
// default import - We do not provide default exports. They are handled differently by different tools!
|
|
63
|
+
❌
|
|
64
|
+
import paydock from '@paydock/client-sdk'
|
|
65
|
+
>>> "Uncaught SyntaxError: The requested module does not provide an export named 'default'"
|
|
66
|
+
```
|
|
55
67
|
|
|
56
68
|
|
|
57
69
|
### Download from CDN
|
|
58
70
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
71
|
+
For browser environments, you can import the Client SDK directly from our CDN to
|
|
72
|
+
your project's HTML. To accomplish this, include the Client SDK in your page
|
|
73
|
+
using one and only of the two script tags below. After this step you will be
|
|
74
|
+
able to access the Client SDK features via the global variable `paydock`.
|
|
62
75
|
|
|
63
|
-
|
|
64
|
-
|
|
76
|
+
For production we recommend using the compressed version (`.min.js`) since
|
|
77
|
+
it will result in faster loading times for your end users.
|
|
65
78
|
|
|
66
|
-
*
|
|
67
|
-
`https://widget.paydock.com/sdk/latest/widget.umd.js`
|
|
79
|
+
- *Compressed version for production: `https://widget.paydock.com/sdk/latest/widget.umd.min.js`*
|
|
68
80
|
|
|
81
|
+
- *Full version for development and debug: `https://widget.paydock.com/sdk/latest/widget.umd.js`*
|
|
69
82
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
Also can download library the [production version][min] or the [development version][max]
|
|
83
|
+
You may download the production version of the Client SDK scripts [here][min],
|
|
84
|
+
and, the development version [here][max].
|
|
73
85
|
|
|
74
86
|
[min]: https://widget.paydock.com/sdk/latest/widget.umd.min.js
|
|
75
87
|
[max]: https://widget.paydock.com/sdk/latest/widget.umd.js
|
|
76
88
|
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
|
|
89
|
+
For more advanced use-cases, the library has [UMD](https://github.com/umdjs/umd)
|
|
90
|
+
format that can be used in RequireJS, Webpack, etc.
|
|
89
91
|
|
|
90
92
|
|
|
91
93
|
```html
|
|
@@ -95,6 +97,7 @@ Also for more advanced use, the library has [UMD](https://github.com/umdjs/umd)
|
|
|
95
97
|
</script>
|
|
96
98
|
```
|
|
97
99
|
|
|
100
|
+
|
|
98
101
|
## Widget
|
|
99
102
|
You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#widget-simple-example)
|
|
100
103
|
|
|
@@ -119,11 +122,11 @@ var widget = new paydock.HtmlWidget('#widget', 'publicKey');
|
|
|
119
122
|
widget.load();
|
|
120
123
|
```
|
|
121
124
|
|
|
122
|
-
```javascript
|
|
125
|
+
```javascript
|
|
123
126
|
// ES2015 | TypeScript
|
|
124
127
|
|
|
125
|
-
import { HtmlWidget } from '@paydock/client-sdk
|
|
126
|
-
|
|
128
|
+
import { HtmlWidget } from '@paydock/client-sdk';
|
|
129
|
+
|
|
127
130
|
var widget = new HtmlWidget('#widget', 'publicKey');
|
|
128
131
|
widget.load();
|
|
129
132
|
```
|
|
@@ -131,7 +134,7 @@ widget.load();
|
|
|
131
134
|
Then write only need 2 lines of code in js to initialize widget
|
|
132
135
|
|
|
133
136
|
|
|
134
|
-
### Full example
|
|
137
|
+
### Full example
|
|
135
138
|
|
|
136
139
|
```html
|
|
137
140
|
<!DOCTYPE html>
|
|
@@ -194,9 +197,9 @@ widget.setFormFields(['phone', 'email']); // add additional fields for form of w
|
|
|
194
197
|
widget.setSupportedCardIcons(['mastercard', 'visa']); // add icons of supported card types
|
|
195
198
|
```
|
|
196
199
|
|
|
197
|
-
This example shows how you can use a lot of other methods to settings your form
|
|
200
|
+
This example shows how you can use a lot of other methods to settings your form
|
|
198
201
|
|
|
199
|
-
### Full example
|
|
202
|
+
### Full example
|
|
200
203
|
|
|
201
204
|
```html
|
|
202
205
|
<!DOCTYPE html>
|
|
@@ -217,12 +220,12 @@ This example shows how you can use a lot of other methods to settings your form
|
|
|
217
220
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.js" ></script>
|
|
218
221
|
<script>
|
|
219
222
|
var widget = new paydock.HtmlWidget('#widget', 'publicKey', 'gatewayId');
|
|
220
|
-
|
|
223
|
+
|
|
221
224
|
widget.setSupportedCardIcons(['mastercard', 'visa']);
|
|
222
225
|
widget.setFormFields(['phone', 'email']);
|
|
223
226
|
widget.setRefId('custom-ref-id');
|
|
224
227
|
widget.onFinishInsert('input[name="payment_source_token"]', 'payment_source');z
|
|
225
|
-
|
|
228
|
+
|
|
226
229
|
widget.load();
|
|
227
230
|
</script>
|
|
228
231
|
</script>
|
|
@@ -639,7 +642,7 @@ Class Widget include method for working on html and include extended by HtmlMult
|
|
|
639
642
|
* [.setFormValues(fieldValues)](#user-content-w_MultiWidget+setFormValues)
|
|
640
643
|
* [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
|
|
641
644
|
* [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
|
|
642
|
-
* [.setIcons()](#user-content-w_MultiWidget+setIcons)
|
|
645
|
+
* ~~[.setIcons()](#user-content-w_MultiWidget+setIcons)~~
|
|
643
646
|
* [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
|
|
644
647
|
* [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
|
|
645
648
|
* [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
|
|
@@ -1194,15 +1197,13 @@ widget.setFormPlaceholders({
|
|
|
1194
1197
|
```
|
|
1195
1198
|
<a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons"> </a>
|
|
1196
1199
|
|
|
1197
|
-
### htmlWidget.setIcons()
|
|
1200
|
+
### ~~htmlWidget.setIcons()~~
|
|
1201
|
+
***Deprecated***
|
|
1202
|
+
|
|
1198
1203
|
The method to change the widget icons
|
|
1199
1204
|
|
|
1200
1205
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
1201
1206
|
**Overrides**: [<code>setIcons</code>](#user-content-w_MultiWidget+setIcons)
|
|
1202
|
-
**Todo**
|
|
1203
|
-
|
|
1204
|
-
- [ ] DEPRECATED
|
|
1205
|
-
|
|
1206
1207
|
<a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements"> </a>
|
|
1207
1208
|
|
|
1208
1209
|
### htmlWidget.setHiddenElements(elements)
|
|
@@ -1355,7 +1356,7 @@ Class HtmlMultiWidget include method for working with html
|
|
|
1355
1356
|
* [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
|
|
1356
1357
|
* [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
|
|
1357
1358
|
* [.setFormElements(elements)](#user-content-w_MultiWidget+setFormElements)
|
|
1358
|
-
* [.setIcons()](#user-content-w_MultiWidget+setIcons)
|
|
1359
|
+
* ~~[.setIcons()](#user-content-w_MultiWidget+setIcons)~~
|
|
1359
1360
|
* [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
|
|
1360
1361
|
* [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
|
|
1361
1362
|
* [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
|
|
@@ -1812,15 +1813,13 @@ widget.setFormElements([
|
|
|
1812
1813
|
```
|
|
1813
1814
|
<a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons"> </a>
|
|
1814
1815
|
|
|
1815
|
-
### htmlMultiWidget.setIcons()
|
|
1816
|
+
### ~~htmlMultiWidget.setIcons()~~
|
|
1817
|
+
***Deprecated***
|
|
1818
|
+
|
|
1816
1819
|
The method to change the widget icons
|
|
1817
1820
|
|
|
1818
1821
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1819
1822
|
**Overrides**: [<code>setIcons</code>](#user-content-w_MultiWidget+setIcons)
|
|
1820
|
-
**Todo**
|
|
1821
|
-
|
|
1822
|
-
- [ ] DEPRECATED
|
|
1823
|
-
|
|
1824
1823
|
<a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements"> </a>
|
|
1825
1824
|
|
|
1826
1825
|
### htmlMultiWidget.setHiddenElements(elements)
|
|
@@ -2133,7 +2132,7 @@ Class MultiWidget include method for for creating iframe url
|
|
|
2133
2132
|
* [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
|
|
2134
2133
|
* [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
|
|
2135
2134
|
* [.setFormElements(elements)](#user-content-w_MultiWidget+setFormElements)
|
|
2136
|
-
* [.setIcons()](#user-content-w_MultiWidget+setIcons)
|
|
2135
|
+
* ~~[.setIcons()](#user-content-w_MultiWidget+setIcons)~~
|
|
2137
2136
|
* [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
|
|
2138
2137
|
* [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
|
|
2139
2138
|
* [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
|
|
@@ -2359,14 +2358,12 @@ widget.setFormElements([
|
|
|
2359
2358
|
```
|
|
2360
2359
|
<a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons"> </a>
|
|
2361
2360
|
|
|
2362
|
-
### multiWidget.setIcons()
|
|
2361
|
+
### ~~multiWidget.setIcons()~~
|
|
2362
|
+
***Deprecated***
|
|
2363
|
+
|
|
2363
2364
|
The method to change the widget icons
|
|
2364
2365
|
|
|
2365
2366
|
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
2366
|
-
**Todo**
|
|
2367
|
-
|
|
2368
|
-
- [ ] DEPRECATED
|
|
2369
|
-
|
|
2370
2367
|
<a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements"> </a>
|
|
2371
2368
|
|
|
2372
2369
|
### multiWidget.setHiddenElements(elements)
|
|
@@ -2710,10 +2707,10 @@ var list = new paydock.HtmlPaymentSourceWidget('#list', 'publicKey', 'queryToken
|
|
|
2710
2707
|
list.load();
|
|
2711
2708
|
```
|
|
2712
2709
|
|
|
2713
|
-
```javascript
|
|
2710
|
+
```javascript
|
|
2714
2711
|
// ES2015 | TypeScript
|
|
2715
2712
|
|
|
2716
|
-
import { HtmlPaymentSourceWidget } from '@paydock/client-sdk
|
|
2713
|
+
import { HtmlPaymentSourceWidget } from '@paydock/client-sdk';
|
|
2717
2714
|
|
|
2718
2715
|
var list = new HtmlPaymentSourceWidget('#list', 'publicKey', 'queryToken');
|
|
2719
2716
|
list.load();
|
|
@@ -3426,7 +3423,7 @@ You must create a button to turn it into checkout-button
|
|
|
3426
3423
|
var button = new paydock.PaypalCheckoutButton('#button', 'publicKey', 'gatewayId');
|
|
3427
3424
|
```
|
|
3428
3425
|
|
|
3429
|
-
```javascript
|
|
3426
|
+
```javascript
|
|
3430
3427
|
// ES2015 | TypeScript
|
|
3431
3428
|
|
|
3432
3429
|
|
|
@@ -4569,11 +4566,11 @@ This wrapper helps you to work with paydock api emdpoints
|
|
|
4569
4566
|
var browserDetails = await new paydock.Api('publicKey').setEnv('env').getBrowserDetails();
|
|
4570
4567
|
```
|
|
4571
4568
|
|
|
4572
|
-
```javascript
|
|
4569
|
+
```javascript
|
|
4573
4570
|
// ES2015 | TypeScript
|
|
4574
4571
|
|
|
4575
|
-
import { Api } from '@paydock/client-sdk
|
|
4576
|
-
|
|
4572
|
+
import { Api } from '@paydock/client-sdk';
|
|
4573
|
+
|
|
4577
4574
|
var browserDetails = await new paydock.Api('publicKey').setEnv('env').getBrowserDetails();
|
|
4578
4575
|
```
|
|
4579
4576
|
|
|
@@ -4586,11 +4583,11 @@ var response = await new paydock.Api('publicKey').setEnv('env').charge().preAuth
|
|
|
4586
4583
|
});
|
|
4587
4584
|
```
|
|
4588
4585
|
|
|
4589
|
-
```javascript
|
|
4586
|
+
```javascript
|
|
4590
4587
|
// ES2015 | TypeScript
|
|
4591
4588
|
|
|
4592
|
-
import { Api } from '@paydock/client-sdk
|
|
4593
|
-
|
|
4589
|
+
import { Api } from '@paydock/client-sdk';
|
|
4590
|
+
|
|
4594
4591
|
var response = await new Api('publicKey').setEnv('env').charge().preAuth({
|
|
4595
4592
|
amount: 100,
|
|
4596
4593
|
currency: 'AUD',
|
|
@@ -4600,7 +4597,7 @@ var response = await new Api('publicKey').setEnv('env').charge().preAuth({
|
|
|
4600
4597
|
|
|
4601
4598
|
Then write only need 2 lines of code in js to make request
|
|
4602
4599
|
|
|
4603
|
-
### Initialization full example
|
|
4600
|
+
### Initialization full example
|
|
4604
4601
|
|
|
4605
4602
|
```html
|
|
4606
4603
|
<!DOCTYPE html>
|
|
@@ -4647,10 +4644,10 @@ var canvas3ds = new paydock.Canvas3ds('#widget', 'token');
|
|
|
4647
4644
|
canvas3ds.load();
|
|
4648
4645
|
```
|
|
4649
4646
|
|
|
4650
|
-
```javascript
|
|
4647
|
+
```javascript
|
|
4651
4648
|
// ES2015 | TypeScript
|
|
4652
4649
|
|
|
4653
|
-
import { Canvas3ds } from '@paydock/client-sdk
|
|
4650
|
+
import { Canvas3ds } from '@paydock/client-sdk';
|
|
4654
4651
|
|
|
4655
4652
|
var list = new Canvas3ds('#widget', 'token');
|
|
4656
4653
|
list.load();
|
|
@@ -4871,7 +4868,7 @@ After you initialized the standalone 3ds charge via `v1/charges/standalone-3ds`
|
|
|
4871
4868
|
## Vault Display Widget
|
|
4872
4869
|
You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#vault-display-widget)
|
|
4873
4870
|
|
|
4874
|
-
The vault display form allows viewing card number and CVV. The form can be customised according to your needs.
|
|
4871
|
+
The vault display form allows viewing card number and CVV. The form can be customised according to your needs.
|
|
4875
4872
|
You can set styles as well as subscribe to widget events that help monitor user’s actions in real time.
|
|
4876
4873
|
|
|
4877
4874
|
## Vault Display Widget simple example
|
|
@@ -4891,18 +4888,18 @@ var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
|
4891
4888
|
widget.load();
|
|
4892
4889
|
```
|
|
4893
4890
|
|
|
4894
|
-
```javascript
|
|
4891
|
+
```javascript
|
|
4895
4892
|
// ES2015 | TypeScript
|
|
4896
4893
|
|
|
4897
|
-
import { VaultDisplayWidget } from '@paydock/client-sdk
|
|
4898
|
-
|
|
4894
|
+
import { VaultDisplayWidget } from '@paydock/client-sdk';
|
|
4895
|
+
|
|
4899
4896
|
var widget = new VaultDisplayWidget('#widget', 'token');
|
|
4900
4897
|
widget.load();
|
|
4901
4898
|
```
|
|
4902
4899
|
|
|
4903
4900
|
Then write only need 2 lines of code in js to initialize widget
|
|
4904
4901
|
|
|
4905
|
-
### Full example
|
|
4902
|
+
### Full example
|
|
4906
4903
|
|
|
4907
4904
|
```html
|
|
4908
4905
|
<!DOCTYPE html>
|
|
@@ -4913,9 +4910,9 @@ Then write only need 2 lines of code in js to initialize widget
|
|
|
4913
4910
|
<style>iframe {border: 0;width: 100%;height: 300px;}</style>
|
|
4914
4911
|
</head>
|
|
4915
4912
|
<body>
|
|
4916
|
-
|
|
4913
|
+
|
|
4917
4914
|
<div id="widget"></div>
|
|
4918
|
-
|
|
4915
|
+
|
|
4919
4916
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
4920
4917
|
<script>
|
|
4921
4918
|
var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
@@ -4953,9 +4950,9 @@ widget.setStyles({
|
|
|
4953
4950
|
});
|
|
4954
4951
|
```
|
|
4955
4952
|
|
|
4956
|
-
This example shows how you can use a lot of other methods to settings your form
|
|
4953
|
+
This example shows how you can use a lot of other methods to settings your form
|
|
4957
4954
|
|
|
4958
|
-
### Full example
|
|
4955
|
+
### Full example
|
|
4959
4956
|
|
|
4960
4957
|
```html
|
|
4961
4958
|
<!DOCTYPE html>
|
|
@@ -4966,27 +4963,27 @@ This example shows how you can use a lot of other methods to settings your form
|
|
|
4966
4963
|
<style>iframe {border: 0;width: 40%;height: 450px;}</style>
|
|
4967
4964
|
</head>
|
|
4968
4965
|
<body>
|
|
4969
|
-
|
|
4966
|
+
|
|
4970
4967
|
<div id="widget"></div>
|
|
4971
|
-
|
|
4968
|
+
|
|
4972
4969
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
4973
4970
|
<script>
|
|
4974
4971
|
var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
4975
4972
|
|
|
4976
4973
|
widget.setEnv('sandbox');
|
|
4977
|
-
|
|
4974
|
+
|
|
4978
4975
|
widget.on('after_load', function (data) {
|
|
4979
4976
|
console.log(data);
|
|
4980
4977
|
});
|
|
4981
|
-
|
|
4978
|
+
|
|
4982
4979
|
widget.on('cvv_secure_code_requested', function (data) {
|
|
4983
4980
|
console.log(data);
|
|
4984
4981
|
});
|
|
4985
|
-
|
|
4982
|
+
|
|
4986
4983
|
widget.on('card_number_secure_code_requested', function (data) {
|
|
4987
4984
|
console.log(data);
|
|
4988
4985
|
});
|
|
4989
|
-
|
|
4986
|
+
|
|
4990
4987
|
widget.setStyles({
|
|
4991
4988
|
background_color: 'rgb(0, 0, 0)',
|
|
4992
4989
|
border_color: 'yellow',
|
|
@@ -5130,7 +5127,7 @@ let button = new paydock.WalletButtons(
|
|
|
5130
5127
|
button.load();
|
|
5131
5128
|
```
|
|
5132
5129
|
|
|
5133
|
-
```javascript
|
|
5130
|
+
```javascript
|
|
5134
5131
|
// ES2015 | TypeScript
|
|
5135
5132
|
import { WalletButtons } from '@paydock/client-sdk';
|
|
5136
5133
|
|
|
@@ -5155,7 +5152,7 @@ let button = new paydock.WalletButtons(
|
|
|
5155
5152
|
button.load();
|
|
5156
5153
|
```
|
|
5157
5154
|
|
|
5158
|
-
```javascript
|
|
5155
|
+
```javascript
|
|
5159
5156
|
// ES2015 | TypeScript
|
|
5160
5157
|
import { WalletButtons } from '@paydock/client-sdk';
|
|
5161
5158
|
|
|
@@ -5179,7 +5176,7 @@ let button = new paydock.WalletButtons(
|
|
|
5179
5176
|
button.load();
|
|
5180
5177
|
```
|
|
5181
5178
|
|
|
5182
|
-
```javascript
|
|
5179
|
+
```javascript
|
|
5183
5180
|
// ES2015 | TypeScript
|
|
5184
5181
|
import { WalletButtons } from '@paydock/client-sdk';
|
|
5185
5182
|
|
|
@@ -5248,14 +5245,6 @@ In some situations you may want to forcibly close the checkout so that your user
|
|
|
5248
5245
|
button.close();
|
|
5249
5246
|
```
|
|
5250
5247
|
|
|
5251
|
-
### Performing actions when the wallet button is clicked
|
|
5252
|
-
|
|
5253
|
-
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.
|
|
5254
|
-
|
|
5255
|
-
```javascript
|
|
5256
|
-
button.onClick(() => console.log("Perform actions on button click"));
|
|
5257
|
-
```
|
|
5258
|
-
|
|
5259
5248
|
### Performing actions when shipping info is updated
|
|
5260
5249
|
|
|
5261
5250
|
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).
|
|
@@ -5383,51 +5372,30 @@ _(Required `meta` fields: - . Optional `meta` fields: `request_shipping`, `pay_l
|
|
|
5383
5372
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
5384
5373
|
<script>
|
|
5385
5374
|
let button = new paydock.WalletButtons(
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5375
|
+
"#widget",
|
|
5376
|
+
charge_token,
|
|
5377
|
+
{
|
|
5378
|
+
request_shipping: true,
|
|
5379
|
+
pay_later: true,
|
|
5380
|
+
standalone: false,
|
|
5381
|
+
style: {
|
|
5382
|
+
layout: 'horizontal',
|
|
5383
|
+
color: 'blue',
|
|
5384
|
+
shape: 'rect',
|
|
5385
|
+
label: 'paypal',
|
|
5386
|
+
},
|
|
5387
|
+
}
|
|
5388
|
+
);
|
|
5400
5389
|
button.setEnv('sandbox');
|
|
5401
5390
|
button.onUnavailable(() => console.log("No wallet buttons available"));
|
|
5402
5391
|
button.onUpdate((data) => {
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5392
|
+
console.log("Updating amount via a backend to backend call to POST charges/:id");
|
|
5393
|
+
// call `POST charges/:id` to modify charge
|
|
5394
|
+
button.update({ success: true });
|
|
5395
|
+
});
|
|
5407
5396
|
button.onPaymentSuccessful((data) => console.log("The payment was successful"));
|
|
5408
5397
|
button.onPaymentError((data) => console.log("The payment was not successful"));
|
|
5409
5398
|
button.onPaymentInReview((data) => console.log("The payment is on fraud review"));
|
|
5410
|
-
|
|
5411
|
-
// Example 1: Asynchronous onClick handler
|
|
5412
|
-
const asyncLogic = async () => {
|
|
5413
|
-
// Perform asynchronous logic. Expectation is that a Promise is returned and attached to response via `attachResult`,
|
|
5414
|
-
// and resolve or reject of it will dictate how wallet behaves.
|
|
5415
|
-
}
|
|
5416
|
-
|
|
5417
|
-
button.onClick(({ data: { attachResult } }) => {
|
|
5418
|
-
// Promise is attached to the result. On Paypal, when promise is resolved, the user Journey will continue.
|
|
5419
|
-
// If no promise is attached then the Paypal journey will not depend on the promise being resolved or rejected
|
|
5420
|
-
attachResult(asyncLogic());
|
|
5421
|
-
});
|
|
5422
|
-
|
|
5423
|
-
// Example 2: Synchronous onClick handler
|
|
5424
|
-
// button.onClick(({ data: { attachResult } }) => {
|
|
5425
|
-
// // Perform synchronous logic
|
|
5426
|
-
// console.log("Synchronous onClick: Button clicked");
|
|
5427
|
-
// // Optionally return a boolean flag to halt the operation
|
|
5428
|
-
// attachResult(false);
|
|
5429
|
-
// });
|
|
5430
|
-
|
|
5431
5399
|
button.load();
|
|
5432
5400
|
</script>
|
|
5433
5401
|
</html>
|
|
@@ -5561,7 +5529,6 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `ra
|
|
|
5561
5529
|
button.onUnavailable(() => console.log("No wallet buttons available"));
|
|
5562
5530
|
button.onPaymentSuccessful((data) => console.log("The payment was successful"));
|
|
5563
5531
|
button.onPaymentError((data) => console.log("The payment was not successful"));
|
|
5564
|
-
button.onClick(() => console.log("On WalletButton Click"));
|
|
5565
5532
|
button.onUpdate((data) => {
|
|
5566
5533
|
console.log("Updating amount via a backend to backend call to POST charges/:id");
|
|
5567
5534
|
// call `POST charges/:id` to modify charge
|
|
@@ -5594,6 +5561,7 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `ra
|
|
|
5594
5561
|
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.
|
|
5595
5562
|
|
|
5596
5563
|
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
|
+
|
|
5597
5565
|
### ApplePay and GooglePay via MPGS Raw data initialization example
|
|
5598
5566
|
|
|
5599
5567
|
```html
|
|
@@ -5725,24 +5693,6 @@ Similarly, for **GooglePay via MPGS** you can initialize the `PaymentMethodSpeci
|
|
|
5725
5693
|
## Interfaces
|
|
5726
5694
|
|
|
5727
5695
|
<dl>
|
|
5728
|
-
<dt><a href="#IEventData">IEventData</a></dt>
|
|
5729
|
-
<dd><p>Interface of data from events.</p>
|
|
5730
|
-
</dd>
|
|
5731
|
-
<dt><a href="#IWalletPaymentSuccessful">IWalletPaymentSuccessful</a></dt>
|
|
5732
|
-
<dd><p>Interface of data from a successful payment result.</p>
|
|
5733
|
-
</dd>
|
|
5734
|
-
<dt><a href="#IWalletUpdate">IWalletUpdate</a></dt>
|
|
5735
|
-
<dd><p>Interface of data from an update event.</p>
|
|
5736
|
-
</dd>
|
|
5737
|
-
<dt><a href="#IWalletOnClick">IWalletOnClick</a></dt>
|
|
5738
|
-
<dd><p>Interface of data from a wallet onClick event.</p>
|
|
5739
|
-
</dd>
|
|
5740
|
-
<dt><a href="#IWalletUnavailable">IWalletUnavailable</a></dt>
|
|
5741
|
-
<dd><p>Interface of data from an unavailable event.</p>
|
|
5742
|
-
</dd>
|
|
5743
|
-
<dt><a href="#IWalletUpdateData">IWalletUpdateData</a></dt>
|
|
5744
|
-
<dd><p>Interface of data for wallet button <code>update</code> call.</p>
|
|
5745
|
-
</dd>
|
|
5746
5696
|
<dt><a href="#IWalletMeta">IWalletMeta</a> : <code>object</code></dt>
|
|
5747
5697
|
<dd><p>Interface of data used by the wallet checkout and payment proccess.</p>
|
|
5748
5698
|
</dd>
|
|
@@ -5757,100 +5707,6 @@ Similarly, for **GooglePay via MPGS** you can initialize the `PaymentMethodSpeci
|
|
|
5757
5707
|
</dd>
|
|
5758
5708
|
</dl>
|
|
5759
5709
|
|
|
5760
|
-
<a name="IEventData" id="IEventData" href="#IEventData"> </a>
|
|
5761
|
-
|
|
5762
|
-
## IEventData
|
|
5763
|
-
Interface of data from events.
|
|
5764
|
-
|
|
5765
|
-
**Kind**: global interface
|
|
5766
|
-
|
|
5767
|
-
| Param | Type |
|
|
5768
|
-
| --- | --- |
|
|
5769
|
-
| event | <code>string</code> |
|
|
5770
|
-
| data | <code>void</code> \| [<code>IWalletPaymentSuccessful</code>](#IWalletPaymentSuccessful) \| [<code>IWalletUpdate</code>](#IWalletUpdate) \| [<code>IWalletUnavailable</code>](#IWalletUnavailable) \| [<code>IWalletOnClick</code>](#IWalletOnClick) \| <code>any</code> |
|
|
5771
|
-
|
|
5772
|
-
<a name="IWalletPaymentSuccessful" id="IWalletPaymentSuccessful" href="#IWalletPaymentSuccessful"> </a>
|
|
5773
|
-
|
|
5774
|
-
## IWalletPaymentSuccessful
|
|
5775
|
-
Interface of data from a successful payment result.
|
|
5776
|
-
|
|
5777
|
-
**Kind**: global interface
|
|
5778
|
-
|
|
5779
|
-
| Param | Type |
|
|
5780
|
-
| --- | --- |
|
|
5781
|
-
| id | <code>string</code> |
|
|
5782
|
-
| amount | <code>number</code> |
|
|
5783
|
-
| currency | <code>string</code> |
|
|
5784
|
-
| status | <code>string</code> |
|
|
5785
|
-
| [payer_name] | <code>string</code> |
|
|
5786
|
-
| [payer_email] | <code>string</code> |
|
|
5787
|
-
| [payer_phone] | <code>string</code> |
|
|
5788
|
-
|
|
5789
|
-
<a name="IWalletUpdate" id="IWalletUpdate" href="#IWalletUpdate"> </a>
|
|
5790
|
-
|
|
5791
|
-
## IWalletUpdate
|
|
5792
|
-
Interface of data from an update event.
|
|
5793
|
-
|
|
5794
|
-
**Kind**: global interface
|
|
5795
|
-
|
|
5796
|
-
| Param | Type |
|
|
5797
|
-
| --- | --- |
|
|
5798
|
-
| [wallet_response_code] | <code>string</code> |
|
|
5799
|
-
| [wallet_session_id] | <code>string</code> |
|
|
5800
|
-
| [payment_source] | <code>object</code> |
|
|
5801
|
-
| [payment_source.wallet_payment_method_id] | <code>string</code> |
|
|
5802
|
-
| [payment_source.card_number_last4] | <code>string</code> |
|
|
5803
|
-
| [payment_source.card_scheme] | <code>string</code> |
|
|
5804
|
-
| [wallet_loyalty_account] | <code>object</code> |
|
|
5805
|
-
| [wallet_loyalty_account.id] | <code>string</code> |
|
|
5806
|
-
| [wallet_loyalty_account.barcode] | <code>string</code> |
|
|
5807
|
-
| [shipping] | <code>object</code> |
|
|
5808
|
-
| [shipping.address_line1] | <code>string</code> |
|
|
5809
|
-
| [shipping.address_line2] | <code>string</code> |
|
|
5810
|
-
| [shipping.address_postcode] | <code>string</code> |
|
|
5811
|
-
| [shipping.address_city] | <code>string</code> |
|
|
5812
|
-
| [shipping.address_state] | <code>string</code> |
|
|
5813
|
-
| [shipping.address_country] | <code>string</code> |
|
|
5814
|
-
| [shipping.address_company] | <code>string</code> |
|
|
5815
|
-
| [shipping.post_office_box_number] | <code>string</code> |
|
|
5816
|
-
| [shipping.wallet_address_id] | <code>string</code> |
|
|
5817
|
-
| [shipping.wallet_address_name] | <code>string</code> |
|
|
5818
|
-
| [shipping.wallet_address_created_timestamp] | <code>string</code> |
|
|
5819
|
-
| [shipping.wallet_address_updated_timestamp] | <code>string</code> |
|
|
5820
|
-
|
|
5821
|
-
<a name="IWalletOnClick" id="IWalletOnClick" href="#IWalletOnClick"> </a>
|
|
5822
|
-
|
|
5823
|
-
## IWalletOnClick
|
|
5824
|
-
Interface of data from a wallet onClick event.
|
|
5825
|
-
|
|
5826
|
-
**Kind**: global interface
|
|
5827
|
-
|
|
5828
|
-
| Param | Description |
|
|
5829
|
-
| --- | --- |
|
|
5830
|
-
| 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. |
|
|
5831
|
-
|
|
5832
|
-
<a name="IWalletUnavailable" id="IWalletUnavailable" href="#IWalletUnavailable"> </a>
|
|
5833
|
-
|
|
5834
|
-
## IWalletUnavailable
|
|
5835
|
-
Interface of data from an unavailable event.
|
|
5836
|
-
|
|
5837
|
-
**Kind**: global interface
|
|
5838
|
-
|
|
5839
|
-
| Param | Type | Description |
|
|
5840
|
-
| --- | --- | --- |
|
|
5841
|
-
| [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'. |
|
|
5842
|
-
|
|
5843
|
-
<a name="IWalletUpdateData" id="IWalletUpdateData" href="#IWalletUpdateData"> </a>
|
|
5844
|
-
|
|
5845
|
-
## IWalletUpdateData
|
|
5846
|
-
Interface of data for wallet button `update` call.
|
|
5847
|
-
|
|
5848
|
-
**Kind**: global interface
|
|
5849
|
-
|
|
5850
|
-
| Param | Type |
|
|
5851
|
-
| --- | --- |
|
|
5852
|
-
| success | <code>boolean</code> |
|
|
5853
|
-
|
|
5854
5710
|
<a name="IWalletMeta" id="IWalletMeta" href="#IWalletMeta"> </a>
|
|
5855
5711
|
|
|
5856
5712
|
## IWalletMeta : <code>object</code>
|
|
@@ -5935,19 +5791,14 @@ Class WalletButtons to work with different E-Wallets within html (currently supp
|
|
|
5935
5791
|
* [.load()](#WalletButtons+load)
|
|
5936
5792
|
* [.update()](#WalletButtons+update)
|
|
5937
5793
|
* [.setEnv(env, [alias])](#WalletButtons+setEnv)
|
|
5938
|
-
* [.enable()](#WalletButtons+enable)
|
|
5939
|
-
* [.disable()](#WalletButtons+disable)
|
|
5940
5794
|
* [.close()](#WalletButtons+close)
|
|
5941
|
-
* [.on(eventName, [cb])](#WalletButtons+on) ⇒
|
|
5795
|
+
* [.on(eventName, [cb])](#WalletButtons+on) ⇒ <code>Promise.<IEventData></code> \| <code>void</code>
|
|
5942
5796
|
* [.onUnavailable([handler])](#WalletButtons+onUnavailable)
|
|
5943
5797
|
* [.onUpdate([handler])](#WalletButtons+onUpdate)
|
|
5944
5798
|
* [.onPaymentSuccessful([handler])](#WalletButtons+onPaymentSuccessful)
|
|
5945
5799
|
* [.onPaymentInReview([handler])](#WalletButtons+onPaymentInReview)
|
|
5946
5800
|
* [.onPaymentError([handler])](#WalletButtons+onPaymentError)
|
|
5947
5801
|
* [.onAuthTokensChanged([handler])](#WalletButtons+onAuthTokensChanged)
|
|
5948
|
-
* [.onClick(handler)](#WalletButtons+onClick)
|
|
5949
|
-
* [.onCheckoutOpen(handler)](#WalletButtons+onCheckoutOpen)
|
|
5950
|
-
* [.onCheckoutClose(handler)](#WalletButtons+onCheckoutClose)
|
|
5951
5802
|
|
|
5952
5803
|
<a name="new_WalletButtons_new" id="new_WalletButtons_new" href="#new_WalletButtons_new"> </a>
|
|
5953
5804
|
|
|
@@ -6058,26 +5909,6 @@ Bear in mind that you must set an environment before calling `button.load()`.
|
|
|
6058
5909
|
```js
|
|
6059
5910
|
button.setEnv('production', 'paydock.com');
|
|
6060
5911
|
```
|
|
6061
|
-
<a name="WalletButtons+enable" id="WalletButtons+enable" href="#WalletButtons+enable"> </a>
|
|
6062
|
-
|
|
6063
|
-
### walletButtons.enable()
|
|
6064
|
-
Current method can enable the payment button. This method is only supported for Flypay V2.
|
|
6065
|
-
|
|
6066
|
-
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
6067
|
-
**Example**
|
|
6068
|
-
```js
|
|
6069
|
-
button.enable();
|
|
6070
|
-
```
|
|
6071
|
-
<a name="WalletButtons+disable" id="WalletButtons+disable" href="#WalletButtons+disable"> </a>
|
|
6072
|
-
|
|
6073
|
-
### walletButtons.disable()
|
|
6074
|
-
Current method can disable the payment button. This method is only supported for Flypay V2.
|
|
6075
|
-
|
|
6076
|
-
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
6077
|
-
**Example**
|
|
6078
|
-
```js
|
|
6079
|
-
button.disable('production', 'paydock.com');
|
|
6080
|
-
```
|
|
6081
5912
|
<a name="WalletButtons+close" id="WalletButtons+close" href="#WalletButtons+close"> </a>
|
|
6082
5913
|
|
|
6083
5914
|
### walletButtons.close()
|
|
@@ -6090,7 +5921,7 @@ button.close();
|
|
|
6090
5921
|
```
|
|
6091
5922
|
<a name="WalletButtons+on" id="WalletButtons+on" href="#WalletButtons+on"> </a>
|
|
6092
5923
|
|
|
6093
|
-
### walletButtons.on(eventName, [cb]) ⇒
|
|
5924
|
+
### walletButtons.on(eventName, [cb]) ⇒ <code>Promise.<IEventData></code> \| <code>void</code>
|
|
6094
5925
|
Listen to events of button. `unavailable` returns no data, `paymentSuccessful` returns IWalletPaymentSuccessful
|
|
6095
5926
|
for Stripe or full response for Flypay, and `paymentError` an error.
|
|
6096
5927
|
|
|
@@ -6253,63 +6084,6 @@ button.onAuthTokensChanged().then((eventData) => {
|
|
|
6253
6084
|
console.log('Authentication tokens changed:', eventData);
|
|
6254
6085
|
});
|
|
6255
6086
|
```
|
|
6256
|
-
<a name="WalletButtons+onClick" id="WalletButtons+onClick" href="#WalletButtons+onClick"> </a>
|
|
6257
|
-
|
|
6258
|
-
### walletButtons.onClick(handler)
|
|
6259
|
-
Registers a callback function to be invoked when the wallet button gets clicked.
|
|
6260
|
-
There are two operational modes supported, Synchronous and Asynchronous.
|
|
6261
|
-
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.
|
|
6262
|
-
When synchronous operations occur on the callback handler, attaching a boolean result via `attachResult` is optional to control the execution flow.
|
|
6263
|
-
Note this is supported for Paypal, GooglePay and ApplePay wallet buttons at the moment.
|
|
6264
|
-
|
|
6265
|
-
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
6266
|
-
|
|
6267
|
-
| Param | Type | Description |
|
|
6268
|
-
| --- | --- | --- |
|
|
6269
|
-
| handler | <code>listener</code> | Function to be called when the wallet button is clicked. |
|
|
6270
|
-
|
|
6271
|
-
**Example**
|
|
6272
|
-
```js
|
|
6273
|
-
button.onClick((data) => {
|
|
6274
|
-
performValidationLogic();
|
|
6275
|
-
});
|
|
6276
|
-
```
|
|
6277
|
-
<a name="WalletButtons+onCheckoutOpen" id="WalletButtons+onCheckoutOpen" href="#WalletButtons+onCheckoutOpen"> </a>
|
|
6278
|
-
|
|
6279
|
-
### walletButtons.onCheckoutOpen(handler)
|
|
6280
|
-
Registers a callback function to be invoked when the wallet checkout opens.
|
|
6281
|
-
Note this is supported for FlypayV2 wallet button at the moment.
|
|
6282
|
-
|
|
6283
|
-
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
6284
|
-
|
|
6285
|
-
| Param | Type | Description |
|
|
6286
|
-
| --- | --- | --- |
|
|
6287
|
-
| handler | <code>listener</code> | Function to be called when the wallet checkout opens. |
|
|
6288
|
-
|
|
6289
|
-
**Example**
|
|
6290
|
-
```js
|
|
6291
|
-
button.onCheckoutOpen((data) => {
|
|
6292
|
-
console.log('Checkout opens');
|
|
6293
|
-
});
|
|
6294
|
-
```
|
|
6295
|
-
<a name="WalletButtons+onCheckoutClose" id="WalletButtons+onCheckoutClose" href="#WalletButtons+onCheckoutClose"> </a>
|
|
6296
|
-
|
|
6297
|
-
### walletButtons.onCheckoutClose(handler)
|
|
6298
|
-
Registers a callback function to be invoked when the wallet checkout closes.
|
|
6299
|
-
Note this is supported for FlypayV2 wallet button at the moment.
|
|
6300
|
-
|
|
6301
|
-
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
6302
|
-
|
|
6303
|
-
| Param | Type | Description |
|
|
6304
|
-
| --- | --- | --- |
|
|
6305
|
-
| handler | <code>listener</code> | Function to be called when the wallet checkout closes. |
|
|
6306
|
-
|
|
6307
|
-
**Example**
|
|
6308
|
-
```js
|
|
6309
|
-
button.onCheckoutClose(() => {
|
|
6310
|
-
console.log('Wallet checkout closes');
|
|
6311
|
-
});
|
|
6312
|
-
```
|
|
6313
6087
|
<a name="EVENT" id="EVENT" href="#EVENT"> </a>
|
|
6314
6088
|
|
|
6315
6089
|
## EVENT : <code>object</code>
|
|
@@ -6323,7 +6097,6 @@ List of available event's name in the wallet button lifecycle
|
|
|
6323
6097
|
| UPDATE | <code>string</code> | <code>"update"</code> |
|
|
6324
6098
|
| PAYMENT_SUCCESSFUL | <code>string</code> | <code>"paymentSuccessful"</code> |
|
|
6325
6099
|
| PAYMENT_ERROR | <code>string</code> | <code>"paymentError"</code> |
|
|
6326
|
-
| ON_CLICK | <code>string</code> | <code>"onClick"</code> |
|
|
6327
6100
|
|
|
6328
6101
|
|
|
6329
6102
|
## Secure Remote Commerce
|
|
@@ -6355,7 +6128,7 @@ var src = new paydock.SRC(
|
|
|
6355
6128
|
src.load();
|
|
6356
6129
|
```
|
|
6357
6130
|
|
|
6358
|
-
```javascript
|
|
6131
|
+
```javascript
|
|
6359
6132
|
// ES2015 | TypeScript
|
|
6360
6133
|
|
|
6361
6134
|
import { SRC } from '@paydock/client-sdk';
|