@paydock/client-sdk 1.103.11-beta → 1.104.1-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +123 -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 → 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 +21 -0
- package/docs/install/umd.example.md +6 -0
- package/docs/install.md +53 -0
- package/docs/install.readme.t.md +17 -0
- package/docs/install.slate.t.md +17 -0
- package/docs/license.md +2 -0
- package/docs/partials/header.hbs +3 -0
- package/docs/ps-examples.md +129 -0
- package/docs/secure-remote-commerce-examples.md +258 -0
- package/docs/secure-remote-commerce.md +265 -0
- package/docs/vault-display-example.md +132 -0
- package/docs/wallet-buttons-examples.md +580 -0
- package/docs/wallet-buttons.md +424 -0
- package/docs/wallet-cba-buttons-examples.md +388 -0
- package/docs/widget-examples.md +134 -0
- package/package.json +164 -42
- package/slate.md +108 -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,79 @@ 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 being by including the Client SDK
|
|
73
|
+
in your page using one and only of the two script tags below. After this step
|
|
74
|
+
you will be able to access the Client SDK features via the global
|
|
75
|
+
variable `paydock`.
|
|
62
76
|
|
|
63
|
-
|
|
64
|
-
|
|
77
|
+
For production we recommend using the compressed version (`.min.js`) since
|
|
78
|
+
it will result in faster loading times for your end users.
|
|
65
79
|
|
|
66
|
-
*
|
|
67
|
-
`https://widget.paydock.com/sdk/latest/widget.umd.js`
|
|
80
|
+
- *Compressed version for production: `https://widget.paydock.com/sdk/latest/widget.umd.min.js`*
|
|
68
81
|
|
|
82
|
+
- *Full version for development and debug: `https://widget.paydock.com/sdk/latest/widget.umd.js`*
|
|
69
83
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
Also can download library the [production version][min] or the [development version][max]
|
|
84
|
+
You may download the production version of the Client SDK scripts [here][min],
|
|
85
|
+
and, the development version [here][max].
|
|
73
86
|
|
|
74
87
|
[min]: https://widget.paydock.com/sdk/latest/widget.umd.min.js
|
|
75
88
|
[max]: https://widget.paydock.com/sdk/latest/widget.umd.js
|
|
76
89
|
|
|
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
|
-
|
|
90
|
+
For more advanced use-cases, the library has [UMD](https://github.com/umdjs/umd)
|
|
91
|
+
format that can be used in RequireJS, Webpack, etc.
|
|
89
92
|
|
|
90
93
|
|
|
91
94
|
```html
|
|
@@ -95,6 +98,7 @@ Also for more advanced use, the library has [UMD](https://github.com/umdjs/umd)
|
|
|
95
98
|
</script>
|
|
96
99
|
```
|
|
97
100
|
|
|
101
|
+
|
|
98
102
|
## Widget
|
|
99
103
|
You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#widget-simple-example)
|
|
100
104
|
|
|
@@ -119,11 +123,11 @@ var widget = new paydock.HtmlWidget('#widget', 'publicKey');
|
|
|
119
123
|
widget.load();
|
|
120
124
|
```
|
|
121
125
|
|
|
122
|
-
```javascript
|
|
126
|
+
```javascript
|
|
123
127
|
// ES2015 | TypeScript
|
|
124
128
|
|
|
125
|
-
import { HtmlWidget } from '@paydock/client-sdk
|
|
126
|
-
|
|
129
|
+
import { HtmlWidget } from '@paydock/client-sdk';
|
|
130
|
+
|
|
127
131
|
var widget = new HtmlWidget('#widget', 'publicKey');
|
|
128
132
|
widget.load();
|
|
129
133
|
```
|
|
@@ -131,7 +135,7 @@ widget.load();
|
|
|
131
135
|
Then write only need 2 lines of code in js to initialize widget
|
|
132
136
|
|
|
133
137
|
|
|
134
|
-
### Full example
|
|
138
|
+
### Full example
|
|
135
139
|
|
|
136
140
|
```html
|
|
137
141
|
<!DOCTYPE html>
|
|
@@ -194,9 +198,9 @@ widget.setFormFields(['phone', 'email']); // add additional fields for form of w
|
|
|
194
198
|
widget.setSupportedCardIcons(['mastercard', 'visa']); // add icons of supported card types
|
|
195
199
|
```
|
|
196
200
|
|
|
197
|
-
This example shows how you can use a lot of other methods to settings your form
|
|
201
|
+
This example shows how you can use a lot of other methods to settings your form
|
|
198
202
|
|
|
199
|
-
### Full example
|
|
203
|
+
### Full example
|
|
200
204
|
|
|
201
205
|
```html
|
|
202
206
|
<!DOCTYPE html>
|
|
@@ -217,12 +221,12 @@ This example shows how you can use a lot of other methods to settings your form
|
|
|
217
221
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.js" ></script>
|
|
218
222
|
<script>
|
|
219
223
|
var widget = new paydock.HtmlWidget('#widget', 'publicKey', 'gatewayId');
|
|
220
|
-
|
|
224
|
+
|
|
221
225
|
widget.setSupportedCardIcons(['mastercard', 'visa']);
|
|
222
226
|
widget.setFormFields(['phone', 'email']);
|
|
223
227
|
widget.setRefId('custom-ref-id');
|
|
224
228
|
widget.onFinishInsert('input[name="payment_source_token"]', 'payment_source');z
|
|
225
|
-
|
|
229
|
+
|
|
226
230
|
widget.load();
|
|
227
231
|
</script>
|
|
228
232
|
</script>
|
|
@@ -639,7 +643,7 @@ Class Widget include method for working on html and include extended by HtmlMult
|
|
|
639
643
|
* [.setFormValues(fieldValues)](#user-content-w_MultiWidget+setFormValues)
|
|
640
644
|
* [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
|
|
641
645
|
* [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
|
|
642
|
-
* [.setIcons()](#user-content-w_MultiWidget+setIcons)
|
|
646
|
+
* ~~[.setIcons()](#user-content-w_MultiWidget+setIcons)~~
|
|
643
647
|
* [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
|
|
644
648
|
* [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
|
|
645
649
|
* [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
|
|
@@ -1194,15 +1198,13 @@ widget.setFormPlaceholders({
|
|
|
1194
1198
|
```
|
|
1195
1199
|
<a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons"> </a>
|
|
1196
1200
|
|
|
1197
|
-
### htmlWidget.setIcons()
|
|
1201
|
+
### ~~htmlWidget.setIcons()~~
|
|
1202
|
+
***Deprecated***
|
|
1203
|
+
|
|
1198
1204
|
The method to change the widget icons
|
|
1199
1205
|
|
|
1200
1206
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
1201
1207
|
**Overrides**: [<code>setIcons</code>](#user-content-w_MultiWidget+setIcons)
|
|
1202
|
-
**Todo**
|
|
1203
|
-
|
|
1204
|
-
- [ ] DEPRECATED
|
|
1205
|
-
|
|
1206
1208
|
<a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements"> </a>
|
|
1207
1209
|
|
|
1208
1210
|
### htmlWidget.setHiddenElements(elements)
|
|
@@ -1355,7 +1357,7 @@ Class HtmlMultiWidget include method for working with html
|
|
|
1355
1357
|
* [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
|
|
1356
1358
|
* [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
|
|
1357
1359
|
* [.setFormElements(elements)](#user-content-w_MultiWidget+setFormElements)
|
|
1358
|
-
* [.setIcons()](#user-content-w_MultiWidget+setIcons)
|
|
1360
|
+
* ~~[.setIcons()](#user-content-w_MultiWidget+setIcons)~~
|
|
1359
1361
|
* [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
|
|
1360
1362
|
* [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
|
|
1361
1363
|
* [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
|
|
@@ -1812,15 +1814,13 @@ widget.setFormElements([
|
|
|
1812
1814
|
```
|
|
1813
1815
|
<a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons"> </a>
|
|
1814
1816
|
|
|
1815
|
-
### htmlMultiWidget.setIcons()
|
|
1817
|
+
### ~~htmlMultiWidget.setIcons()~~
|
|
1818
|
+
***Deprecated***
|
|
1819
|
+
|
|
1816
1820
|
The method to change the widget icons
|
|
1817
1821
|
|
|
1818
1822
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1819
1823
|
**Overrides**: [<code>setIcons</code>](#user-content-w_MultiWidget+setIcons)
|
|
1820
|
-
**Todo**
|
|
1821
|
-
|
|
1822
|
-
- [ ] DEPRECATED
|
|
1823
|
-
|
|
1824
1824
|
<a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements"> </a>
|
|
1825
1825
|
|
|
1826
1826
|
### htmlMultiWidget.setHiddenElements(elements)
|
|
@@ -2133,7 +2133,7 @@ Class MultiWidget include method for for creating iframe url
|
|
|
2133
2133
|
* [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
|
|
2134
2134
|
* [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
|
|
2135
2135
|
* [.setFormElements(elements)](#user-content-w_MultiWidget+setFormElements)
|
|
2136
|
-
* [.setIcons()](#user-content-w_MultiWidget+setIcons)
|
|
2136
|
+
* ~~[.setIcons()](#user-content-w_MultiWidget+setIcons)~~
|
|
2137
2137
|
* [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
|
|
2138
2138
|
* [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
|
|
2139
2139
|
* [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
|
|
@@ -2359,14 +2359,12 @@ widget.setFormElements([
|
|
|
2359
2359
|
```
|
|
2360
2360
|
<a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons"> </a>
|
|
2361
2361
|
|
|
2362
|
-
### multiWidget.setIcons()
|
|
2362
|
+
### ~~multiWidget.setIcons()~~
|
|
2363
|
+
***Deprecated***
|
|
2364
|
+
|
|
2363
2365
|
The method to change the widget icons
|
|
2364
2366
|
|
|
2365
2367
|
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
2366
|
-
**Todo**
|
|
2367
|
-
|
|
2368
|
-
- [ ] DEPRECATED
|
|
2369
|
-
|
|
2370
2368
|
<a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements"> </a>
|
|
2371
2369
|
|
|
2372
2370
|
### multiWidget.setHiddenElements(elements)
|
|
@@ -2710,10 +2708,10 @@ var list = new paydock.HtmlPaymentSourceWidget('#list', 'publicKey', 'queryToken
|
|
|
2710
2708
|
list.load();
|
|
2711
2709
|
```
|
|
2712
2710
|
|
|
2713
|
-
```javascript
|
|
2711
|
+
```javascript
|
|
2714
2712
|
// ES2015 | TypeScript
|
|
2715
2713
|
|
|
2716
|
-
import { HtmlPaymentSourceWidget } from '@paydock/client-sdk
|
|
2714
|
+
import { HtmlPaymentSourceWidget } from '@paydock/client-sdk';
|
|
2717
2715
|
|
|
2718
2716
|
var list = new HtmlPaymentSourceWidget('#list', 'publicKey', 'queryToken');
|
|
2719
2717
|
list.load();
|
|
@@ -3426,7 +3424,7 @@ You must create a button to turn it into checkout-button
|
|
|
3426
3424
|
var button = new paydock.PaypalCheckoutButton('#button', 'publicKey', 'gatewayId');
|
|
3427
3425
|
```
|
|
3428
3426
|
|
|
3429
|
-
```javascript
|
|
3427
|
+
```javascript
|
|
3430
3428
|
// ES2015 | TypeScript
|
|
3431
3429
|
|
|
3432
3430
|
|
|
@@ -4569,11 +4567,11 @@ This wrapper helps you to work with paydock api emdpoints
|
|
|
4569
4567
|
var browserDetails = await new paydock.Api('publicKey').setEnv('env').getBrowserDetails();
|
|
4570
4568
|
```
|
|
4571
4569
|
|
|
4572
|
-
```javascript
|
|
4570
|
+
```javascript
|
|
4573
4571
|
// ES2015 | TypeScript
|
|
4574
4572
|
|
|
4575
|
-
import { Api } from '@paydock/client-sdk
|
|
4576
|
-
|
|
4573
|
+
import { Api } from '@paydock/client-sdk';
|
|
4574
|
+
|
|
4577
4575
|
var browserDetails = await new paydock.Api('publicKey').setEnv('env').getBrowserDetails();
|
|
4578
4576
|
```
|
|
4579
4577
|
|
|
@@ -4586,11 +4584,11 @@ var response = await new paydock.Api('publicKey').setEnv('env').charge().preAuth
|
|
|
4586
4584
|
});
|
|
4587
4585
|
```
|
|
4588
4586
|
|
|
4589
|
-
```javascript
|
|
4587
|
+
```javascript
|
|
4590
4588
|
// ES2015 | TypeScript
|
|
4591
4589
|
|
|
4592
|
-
import { Api } from '@paydock/client-sdk
|
|
4593
|
-
|
|
4590
|
+
import { Api } from '@paydock/client-sdk';
|
|
4591
|
+
|
|
4594
4592
|
var response = await new Api('publicKey').setEnv('env').charge().preAuth({
|
|
4595
4593
|
amount: 100,
|
|
4596
4594
|
currency: 'AUD',
|
|
@@ -4600,7 +4598,7 @@ var response = await new Api('publicKey').setEnv('env').charge().preAuth({
|
|
|
4600
4598
|
|
|
4601
4599
|
Then write only need 2 lines of code in js to make request
|
|
4602
4600
|
|
|
4603
|
-
### Initialization full example
|
|
4601
|
+
### Initialization full example
|
|
4604
4602
|
|
|
4605
4603
|
```html
|
|
4606
4604
|
<!DOCTYPE html>
|
|
@@ -4647,10 +4645,10 @@ var canvas3ds = new paydock.Canvas3ds('#widget', 'token');
|
|
|
4647
4645
|
canvas3ds.load();
|
|
4648
4646
|
```
|
|
4649
4647
|
|
|
4650
|
-
```javascript
|
|
4648
|
+
```javascript
|
|
4651
4649
|
// ES2015 | TypeScript
|
|
4652
4650
|
|
|
4653
|
-
import { Canvas3ds } from '@paydock/client-sdk
|
|
4651
|
+
import { Canvas3ds } from '@paydock/client-sdk';
|
|
4654
4652
|
|
|
4655
4653
|
var list = new Canvas3ds('#widget', 'token');
|
|
4656
4654
|
list.load();
|
|
@@ -4871,7 +4869,7 @@ After you initialized the standalone 3ds charge via `v1/charges/standalone-3ds`
|
|
|
4871
4869
|
## Vault Display Widget
|
|
4872
4870
|
You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#vault-display-widget)
|
|
4873
4871
|
|
|
4874
|
-
The vault display form allows viewing card number and CVV. The form can be customised according to your needs.
|
|
4872
|
+
The vault display form allows viewing card number and CVV. The form can be customised according to your needs.
|
|
4875
4873
|
You can set styles as well as subscribe to widget events that help monitor user’s actions in real time.
|
|
4876
4874
|
|
|
4877
4875
|
## Vault Display Widget simple example
|
|
@@ -4891,18 +4889,18 @@ var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
|
4891
4889
|
widget.load();
|
|
4892
4890
|
```
|
|
4893
4891
|
|
|
4894
|
-
```javascript
|
|
4892
|
+
```javascript
|
|
4895
4893
|
// ES2015 | TypeScript
|
|
4896
4894
|
|
|
4897
|
-
import { VaultDisplayWidget } from '@paydock/client-sdk
|
|
4898
|
-
|
|
4895
|
+
import { VaultDisplayWidget } from '@paydock/client-sdk';
|
|
4896
|
+
|
|
4899
4897
|
var widget = new VaultDisplayWidget('#widget', 'token');
|
|
4900
4898
|
widget.load();
|
|
4901
4899
|
```
|
|
4902
4900
|
|
|
4903
4901
|
Then write only need 2 lines of code in js to initialize widget
|
|
4904
4902
|
|
|
4905
|
-
### Full example
|
|
4903
|
+
### Full example
|
|
4906
4904
|
|
|
4907
4905
|
```html
|
|
4908
4906
|
<!DOCTYPE html>
|
|
@@ -4913,9 +4911,9 @@ Then write only need 2 lines of code in js to initialize widget
|
|
|
4913
4911
|
<style>iframe {border: 0;width: 100%;height: 300px;}</style>
|
|
4914
4912
|
</head>
|
|
4915
4913
|
<body>
|
|
4916
|
-
|
|
4914
|
+
|
|
4917
4915
|
<div id="widget"></div>
|
|
4918
|
-
|
|
4916
|
+
|
|
4919
4917
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
4920
4918
|
<script>
|
|
4921
4919
|
var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
@@ -4953,9 +4951,9 @@ widget.setStyles({
|
|
|
4953
4951
|
});
|
|
4954
4952
|
```
|
|
4955
4953
|
|
|
4956
|
-
This example shows how you can use a lot of other methods to settings your form
|
|
4954
|
+
This example shows how you can use a lot of other methods to settings your form
|
|
4957
4955
|
|
|
4958
|
-
### Full example
|
|
4956
|
+
### Full example
|
|
4959
4957
|
|
|
4960
4958
|
```html
|
|
4961
4959
|
<!DOCTYPE html>
|
|
@@ -4966,27 +4964,27 @@ This example shows how you can use a lot of other methods to settings your form
|
|
|
4966
4964
|
<style>iframe {border: 0;width: 40%;height: 450px;}</style>
|
|
4967
4965
|
</head>
|
|
4968
4966
|
<body>
|
|
4969
|
-
|
|
4967
|
+
|
|
4970
4968
|
<div id="widget"></div>
|
|
4971
|
-
|
|
4969
|
+
|
|
4972
4970
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
4973
4971
|
<script>
|
|
4974
4972
|
var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
4975
4973
|
|
|
4976
4974
|
widget.setEnv('sandbox');
|
|
4977
|
-
|
|
4975
|
+
|
|
4978
4976
|
widget.on('after_load', function (data) {
|
|
4979
4977
|
console.log(data);
|
|
4980
4978
|
});
|
|
4981
|
-
|
|
4979
|
+
|
|
4982
4980
|
widget.on('cvv_secure_code_requested', function (data) {
|
|
4983
4981
|
console.log(data);
|
|
4984
4982
|
});
|
|
4985
|
-
|
|
4983
|
+
|
|
4986
4984
|
widget.on('card_number_secure_code_requested', function (data) {
|
|
4987
4985
|
console.log(data);
|
|
4988
4986
|
});
|
|
4989
|
-
|
|
4987
|
+
|
|
4990
4988
|
widget.setStyles({
|
|
4991
4989
|
background_color: 'rgb(0, 0, 0)',
|
|
4992
4990
|
border_color: 'yellow',
|
|
@@ -5130,7 +5128,7 @@ let button = new paydock.WalletButtons(
|
|
|
5130
5128
|
button.load();
|
|
5131
5129
|
```
|
|
5132
5130
|
|
|
5133
|
-
```javascript
|
|
5131
|
+
```javascript
|
|
5134
5132
|
// ES2015 | TypeScript
|
|
5135
5133
|
import { WalletButtons } from '@paydock/client-sdk';
|
|
5136
5134
|
|
|
@@ -5155,7 +5153,7 @@ let button = new paydock.WalletButtons(
|
|
|
5155
5153
|
button.load();
|
|
5156
5154
|
```
|
|
5157
5155
|
|
|
5158
|
-
```javascript
|
|
5156
|
+
```javascript
|
|
5159
5157
|
// ES2015 | TypeScript
|
|
5160
5158
|
import { WalletButtons } from '@paydock/client-sdk';
|
|
5161
5159
|
|
|
@@ -5179,7 +5177,7 @@ let button = new paydock.WalletButtons(
|
|
|
5179
5177
|
button.load();
|
|
5180
5178
|
```
|
|
5181
5179
|
|
|
5182
|
-
```javascript
|
|
5180
|
+
```javascript
|
|
5183
5181
|
// ES2015 | TypeScript
|
|
5184
5182
|
import { WalletButtons } from '@paydock/client-sdk';
|
|
5185
5183
|
|
|
@@ -5248,14 +5246,6 @@ In some situations you may want to forcibly close the checkout so that your user
|
|
|
5248
5246
|
button.close();
|
|
5249
5247
|
```
|
|
5250
5248
|
|
|
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
5249
|
### Performing actions when shipping info is updated
|
|
5260
5250
|
|
|
5261
5251
|
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 +5373,30 @@ _(Required `meta` fields: - . Optional `meta` fields: `request_shipping`, `pay_l
|
|
|
5383
5373
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
5384
5374
|
<script>
|
|
5385
5375
|
let button = new paydock.WalletButtons(
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5376
|
+
"#widget",
|
|
5377
|
+
charge_token,
|
|
5378
|
+
{
|
|
5379
|
+
request_shipping: true,
|
|
5380
|
+
pay_later: true,
|
|
5381
|
+
standalone: false,
|
|
5382
|
+
style: {
|
|
5383
|
+
layout: 'horizontal',
|
|
5384
|
+
color: 'blue',
|
|
5385
|
+
shape: 'rect',
|
|
5386
|
+
label: 'paypal',
|
|
5387
|
+
},
|
|
5388
|
+
}
|
|
5389
|
+
);
|
|
5400
5390
|
button.setEnv('sandbox');
|
|
5401
5391
|
button.onUnavailable(() => console.log("No wallet buttons available"));
|
|
5402
5392
|
button.onUpdate((data) => {
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5393
|
+
console.log("Updating amount via a backend to backend call to POST charges/:id");
|
|
5394
|
+
// call `POST charges/:id` to modify charge
|
|
5395
|
+
button.update({ success: true });
|
|
5396
|
+
});
|
|
5407
5397
|
button.onPaymentSuccessful((data) => console.log("The payment was successful"));
|
|
5408
5398
|
button.onPaymentError((data) => console.log("The payment was not successful"));
|
|
5409
5399
|
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
5400
|
button.load();
|
|
5432
5401
|
</script>
|
|
5433
5402
|
</html>
|
|
@@ -5561,7 +5530,6 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `ra
|
|
|
5561
5530
|
button.onUnavailable(() => console.log("No wallet buttons available"));
|
|
5562
5531
|
button.onPaymentSuccessful((data) => console.log("The payment was successful"));
|
|
5563
5532
|
button.onPaymentError((data) => console.log("The payment was not successful"));
|
|
5564
|
-
button.onClick(() => console.log("On WalletButton Click"));
|
|
5565
5533
|
button.onUpdate((data) => {
|
|
5566
5534
|
console.log("Updating amount via a backend to backend call to POST charges/:id");
|
|
5567
5535
|
// call `POST charges/:id` to modify charge
|
|
@@ -5594,6 +5562,7 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `ra
|
|
|
5594
5562
|
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
5563
|
|
|
5596
5564
|
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.
|
|
5565
|
+
|
|
5597
5566
|
### ApplePay and GooglePay via MPGS Raw data initialization example
|
|
5598
5567
|
|
|
5599
5568
|
```html
|
|
@@ -5725,24 +5694,6 @@ Similarly, for **GooglePay via MPGS** you can initialize the `PaymentMethodSpeci
|
|
|
5725
5694
|
## Interfaces
|
|
5726
5695
|
|
|
5727
5696
|
<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
5697
|
<dt><a href="#IWalletMeta">IWalletMeta</a> : <code>object</code></dt>
|
|
5747
5698
|
<dd><p>Interface of data used by the wallet checkout and payment proccess.</p>
|
|
5748
5699
|
</dd>
|
|
@@ -5757,100 +5708,6 @@ Similarly, for **GooglePay via MPGS** you can initialize the `PaymentMethodSpeci
|
|
|
5757
5708
|
</dd>
|
|
5758
5709
|
</dl>
|
|
5759
5710
|
|
|
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
5711
|
<a name="IWalletMeta" id="IWalletMeta" href="#IWalletMeta"> </a>
|
|
5855
5712
|
|
|
5856
5713
|
## IWalletMeta : <code>object</code>
|
|
@@ -5935,19 +5792,14 @@ Class WalletButtons to work with different E-Wallets within html (currently supp
|
|
|
5935
5792
|
* [.load()](#WalletButtons+load)
|
|
5936
5793
|
* [.update()](#WalletButtons+update)
|
|
5937
5794
|
* [.setEnv(env, [alias])](#WalletButtons+setEnv)
|
|
5938
|
-
* [.enable()](#WalletButtons+enable)
|
|
5939
|
-
* [.disable()](#WalletButtons+disable)
|
|
5940
5795
|
* [.close()](#WalletButtons+close)
|
|
5941
|
-
* [.on(eventName, [cb])](#WalletButtons+on) ⇒
|
|
5796
|
+
* [.on(eventName, [cb])](#WalletButtons+on) ⇒ <code>Promise.<IEventData></code> \| <code>void</code>
|
|
5942
5797
|
* [.onUnavailable([handler])](#WalletButtons+onUnavailable)
|
|
5943
5798
|
* [.onUpdate([handler])](#WalletButtons+onUpdate)
|
|
5944
5799
|
* [.onPaymentSuccessful([handler])](#WalletButtons+onPaymentSuccessful)
|
|
5945
5800
|
* [.onPaymentInReview([handler])](#WalletButtons+onPaymentInReview)
|
|
5946
5801
|
* [.onPaymentError([handler])](#WalletButtons+onPaymentError)
|
|
5947
5802
|
* [.onAuthTokensChanged([handler])](#WalletButtons+onAuthTokensChanged)
|
|
5948
|
-
* [.onClick(handler)](#WalletButtons+onClick)
|
|
5949
|
-
* [.onCheckoutOpen(handler)](#WalletButtons+onCheckoutOpen)
|
|
5950
|
-
* [.onCheckoutClose(handler)](#WalletButtons+onCheckoutClose)
|
|
5951
5803
|
|
|
5952
5804
|
<a name="new_WalletButtons_new" id="new_WalletButtons_new" href="#new_WalletButtons_new"> </a>
|
|
5953
5805
|
|
|
@@ -6058,26 +5910,6 @@ Bear in mind that you must set an environment before calling `button.load()`.
|
|
|
6058
5910
|
```js
|
|
6059
5911
|
button.setEnv('production', 'paydock.com');
|
|
6060
5912
|
```
|
|
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
5913
|
<a name="WalletButtons+close" id="WalletButtons+close" href="#WalletButtons+close"> </a>
|
|
6082
5914
|
|
|
6083
5915
|
### walletButtons.close()
|
|
@@ -6090,7 +5922,7 @@ button.close();
|
|
|
6090
5922
|
```
|
|
6091
5923
|
<a name="WalletButtons+on" id="WalletButtons+on" href="#WalletButtons+on"> </a>
|
|
6092
5924
|
|
|
6093
|
-
### walletButtons.on(eventName, [cb]) ⇒
|
|
5925
|
+
### walletButtons.on(eventName, [cb]) ⇒ <code>Promise.<IEventData></code> \| <code>void</code>
|
|
6094
5926
|
Listen to events of button. `unavailable` returns no data, `paymentSuccessful` returns IWalletPaymentSuccessful
|
|
6095
5927
|
for Stripe or full response for Flypay, and `paymentError` an error.
|
|
6096
5928
|
|
|
@@ -6253,63 +6085,6 @@ button.onAuthTokensChanged().then((eventData) => {
|
|
|
6253
6085
|
console.log('Authentication tokens changed:', eventData);
|
|
6254
6086
|
});
|
|
6255
6087
|
```
|
|
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
6088
|
<a name="EVENT" id="EVENT" href="#EVENT"> </a>
|
|
6314
6089
|
|
|
6315
6090
|
## EVENT : <code>object</code>
|
|
@@ -6323,7 +6098,6 @@ List of available event's name in the wallet button lifecycle
|
|
|
6323
6098
|
| UPDATE | <code>string</code> | <code>"update"</code> |
|
|
6324
6099
|
| PAYMENT_SUCCESSFUL | <code>string</code> | <code>"paymentSuccessful"</code> |
|
|
6325
6100
|
| PAYMENT_ERROR | <code>string</code> | <code>"paymentError"</code> |
|
|
6326
|
-
| ON_CLICK | <code>string</code> | <code>"onClick"</code> |
|
|
6327
6101
|
|
|
6328
6102
|
|
|
6329
6103
|
## Secure Remote Commerce
|
|
@@ -6355,7 +6129,7 @@ var src = new paydock.SRC(
|
|
|
6355
6129
|
src.load();
|
|
6356
6130
|
```
|
|
6357
6131
|
|
|
6358
|
-
```javascript
|
|
6132
|
+
```javascript
|
|
6359
6133
|
// ES2015 | TypeScript
|
|
6360
6134
|
|
|
6361
6135
|
import { SRC } from '@paydock/client-sdk';
|