@paydock/client-sdk 1.103.1 → 1.104.1-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +102 -104
- package/bundles/index.cjs +10674 -0
- package/bundles/index.cjs.d.ts +3163 -0
- package/bundles/index.cjs.map +1 -0
- package/bundles/index.mjs +10642 -0
- package/bundles/index.mjs.d.ts +3163 -0
- package/bundles/index.mjs.map +1 -0
- package/{lib → bundles/types}/api/api-base.d.ts +2 -1
- package/bundles/types/api/api-base.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api-charge-internal.d.ts +1 -0
- package/bundles/types/api/api-charge-internal.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api-charge.d.ts +1 -0
- package/bundles/types/api/api-charge.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api-internal.d.ts +1 -0
- package/bundles/types/api/api-internal.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api-service-internal.d.ts +1 -0
- package/bundles/types/api/api-service-internal.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api.d.ts +1 -0
- package/bundles/types/api/api.d.ts.map +1 -0
- package/bundles/types/api/index.d.ts +2 -0
- package/bundles/types/api/index.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/canvas-3ds.d.ts +1 -0
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/index.d.ts +1 -0
- package/bundles/types/canvas-3ds/index.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/services/gpayments-service.d.ts +1 -0
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/services/index.d.ts +1 -0
- package/bundles/types/canvas-3ds/services/index.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/services/standalone3ds-service.d.ts +1 -0
- package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -0
- package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/afterpay/afterpay.runner.d.ts +1 -0
- package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/checkout-button.d.ts +1 -0
- package/bundles/types/checkout-button/checkout-button.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/checkout-button.interface.d.ts +1 -0
- package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/checkout-contextual-handler.d.ts +1 -0
- package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/index.d.ts +2 -1
- package/bundles/types/checkout-button/index.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/paypal/paypal-checkout-button.d.ts +1 -0
- package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/paypal/paypal.runner.d.ts +1 -0
- package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/base.runner.d.ts +4 -3
- package/bundles/types/checkout-button/runner/base.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/contextual.runner.d.ts +2 -1
- package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/index.d.ts +1 -0
- package/bundles/types/checkout-button/runner/index.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/popup.runner.d.ts +2 -1
- package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/redirect.runner.d.ts +2 -1
- package/bundles/types/checkout-button/runner/redirect.runner.d.ts.map +1 -0
- package/bundles/types/checkout-button/zipmoney/index.d.ts +4 -0
- package/bundles/types/checkout-button/zipmoney/index.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +2 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +2 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.config.d.ts +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.runner.d.ts +2 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.types.d.ts +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +1 -0
- package/{lib → bundles/types}/components/ability-guard.d.ts +1 -0
- package/bundles/types/components/ability-guard.d.ts.map +1 -0
- package/{lib → bundles/types}/components/background.d.ts +1 -0
- package/bundles/types/components/background.d.ts.map +1 -0
- package/{lib → bundles/types}/components/container.d.ts +1 -0
- package/bundles/types/components/container.d.ts.map +1 -0
- package/{lib → bundles/types}/components/dispatcher.d.ts +2 -1
- package/bundles/types/components/dispatcher.d.ts.map +1 -0
- package/{lib → bundles/types}/components/element-style.d.ts +2 -1
- package/bundles/types/components/element-style.d.ts.map +1 -0
- package/{lib → bundles/types}/components/flypay-iframe-event.d.ts +1 -0
- package/bundles/types/components/flypay-iframe-event.d.ts.map +1 -0
- package/{lib → bundles/types}/components/form-Interceptor.d.ts +1 -0
- package/bundles/types/components/form-Interceptor.d.ts.map +1 -0
- package/{lib → bundles/types}/components/http-core.d.ts +1 -0
- package/bundles/types/components/http-core.d.ts.map +1 -0
- package/{lib → bundles/types}/components/iframe-event.d.ts +2 -0
- package/bundles/types/components/iframe-event.d.ts.map +1 -0
- package/{lib → bundles/types}/components/iframe.d.ts +1 -0
- package/bundles/types/components/iframe.d.ts.map +1 -0
- package/{lib → bundles/types}/components/link.d.ts +2 -1
- package/bundles/types/components/link.d.ts.map +1 -0
- package/{lib → bundles/types}/components/loader.d.ts +1 -0
- package/bundles/types/components/loader.d.ts.map +1 -0
- package/{lib → bundles/types}/components/param.d.ts +6 -5
- package/bundles/types/components/param.d.ts.map +1 -0
- package/{lib → bundles/types}/components/popup.d.ts +1 -0
- package/bundles/types/components/popup.d.ts.map +1 -0
- package/{lib → bundles/types}/components/storage-dispatcher.d.ts +1 -0
- package/bundles/types/components/storage-dispatcher.d.ts.map +1 -0
- package/{lib → bundles/types}/components/trigger.d.ts +1 -0
- package/bundles/types/components/trigger.d.ts.map +1 -0
- package/{lib → bundles/types}/components/vault-display-iframe-event.d.ts +1 -0
- package/bundles/types/components/vault-display-iframe-event.d.ts.map +1 -0
- package/{lib → bundles/types}/components/wallet-background.d.ts +1 -0
- package/bundles/types/components/wallet-background.d.ts.map +1 -0
- package/{lib → bundles/types}/components/wallet-trigger.d.ts +1 -0
- package/bundles/types/components/wallet-trigger.d.ts.map +1 -0
- package/bundles/types/configs/env/environment.cba.d.ts +29 -0
- package/bundles/types/configs/env/environment.cba.d.ts.map +1 -0
- package/bundles/types/configs/env/environment.interface.d.ts +12 -0
- package/bundles/types/configs/env/environment.interface.d.ts.map +1 -0
- package/{lib/configs/env/env.d.ts → bundles/types/configs/env/environment.paydock.d.ts} +5 -8
- package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -0
- package/bundles/types/configs/env/index.d.ts +3 -0
- package/bundles/types/configs/env/index.d.ts.map +1 -0
- package/{lib → bundles/types}/configs/sdk.d.ts +3 -2
- package/bundles/types/configs/sdk.d.ts.map +1 -0
- package/{lib → bundles/types}/external-checkout/builder.d.ts +1 -0
- package/bundles/types/external-checkout/builder.d.ts.map +1 -0
- package/{lib → bundles/types}/external-checkout/checker.d.ts +1 -0
- package/bundles/types/external-checkout/checker.d.ts.map +1 -0
- package/bundles/types/external-checkout/index.d.ts +3 -0
- package/bundles/types/external-checkout/index.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/access-token.d.ts +1 -0
- package/bundles/types/helper/access-token.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/browser.d.ts +1 -0
- package/bundles/types/helper/browser.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/event-emitter.d.ts +1 -0
- package/bundles/types/helper/event-emitter.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/event.d.ts +1 -0
- package/bundles/types/helper/event.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/ms.d.ts +1 -0
- package/bundles/types/helper/ms.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/object.d.ts +1 -0
- package/bundles/types/helper/object.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/url.d.ts +1 -0
- package/bundles/types/helper/url.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/uuid.d.ts +1 -0
- package/bundles/types/helper/uuid.d.ts.map +1 -0
- package/bundles/types/index-cba.d.ts +13 -0
- package/bundles/types/index-cba.d.ts.map +1 -0
- package/bundles/types/index.d.ts +14 -0
- package/bundles/types/index.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source/builder.d.ts +1 -0
- package/bundles/types/payment-source/builder.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source/index.d.ts +1 -0
- package/bundles/types/payment-source/index.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source-widget/html-payment-source-widget.d.ts +1 -0
- package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source-widget/index.d.ts +1 -0
- package/bundles/types/payment-source-widget/index.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source-widget/interfaces.d.ts +1 -0
- package/bundles/types/payment-source-widget/interfaces.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source-widget/payment-source-widget.d.ts +1 -0
- package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/index.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/interfaces.d.ts +6 -5
- package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/src-provider.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/helper.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/index.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/visa-src.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/secure-remote-commerce.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +1 -0
- package/{lib → bundles/types}/vault-display-widget/index.d.ts +1 -0
- package/bundles/types/vault-display-widget/index.d.ts.map +1 -0
- package/{lib → bundles/types}/vault-display-widget/vault-display-widget.d.ts +1 -0
- package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/afterpay.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/apple.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/flypay-v2.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/flypay.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/google.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/index-cba.d.ts +2 -0
- package/bundles/types/wallet-buttons/index-cba.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/index.d.ts +1 -0
- package/bundles/types/wallet-buttons/index.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/interfaces.d.ts +1 -0
- package/bundles/types/wallet-buttons/interfaces.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/mastercard.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/paypal.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/stripe.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/wallet-buttons.d.ts +1 -0
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts +330 -0
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/configuration.d.ts +2 -1
- package/bundles/types/widget/configuration.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/html-multi-widget.d.ts +1 -0
- package/bundles/types/widget/html-multi-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/html-widget.d.ts +1 -0
- package/bundles/types/widget/html-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/index.d.ts +2 -1
- package/bundles/types/widget/index.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/meta.d.ts +1 -0
- package/bundles/types/widget/meta.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/multi-widget.d.ts +2 -1
- package/bundles/types/widget/multi-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/style.d.ts +1 -0
- package/bundles/types/widget/style.d.ts.map +1 -0
- package/bundles/widget.umd.js +6813 -6963
- package/bundles/widget.umd.js.d.ts +3163 -0
- package/bundles/widget.umd.js.map +1 -0
- package/bundles/widget.umd.js.min.d.ts +3163 -0
- package/bundles/widget.umd.min.js +2 -1
- package/bundles/widget.umd.min.js.map +1 -0
- package/docs/api-canvas3ds.md +158 -0
- package/docs/api-checkout-button.md +912 -0
- package/docs/api-examples.md +65 -0
- package/docs/api-ps-widget.md +585 -0
- package/docs/api-vault-display.md +94 -0
- package/docs/api-widget.md +2444 -0
- package/docs/api-wrapper.md +78 -0
- package/docs/canvas3ds-examples.md +242 -0
- package/docs/cba-header.md +13 -0
- package/docs/cba-license.md +2 -0
- package/docs/checkout-examples.md +248 -0
- package/docs/header.md +15 -0
- package/docs/html/layout.html +78 -0
- package/docs/html/marked.js +23 -0
- package/docs/html/style.css +365 -0
- package/docs/install/npm.content.md +16 -0
- package/docs/install/npm.example.md +24 -0
- package/docs/install/umd.content.md +21 -0
- package/docs/install/umd.example.md +6 -0
- package/docs/install.md +53 -0
- package/docs/install.readme.t.md +17 -0
- package/docs/install.slate.t.md +17 -0
- package/docs/license.md +2 -0
- package/docs/partials/header.hbs +3 -0
- package/docs/ps-examples.md +129 -0
- package/docs/secure-remote-commerce-examples.md +258 -0
- package/docs/secure-remote-commerce.md +265 -0
- package/docs/vault-display-example.md +132 -0
- package/docs/wallet-buttons-examples.md +580 -0
- package/docs/wallet-buttons.md +424 -0
- package/docs/wallet-cba-buttons-examples.md +388 -0
- package/docs/widget-examples.md +134 -0
- package/package.json +164 -42
- package/slate.md +89 -88
- package/.nvmrc +0 -1
- package/api.d.ts +0 -1
- package/api.js +0 -1
- package/canvas3ds.d.ts +0 -1
- package/canvas3ds.js +0 -1
- package/checkout-button.d.ts +0 -1
- package/checkout-button.js +0 -1
- package/inicialization-guide.md +0 -7
- package/lib/api/api-base.js +0 -101
- package/lib/api/api-base.js.map +0 -1
- package/lib/api/api-charge-internal.js +0 -30
- package/lib/api/api-charge-internal.js.map +0 -1
- package/lib/api/api-charge.js +0 -49
- package/lib/api/api-charge.js.map +0 -1
- package/lib/api/api-internal.js +0 -13
- package/lib/api/api-internal.js.map +0 -1
- package/lib/api/api-service-internal.js +0 -18
- package/lib/api/api-service-internal.js.map +0 -1
- package/lib/api/api.js +0 -61
- package/lib/api/api.js.map +0 -1
- package/lib/api/index.d.ts +0 -1
- package/lib/api/index.js +0 -2
- package/lib/api/index.js.map +0 -1
- package/lib/canvas-3ds/canvas-3ds.js +0 -156
- package/lib/canvas-3ds/canvas-3ds.js.map +0 -1
- package/lib/canvas-3ds/index.js +0 -2
- package/lib/canvas-3ds/index.js.map +0 -1
- package/lib/canvas-3ds/services/gpayments-service.js +0 -181
- package/lib/canvas-3ds/services/gpayments-service.js.map +0 -1
- package/lib/canvas-3ds/services/index.js +0 -2
- package/lib/canvas-3ds/services/index.js.map +0 -1
- package/lib/canvas-3ds/services/standalone3ds-service.js +0 -32
- package/lib/canvas-3ds/services/standalone3ds-service.js.map +0 -1
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js +0 -49
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +0 -1
- package/lib/checkout-button/afterpay/afterpay.runner.js +0 -41
- package/lib/checkout-button/afterpay/afterpay.runner.js.map +0 -1
- package/lib/checkout-button/checkout-button.interface.js +0 -45
- package/lib/checkout-button/checkout-button.interface.js.map +0 -1
- package/lib/checkout-button/checkout-button.js +0 -265
- package/lib/checkout-button/checkout-button.js.map +0 -1
- package/lib/checkout-button/checkout-contextual-handler.js +0 -75
- package/lib/checkout-button/checkout-contextual-handler.js.map +0 -1
- package/lib/checkout-button/index.js +0 -85
- package/lib/checkout-button/index.js.map +0 -1
- package/lib/checkout-button/paypal/paypal-checkout-button.js +0 -24
- package/lib/checkout-button/paypal/paypal-checkout-button.js.map +0 -1
- package/lib/checkout-button/paypal/paypal.runner.js +0 -14
- package/lib/checkout-button/paypal/paypal.runner.js.map +0 -1
- package/lib/checkout-button/runner/base.runner.js +0 -13
- package/lib/checkout-button/runner/base.runner.js.map +0 -1
- package/lib/checkout-button/runner/contextual.runner.js +0 -40
- package/lib/checkout-button/runner/contextual.runner.js.map +0 -1
- package/lib/checkout-button/runner/index.js +0 -11
- package/lib/checkout-button/runner/index.js.map +0 -1
- package/lib/checkout-button/runner/popup.runner.js +0 -68
- package/lib/checkout-button/runner/popup.runner.js.map +0 -1
- package/lib/checkout-button/runner/redirect.runner.js +0 -15
- package/lib/checkout-button/runner/redirect.runner.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +0 -63
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js +0 -78
- package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js +0 -49
- package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.config.js +0 -4
- package/lib/checkout-button/zipmoney/zipmoney.config.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.runner.js +0 -23
- package/lib/checkout-button/zipmoney/zipmoney.runner.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.types.js +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.types.js.map +0 -1
- package/lib/components/ability-guard.js +0 -44
- package/lib/components/ability-guard.js.map +0 -1
- package/lib/components/background.js +0 -193
- package/lib/components/background.js.map +0 -1
- package/lib/components/container.js +0 -60
- package/lib/components/container.js.map +0 -1
- package/lib/components/dispatcher.js +0 -39
- package/lib/components/dispatcher.js.map +0 -1
- package/lib/components/element-style.js +0 -52
- package/lib/components/element-style.js.map +0 -1
- package/lib/components/flypay-iframe-event.js +0 -28
- package/lib/components/flypay-iframe-event.js.map +0 -1
- package/lib/components/form-Interceptor.js +0 -38
- package/lib/components/form-Interceptor.js.map +0 -1
- package/lib/components/http-core.js +0 -57
- package/lib/components/http-core.js.map +0 -1
- package/lib/components/iframe-event.js +0 -84
- package/lib/components/iframe-event.js.map +0 -1
- package/lib/components/iframe.js +0 -62
- package/lib/components/iframe.js.map +0 -1
- package/lib/components/link.js +0 -59
- package/lib/components/link.js.map +0 -1
- package/lib/components/loader.js +0 -234
- package/lib/components/loader.js.map +0 -1
- package/lib/components/param.js +0 -147
- package/lib/components/param.js.map +0 -1
- package/lib/components/popup.js +0 -104
- package/lib/components/popup.js.map +0 -1
- package/lib/components/storage-dispatcher.js +0 -75
- package/lib/components/storage-dispatcher.js.map +0 -1
- package/lib/components/trigger.js +0 -49
- package/lib/components/trigger.js.map +0 -1
- package/lib/components/vault-display-iframe-event.js +0 -27
- package/lib/components/vault-display-iframe-event.js.map +0 -1
- package/lib/components/wallet-background.js +0 -60
- package/lib/components/wallet-background.js.map +0 -1
- package/lib/components/wallet-trigger.js +0 -27
- package/lib/components/wallet-trigger.js.map +0 -1
- package/lib/configs/env/env.js +0 -117
- package/lib/configs/env/env.js.map +0 -1
- package/lib/configs/sdk.js +0 -16
- package/lib/configs/sdk.js.map +0 -1
- package/lib/external-checkout/builder.js +0 -45
- package/lib/external-checkout/builder.js.map +0 -1
- package/lib/external-checkout/checker.js +0 -22
- package/lib/external-checkout/checker.js.map +0 -1
- package/lib/external-checkout/index.d.ts +0 -2
- package/lib/external-checkout/index.js +0 -3
- package/lib/external-checkout/index.js.map +0 -1
- package/lib/helper/access-token.js +0 -44
- package/lib/helper/access-token.js.map +0 -1
- package/lib/helper/browser.js +0 -79
- package/lib/helper/browser.js.map +0 -1
- package/lib/helper/event-emitter.js +0 -23
- package/lib/helper/event-emitter.js.map +0 -1
- package/lib/helper/event.js +0 -23
- package/lib/helper/event.js.map +0 -1
- package/lib/helper/ms.js +0 -32
- package/lib/helper/ms.js.map +0 -1
- package/lib/helper/object.js +0 -6
- package/lib/helper/object.js.map +0 -1
- package/lib/helper/url.js +0 -11
- package/lib/helper/url.js.map +0 -1
- package/lib/helper/uuid.js +0 -26
- package/lib/helper/uuid.js.map +0 -1
- package/lib/index.d.ts +0 -15
- package/lib/index.js +0 -15
- package/lib/index.js.map +0 -1
- package/lib/payment-source/builder.js +0 -49
- package/lib/payment-source/builder.js.map +0 -1
- package/lib/payment-source/index.js +0 -2
- package/lib/payment-source/index.js.map +0 -1
- package/lib/payment-source-widget/html-payment-source-widget.js +0 -167
- package/lib/payment-source-widget/html-payment-source-widget.js.map +0 -1
- package/lib/payment-source-widget/index.js +0 -35
- package/lib/payment-source-widget/index.js.map +0 -1
- package/lib/payment-source-widget/interfaces.js +0 -2
- package/lib/payment-source-widget/interfaces.js.map +0 -1
- package/lib/payment-source-widget/payment-source-widget.js +0 -141
- package/lib/payment-source-widget/payment-source-widget.js.map +0 -1
- package/lib/secure-remote-commerce/index.js +0 -2
- package/lib/secure-remote-commerce/index.js.map +0 -1
- package/lib/secure-remote-commerce/interfaces.js +0 -28
- package/lib/secure-remote-commerce/interfaces.js.map +0 -1
- package/lib/secure-remote-commerce/providers/src-provider.js +0 -1
- package/lib/secure-remote-commerce/providers/src-provider.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/helper.js +0 -36
- package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/index.js +0 -2
- package/lib/secure-remote-commerce/providers/visa-src/index.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +0 -113
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +0 -10
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +0 -1
- package/lib/secure-remote-commerce/secure-remote-commerce.js +0 -238
- package/lib/secure-remote-commerce/secure-remote-commerce.js.map +0 -1
- package/lib/vault-display-widget/index.js +0 -14
- package/lib/vault-display-widget/index.js.map +0 -1
- package/lib/vault-display-widget/vault-display-widget.js +0 -98
- package/lib/vault-display-widget/vault-display-widget.js.map +0 -1
- package/lib/wallet-buttons/afterpay.wallet-service.js +0 -152
- package/lib/wallet-buttons/afterpay.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/apple.wallet-service.js +0 -291
- package/lib/wallet-buttons/apple.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/flypay-v2.wallet-service.js +0 -192
- package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/flypay.wallet-service.js +0 -117
- package/lib/wallet-buttons/flypay.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/google.wallet-service.js +0 -268
- package/lib/wallet-buttons/google.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/index.js +0 -2
- package/lib/wallet-buttons/index.js.map +0 -1
- package/lib/wallet-buttons/interfaces.js +0 -1
- package/lib/wallet-buttons/interfaces.js.map +0 -1
- package/lib/wallet-buttons/mastercard.wallet-service.js +0 -27
- package/lib/wallet-buttons/mastercard.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/paypal.wallet-service.js +0 -129
- package/lib/wallet-buttons/paypal.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/stripe.wallet-service.js +0 -100
- package/lib/wallet-buttons/stripe.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/wallet-buttons.js +0 -454
- package/lib/wallet-buttons/wallet-buttons.js.map +0 -1
- package/lib/wallet-buttons/wallet-service.js +0 -49
- package/lib/wallet-buttons/wallet-service.js.map +0 -1
- package/lib/widget/configuration.js +0 -259
- package/lib/widget/configuration.js.map +0 -1
- package/lib/widget/html-multi-widget.js +0 -380
- package/lib/widget/html-multi-widget.js.map +0 -1
- package/lib/widget/html-widget.js +0 -126
- package/lib/widget/html-widget.js.map +0 -1
- package/lib/widget/index.js +0 -132
- package/lib/widget/index.js.map +0 -1
- package/lib/widget/meta.js +0 -8
- package/lib/widget/meta.js.map +0 -1
- package/lib/widget/multi-widget.js +0 -436
- package/lib/widget/multi-widget.js.map +0 -1
- package/lib/widget/style.js +0 -204
- package/lib/widget/style.js.map +0 -1
- package/payment-source-widget.d.ts +0 -1
- package/payment-source-widget.js +0 -1
- package/tslint.json +0 -130
- package/typings/globals/@auspayplus/open-payments-checkout/index.d.ts +0 -43
- package/typings/globals/jasmine/index.d.ts +0 -576
- package/typings/globals/jasmine-ajax/index.d.ts +0 -83
- package/typings/globals/jquery/index.d.ts +0 -3759
- package/typings/index.d.ts +0 -4
- package/vault-display-widget.d.ts +0 -1
- package/vault-display-widget.js +0 -1
- package/vendors/zipmoney.d.ts +0 -18
- package/vendors/zipmoney.js +0 -2
- package/widget.d.ts +0 -1
- package/widget.js +0 -1
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
## Classes
|
|
2
|
+
|
|
3
|
+
<dl>
|
|
4
|
+
<dt><a href="#WalletButtons">WalletButtons</a></dt>
|
|
5
|
+
<dd><p>Class WalletButtons to work with different E-Wallets within html (currently supports Apple Pay, Google Pay, Google Pay™ and Apple Pay via Stripe, Flypay, Flypay V2, Paypal, Afterpay)</p>
|
|
6
|
+
</dd>
|
|
7
|
+
</dl>
|
|
8
|
+
|
|
9
|
+
## Constants
|
|
10
|
+
|
|
11
|
+
<dl>
|
|
12
|
+
<dt><a href="#EVENT">EVENT</a> : <code>object</code></dt>
|
|
13
|
+
<dd><p>List of available event's name in the wallet button lifecycle</p>
|
|
14
|
+
</dd>
|
|
15
|
+
</dl>
|
|
16
|
+
|
|
17
|
+
## Interfaces
|
|
18
|
+
|
|
19
|
+
<dl>
|
|
20
|
+
<dt><a href="#IWalletMeta">IWalletMeta</a> : <code>object</code></dt>
|
|
21
|
+
<dd><p>Interface of data used by the wallet checkout and payment proccess.</p>
|
|
22
|
+
</dd>
|
|
23
|
+
<dt><a href="#IApplePayShippingOption">IApplePayShippingOption</a> : <code>object</code></dt>
|
|
24
|
+
<dd><p>Interface of Shipping Options for ApplePay</p>
|
|
25
|
+
</dd>
|
|
26
|
+
<dt><a href="#IGooglePayShippingOption">IGooglePayShippingOption</a> : <code>object</code></dt>
|
|
27
|
+
<dd><p>Interface of Shipping Options for GooglePay</p>
|
|
28
|
+
</dd>
|
|
29
|
+
<dt><a href="#IPayPalShippingOption">IPayPalShippingOption</a> : <code>object</code></dt>
|
|
30
|
+
<dd><p>Interface of Shipping Options for PayPal</p>
|
|
31
|
+
</dd>
|
|
32
|
+
</dl>
|
|
33
|
+
|
|
34
|
+
<a name="IWalletMeta" id="IWalletMeta" href="#IWalletMeta"> </a>
|
|
35
|
+
|
|
36
|
+
## IWalletMeta : <code>object</code>
|
|
37
|
+
Interface of data used by the wallet checkout and payment proccess.
|
|
38
|
+
|
|
39
|
+
**Kind**: global interface
|
|
40
|
+
|
|
41
|
+
| Param | Type | Description |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| [amount_label] | <code>string</code> | Label shown next to the total amount to be paid. Required for [Stripe, ApplePay, GooglePay]. N/A for [FlyPay, Flypay V2, PayPal, Afterpay]. |
|
|
44
|
+
| [country] | <code>string</code> | Country of the user. 2 letter ISO code format. Required for [Stripe, ApplePay, GooglePay, Afterpay]. N/A for [FlyPay, Flypay V2, PayPal]. |
|
|
45
|
+
| [pay_later] | <code>boolean</code> | Used to enable Pay Later feature in PayPal Smart Checkout WalletButton integration when available. Optional for [PayPal]. N/A for other wallets. |
|
|
46
|
+
| [standalone] | <code>boolean</code> | Used to enable Standalone Buttons feature in PayPal Smart Checkout WalletButton integration. Used together with `pay_later`. Optional for [PayPal]. N/A for other wallets. |
|
|
47
|
+
| [show_billing_address] | <code>boolean</code> | Used to hide/show the billing address on ApplePay and GooglePay popups. Default value is false. Optional for [ApplePay, GooglePay]. N/A for other wallets. |
|
|
48
|
+
| [request_payer_name] | <code>boolean</code> | Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets. |
|
|
49
|
+
| [request_payer_email] | <code>boolean</code> | Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets. |
|
|
50
|
+
| [request_payer_phone] | <code>boolean</code> | Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets. |
|
|
51
|
+
| [access_token] | <code>string</code> | Used for Flypay V2 express flow. Optional for [Flypay V2]. N/A for other wallets. |
|
|
52
|
+
| [refresh_token] | <code>string</code> | Used for Flypay V2 express flow. Optional for [Flypay V2]. N/A for other wallets. |
|
|
53
|
+
| [request_shipping] | <code>boolean</code> | Used to request or not shipping address in the Wallet checkout, being able to handle amount changes via the `update` event. Optional for [FlyPay, PayPal, ApplePay, GooglePay]. N/A for [Flypay V2, Stripe, Afterpay]. |
|
|
54
|
+
| [shipping_options] | [<code>Array.<IApplePayShippingOption></code>](#IApplePayShippingOption) \| [<code>Array.<IPayPalShippingOption></code>](#IPayPalShippingOption) | Used to provide available shipping options.(To use shipping_options the request_shipping flag should be true). Optional for [ApplePay]. N/A for the other wallets. |
|
|
55
|
+
| [merchant_name] | <code>string</code> | Merchant Name used for GooglePay integration via MPGS. Required for [GooglePay]. N/A for other wallets. |
|
|
56
|
+
| [raw_data_initialization] | <code>object</code> | Used to provide values to initialize wallet with raw data. Optional for [ApplePay]. N/A for the other wallets. |
|
|
57
|
+
| [style] | <code>object</code> | For **Paypal**: used to style the buttons, check possible values in the [style guide](https://developer.paypal.com/docs/business/checkout/reference/style-guide). When `standalone` and `pay_later`, extra options can be provided in `style.messages` with the [messages style options](https://developer.paypal.com/docs/checkout/pay-later/us/integrate/reference/#stylelayout). Also used at **ApplePay**, **GooglePay** and **Afterpay** to select button type. Optional for [PayPal, ApplePay, GooglePay, Afterpay]. N/A for [Stripe, FlyPay, Flypay V2]. |
|
|
58
|
+
| [style.button_type] | <code>object</code> | Used to select ApplePay button type (e.g: 'buy','donate', etc), check possible values at https://developer.apple.com/documentation/apple_pay_on_the_web/displaying_apple_pay_buttons_using_css. Also select button type for GooglePay (check GooglePayStyles) and Afterpay (check AfterpayStyles). Optional for [ApplePay, GooglePay, Afterpay]. N/A for other wallets. |
|
|
59
|
+
| [style.height] | <code>object</code> | Used to select Afterpay button height. Optional for [Afterpay]. N/A for other wallets. |
|
|
60
|
+
| [wallets] | <code>array</code> | By default if this is not sent or empty, we will try to show either Apple Pay or Google Pay buttons. This can be limited sending the following array in this field: ['apple','google]. Optional for [Stripe, ApplePay, GooglePay]. N/A for other wallets. |
|
|
61
|
+
|
|
62
|
+
<a name="IApplePayShippingOption" id="IApplePayShippingOption" href="#IApplePayShippingOption"> </a>
|
|
63
|
+
|
|
64
|
+
## IApplePayShippingOption : <code>object</code>
|
|
65
|
+
Interface of Shipping Options for ApplePay
|
|
66
|
+
|
|
67
|
+
**Kind**: global interface
|
|
68
|
+
|
|
69
|
+
| Param | Type | Description |
|
|
70
|
+
| --- | --- | --- |
|
|
71
|
+
| [id] | <code>string</code> | Identifier of the Shipping Option. Required. |
|
|
72
|
+
| [label] | <code>string</code> | Identifier of the Shipping Option. Required. |
|
|
73
|
+
| [amount] | <code>string</code> | Amount of the Shipping Option. Required. |
|
|
74
|
+
| [detail] | <code>string</code> | Details of the Shipping Option. Required. |
|
|
75
|
+
| [type] | <code>string</code> | Type of the Shipping Option. Values can be 'ELECTRONIC', 'GROUND', 'NOT_SHIPPED', 'OVERNIGHT', 'PICKUP', 'PRIORITY', 'SAME_DAY'. Optional. |
|
|
76
|
+
|
|
77
|
+
<a name="IGooglePayShippingOption" id="IGooglePayShippingOption" href="#IGooglePayShippingOption"> </a>
|
|
78
|
+
|
|
79
|
+
## IGooglePayShippingOption : <code>object</code>
|
|
80
|
+
Interface of Shipping Options for GooglePay
|
|
81
|
+
|
|
82
|
+
**Kind**: global interface
|
|
83
|
+
|
|
84
|
+
| Param | Type | Description |
|
|
85
|
+
| --- | --- | --- |
|
|
86
|
+
| [id] | <code>string</code> | Identifier of the Shipping Option. Required. |
|
|
87
|
+
| [label] | <code>string</code> | Identifier of the Shipping Option. Required. |
|
|
88
|
+
| [detail] | <code>string</code> | Details of the Shipping Option. Optional. |
|
|
89
|
+
| [type] | <code>string</code> | Type of the Shipping Option. Values can be 'ELECTRONIC', 'GROUND', 'NOT_SHIPPED', 'OVERNIGHT', 'PICKUP', 'PRIORITY', 'SAME_DAY'. Optional. |
|
|
90
|
+
|
|
91
|
+
<a name="IPayPalShippingOption" id="IPayPalShippingOption" href="#IPayPalShippingOption"> </a>
|
|
92
|
+
|
|
93
|
+
## IPayPalShippingOption : <code>object</code>
|
|
94
|
+
Interface of Shipping Options for PayPal
|
|
95
|
+
|
|
96
|
+
**Kind**: global interface
|
|
97
|
+
|
|
98
|
+
| Param | Type | Description |
|
|
99
|
+
| --- | --- | --- |
|
|
100
|
+
| [id] | <code>string</code> | Identifier of the Shipping Option. Required. |
|
|
101
|
+
| [label] | <code>string</code> | Identifier of the Shipping Option. Required. |
|
|
102
|
+
| [amount] | <code>string</code> | Amount of the Shipping Option. Required. |
|
|
103
|
+
| [currency] | <code>string</code> | Currency of the Shipping Option. Required. |
|
|
104
|
+
| [type] | <code>string</code> | Type of the Shipping Option. Values can be 'SHIPPING' or 'PICKUP'. Required. |
|
|
105
|
+
|
|
106
|
+
<a name="WalletButtons" id="WalletButtons" href="#WalletButtons"> </a>
|
|
107
|
+
|
|
108
|
+
## WalletButtons
|
|
109
|
+
Class WalletButtons to work with different E-Wallets within html (currently supports Apple Pay, Google Pay, Google Pay™ and Apple Pay via Stripe, Flypay, Flypay V2, Paypal, Afterpay)
|
|
110
|
+
|
|
111
|
+
**Kind**: global class
|
|
112
|
+
|
|
113
|
+
* [WalletButtons](#WalletButtons)
|
|
114
|
+
* [new WalletButtons(selector, chargeToken, meta)](#new_WalletButtons_new)
|
|
115
|
+
* [.load()](#WalletButtons+load)
|
|
116
|
+
* [.update()](#WalletButtons+update)
|
|
117
|
+
* [.setEnv(env, [alias])](#WalletButtons+setEnv)
|
|
118
|
+
* [.close()](#WalletButtons+close)
|
|
119
|
+
* [.on(eventName, [cb])](#WalletButtons+on) ⇒ <code>Promise.<IEventData></code> \| <code>void</code>
|
|
120
|
+
* [.onUnavailable([handler])](#WalletButtons+onUnavailable)
|
|
121
|
+
* [.onUpdate([handler])](#WalletButtons+onUpdate)
|
|
122
|
+
* [.onPaymentSuccessful([handler])](#WalletButtons+onPaymentSuccessful)
|
|
123
|
+
* [.onPaymentInReview([handler])](#WalletButtons+onPaymentInReview)
|
|
124
|
+
* [.onPaymentError([handler])](#WalletButtons+onPaymentError)
|
|
125
|
+
* [.onAuthTokensChanged([handler])](#WalletButtons+onAuthTokensChanged)
|
|
126
|
+
|
|
127
|
+
<a name="new_WalletButtons_new" id="new_WalletButtons_new" href="#new_WalletButtons_new"> </a>
|
|
128
|
+
|
|
129
|
+
### new WalletButtons(selector, chargeToken, meta)
|
|
130
|
+
|
|
131
|
+
| Param | Type | Description |
|
|
132
|
+
| --- | --- | --- |
|
|
133
|
+
| selector | <code>string</code> | Selector of html element. Container for the WalletButtons. |
|
|
134
|
+
| chargeToken | <code>string</code> | token for the wallet transaction, created with a secure call to `POST charges/wallet`. |
|
|
135
|
+
| meta | [<code>IWalletMeta</code>](#IWalletMeta) | data that configures the E-Wallet, which can be shown on checkout page and configures required customer information. |
|
|
136
|
+
|
|
137
|
+
**Example**
|
|
138
|
+
```js
|
|
139
|
+
var button = new WalletButtons('#wallet-buttons', 'charge-token', { amount_label: 'Total', country: 'us' });
|
|
140
|
+
```
|
|
141
|
+
<a name="WalletButtons+load" id="WalletButtons+load" href="#WalletButtons+load"> </a>
|
|
142
|
+
|
|
143
|
+
### walletButtons.load()
|
|
144
|
+
Initializes the availability checks and inserts the button if possible.
|
|
145
|
+
Otherwise function onUnavailable(handler: VoidFunction) will be called.
|
|
146
|
+
|
|
147
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
148
|
+
**Example**
|
|
149
|
+
```js
|
|
150
|
+
var button = new WalletButtons(
|
|
151
|
+
'#buttons',
|
|
152
|
+
token,
|
|
153
|
+
{
|
|
154
|
+
amount_label: 'Total',
|
|
155
|
+
country: 'DE',
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
button.load();
|
|
159
|
+
```
|
|
160
|
+
<a name="WalletButtons+update" id="WalletButtons+update" href="#WalletButtons+update"> </a>
|
|
161
|
+
|
|
162
|
+
### walletButtons.update()
|
|
163
|
+
Triggers the update process of the wallet, if available.
|
|
164
|
+
Currently supported by Flypay, Paypal and ApplePay/GooglePay via MPGS Wallets.
|
|
165
|
+
|
|
166
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
167
|
+
**Example**
|
|
168
|
+
```js
|
|
169
|
+
var button = new WalletButtons(
|
|
170
|
+
'#buttons',
|
|
171
|
+
token,
|
|
172
|
+
{
|
|
173
|
+
amount_label: 'Total',
|
|
174
|
+
country: 'DE',
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
button.on('update', (data) => {
|
|
178
|
+
updateChargeAmountInBackend(data);
|
|
179
|
+
button.update({ success: true });
|
|
180
|
+
});
|
|
181
|
+
```
|
|
182
|
+
**Example**
|
|
183
|
+
```js
|
|
184
|
+
// ApplePay via MPGS example:
|
|
185
|
+
var button = new WalletButtons(
|
|
186
|
+
'#buttons',
|
|
187
|
+
token,
|
|
188
|
+
{
|
|
189
|
+
amount_label: 'Total',
|
|
190
|
+
country: 'AU',
|
|
191
|
+
...
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
button.on('update', (data) => {
|
|
195
|
+
updateChargeAmountInBackend(data);
|
|
196
|
+
button.update({
|
|
197
|
+
success: true,
|
|
198
|
+
body: {
|
|
199
|
+
amount: 15,
|
|
200
|
+
shipping_options: [
|
|
201
|
+
{
|
|
202
|
+
id: "NEW-FreeShip",
|
|
203
|
+
label: "NEW - Free Shipping",
|
|
204
|
+
detail: "Arrives in 3 to 5 days",
|
|
205
|
+
amount: "0.00"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
id: "NEW - FastShip",
|
|
209
|
+
label: "NEW - Fast Shipping",
|
|
210
|
+
detail: "Arrives in less than 1 day",
|
|
211
|
+
amount: "10.00"
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
```
|
|
218
|
+
<a name="WalletButtons+setEnv" id="WalletButtons+setEnv" href="#WalletButtons+setEnv"> </a>
|
|
219
|
+
|
|
220
|
+
### walletButtons.setEnv(env, [alias])
|
|
221
|
+
Current method can change environment. By default environment = sandbox.
|
|
222
|
+
Also we can change domain alias for this environment. By default domain_alias = paydock.com
|
|
223
|
+
Bear in mind that you must set an environment before calling `button.load()`.
|
|
224
|
+
|
|
225
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
226
|
+
|
|
227
|
+
| Param | Type | Description |
|
|
228
|
+
| --- | --- | --- |
|
|
229
|
+
| env | <code>string</code> | sandbox, production |
|
|
230
|
+
| [alias] | <code>string</code> | Own domain alias |
|
|
231
|
+
|
|
232
|
+
**Example**
|
|
233
|
+
```js
|
|
234
|
+
button.setEnv('production', 'paydock.com');
|
|
235
|
+
```
|
|
236
|
+
<a name="WalletButtons+close" id="WalletButtons+close" href="#WalletButtons+close"> </a>
|
|
237
|
+
|
|
238
|
+
### walletButtons.close()
|
|
239
|
+
Closes the checkout forcibly. Currently supported in Flypay wallet.
|
|
240
|
+
|
|
241
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
242
|
+
**Example**
|
|
243
|
+
```js
|
|
244
|
+
button.close();
|
|
245
|
+
```
|
|
246
|
+
<a name="WalletButtons+on" id="WalletButtons+on" href="#WalletButtons+on"> </a>
|
|
247
|
+
|
|
248
|
+
### walletButtons.on(eventName, [cb]) ⇒ <code>Promise.<IEventData></code> \| <code>void</code>
|
|
249
|
+
Listen to events of button. `unavailable` returns no data, `paymentSuccessful` returns IWalletPaymentSuccessful
|
|
250
|
+
for Stripe or full response for Flypay, and `paymentError` an error.
|
|
251
|
+
|
|
252
|
+
NOTE: when listening for the 'update' event, make sure to call the `button.update(result)` method on completion.
|
|
253
|
+
|
|
254
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
255
|
+
|
|
256
|
+
| Param | Type | Description |
|
|
257
|
+
| --- | --- | --- |
|
|
258
|
+
| eventName | <code>string</code> | Available event names [EVENT](#EVENT) |
|
|
259
|
+
| [cb] | <code>listener</code> | |
|
|
260
|
+
|
|
261
|
+
**Example**
|
|
262
|
+
```js
|
|
263
|
+
button.on('paymentSuccessful', function (data) {
|
|
264
|
+
console.log(data);
|
|
265
|
+
});
|
|
266
|
+
// or
|
|
267
|
+
button.on('unavailable').then(function () {
|
|
268
|
+
console.log('No button is available);
|
|
269
|
+
});
|
|
270
|
+
```
|
|
271
|
+
<a name="WalletButtons+onUnavailable" id="WalletButtons+onUnavailable" href="#WalletButtons+onUnavailable"> </a>
|
|
272
|
+
|
|
273
|
+
### walletButtons.onUnavailable([handler])
|
|
274
|
+
User to subscribe to the no button available event. This method is used after loading when the button is not available.
|
|
275
|
+
For MPGS, since can have more than one wallet button configured (ApplePay/GooglePay) you will receive a body (({ wallet: WALLET_TYPE.GOOGLE }) or ({ wallet: WALLET_TYPE.APPLE })) indicating which button is unavailable
|
|
276
|
+
Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
277
|
+
|
|
278
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
279
|
+
|
|
280
|
+
| Param | Type | Description |
|
|
281
|
+
| --- | --- | --- |
|
|
282
|
+
| [handler] | <code>listener</code> | Function to be called when no button is available. |
|
|
283
|
+
|
|
284
|
+
**Example**
|
|
285
|
+
```js
|
|
286
|
+
button.onUnavailable(() => {
|
|
287
|
+
console.log('No wallet buttons available');
|
|
288
|
+
});
|
|
289
|
+
```
|
|
290
|
+
**Example**
|
|
291
|
+
```js
|
|
292
|
+
button.onUnavailable().then(() => console.log('No wallet buttons available'));
|
|
293
|
+
```
|
|
294
|
+
**Example**
|
|
295
|
+
```js
|
|
296
|
+
button.onUnavailable(function (data) {console.log('data.wallet :: ', data.wallet)});
|
|
297
|
+
```
|
|
298
|
+
<a name="WalletButtons+onUpdate" id="WalletButtons+onUpdate" href="#WalletButtons+onUpdate"> </a>
|
|
299
|
+
|
|
300
|
+
### walletButtons.onUpdate([handler])
|
|
301
|
+
If the wallet performs some update in the checkout process, the function passed as parameter will be called.
|
|
302
|
+
|
|
303
|
+
NOTE: make sure to call the `button.update(result)` method on handler completion.
|
|
304
|
+
|
|
305
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
306
|
+
|
|
307
|
+
| Param | Type | Description |
|
|
308
|
+
| --- | --- | --- |
|
|
309
|
+
| [handler] | <code>listener</code> | Function to be called when the payment was successful. |
|
|
310
|
+
|
|
311
|
+
**Example**
|
|
312
|
+
```js
|
|
313
|
+
button.onUpdate((data) => {
|
|
314
|
+
button.update({ success: true });
|
|
315
|
+
});
|
|
316
|
+
```
|
|
317
|
+
**Example**
|
|
318
|
+
```js
|
|
319
|
+
button.onUpdate().then((data) => throw new Error());
|
|
320
|
+
```
|
|
321
|
+
<a name="WalletButtons+onPaymentSuccessful" id="WalletButtons+onPaymentSuccessful" href="#WalletButtons+onPaymentSuccessful"> </a>
|
|
322
|
+
|
|
323
|
+
### walletButtons.onPaymentSuccessful([handler])
|
|
324
|
+
If the payment was successful, the function passed as parameter will be called.
|
|
325
|
+
Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
326
|
+
|
|
327
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
328
|
+
|
|
329
|
+
| Param | Type | Description |
|
|
330
|
+
| --- | --- | --- |
|
|
331
|
+
| [handler] | <code>listener</code> | Function to be called when the payment was successful. |
|
|
332
|
+
|
|
333
|
+
**Example**
|
|
334
|
+
```js
|
|
335
|
+
button.onPaymentSuccessful((data) => {
|
|
336
|
+
console.log('Payment successful!');
|
|
337
|
+
});
|
|
338
|
+
```
|
|
339
|
+
**Example**
|
|
340
|
+
```js
|
|
341
|
+
button.onPaymentSuccessful().then((data) => console.log('Payment successful!'));
|
|
342
|
+
```
|
|
343
|
+
<a name="WalletButtons+onPaymentInReview" id="WalletButtons+onPaymentInReview" href="#WalletButtons+onPaymentInReview"> </a>
|
|
344
|
+
|
|
345
|
+
### walletButtons.onPaymentInReview([handler])
|
|
346
|
+
If the payment was left in fraud review, the function passed as parameter will be called.
|
|
347
|
+
Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
348
|
+
|
|
349
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
350
|
+
|
|
351
|
+
| Param | Type | Description |
|
|
352
|
+
| --- | --- | --- |
|
|
353
|
+
| [handler] | <code>listener</code> | Function to be called when the payment was left in fraud review status. |
|
|
354
|
+
|
|
355
|
+
**Example**
|
|
356
|
+
```js
|
|
357
|
+
button.onPaymentInReview((data) => {
|
|
358
|
+
console.log('Payment in fraud review');
|
|
359
|
+
});
|
|
360
|
+
```
|
|
361
|
+
**Example**
|
|
362
|
+
```js
|
|
363
|
+
button.onPaymentInReview().then((data) => console.log('Payment in fraud review'));
|
|
364
|
+
```
|
|
365
|
+
<a name="WalletButtons+onPaymentError" id="WalletButtons+onPaymentError" href="#WalletButtons+onPaymentError"> </a>
|
|
366
|
+
|
|
367
|
+
### walletButtons.onPaymentError([handler])
|
|
368
|
+
If the payment was not successful, the function passed as parameter will be called.
|
|
369
|
+
Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
370
|
+
|
|
371
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
372
|
+
|
|
373
|
+
| Param | Type | Description |
|
|
374
|
+
| --- | --- | --- |
|
|
375
|
+
| [handler] | <code>listener</code> | Function to be called when the payment was not successful. |
|
|
376
|
+
|
|
377
|
+
**Example**
|
|
378
|
+
```js
|
|
379
|
+
button.onPaymentError((err) => {
|
|
380
|
+
console.log('Payment not successful');
|
|
381
|
+
});
|
|
382
|
+
```
|
|
383
|
+
**Example**
|
|
384
|
+
```js
|
|
385
|
+
button.onPaymentError().then((err) => console.log('Payment not successful'));
|
|
386
|
+
```
|
|
387
|
+
<a name="WalletButtons+onAuthTokensChanged" id="WalletButtons+onAuthTokensChanged" href="#WalletButtons+onAuthTokensChanged"> </a>
|
|
388
|
+
|
|
389
|
+
### walletButtons.onAuthTokensChanged([handler])
|
|
390
|
+
Registers a callback function to be invoked when authentication tokens are changed.
|
|
391
|
+
This function allows you to respond to changes in authentication tokens, such as when a user logs in.
|
|
392
|
+
|
|
393
|
+
**Kind**: instance method of [<code>WalletButtons</code>](#WalletButtons)
|
|
394
|
+
|
|
395
|
+
| Param | Type | Description |
|
|
396
|
+
| --- | --- | --- |
|
|
397
|
+
| [handler] | <code>listener</code> | Function to be called when authentication tokens are changed. |
|
|
398
|
+
|
|
399
|
+
**Example**
|
|
400
|
+
```js
|
|
401
|
+
button.onAuthTokensChanged((eventData) => {
|
|
402
|
+
console.log('Authentication tokens changed:', eventData);
|
|
403
|
+
});
|
|
404
|
+
```
|
|
405
|
+
**Example**
|
|
406
|
+
```js
|
|
407
|
+
button.onAuthTokensChanged().then((eventData) => {
|
|
408
|
+
console.log('Authentication tokens changed:', eventData);
|
|
409
|
+
});
|
|
410
|
+
```
|
|
411
|
+
<a name="EVENT" id="EVENT" href="#EVENT"> </a>
|
|
412
|
+
|
|
413
|
+
## EVENT : <code>object</code>
|
|
414
|
+
List of available event's name in the wallet button lifecycle
|
|
415
|
+
|
|
416
|
+
**Kind**: global constant
|
|
417
|
+
|
|
418
|
+
| Param | Type | Default |
|
|
419
|
+
| --- | --- | --- |
|
|
420
|
+
| UNAVAILABLE | <code>string</code> | <code>"unavailable"</code> |
|
|
421
|
+
| UPDATE | <code>string</code> | <code>"update"</code> |
|
|
422
|
+
| PAYMENT_SUCCESSFUL | <code>string</code> | <code>"paymentSuccessful"</code> |
|
|
423
|
+
| PAYMENT_ERROR | <code>string</code> | <code>"paymentError"</code> |
|
|
424
|
+
|