@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,258 @@
|
|
|
1
|
+
## Secure Remote Commerce
|
|
2
|
+
You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#SRC).
|
|
3
|
+
|
|
4
|
+
This widget provides you with the ability to easily integrate with SRC providers. Currently Visa SRC is supported.
|
|
5
|
+
|
|
6
|
+
## SRC simple example
|
|
7
|
+
|
|
8
|
+
### Container
|
|
9
|
+
|
|
10
|
+
```html
|
|
11
|
+
<div id="checkoutButton"></div>
|
|
12
|
+
<div id="checkoutIframe"></div>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
You must create a container for the initial checkout button, and a different one for the checkout iFrame. Inside the first tag the button will be initialized, and inside the second one the iFrame will be loaded once the button is clicked.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Initialization
|
|
19
|
+
```javascript
|
|
20
|
+
var src = new paydock.SRC(
|
|
21
|
+
"#checkoutButton",
|
|
22
|
+
"#checkoutIframe",
|
|
23
|
+
"scheme_service_id",
|
|
24
|
+
"paydock_public_key_or_access_token",
|
|
25
|
+
{}, // meta
|
|
26
|
+
);
|
|
27
|
+
src.load();
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```javascript
|
|
31
|
+
// ES2015 | TypeScript
|
|
32
|
+
|
|
33
|
+
import { SRC } from '@paydock/client-sdk';
|
|
34
|
+
|
|
35
|
+
var src = new SRC(
|
|
36
|
+
"#checkoutButton",
|
|
37
|
+
"#checkoutIframe",
|
|
38
|
+
"scheme_service_id",
|
|
39
|
+
"paydock_public_key_or_access_token",
|
|
40
|
+
{}, // meta
|
|
41
|
+
);
|
|
42
|
+
src.load();
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
*NOTE:* it's highly recommended to use a Paydock Access Token instead of the public key for security reasons. When creating it, you will need to enable the `Secure Remote Commerce` and add a whiteliste for the domain of your checkout screen.
|
|
46
|
+
|
|
47
|
+
### Full example
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<!DOCTYPE html>
|
|
51
|
+
<html lang="en">
|
|
52
|
+
<head>
|
|
53
|
+
<meta charset="UTF-8">
|
|
54
|
+
<title>Title</title>
|
|
55
|
+
<style>iframe {border: 0;width: 40%;height: 300px;}</style>
|
|
56
|
+
</head>
|
|
57
|
+
<body>
|
|
58
|
+
<div id="checkoutButton"></div>
|
|
59
|
+
<div id="checkoutIframe"></div>
|
|
60
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
61
|
+
<script>
|
|
62
|
+
var src = new paydock.SRC(
|
|
63
|
+
"#checkoutButton",
|
|
64
|
+
"#checkoutIframe",
|
|
65
|
+
"scheme_service_id",
|
|
66
|
+
"paydock_public_key_or_access_token",
|
|
67
|
+
{},
|
|
68
|
+
);
|
|
69
|
+
src.load();
|
|
70
|
+
</script>
|
|
71
|
+
</body>
|
|
72
|
+
</html>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## SRC advanced example
|
|
77
|
+
|
|
78
|
+
### Settings
|
|
79
|
+
|
|
80
|
+
```javascript
|
|
81
|
+
|
|
82
|
+
src.setEnv('sandbox'); // set enviroment
|
|
83
|
+
|
|
84
|
+
src.hideButton(); // hide button
|
|
85
|
+
|
|
86
|
+
src.showButton(); // show button
|
|
87
|
+
|
|
88
|
+
src.hideCheckout(); // hide checkout iframe
|
|
89
|
+
|
|
90
|
+
src.showCheckout(); // show checkout iframe
|
|
91
|
+
|
|
92
|
+
src.on('checkoutButtonLoaded', () => {
|
|
93
|
+
console.log("Button loaded");
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
src.on('checkoutButtonClicked', () => {
|
|
97
|
+
console.log("Button clicked");
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
src.on('iframeLoaded', () => {
|
|
101
|
+
console.log("Initial iframe loaded");
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
src.on('checkoutReady', () => {
|
|
105
|
+
console.log("Checkout ready to be used");
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
src.on('checkoutCompleted', (token) => {
|
|
109
|
+
console.log(token);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
src.on('checkoutError', (error) => {
|
|
113
|
+
console.log(error);
|
|
114
|
+
});
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Here you can see how you can use this methods to customize your checkout experience
|
|
118
|
+
|
|
119
|
+
### Full example
|
|
120
|
+
|
|
121
|
+
```html
|
|
122
|
+
<!DOCTYPE html>
|
|
123
|
+
<html lang="en">
|
|
124
|
+
<head>
|
|
125
|
+
<meta charset="UTF-8">
|
|
126
|
+
<title>Title</title>
|
|
127
|
+
<style>iframe {border: 0;width: 40%;height: 450px;}</style>
|
|
128
|
+
</head>
|
|
129
|
+
<body>
|
|
130
|
+
<div id="checkoutButton"></div>
|
|
131
|
+
<div id="checkoutIframe"></div>
|
|
132
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
133
|
+
<script>
|
|
134
|
+
var src = new paydock.SRC(
|
|
135
|
+
"#checkoutButton",
|
|
136
|
+
"#checkoutIframe",
|
|
137
|
+
"scheme_service_id",
|
|
138
|
+
"paydock_public_key_or_access_token",
|
|
139
|
+
{},
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
src.on('checkoutReady', () => {
|
|
143
|
+
console.log("Checkout ready to be used");
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
src.on('checkoutCompleted', (token) => {
|
|
147
|
+
console.log(token);
|
|
148
|
+
});
|
|
149
|
+
src.load();
|
|
150
|
+
</script>
|
|
151
|
+
</body>
|
|
152
|
+
</html>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Customization options for address fields
|
|
156
|
+
### Shipping address:
|
|
157
|
+
|
|
158
|
+
To customize shipping address experience we use a flag that manages how VisaSRC requires or not shipping address to the customer. Options are NONE (default option), POSTAL_COUNTRY or ALL.
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
var src = new paydock.SRC(
|
|
162
|
+
"#checkoutButton",
|
|
163
|
+
"#checkoutIframe",
|
|
164
|
+
"scheme_service_id",
|
|
165
|
+
"paydock_public_key_or_access_token",
|
|
166
|
+
{
|
|
167
|
+
"dpa_transaction_options": {
|
|
168
|
+
"dpa_shipping_preference": "ALL"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
);
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
With this the Visa popup requires the shipping address from consumer, and these information will be stored in the Paydock charge.
|
|
175
|
+
|
|
176
|
+
Another option is at time of creating the charge. Say that you have a different way of collecting the shipping address (outside Paydock checkout), you can then disable the shipping address on our SRC widget and send it when creating the charge creation after getting the One Time Token out of the SRC widget:
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
POST v1/charges
|
|
180
|
+
|
|
181
|
+
{
|
|
182
|
+
"amount": "10.00",
|
|
183
|
+
"currency": "AUD",
|
|
184
|
+
"token": "token",
|
|
185
|
+
"customer": {
|
|
186
|
+
"payment_source": {
|
|
187
|
+
"gateway_id": "gateway_id"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"shipping": {
|
|
191
|
+
"address_line1": "address_line1",
|
|
192
|
+
"address_line2": "address_line2",
|
|
193
|
+
"address_line3": "address_line3",
|
|
194
|
+
"address_city": "address_city",
|
|
195
|
+
"address_postcode": "address_postcode",
|
|
196
|
+
"address_state": "address_state",
|
|
197
|
+
"address_country": "address_country"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
- Billing address:
|
|
203
|
+
|
|
204
|
+
Billing address fields are always present on the checkout and required when adding a new credit card (or for new consumer checkout). You can send billing fields on the meta data to pre-fill these fields inside the customer object:
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
var src = new paydock.SRC(
|
|
208
|
+
"#checkoutButton",
|
|
209
|
+
"#checkoutIframe",
|
|
210
|
+
"scheme_service_id",
|
|
211
|
+
"paydock_public_key_or_access_token",
|
|
212
|
+
{
|
|
213
|
+
"customer": {
|
|
214
|
+
"email": "test@email.com",
|
|
215
|
+
"first_name": "Name",
|
|
216
|
+
"last_name": "Surname",
|
|
217
|
+
"phone": {
|
|
218
|
+
"country_code": "1",
|
|
219
|
+
"phone": "2124567890"
|
|
220
|
+
},
|
|
221
|
+
"payment_source": {
|
|
222
|
+
"address_line1": "Line 1",
|
|
223
|
+
"address_line2": "Line 2",
|
|
224
|
+
"address_city": "Miami",
|
|
225
|
+
"address_postcode": "33126",
|
|
226
|
+
"address_state": "FL",
|
|
227
|
+
"address_country": "US"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
);
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Personalization Styling
|
|
235
|
+
|
|
236
|
+
To improve the experience in the use of the widget, it is allowed to send props that customize the UI.
|
|
237
|
+
|
|
238
|
+
### Example code
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
var src = new paydock.SRC(
|
|
242
|
+
"#checkoutButton",
|
|
243
|
+
"#checkoutIframe",
|
|
244
|
+
"scheme_service_id",
|
|
245
|
+
"paydock_public_key",
|
|
246
|
+
);
|
|
247
|
+
|
|
248
|
+
button.setStyles({"primary_color":"#a83232","button_text_color":"#171e9c","font_family":"sans-serif"})
|
|
249
|
+
|
|
250
|
+
```
|
|
251
|
+
## Event and Values
|
|
252
|
+
|
|
253
|
+
| Event Value | Type | Description |
|
|
254
|
+
| ------------------- | ------------------- | -------------------------------------------------------------- |
|
|
255
|
+
| primary_color | <code>string</code> | HEX color for the principal buttons, example : #32a852 |
|
|
256
|
+
| button_text_color | <code>string</code> | HEX color for the text of the buttons, example : #32a852|
|
|
257
|
+
| font_family | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family)|
|
|
258
|
+
| card_schemes | <code>[string] - array of string</code> | Possible values "visa", "mastercard", "amex" and "discover" - Default show all logos
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
## Classes
|
|
2
|
+
|
|
3
|
+
<dl>
|
|
4
|
+
<dt><a href="#SRC">SRC</a></dt>
|
|
5
|
+
<dd><p>Class SRC include methods for interacting with different secure remote commerce options such as Visa SRC</p>
|
|
6
|
+
</dd>
|
|
7
|
+
</dl>
|
|
8
|
+
|
|
9
|
+
## Interfaces
|
|
10
|
+
|
|
11
|
+
<dl>
|
|
12
|
+
<dt><a href="#IVisaSRCMeta">IVisaSRCMeta</a> : <code>object</code></dt>
|
|
13
|
+
<dd><p>Interface of data used for the Visa Checkout.</p>
|
|
14
|
+
</dd>
|
|
15
|
+
</dl>
|
|
16
|
+
|
|
17
|
+
<a name="IVisaSRCMeta" id="IVisaSRCMeta" href="#IVisaSRCMeta"> </a>
|
|
18
|
+
|
|
19
|
+
## IVisaSRCMeta : <code>object</code>
|
|
20
|
+
Interface of data used for the Visa Checkout.
|
|
21
|
+
|
|
22
|
+
**Kind**: global interface
|
|
23
|
+
|
|
24
|
+
| Param | Type | Description |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| [srci_transaction_id] | <code>string</code> | Used to identify the SRC Id. |
|
|
27
|
+
| [dpa_data] | <code>object</code> | Object where the DPA creation data is stored. |
|
|
28
|
+
| [dpa_data.dpa_presentation_name] | <code>string</code> | Name in which the DPA is presented in. |
|
|
29
|
+
| [dpa_data.dpa_uri] | <code>string</code> | Used for indicating the DPA URI. |
|
|
30
|
+
| [dpa_transaction_options] | <code>object</code> | Object that stores options for creating a trasaction with DPA. |
|
|
31
|
+
| [dpa_transaction_options.dpa_locale] | <code>string</code> | DPA’s preferred locale, example en_US. |
|
|
32
|
+
| [dpa_transaction_options.dpa_accepted_billing_countries] | <code>Array</code> | Used to indicate list of accepted billing countries for DPA. |
|
|
33
|
+
| [dpa_transaction_options.dpa_accepted_shipping_countries] | <code>Array</code> | Used to indicate list of accepted shipping countries for DPA. |
|
|
34
|
+
| [dpa_transaction_options.dpa_billing_preference] | <code>string</code> | Used for listing the enumeration for billing preferences for DPA. Options are 'ALL', 'POSTAL_COUNTRY' and 'NONE'. |
|
|
35
|
+
| [dpa_transaction_options.dpa_shipping_preference] | <code>string</code> | Used for listing the enumeration for shipping preferences for DPA. Options are 'ALL', 'POSTAL_COUNTRY' and 'NONE'. |
|
|
36
|
+
| [dpa_transaction_options.consumer_name_requested] | <code>boolean</code> | Used to check if the name of the consumer is needed. |
|
|
37
|
+
| [dpa_transaction_options.consumer_email_address_requested] | <code>boolean</code> | Used to check if the email of the consumer is needed. |
|
|
38
|
+
| [dpa_transaction_options.consumer_phone_number_requested] | <code>boolean</code> | Used to check if the phone number of the consumer is needed. |
|
|
39
|
+
| [dpa_transaction_options.payment_options] | <code>object</code> | Object used to check the payment options that are included. |
|
|
40
|
+
| [dpa_transaction_options.payment_options.dpa_dynamic_data_ttl_minutes] | <code>number</code> | The minimum requested validity period for the transaction credentials. |
|
|
41
|
+
| [dpa_transaction_options.payment_options.dynamic_data_type] | <code>string</code> | Used for listing the enumeration for dynamic data types. Options are 'TAVV' and 'DTVV'. |
|
|
42
|
+
| [dpa_transaction_options.payment_options.dpa_pan_requested] | <code>boolean</code> | Used to check if PAN number was requested. |
|
|
43
|
+
| [dpa_transaction_options.review_action] | <code>string</code> | Used for listing the enumeration of review actions. Options are 'pay' and 'continue'. |
|
|
44
|
+
| [dpa_transaction_options.checkout_description] | <code>string</code> | Used for indicating the description of the checkout. |
|
|
45
|
+
| [dpa_transaction_options.transaction_type] | <code>string</code> | Used for listing the enumeration of the type of the transaction. 'PURCHASE', 'BILL_PAYMENT' and 'MONEY_TRANSFER' |
|
|
46
|
+
| [dpa_transaction_options.order_type] | <code>string</code> | Used for listing the enumeration of the type of the order. Options are 'REAUTHORIZATION', 'RECURRING' and 'INSTALLMENT'. |
|
|
47
|
+
| [dpa_transaction_options.transaction_amount] | <code>object</code> | Object used to describe the details of the transaction. |
|
|
48
|
+
| [dpa_transaction_options.transaction_amount.transaction_amount] | <code>number</code> | Used to indicate the amount of the transaction. |
|
|
49
|
+
| [dpa_transaction_options.transaction_amount.transaction_currency_code] | <code>string</code> | Used to indicate the currency code of the transaction. 3 letter ISO code format. |
|
|
50
|
+
| [dpa_transaction_options.merchant_order_id] | <code>string</code> | Used to indicate the merchants order Id. |
|
|
51
|
+
| [dpa_transaction_options.merchant_category_code] | <code>string</code> | Used to indicate the merchants category code. |
|
|
52
|
+
| [dpa_transaction_options.merchant_country_code] | <code>string</code> | Used to indicate the merchants country code. 2 letter ISO code format. |
|
|
53
|
+
| [customer] | <code>object</code> | Object where the customer data is stored to prefill in the checkout. |
|
|
54
|
+
| [customer.email] | <code>string</code> | Customer email. |
|
|
55
|
+
| [customer.first_name] | <code>string</code> | Customer first name. |
|
|
56
|
+
| [customer.last_name] | <code>string</code> | Customer last name. |
|
|
57
|
+
| [customer.phone] | <code>object</code> | Object where the customer phone is stored. |
|
|
58
|
+
| [customer.phone.country_code] | <code>string</code> | Customer phone country code (example "1" for US). |
|
|
59
|
+
| [customer.phone.phone] | <code>string</code> | Customer phone number. |
|
|
60
|
+
| [customer.payment_source] | <code>object</code> | Object where the customer billing address data is stored. |
|
|
61
|
+
| [customer.payment_source.address_line1] | <code>string</code> | Customer billing address line 1. |
|
|
62
|
+
| [customer.payment_source.address_line2] | <code>string</code> | Customer billing address line 2. |
|
|
63
|
+
| [customer.payment_source.address_city] | <code>string</code> | Customer billing address city. |
|
|
64
|
+
| [customer.payment_source.address_postcode] | <code>string</code> | Customer billing address postcode. |
|
|
65
|
+
| [customer.payment_source.address_state] | <code>string</code> | Customer billing address state code (if applicable for the country, example "FL" for Florida). |
|
|
66
|
+
| [customer.payment_source.address_country] | <code>string</code> | Customer billing address country code (example "US"). |
|
|
67
|
+
|
|
68
|
+
<a name="SRC" id="SRC" href="#SRC"> </a>
|
|
69
|
+
|
|
70
|
+
## SRC
|
|
71
|
+
Class SRC include methods for interacting with different secure remote commerce options such as Visa SRC
|
|
72
|
+
|
|
73
|
+
**Kind**: global class
|
|
74
|
+
|
|
75
|
+
* [SRC](#SRC)
|
|
76
|
+
* [new SRC(button_selector, iframe_selector, service_id, public_key_or_access_token, meta)](#new_SRC_new)
|
|
77
|
+
* [.setStyles(fields)](#SRC+setStyles)
|
|
78
|
+
* [.load()](#SRC+load)
|
|
79
|
+
* [.setEnv(env, [alias])](#SRC+setEnv)
|
|
80
|
+
* [.getEnv()](#SRC+getEnv)
|
|
81
|
+
* [.on(eventName, [cb])](#SRC+on) ⇒ <code>Promise.<any></code> \| <code>void</code>
|
|
82
|
+
* [.hideButton([saveSize])](#SRC+hideButton)
|
|
83
|
+
* [.showButton()](#SRC+showButton)
|
|
84
|
+
* [.hideCheckout([saveSize])](#SRC+hideCheckout)
|
|
85
|
+
* [.showCheckout()](#SRC+showCheckout)
|
|
86
|
+
* [.reload()](#SRC+reload)
|
|
87
|
+
* [.useAutoResize()](#SRC+useAutoResize)
|
|
88
|
+
|
|
89
|
+
<a name="new_SRC_new" id="new_SRC_new" href="#new_SRC_new"> </a>
|
|
90
|
+
|
|
91
|
+
### new SRC(button_selector, iframe_selector, service_id, public_key_or_access_token, meta)
|
|
92
|
+
|
|
93
|
+
| Param | Type | Description |
|
|
94
|
+
| --- | --- | --- |
|
|
95
|
+
| button_selector | <code>string</code> | Selector of html element. Container for SRC checkout button. |
|
|
96
|
+
| iframe_selector | <code>string</code> | Selector of html element. Container for SRC checkout iFrame. |
|
|
97
|
+
| service_id | <code>string</code> | Card Scheme Service ID |
|
|
98
|
+
| public_key_or_access_token | <code>string</code> | Paydock public key or Access Token |
|
|
99
|
+
| meta | [<code>IVisaSRCMeta</code>](#IVisaSRCMeta) | Data that configures the SRC checkout |
|
|
100
|
+
|
|
101
|
+
**Example**
|
|
102
|
+
```js
|
|
103
|
+
var SRC = new SRC('#checkoutButton', '#checkoutIframe', 'service_id', 'public_key', {});
|
|
104
|
+
```
|
|
105
|
+
<a name="SRC+setStyles" id="SRC+setStyles" href="#SRC+setStyles"> </a>
|
|
106
|
+
|
|
107
|
+
### srC.setStyles(fields)
|
|
108
|
+
Object contain styles for widget - call before `.load()`.
|
|
109
|
+
|
|
110
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
111
|
+
|
|
112
|
+
| Param | Type | Description |
|
|
113
|
+
| --- | --- | --- |
|
|
114
|
+
| fields | <code>IStyles</code> | name of styles which can be shown in widget [STYLE](STYLE) |
|
|
115
|
+
|
|
116
|
+
**Example**
|
|
117
|
+
```js
|
|
118
|
+
widget.setStyles({
|
|
119
|
+
button_text_color: '#32a852',
|
|
120
|
+
primary_color: '#32a852',
|
|
121
|
+
font_family: 'sans-serif',
|
|
122
|
+
card_schemes: ['visa']
|
|
123
|
+
});
|
|
124
|
+
```
|
|
125
|
+
<a name="SRC+load" id="SRC+load" href="#SRC+load"> </a>
|
|
126
|
+
|
|
127
|
+
### srC.load()
|
|
128
|
+
The final method after configuring the SRC to start the load process of SRC checkout
|
|
129
|
+
|
|
130
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
131
|
+
<a name="SRC+setEnv" id="SRC+setEnv" href="#SRC+setEnv"> </a>
|
|
132
|
+
|
|
133
|
+
### srC.setEnv(env, [alias])
|
|
134
|
+
Current method can change environment. By default environment = sandbox.
|
|
135
|
+
Also we can change domain alias for this environment. By default domain_alias = paydock.com
|
|
136
|
+
|
|
137
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
138
|
+
|
|
139
|
+
| Param | Type | Description |
|
|
140
|
+
| --- | --- | --- |
|
|
141
|
+
| env | <code>string</code> | sandbox, production |
|
|
142
|
+
| [alias] | <code>string</code> | Own domain alias |
|
|
143
|
+
|
|
144
|
+
**Example**
|
|
145
|
+
```js
|
|
146
|
+
SRC.setEnv('production');
|
|
147
|
+
```
|
|
148
|
+
<a name="SRC+getEnv" id="SRC+getEnv" href="#SRC+getEnv"> </a>
|
|
149
|
+
|
|
150
|
+
### srC.getEnv()
|
|
151
|
+
Method to read the current environment
|
|
152
|
+
|
|
153
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
154
|
+
**Example**
|
|
155
|
+
```js
|
|
156
|
+
SRC.getEnv();
|
|
157
|
+
```
|
|
158
|
+
<a name="SRC+on" id="SRC+on" href="#SRC+on"> </a>
|
|
159
|
+
|
|
160
|
+
### srC.on(eventName, [cb]) ⇒ <code>Promise.<any></code> \| <code>void</code>
|
|
161
|
+
Listen to events of SRC
|
|
162
|
+
|
|
163
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
164
|
+
|
|
165
|
+
| Param | Type | Description |
|
|
166
|
+
| --- | --- | --- |
|
|
167
|
+
| eventName | <code>string</code> | Available event names [EVENT](#EVENT) |
|
|
168
|
+
| [cb] | <code>listener</code> | |
|
|
169
|
+
|
|
170
|
+
**Example**
|
|
171
|
+
```js
|
|
172
|
+
SRC.on('checkoutCompleted', function (token) {
|
|
173
|
+
console.log(token);
|
|
174
|
+
});
|
|
175
|
+
// or
|
|
176
|
+
SRC.on('checkoutCompleted').then(function (token) {
|
|
177
|
+
console.log(token);
|
|
178
|
+
});
|
|
179
|
+
```
|
|
180
|
+
<a name="SRC+hideButton" id="SRC+hideButton" href="#SRC+hideButton"> </a>
|
|
181
|
+
|
|
182
|
+
### srC.hideButton([saveSize])
|
|
183
|
+
Using this method you can hide button
|
|
184
|
+
|
|
185
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
186
|
+
|
|
187
|
+
| Param | Type | Default | Description |
|
|
188
|
+
| --- | --- | --- | --- |
|
|
189
|
+
| [saveSize] | <code>boolean</code> | <code>false</code> | using this param you can save iframe's size (if applicable) |
|
|
190
|
+
|
|
191
|
+
**Example**
|
|
192
|
+
```js
|
|
193
|
+
SRC.hideButton();
|
|
194
|
+
```
|
|
195
|
+
<a name="SRC+showButton" id="SRC+showButton" href="#SRC+showButton"> </a>
|
|
196
|
+
|
|
197
|
+
### srC.showButton()
|
|
198
|
+
Using this method you can show the SRC button after using hideButton method
|
|
199
|
+
|
|
200
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
201
|
+
**Example**
|
|
202
|
+
```js
|
|
203
|
+
SRC.showButton();
|
|
204
|
+
```
|
|
205
|
+
<a name="SRC+hideCheckout" id="SRC+hideCheckout" href="#SRC+hideCheckout"> </a>
|
|
206
|
+
|
|
207
|
+
### srC.hideCheckout([saveSize])
|
|
208
|
+
Using this method you can hide checkout after load and button click
|
|
209
|
+
|
|
210
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
211
|
+
|
|
212
|
+
| Param | Type | Default | Description |
|
|
213
|
+
| --- | --- | --- | --- |
|
|
214
|
+
| [saveSize] | <code>boolean</code> | <code>false</code> | using this param you can save iframe's size (if applicable) |
|
|
215
|
+
|
|
216
|
+
**Example**
|
|
217
|
+
```js
|
|
218
|
+
SRC.hideCheckout();
|
|
219
|
+
```
|
|
220
|
+
<a name="SRC+showCheckout" id="SRC+showCheckout" href="#SRC+showCheckout"> </a>
|
|
221
|
+
|
|
222
|
+
### srC.showCheckout()
|
|
223
|
+
Using this method you can show checkout after using hideCheckout method
|
|
224
|
+
|
|
225
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
226
|
+
**Example**
|
|
227
|
+
```js
|
|
228
|
+
SRC.showCheckout()
|
|
229
|
+
```
|
|
230
|
+
<a name="SRC+reload" id="SRC+reload" href="#SRC+reload"> </a>
|
|
231
|
+
|
|
232
|
+
### srC.reload()
|
|
233
|
+
Using this method you can reload the whole checkout
|
|
234
|
+
|
|
235
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
236
|
+
**Example**
|
|
237
|
+
```js
|
|
238
|
+
SRC.reload()
|
|
239
|
+
```
|
|
240
|
+
<a name="SRC+useAutoResize" id="SRC+useAutoResize" href="#SRC+useAutoResize"> </a>
|
|
241
|
+
|
|
242
|
+
### srC.useAutoResize()
|
|
243
|
+
Use this method for resize checkout iFrame according to content height, if applicable
|
|
244
|
+
|
|
245
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
246
|
+
**Example**
|
|
247
|
+
```js
|
|
248
|
+
SRC.useAutoResize();
|
|
249
|
+
```
|
|
250
|
+
<a name="EVENT" id="EVENT" href="#EVENT"> </a>
|
|
251
|
+
|
|
252
|
+
## EVENT : <code>enum</code>
|
|
253
|
+
List of available event's name in the SRC checkout lifecycle
|
|
254
|
+
|
|
255
|
+
**Kind**: global enum
|
|
256
|
+
|
|
257
|
+
| Param | Type | Default |
|
|
258
|
+
| --- | --- | --- |
|
|
259
|
+
| CHECKOUT_BUTTON_LOADED | <code>string</code> | <code>"checkoutButtonLoaded"</code> |
|
|
260
|
+
| CHECKOUT_BUTTON_CLICKED | <code>string</code> | <code>"checkoutButtonClicked"</code> |
|
|
261
|
+
| IFRAME_LOADED | <code>string</code> | <code>"iframeLoaded"</code> |
|
|
262
|
+
| CHECKOUT_READY | <code>string</code> | <code>"checkoutReady"</code> |
|
|
263
|
+
| CHECKOUT_COMPLETED | <code>string</code> | <code>"checkoutCompleted"</code> |
|
|
264
|
+
| CHECKOUT_ERROR | <code>string</code> | <code>"checkoutError"</code> |
|
|
265
|
+
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
## Vault Display Widget
|
|
2
|
+
You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#vault-display-widget)
|
|
3
|
+
|
|
4
|
+
The vault display form allows viewing card number and CVV. The form can be customised according to your needs.
|
|
5
|
+
You can set styles as well as subscribe to widget events that help monitor user’s actions in real time.
|
|
6
|
+
|
|
7
|
+
## Vault Display Widget simple example
|
|
8
|
+
|
|
9
|
+
### Container
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<div id="widget"></div>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
You must create a container for the widget. Inside this tag, the widget will be initialized
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Initialization
|
|
19
|
+
```javascript
|
|
20
|
+
var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
21
|
+
widget.load();
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
// ES2015 | TypeScript
|
|
26
|
+
|
|
27
|
+
import { VaultDisplayWidget } from '@paydock/client-sdk';
|
|
28
|
+
|
|
29
|
+
var widget = new VaultDisplayWidget('#widget', 'token');
|
|
30
|
+
widget.load();
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Then write only need 2 lines of code in js to initialize widget
|
|
34
|
+
|
|
35
|
+
### Full example
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<!DOCTYPE html>
|
|
39
|
+
<html lang="en">
|
|
40
|
+
<head>
|
|
41
|
+
<meta charset="UTF-8">
|
|
42
|
+
<title>Title</title>
|
|
43
|
+
<style>iframe {border: 0;width: 100%;height: 300px;}</style>
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
<div id="widget"></div>
|
|
48
|
+
|
|
49
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
50
|
+
<script>
|
|
51
|
+
var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
52
|
+
widget.load();
|
|
53
|
+
</script>
|
|
54
|
+
</body>
|
|
55
|
+
</html>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Widget advanced example
|
|
59
|
+
|
|
60
|
+
### Customization
|
|
61
|
+
|
|
62
|
+
```javascript
|
|
63
|
+
widget.setEnv('sandbox');
|
|
64
|
+
|
|
65
|
+
widget.on('after_load', function (data) {
|
|
66
|
+
console.log(data);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
widget.on('cvv_secure_code_requested', function (data) {
|
|
70
|
+
console.log(data);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
widget.on('card_number_secure_code_requested', function (data) {
|
|
74
|
+
console.log(data);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
widget.setStyles({
|
|
78
|
+
background_color: 'rgb(0, 0, 0)',
|
|
79
|
+
border_color: 'yellow',
|
|
80
|
+
text_color: '#FFFFAA',
|
|
81
|
+
button_color: 'rgba(255, 255, 255, 0.9)',
|
|
82
|
+
font_size: '20px'
|
|
83
|
+
});
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
This example shows how you can use a lot of other methods to settings your form
|
|
87
|
+
|
|
88
|
+
### Full example
|
|
89
|
+
|
|
90
|
+
```html
|
|
91
|
+
<!DOCTYPE html>
|
|
92
|
+
<html lang="en">
|
|
93
|
+
<head>
|
|
94
|
+
<meta charset="UTF-8">
|
|
95
|
+
<title>Title</title>
|
|
96
|
+
<style>iframe {border: 0;width: 40%;height: 450px;}</style>
|
|
97
|
+
</head>
|
|
98
|
+
<body>
|
|
99
|
+
|
|
100
|
+
<div id="widget"></div>
|
|
101
|
+
|
|
102
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
103
|
+
<script>
|
|
104
|
+
var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
105
|
+
|
|
106
|
+
widget.setEnv('sandbox');
|
|
107
|
+
|
|
108
|
+
widget.on('after_load', function (data) {
|
|
109
|
+
console.log(data);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
widget.on('cvv_secure_code_requested', function (data) {
|
|
113
|
+
console.log(data);
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
widget.on('card_number_secure_code_requested', function (data) {
|
|
117
|
+
console.log(data);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
widget.setStyles({
|
|
121
|
+
background_color: 'rgb(0, 0, 0)',
|
|
122
|
+
border_color: 'yellow',
|
|
123
|
+
text_color: '#FFFFAA',
|
|
124
|
+
button_color: 'rgba(255, 255, 255, 0.9)',
|
|
125
|
+
font_size: '20px'
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
widget.load();
|
|
129
|
+
</script>
|
|
130
|
+
</body>
|
|
131
|
+
</html>
|
|
132
|
+
```
|