@paydock/client-sdk 1.104.6-beta → 1.105.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nvmrc +1 -0
- package/README.md +320 -362
- package/api.d.ts +1 -0
- package/api.js +1 -0
- package/bundles/widget.umd.js +7410 -6717
- package/bundles/widget.umd.min.js +1 -2
- package/canvas3ds.d.ts +1 -0
- package/canvas3ds.js +1 -0
- package/checkout-button.d.ts +1 -0
- package/checkout-button.js +1 -0
- package/inicialization-guide.md +7 -0
- package/{bundles/types → lib}/api/api-base.d.ts +1 -2
- package/lib/api/api-base.js +101 -0
- package/lib/api/api-base.js.map +1 -0
- package/{bundles/types → lib}/api/api-charge-internal.d.ts +0 -1
- package/lib/api/api-charge-internal.js +30 -0
- package/lib/api/api-charge-internal.js.map +1 -0
- package/{bundles/types → lib}/api/api-charge.d.ts +0 -1
- package/lib/api/api-charge.js +49 -0
- package/lib/api/api-charge.js.map +1 -0
- package/{bundles/types → lib}/api/api-internal.d.ts +0 -1
- package/lib/api/api-internal.js +13 -0
- package/lib/api/api-internal.js.map +1 -0
- package/{bundles/types → lib}/api/api-service-internal.d.ts +1 -3
- package/lib/api/api-service-internal.js +18 -0
- package/lib/api/api-service-internal.js.map +1 -0
- package/{bundles/types → lib}/api/api.d.ts +0 -1
- package/lib/api/api.js +62 -0
- package/lib/api/api.js.map +1 -0
- package/lib/api/index.d.ts +1 -0
- package/lib/api/index.js +2 -0
- package/lib/api/index.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/canvas-3ds.d.ts +0 -1
- package/lib/canvas-3ds/canvas-3ds.js +157 -0
- package/lib/canvas-3ds/canvas-3ds.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/index.d.ts +0 -1
- package/lib/canvas-3ds/index.js +2 -0
- package/lib/canvas-3ds/index.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/services/gpayments-service.d.ts +0 -1
- package/lib/canvas-3ds/services/gpayments-service.js +181 -0
- package/lib/canvas-3ds/services/gpayments-service.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/services/index.d.ts +0 -1
- package/lib/canvas-3ds/services/index.js +2 -0
- package/lib/canvas-3ds/services/index.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/services/standalone3ds-service.d.ts +0 -1
- package/lib/canvas-3ds/services/standalone3ds-service.js +32 -0
- package/lib/canvas-3ds/services/standalone3ds-service.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/afterpay/afterpay-checkout-button.d.ts +0 -1
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js +50 -0
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/afterpay/afterpay.runner.d.ts +0 -1
- package/lib/checkout-button/afterpay/afterpay.runner.js +41 -0
- package/lib/checkout-button/afterpay/afterpay.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/checkout-button.d.ts +0 -1
- package/{bundles/types → lib}/checkout-button/checkout-button.interface.d.ts +0 -1
- package/lib/checkout-button/checkout-button.interface.js +45 -0
- package/lib/checkout-button/checkout-button.interface.js.map +1 -0
- package/lib/checkout-button/checkout-button.js +266 -0
- package/lib/checkout-button/checkout-button.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/checkout-contextual-handler.d.ts +0 -1
- package/lib/checkout-button/checkout-contextual-handler.js +75 -0
- package/lib/checkout-button/checkout-contextual-handler.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/index.d.ts +1 -2
- package/lib/checkout-button/index.js +85 -0
- package/lib/checkout-button/index.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/paypal/paypal-checkout-button.d.ts +0 -1
- package/lib/checkout-button/paypal/paypal-checkout-button.js +25 -0
- package/lib/checkout-button/paypal/paypal-checkout-button.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/paypal/paypal.runner.d.ts +0 -1
- package/lib/checkout-button/paypal/paypal.runner.js +14 -0
- package/lib/checkout-button/paypal/paypal.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/base.runner.d.ts +3 -4
- package/lib/checkout-button/runner/base.runner.js +13 -0
- package/lib/checkout-button/runner/base.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/contextual.runner.d.ts +1 -2
- package/lib/checkout-button/runner/contextual.runner.js +40 -0
- package/lib/checkout-button/runner/contextual.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/index.d.ts +0 -1
- package/lib/checkout-button/runner/index.js +11 -0
- package/lib/checkout-button/runner/index.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/popup.runner.d.ts +1 -2
- package/lib/checkout-button/runner/popup.runner.js +68 -0
- package/lib/checkout-button/runner/popup.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/redirect.runner.d.ts +1 -2
- package/lib/checkout-button/runner/redirect.runner.js +15 -0
- package/lib/checkout-button/runner/redirect.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +0 -1
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +64 -0
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +1 -2
- package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js +78 -0
- package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +1 -2
- package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js +49 -0
- package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.config.d.ts +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.config.js +4 -0
- package/lib/checkout-button/zipmoney/zipmoney.config.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.runner.d.ts +1 -2
- package/lib/checkout-button/zipmoney/zipmoney.runner.js +23 -0
- package/lib/checkout-button/zipmoney/zipmoney.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.types.d.ts +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.types.js +1 -0
- package/lib/checkout-button/zipmoney/zipmoney.types.js.map +1 -0
- package/{bundles/types → lib}/components/ability-guard.d.ts +0 -1
- package/lib/components/ability-guard.js +44 -0
- package/lib/components/ability-guard.js.map +1 -0
- package/{bundles/types → lib}/components/background.d.ts +0 -1
- package/lib/components/background.js +193 -0
- package/lib/components/background.js.map +1 -0
- package/{bundles/types → lib}/components/container.d.ts +0 -1
- package/lib/components/container.js +63 -0
- package/lib/components/container.js.map +1 -0
- package/{bundles/types → lib}/components/dispatcher.d.ts +1 -2
- package/lib/components/dispatcher.js +39 -0
- package/lib/components/dispatcher.js.map +1 -0
- package/{bundles/types → lib}/components/element-style.d.ts +1 -2
- package/lib/components/element-style.js +52 -0
- package/lib/components/element-style.js.map +1 -0
- package/{bundles/types → lib}/components/flypay-iframe-event.d.ts +0 -1
- package/lib/components/flypay-iframe-event.js +28 -0
- package/lib/components/flypay-iframe-event.js.map +1 -0
- package/{bundles/types/components/form-interceptor.d.ts → lib/components/form-Interceptor.d.ts} +0 -1
- package/lib/components/form-Interceptor.js +38 -0
- package/lib/components/form-Interceptor.js.map +1 -0
- package/{bundles/types → lib}/components/http-core.d.ts +0 -1
- package/lib/components/http-core.js +57 -0
- package/lib/components/http-core.js.map +1 -0
- package/{bundles/types → lib}/components/iframe-event.d.ts +0 -4
- package/lib/components/iframe-event.js +75 -0
- package/lib/components/iframe-event.js.map +1 -0
- package/{bundles/types → lib}/components/iframe.d.ts +0 -1
- package/lib/components/iframe.js +62 -0
- package/lib/components/iframe.js.map +1 -0
- package/{bundles/types → lib}/components/link.d.ts +3 -5
- package/lib/components/link.js +59 -0
- package/lib/components/link.js.map +1 -0
- package/{bundles/types → lib}/components/loader.d.ts +0 -1
- package/lib/components/loader.js +234 -0
- package/lib/components/loader.js.map +1 -0
- package/{bundles/types → lib}/components/param.d.ts +9 -10
- package/lib/components/param.js +147 -0
- package/lib/components/param.js.map +1 -0
- package/{bundles/types → lib}/components/popup.d.ts +0 -1
- package/lib/components/popup.js +104 -0
- package/lib/components/popup.js.map +1 -0
- package/{bundles/types → lib}/components/storage-dispatcher.d.ts +0 -1
- package/lib/components/storage-dispatcher.js +75 -0
- package/lib/components/storage-dispatcher.js.map +1 -0
- package/{bundles/types → lib}/components/trigger.d.ts +0 -1
- package/lib/components/trigger.js +49 -0
- package/lib/components/trigger.js.map +1 -0
- package/{bundles/types → lib}/components/vault-display-iframe-event.d.ts +0 -1
- package/lib/components/vault-display-iframe-event.js +27 -0
- package/lib/components/vault-display-iframe-event.js.map +1 -0
- package/{bundles/types → lib}/components/wallet-background.d.ts +0 -1
- package/lib/components/wallet-background.js +63 -0
- package/lib/components/wallet-background.js.map +1 -0
- package/{bundles/types → lib}/components/wallet-trigger.d.ts +0 -1
- package/lib/components/wallet-trigger.js +27 -0
- package/lib/components/wallet-trigger.js.map +1 -0
- package/{bundles/types/configs/env/environment.paydock.d.ts → lib/configs/env/env.d.ts} +8 -5
- package/lib/configs/env/env.js +117 -0
- package/lib/configs/env/env.js.map +1 -0
- package/{bundles/types → lib}/configs/sdk.d.ts +2 -3
- package/lib/configs/sdk.js +16 -0
- package/lib/configs/sdk.js.map +1 -0
- package/{bundles/types → lib}/constants/validators.d.ts +2 -3
- package/lib/constants/validators.js +42 -0
- package/lib/constants/validators.js.map +1 -0
- package/{bundles/types → lib}/external-checkout/builder.d.ts +0 -1
- package/lib/external-checkout/builder.js +45 -0
- package/lib/external-checkout/builder.js.map +1 -0
- package/{bundles/types → lib}/external-checkout/checker.d.ts +0 -1
- package/lib/external-checkout/checker.js +22 -0
- package/lib/external-checkout/checker.js.map +1 -0
- package/lib/external-checkout/index.d.ts +2 -0
- package/lib/external-checkout/index.js +3 -0
- package/lib/external-checkout/index.js.map +1 -0
- package/{bundles/types → lib}/helper/access-token.d.ts +0 -1
- package/lib/helper/access-token.js +44 -0
- package/lib/helper/access-token.js.map +1 -0
- package/{bundles/types → lib}/helper/browser.d.ts +0 -1
- package/lib/helper/browser.js +79 -0
- package/lib/helper/browser.js.map +1 -0
- package/{bundles/types → lib}/helper/event-emitter.d.ts +0 -1
- package/lib/helper/event-emitter.js +23 -0
- package/lib/helper/event-emitter.js.map +1 -0
- package/{bundles/types → lib}/helper/event.d.ts +0 -1
- package/lib/helper/event.js +23 -0
- package/lib/helper/event.js.map +1 -0
- package/{bundles/types → lib}/helper/ms.d.ts +0 -1
- package/lib/helper/ms.js +32 -0
- package/lib/helper/ms.js.map +1 -0
- package/{bundles/types → lib}/helper/object.d.ts +0 -1
- package/lib/helper/object.js +6 -0
- package/lib/helper/object.js.map +1 -0
- package/{bundles/types → lib}/helper/url.d.ts +0 -1
- package/lib/helper/url.js +11 -0
- package/lib/helper/url.js.map +1 -0
- package/{bundles/types → lib}/helper/uuid.d.ts +0 -1
- package/lib/helper/uuid.js +26 -0
- package/lib/helper/uuid.js.map +1 -0
- package/lib/index.d.ts +15 -0
- package/lib/index.js +15 -0
- package/lib/index.js.map +1 -0
- package/{bundles/types → lib}/payment-source/builder.d.ts +0 -1
- package/lib/payment-source/builder.js +49 -0
- package/lib/payment-source/builder.js.map +1 -0
- package/{bundles/types → lib}/payment-source/index.d.ts +0 -1
- package/lib/payment-source/index.js +2 -0
- package/lib/payment-source/index.js.map +1 -0
- package/{bundles/types → lib}/payment-source-widget/html-payment-source-widget.d.ts +0 -1
- package/lib/payment-source-widget/html-payment-source-widget.js +172 -0
- package/lib/payment-source-widget/html-payment-source-widget.js.map +1 -0
- package/{bundles/types → lib}/payment-source-widget/index.d.ts +0 -1
- package/lib/payment-source-widget/index.js +35 -0
- package/lib/payment-source-widget/index.js.map +1 -0
- package/{bundles/types → lib}/payment-source-widget/interfaces.d.ts +0 -1
- package/lib/payment-source-widget/interfaces.js +2 -0
- package/lib/payment-source-widget/interfaces.js.map +1 -0
- package/{bundles/types → lib}/payment-source-widget/payment-source-widget.d.ts +0 -1
- package/lib/payment-source-widget/payment-source-widget.js +142 -0
- package/lib/payment-source-widget/payment-source-widget.js.map +1 -0
- package/lib/secure-remote-commerce/index.d.ts +1 -0
- package/lib/secure-remote-commerce/index.js +2 -0
- package/lib/secure-remote-commerce/index.js.map +1 -0
- package/lib/secure-remote-commerce/interfaces.d.ts +71 -0
- package/lib/secure-remote-commerce/interfaces.js +28 -0
- package/lib/secure-remote-commerce/interfaces.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/providers/src-provider.d.ts +0 -1
- package/lib/secure-remote-commerce/providers/src-provider.js +1 -0
- package/lib/secure-remote-commerce/providers/src-provider.js.map +1 -0
- package/lib/secure-remote-commerce/providers/visa-src/helper.d.ts +7 -0
- package/lib/secure-remote-commerce/providers/visa-src/helper.js +36 -0
- package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +1 -0
- package/lib/secure-remote-commerce/providers/visa-src/index.d.ts +1 -0
- package/lib/secure-remote-commerce/providers/visa-src/index.js +2 -0
- package/lib/secure-remote-commerce/providers/visa-src/index.js.map +1 -0
- package/{bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts → lib/secure-remote-commerce/providers/visa-src/visa-src.d.ts} +7 -5
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +113 -0
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +1 -0
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +8 -0
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +10 -0
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +1 -0
- package/lib/secure-remote-commerce/secure-remote-commerce.d.ts +163 -0
- package/lib/secure-remote-commerce/secure-remote-commerce.js +239 -0
- package/lib/secure-remote-commerce/secure-remote-commerce.js.map +1 -0
- package/{bundles/types → lib}/vault-display-widget/index.d.ts +0 -1
- package/lib/vault-display-widget/index.js +14 -0
- package/lib/vault-display-widget/index.js.map +1 -0
- package/{bundles/types → lib}/vault-display-widget/vault-display-widget.d.ts +0 -1
- package/lib/vault-display-widget/vault-display-widget.js +99 -0
- package/lib/vault-display-widget/vault-display-widget.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/afterpay.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/afterpay.wallet-service.js +152 -0
- package/lib/wallet-buttons/afterpay.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/apple.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/apple.wallet-service.js +324 -0
- package/lib/wallet-buttons/apple.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/flypay-v2.wallet-service.d.ts +1 -1
- package/lib/wallet-buttons/flypay-v2.wallet-service.js +165 -0
- package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/flypay.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/flypay.wallet-service.js +117 -0
- package/lib/wallet-buttons/flypay.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/google.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/google.wallet-service.js +301 -0
- package/lib/wallet-buttons/google.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/helpers/flypay-v2.helper.d.ts +0 -1
- package/lib/wallet-buttons/helpers/flypay-v2.helper.js +151 -0
- package/lib/wallet-buttons/helpers/flypay-v2.helper.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/index.d.ts +0 -1
- package/lib/wallet-buttons/index.js +128 -0
- package/lib/wallet-buttons/index.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/interfaces.d.ts +0 -1
- package/lib/wallet-buttons/interfaces.js +1 -0
- package/lib/wallet-buttons/interfaces.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/mastercard.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/mastercard.wallet-service.js +27 -0
- package/lib/wallet-buttons/mastercard.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/paypal.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/paypal.wallet-service.js +144 -0
- package/lib/wallet-buttons/paypal.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/stripe.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/stripe.wallet-service.js +100 -0
- package/lib/wallet-buttons/stripe.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/wallet-buttons.d.ts +0 -1
- package/lib/wallet-buttons/wallet-buttons.js +479 -0
- package/lib/wallet-buttons/wallet-buttons.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/wallet-service.js +60 -0
- package/lib/wallet-buttons/wallet-service.js.map +1 -0
- package/{bundles/types → lib}/widget/configuration.d.ts +1 -2
- package/lib/widget/configuration.js +260 -0
- package/lib/widget/configuration.js.map +1 -0
- package/{bundles/types → lib}/widget/html-multi-widget.d.ts +3 -4
- package/lib/widget/html-multi-widget.js +422 -0
- package/lib/widget/html-multi-widget.js.map +1 -0
- package/{bundles/types → lib}/widget/html-widget.d.ts +0 -1
- package/lib/widget/html-widget.js +127 -0
- package/lib/widget/html-widget.js.map +1 -0
- package/{bundles/types → lib}/widget/index.d.ts +1 -2
- package/lib/widget/index.js +132 -0
- package/lib/widget/index.js.map +1 -0
- package/{bundles/types → lib}/widget/meta.d.ts +0 -1
- package/lib/widget/meta.js +8 -0
- package/lib/widget/meta.js.map +1 -0
- package/{bundles/types → lib}/widget/multi-widget.d.ts +1 -2
- package/lib/widget/multi-widget.js +437 -0
- package/lib/widget/multi-widget.js.map +1 -0
- package/{bundles/types → lib}/widget/style.d.ts +0 -1
- package/lib/widget/style.js +204 -0
- package/lib/widget/style.js.map +1 -0
- package/package.json +42 -164
- package/payment-source-widget.d.ts +1 -0
- package/payment-source-widget.js +1 -0
- package/slate.md +189 -163
- package/tslint.json +129 -0
- package/typings/globals/@auspayplus/open-payments-checkout/index.d.ts +43 -0
- package/typings/globals/jasmine/index.d.ts +576 -0
- package/typings/globals/jasmine-ajax/index.d.ts +83 -0
- package/typings/globals/jquery/index.d.ts +3759 -0
- package/typings/index.d.ts +4 -0
- package/vault-display-widget.d.ts +1 -0
- package/vault-display-widget.js +1 -0
- package/vendors/zipmoney.d.ts +18 -0
- package/vendors/zipmoney.js +2 -0
- package/widget.d.ts +1 -0
- package/widget.js +1 -0
- package/bundles/index.cjs +0 -10456
- package/bundles/index.cjs.d.ts +0 -3206
- package/bundles/index.cjs.map +0 -1
- package/bundles/index.mjs +0 -10424
- package/bundles/index.mjs.d.ts +0 -3206
- package/bundles/index.mjs.map +0 -1
- package/bundles/types/api/api-base.d.ts.map +0 -1
- package/bundles/types/api/api-charge-internal.d.ts.map +0 -1
- package/bundles/types/api/api-charge.d.ts.map +0 -1
- package/bundles/types/api/api-internal.d.ts.map +0 -1
- package/bundles/types/api/api-service-internal.d.ts.map +0 -1
- package/bundles/types/api/api.d.ts.map +0 -1
- package/bundles/types/api/index.d.ts +0 -2
- package/bundles/types/api/index.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/index.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/services/index.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +0 -1
- package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +0 -1
- package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/checkout-button.d.ts.map +0 -1
- package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +0 -1
- package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +0 -1
- package/bundles/types/checkout-button/index.d.ts.map +0 -1
- package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +0 -1
- package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/base.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/index.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/redirect.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/index.d.ts +0 -4
- package/bundles/types/checkout-button/zipmoney/index.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +0 -1
- package/bundles/types/components/ability-guard.d.ts.map +0 -1
- package/bundles/types/components/background.d.ts.map +0 -1
- package/bundles/types/components/container.d.ts.map +0 -1
- package/bundles/types/components/dispatcher.d.ts.map +0 -1
- package/bundles/types/components/element-style.d.ts.map +0 -1
- package/bundles/types/components/flypay-iframe-event.d.ts.map +0 -1
- package/bundles/types/components/form-interceptor.d.ts.map +0 -1
- package/bundles/types/components/http-core.d.ts.map +0 -1
- package/bundles/types/components/iframe-event.d.ts.map +0 -1
- package/bundles/types/components/iframe.d.ts.map +0 -1
- package/bundles/types/components/link.d.ts.map +0 -1
- package/bundles/types/components/loader.d.ts.map +0 -1
- package/bundles/types/components/param.d.ts.map +0 -1
- package/bundles/types/components/popup.d.ts.map +0 -1
- package/bundles/types/components/storage-dispatcher.d.ts.map +0 -1
- package/bundles/types/components/trigger.d.ts.map +0 -1
- package/bundles/types/components/vault-display-iframe-event.d.ts.map +0 -1
- package/bundles/types/components/wallet-background.d.ts.map +0 -1
- package/bundles/types/components/wallet-trigger.d.ts.map +0 -1
- package/bundles/types/configs/env/environment.cba.d.ts +0 -29
- package/bundles/types/configs/env/environment.cba.d.ts.map +0 -1
- package/bundles/types/configs/env/environment.interface.d.ts +0 -12
- package/bundles/types/configs/env/environment.interface.d.ts.map +0 -1
- package/bundles/types/configs/env/environment.paydock.d.ts.map +0 -1
- package/bundles/types/configs/env/index.d.ts +0 -3
- package/bundles/types/configs/env/index.d.ts.map +0 -1
- package/bundles/types/configs/sdk.d.ts.map +0 -1
- package/bundles/types/constants/validators.d.ts.map +0 -1
- package/bundles/types/external-checkout/builder.d.ts.map +0 -1
- package/bundles/types/external-checkout/checker.d.ts.map +0 -1
- package/bundles/types/external-checkout/index.d.ts +0 -3
- package/bundles/types/external-checkout/index.d.ts.map +0 -1
- package/bundles/types/helper/access-token.d.ts.map +0 -1
- package/bundles/types/helper/browser.d.ts.map +0 -1
- package/bundles/types/helper/event-emitter.d.ts.map +0 -1
- package/bundles/types/helper/event.d.ts.map +0 -1
- package/bundles/types/helper/ms.d.ts.map +0 -1
- package/bundles/types/helper/object.d.ts.map +0 -1
- package/bundles/types/helper/url.d.ts.map +0 -1
- package/bundles/types/helper/uuid.d.ts.map +0 -1
- package/bundles/types/index-cba.d.ts +0 -13
- package/bundles/types/index-cba.d.ts.map +0 -1
- package/bundles/types/index.d.ts +0 -14
- package/bundles/types/index.d.ts.map +0 -1
- package/bundles/types/payment-source/builder.d.ts.map +0 -1
- package/bundles/types/payment-source/index.d.ts.map +0 -1
- package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +0 -1
- package/bundles/types/payment-source-widget/index.d.ts.map +0 -1
- package/bundles/types/payment-source-widget/interfaces.d.ts.map +0 -1
- package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/index.d.ts +0 -103
- package/bundles/types/secure-remote-commerce/index.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/interfaces.d.ts +0 -149
- package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts +0 -31
- package/bundles/types/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts +0 -2
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts +0 -86
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +0 -1
- package/bundles/types/vault-display-widget/index.d.ts.map +0 -1
- package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/index-cba.d.ts +0 -2
- package/bundles/types/wallet-buttons/index-cba.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/index.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/interfaces.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts +0 -330
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/wallet-service.d.ts.map +0 -1
- package/bundles/types/widget/configuration.d.ts.map +0 -1
- package/bundles/types/widget/html-multi-widget.d.ts.map +0 -1
- package/bundles/types/widget/html-widget.d.ts.map +0 -1
- package/bundles/types/widget/index.d.ts.map +0 -1
- package/bundles/types/widget/meta.d.ts.map +0 -1
- package/bundles/types/widget/multi-widget.d.ts.map +0 -1
- package/bundles/types/widget/style.d.ts.map +0 -1
- package/bundles/widget.umd.js.d.ts +0 -3206
- package/bundles/widget.umd.js.map +0 -1
- package/bundles/widget.umd.js.min.d.ts +0 -3206
- package/bundles/widget.umd.min.js.map +0 -1
- package/docs/api-canvas3ds.md +0 -158
- package/docs/api-checkout-button.md +0 -912
- package/docs/api-examples.md +0 -65
- package/docs/api-ps-widget.md +0 -585
- package/docs/api-vault-display.md +0 -94
- package/docs/api-widget.md +0 -2499
- package/docs/api-wrapper.md +0 -78
- package/docs/canvas3ds-examples.md +0 -242
- package/docs/cba-header.md +0 -13
- package/docs/cba-license.md +0 -2
- package/docs/checkout-examples.md +0 -248
- package/docs/header.md +0 -15
- package/docs/html/layout.html +0 -78
- package/docs/html/marked.js +0 -23
- package/docs/html/style.css +0 -365
- package/docs/install/npm.content.md +0 -16
- package/docs/install/npm.example.md +0 -24
- package/docs/install/umd.content.md +0 -20
- package/docs/install/umd.example.md +0 -6
- package/docs/install.md +0 -43
- package/docs/install.readme.t.md +0 -17
- package/docs/install.slate.t.md +0 -17
- package/docs/license.md +0 -2
- package/docs/partials/header.hbs +0 -3
- package/docs/ps-examples.md +0 -129
- package/docs/secure-remote-commerce-examples.md +0 -232
- package/docs/secure-remote-commerce.md +0 -336
- package/docs/vault-display-example.md +0 -132
- package/docs/wallet-buttons-examples.md +0 -609
- package/docs/wallet-buttons.md +0 -619
- package/docs/wallet-cba-buttons-examples.md +0 -388
- package/docs/widget-examples.md +0 -134
package/slate.md
CHANGED
|
@@ -16,10 +16,6 @@ Also you will need added gateway ([see API Reference by gateway](https://docs.pa
|
|
|
16
16
|
|
|
17
17
|
## Get started
|
|
18
18
|
|
|
19
|
-
The Client SDK ships in JavaScript ES6 (EcmaScript 2015) in three different
|
|
20
|
-
formats (CJS, ESM and UMD) along with respective TypeScript declarations. Below,
|
|
21
|
-
we exemplify how to import each format.
|
|
22
|
-
|
|
23
19
|
### Download from CDN
|
|
24
20
|
|
|
25
21
|
```html
|
|
@@ -29,73 +25,77 @@ we exemplify how to import each format.
|
|
|
29
25
|
</script>
|
|
30
26
|
```
|
|
31
27
|
|
|
28
|
+
You should begin by including the library in your page.
|
|
29
|
+
|
|
30
|
+
Add this script tag to your page to get started with with the url below:
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
using one and only of the two script tags below. After this step you will be
|
|
36
|
-
able to access the Client SDK features via the global variable `paydock`.
|
|
32
|
+
*Compressed version for production*
|
|
33
|
+
`https://widget.paydock.com/sdk/latest/widget.umd.min.js`
|
|
37
34
|
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
*Full version for development and debug*
|
|
36
|
+
`https://widget.paydock.com/sdk/latest/widget.umd.js`
|
|
40
37
|
|
|
41
|
-
- *Compressed version for production: `https://widget.paydock.com/sdk/latest/widget.umd.min.js`*
|
|
42
38
|
|
|
43
|
-
- *Full version for development and debug: `https://widget.paydock.com/sdk/latest/widget.umd.js`*
|
|
44
39
|
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
|
|
41
|
+
Also can download library the [production version][min] or the [development version][max]
|
|
47
42
|
|
|
48
43
|
[min]: https://widget.paydock.com/sdk/latest/widget.umd.min.js
|
|
49
44
|
[max]: https://widget.paydock.com/sdk/latest/widget.umd.js
|
|
50
45
|
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
|
|
47
|
+
The library will always be available via the global variable `paydock`.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
Also for more advanced use, the library has [UMD](https://github.com/umdjs/umd) format, thus can be used in requireJs, webpack, etc.
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
53
59
|
|
|
54
60
|
|
|
55
61
|
### With package manager
|
|
56
62
|
|
|
57
|
-
```cjs
|
|
58
|
-
// module import - CommonJS/Node projects ✅
|
|
59
|
-
const paydock = require('@paydock/client-sdk')
|
|
60
|
-
const api = new paydock.Api('publicKey');
|
|
61
|
-
```
|
|
62
63
|
|
|
63
|
-
```
|
|
64
|
-
//
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
```
|
|
64
|
+
```javascript--es2015
|
|
65
|
+
// ES2015 / TypeScript
|
|
66
|
+
|
|
67
|
+
import { HtmlWidget } from '@paydock/client-sdk/widget';
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
// namespaced import - ESM projects or TypeScript projects ✅
|
|
71
|
-
import * as Paydock from '@paydock/client-sdk'
|
|
72
|
-
const widget = new Paydock.HtmlWidget('#selector', 'publicKey', 'gatewayId');
|
|
69
|
+
let widget = new HtmlWidget('#selector', 'publicKey', 'gatewayId');
|
|
73
70
|
```
|
|
74
71
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
|
|
73
|
+
```html
|
|
74
|
+
<script src="@paydock/client-sdk/bundles/widget.umd.min.js"></script>
|
|
75
|
+
<script>
|
|
76
|
+
var widget = new paydock.HtmlWidget('#tag', 'publicKey', 'gatewayId');
|
|
77
|
+
</script>
|
|
80
78
|
```
|
|
81
79
|
|
|
82
80
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
To install with package manager, enter the following command:
|
|
82
|
+
|
|
83
|
+
`npm install @paydock/client-sdk`
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
You can use ES2015 or TypeScript modules
|
|
87
|
+
|
|
88
|
+
`@paydock/client-sdk/widget`
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
Also can use UMD module (global visibility, see above)
|
|
92
|
+
|
|
93
|
+
`@paydock/client-sdk/bundles/widget.umd.js`
|
|
94
|
+
|
|
95
|
+
`@paydock/client-sdk/bundles/widget.umd.min.js`
|
|
96
|
+
|
|
86
97
|
|
|
87
|
-
```bash
|
|
88
|
-
npm install @paydock/client-sdk
|
|
89
|
-
```
|
|
90
98
|
|
|
91
|
-
After installation is complete, if you are developing in NodeJS environments or
|
|
92
|
-
using tools that expect your JavaScript code to be in CJS format (e.g., Jest,
|
|
93
|
-
Karma, RequireJS, Webpack), you can import the Client SDK using CommonJS modules.
|
|
94
|
-
For these environments the UMD format (`@paydock/client-sdk/bundles/widget.umd.js`)
|
|
95
|
-
can also be used as a fallback. Alternatively, in case you are developing in
|
|
96
|
-
projects that have access to modern bundlers such as Vite or others (e.g., SPA
|
|
97
|
-
libs or SSR Metaframeworks), you can import the Client SDK features using ESM
|
|
98
|
-
through named imports or namespaced imports.
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
## Widget
|
|
@@ -122,11 +122,11 @@ var widget = new paydock.HtmlWidget('#widget', 'publicKey');
|
|
|
122
122
|
widget.load();
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
```javascript
|
|
125
|
+
```javascript--es2015
|
|
126
126
|
// ES2015 | TypeScript
|
|
127
127
|
|
|
128
|
-
import { HtmlWidget } from '@paydock/client-sdk';
|
|
129
|
-
|
|
128
|
+
import { HtmlWidget } from '@paydock/client-sdk/widget';
|
|
129
|
+
|
|
130
130
|
var widget = new HtmlWidget('#widget', 'publicKey');
|
|
131
131
|
widget.load();
|
|
132
132
|
```
|
|
@@ -134,7 +134,7 @@ widget.load();
|
|
|
134
134
|
Then write only need 2 lines of code in js to initialize widget
|
|
135
135
|
|
|
136
136
|
|
|
137
|
-
### Full example
|
|
137
|
+
### Full example
|
|
138
138
|
|
|
139
139
|
```html
|
|
140
140
|
<!DOCTYPE html>
|
|
@@ -197,9 +197,9 @@ widget.setFormFields(['phone', 'email']); // add additional fields for form of w
|
|
|
197
197
|
widget.setSupportedCardIcons(['mastercard', 'visa']); // add icons of supported card types
|
|
198
198
|
```
|
|
199
199
|
|
|
200
|
-
This example shows how you can use a lot of other methods to settings your form
|
|
200
|
+
This example shows how you can use a lot of other methods to settings your form
|
|
201
201
|
|
|
202
|
-
### Full example
|
|
202
|
+
### Full example
|
|
203
203
|
|
|
204
204
|
```html
|
|
205
205
|
<!DOCTYPE html>
|
|
@@ -220,12 +220,12 @@ This example shows how you can use a lot of other methods to settings your form
|
|
|
220
220
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.js" ></script>
|
|
221
221
|
<script>
|
|
222
222
|
var widget = new paydock.HtmlWidget('#widget', 'publicKey', 'gatewayId');
|
|
223
|
-
|
|
223
|
+
|
|
224
224
|
widget.setSupportedCardIcons(['mastercard', 'visa']);
|
|
225
225
|
widget.setFormFields(['phone', 'email']);
|
|
226
226
|
widget.setRefId('custom-ref-id');
|
|
227
227
|
widget.onFinishInsert('input[name="payment_source_token"]', 'payment_source');z
|
|
228
|
-
|
|
228
|
+
|
|
229
229
|
widget.load();
|
|
230
230
|
</script>
|
|
231
231
|
</script>
|
|
@@ -262,10 +262,10 @@ var list = new paydock.HtmlPaymentSourceWidget('#list', 'publicKey', 'queryToken
|
|
|
262
262
|
list.load();
|
|
263
263
|
```
|
|
264
264
|
|
|
265
|
-
```javascript
|
|
265
|
+
```javascript--es2015
|
|
266
266
|
// ES2015 | TypeScript
|
|
267
267
|
|
|
268
|
-
import { HtmlPaymentSourceWidget } from '@paydock/client-sdk';
|
|
268
|
+
import { HtmlPaymentSourceWidget } from '@paydock/client-sdk/payment-source-widget';
|
|
269
269
|
|
|
270
270
|
var list = new HtmlPaymentSourceWidget('#list', 'publicKey', 'queryToken');
|
|
271
271
|
list.load();
|
|
@@ -392,7 +392,7 @@ You must create a button to turn it into checkout-button
|
|
|
392
392
|
var button = new paydock.PaypalCheckoutButton('#button', 'publicKey', 'gatewayId');
|
|
393
393
|
```
|
|
394
394
|
|
|
395
|
-
```javascript
|
|
395
|
+
```javascript--es2015
|
|
396
396
|
// ES2015 | TypeScript
|
|
397
397
|
|
|
398
398
|
|
|
@@ -622,11 +622,11 @@ This wrapper helps you to work with paydock api emdpoints
|
|
|
622
622
|
var browserDetails = await new paydock.Api('publicKey').setEnv('env').getBrowserDetails();
|
|
623
623
|
```
|
|
624
624
|
|
|
625
|
-
```javascript
|
|
625
|
+
```javascript--es2015
|
|
626
626
|
// ES2015 | TypeScript
|
|
627
627
|
|
|
628
|
-
import { Api } from '@paydock/client-sdk';
|
|
629
|
-
|
|
628
|
+
import { Api } from '@paydock/client-sdk/api';
|
|
629
|
+
|
|
630
630
|
var browserDetails = await new paydock.Api('publicKey').setEnv('env').getBrowserDetails();
|
|
631
631
|
```
|
|
632
632
|
|
|
@@ -639,11 +639,11 @@ var response = await new paydock.Api('publicKey').setEnv('env').charge().preAuth
|
|
|
639
639
|
});
|
|
640
640
|
```
|
|
641
641
|
|
|
642
|
-
```javascript
|
|
642
|
+
```javascript--es2015
|
|
643
643
|
// ES2015 | TypeScript
|
|
644
644
|
|
|
645
|
-
import { Api } from '@paydock/client-sdk';
|
|
646
|
-
|
|
645
|
+
import { Api } from '@paydock/client-sdk/api';
|
|
646
|
+
|
|
647
647
|
var response = await new Api('publicKey').setEnv('env').charge().preAuth({
|
|
648
648
|
amount: 100,
|
|
649
649
|
currency: 'AUD',
|
|
@@ -653,7 +653,7 @@ var response = await new Api('publicKey').setEnv('env').charge().preAuth({
|
|
|
653
653
|
|
|
654
654
|
Then write only need 2 lines of code in js to make request
|
|
655
655
|
|
|
656
|
-
### Initialization full example
|
|
656
|
+
### Initialization full example
|
|
657
657
|
|
|
658
658
|
```html
|
|
659
659
|
<!DOCTYPE html>
|
|
@@ -700,10 +700,10 @@ var canvas3ds = new paydock.Canvas3ds('#widget', 'token');
|
|
|
700
700
|
canvas3ds.load();
|
|
701
701
|
```
|
|
702
702
|
|
|
703
|
-
```javascript
|
|
703
|
+
```javascript--es2015
|
|
704
704
|
// ES2015 | TypeScript
|
|
705
705
|
|
|
706
|
-
import { Canvas3ds } from '@paydock/client-sdk';
|
|
706
|
+
import { Canvas3ds } from '@paydock/client-sdk/canvas3ds';
|
|
707
707
|
|
|
708
708
|
var list = new Canvas3ds('#widget', 'token');
|
|
709
709
|
list.load();
|
|
@@ -924,7 +924,7 @@ After you initialized the standalone 3ds charge via `v1/charges/standalone-3ds`
|
|
|
924
924
|
## Vault Display Widget
|
|
925
925
|
You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#vault-display-widget)
|
|
926
926
|
|
|
927
|
-
The vault display form allows viewing card number and CVV. The form can be customised according to your needs.
|
|
927
|
+
The vault display form allows viewing card number and CVV. The form can be customised according to your needs.
|
|
928
928
|
You can set styles as well as subscribe to widget events that help monitor user’s actions in real time.
|
|
929
929
|
|
|
930
930
|
## Vault Display Widget simple example
|
|
@@ -944,18 +944,18 @@ var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
|
944
944
|
widget.load();
|
|
945
945
|
```
|
|
946
946
|
|
|
947
|
-
```javascript
|
|
947
|
+
```javascript--es2015
|
|
948
948
|
// ES2015 | TypeScript
|
|
949
949
|
|
|
950
|
-
import { VaultDisplayWidget } from '@paydock/client-sdk';
|
|
951
|
-
|
|
950
|
+
import { VaultDisplayWidget } from '@paydock/client-sdk/vault-display-widget';
|
|
951
|
+
|
|
952
952
|
var widget = new VaultDisplayWidget('#widget', 'token');
|
|
953
953
|
widget.load();
|
|
954
954
|
```
|
|
955
955
|
|
|
956
956
|
Then write only need 2 lines of code in js to initialize widget
|
|
957
957
|
|
|
958
|
-
### Full example
|
|
958
|
+
### Full example
|
|
959
959
|
|
|
960
960
|
```html
|
|
961
961
|
<!DOCTYPE html>
|
|
@@ -966,9 +966,9 @@ Then write only need 2 lines of code in js to initialize widget
|
|
|
966
966
|
<style>iframe {border: 0;width: 100%;height: 300px;}</style>
|
|
967
967
|
</head>
|
|
968
968
|
<body>
|
|
969
|
-
|
|
969
|
+
|
|
970
970
|
<div id="widget"></div>
|
|
971
|
-
|
|
971
|
+
|
|
972
972
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
973
973
|
<script>
|
|
974
974
|
var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
@@ -1006,9 +1006,9 @@ widget.setStyles({
|
|
|
1006
1006
|
});
|
|
1007
1007
|
```
|
|
1008
1008
|
|
|
1009
|
-
This example shows how you can use a lot of other methods to settings your form
|
|
1009
|
+
This example shows how you can use a lot of other methods to settings your form
|
|
1010
1010
|
|
|
1011
|
-
### Full example
|
|
1011
|
+
### Full example
|
|
1012
1012
|
|
|
1013
1013
|
```html
|
|
1014
1014
|
<!DOCTYPE html>
|
|
@@ -1019,27 +1019,27 @@ This example shows how you can use a lot of other methods to settings your form
|
|
|
1019
1019
|
<style>iframe {border: 0;width: 40%;height: 450px;}</style>
|
|
1020
1020
|
</head>
|
|
1021
1021
|
<body>
|
|
1022
|
-
|
|
1022
|
+
|
|
1023
1023
|
<div id="widget"></div>
|
|
1024
|
-
|
|
1024
|
+
|
|
1025
1025
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
1026
1026
|
<script>
|
|
1027
1027
|
var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
1028
1028
|
|
|
1029
1029
|
widget.setEnv('sandbox');
|
|
1030
|
-
|
|
1030
|
+
|
|
1031
1031
|
widget.on('after_load', function (data) {
|
|
1032
1032
|
console.log(data);
|
|
1033
1033
|
});
|
|
1034
|
-
|
|
1034
|
+
|
|
1035
1035
|
widget.on('cvv_secure_code_requested', function (data) {
|
|
1036
1036
|
console.log(data);
|
|
1037
1037
|
});
|
|
1038
|
-
|
|
1038
|
+
|
|
1039
1039
|
widget.on('card_number_secure_code_requested', function (data) {
|
|
1040
1040
|
console.log(data);
|
|
1041
1041
|
});
|
|
1042
|
-
|
|
1042
|
+
|
|
1043
1043
|
widget.setStyles({
|
|
1044
1044
|
background_color: 'rgb(0, 0, 0)',
|
|
1045
1045
|
border_color: 'yellow',
|
|
@@ -1088,7 +1088,7 @@ let button = new paydock.WalletButtons(
|
|
|
1088
1088
|
button.load();
|
|
1089
1089
|
```
|
|
1090
1090
|
|
|
1091
|
-
```javascript
|
|
1091
|
+
```javascript--es2015
|
|
1092
1092
|
// ES2015 | TypeScript
|
|
1093
1093
|
import { WalletButtons } from '@paydock/client-sdk';
|
|
1094
1094
|
|
|
@@ -1113,7 +1113,7 @@ let button = new paydock.WalletButtons(
|
|
|
1113
1113
|
button.load();
|
|
1114
1114
|
```
|
|
1115
1115
|
|
|
1116
|
-
```javascript
|
|
1116
|
+
```javascript--es2015
|
|
1117
1117
|
// ES2015 | TypeScript
|
|
1118
1118
|
import { WalletButtons } from '@paydock/client-sdk';
|
|
1119
1119
|
|
|
@@ -1137,7 +1137,7 @@ let button = new paydock.WalletButtons(
|
|
|
1137
1137
|
button.load();
|
|
1138
1138
|
```
|
|
1139
1139
|
|
|
1140
|
-
```javascript
|
|
1140
|
+
```javascript--es2015
|
|
1141
1141
|
// ES2015 | TypeScript
|
|
1142
1142
|
import { WalletButtons } from '@paydock/client-sdk';
|
|
1143
1143
|
|
|
@@ -1664,57 +1664,54 @@ Similarly, for **GooglePay via MPGS** you can initialize the `PaymentMethodSpeci
|
|
|
1664
1664
|
</html>
|
|
1665
1665
|
```
|
|
1666
1666
|
|
|
1667
|
-
|
|
1667
|
+
## Secure Remote Commerce
|
|
1668
|
+
You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#SRC).
|
|
1668
1669
|
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
Integrate with Mastercard SRC using Paydock's Mastercard SRC widget.
|
|
1672
|
-
For a full description of the methods and parameters, reference the [README file](https://www.npmjs.com/package/@paydock/client-sdk#SRC).
|
|
1670
|
+
This widget provides you with the ability to easily integrate with SRC providers. Currently Visa SRC is supported.
|
|
1673
1671
|
|
|
1674
1672
|
## SRC simple example
|
|
1675
1673
|
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
### Create a Container
|
|
1679
|
-
|
|
1680
|
-
To integrate the SRC checkout iFrame, create a container in your HTML code. This container serves as the placeholder for the iFrame.
|
|
1674
|
+
### Container
|
|
1681
1675
|
|
|
1682
1676
|
```html
|
|
1677
|
+
<div id="checkoutButton"></div>
|
|
1683
1678
|
<div id="checkoutIframe"></div>
|
|
1684
1679
|
```
|
|
1685
1680
|
|
|
1686
|
-
|
|
1681
|
+
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.
|
|
1687
1682
|
|
|
1688
|
-
Use the following code to initialize your widget:
|
|
1689
1683
|
|
|
1684
|
+
### Initialization
|
|
1690
1685
|
```javascript
|
|
1691
|
-
var src = new paydock.
|
|
1686
|
+
var src = new paydock.SRC(
|
|
1687
|
+
"#checkoutButton",
|
|
1692
1688
|
"#checkoutIframe",
|
|
1693
|
-
"
|
|
1689
|
+
"scheme_service_id",
|
|
1694
1690
|
"paydock_public_key_or_access_token",
|
|
1695
1691
|
{}, // meta
|
|
1696
1692
|
);
|
|
1697
1693
|
src.load();
|
|
1698
1694
|
```
|
|
1699
1695
|
|
|
1700
|
-
```javascript
|
|
1696
|
+
```javascript--es2015
|
|
1701
1697
|
// ES2015 | TypeScript
|
|
1702
|
-
|
|
1703
|
-
|
|
1698
|
+
|
|
1699
|
+
import { SRC } from '@paydock/client-sdk';
|
|
1700
|
+
|
|
1701
|
+
var src = new SRC(
|
|
1702
|
+
"#checkoutButton",
|
|
1704
1703
|
"#checkoutIframe",
|
|
1705
|
-
"
|
|
1704
|
+
"scheme_service_id",
|
|
1706
1705
|
"paydock_public_key_or_access_token",
|
|
1707
1706
|
{}, // meta
|
|
1708
1707
|
);
|
|
1709
1708
|
src.load();
|
|
1710
1709
|
```
|
|
1711
1710
|
|
|
1712
|
-
*NOTE:*
|
|
1711
|
+
*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.
|
|
1713
1712
|
|
|
1714
1713
|
### Full example
|
|
1715
1714
|
|
|
1716
|
-
A full example of the container and the initialized widget is as follows:
|
|
1717
|
-
|
|
1718
1715
|
```html
|
|
1719
1716
|
<!DOCTYPE html>
|
|
1720
1717
|
<html lang="en">
|
|
@@ -1724,12 +1721,14 @@ A full example of the container and the initialized widget is as follows:
|
|
|
1724
1721
|
<style>iframe {border: 0;width: 40%;height: 300px;}</style>
|
|
1725
1722
|
</head>
|
|
1726
1723
|
<body>
|
|
1724
|
+
<div id="checkoutButton"></div>
|
|
1727
1725
|
<div id="checkoutIframe"></div>
|
|
1728
1726
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
1729
1727
|
<script>
|
|
1730
|
-
var src = new paydock.
|
|
1728
|
+
var src = new paydock.SRC(
|
|
1729
|
+
"#checkoutButton",
|
|
1731
1730
|
"#checkoutIframe",
|
|
1732
|
-
"
|
|
1731
|
+
"scheme_service_id",
|
|
1733
1732
|
"paydock_public_key_or_access_token",
|
|
1734
1733
|
{},
|
|
1735
1734
|
);
|
|
@@ -1739,30 +1738,50 @@ A full example of the container and the initialized widget is as follows:
|
|
|
1739
1738
|
</html>
|
|
1740
1739
|
```
|
|
1741
1740
|
|
|
1742
|
-
## Customize your SRC Checkout
|
|
1743
1741
|
|
|
1744
|
-
|
|
1742
|
+
## SRC advanced example
|
|
1745
1743
|
|
|
1746
1744
|
### Settings
|
|
1747
1745
|
|
|
1748
1746
|
```javascript
|
|
1749
|
-
|
|
1747
|
+
|
|
1748
|
+
src.setEnv('sandbox'); // set enviroment
|
|
1749
|
+
|
|
1750
|
+
src.hideButton(); // hide button
|
|
1751
|
+
|
|
1752
|
+
src.showButton(); // show button
|
|
1753
|
+
|
|
1750
1754
|
src.hideCheckout(); // hide checkout iframe
|
|
1755
|
+
|
|
1751
1756
|
src.showCheckout(); // show checkout iframe
|
|
1757
|
+
|
|
1758
|
+
src.on('checkoutButtonLoaded', () => {
|
|
1759
|
+
console.log("Button loaded");
|
|
1760
|
+
});
|
|
1761
|
+
|
|
1762
|
+
src.on('checkoutButtonClicked', () => {
|
|
1763
|
+
console.log("Button clicked");
|
|
1764
|
+
});
|
|
1765
|
+
|
|
1752
1766
|
src.on('iframeLoaded', () => {
|
|
1753
1767
|
console.log("Initial iframe loaded");
|
|
1754
1768
|
});
|
|
1769
|
+
|
|
1755
1770
|
src.on('checkoutReady', () => {
|
|
1756
1771
|
console.log("Checkout ready to be used");
|
|
1757
1772
|
});
|
|
1773
|
+
|
|
1758
1774
|
src.on('checkoutCompleted', (token) => {
|
|
1759
1775
|
console.log(token);
|
|
1760
1776
|
});
|
|
1777
|
+
|
|
1761
1778
|
src.on('checkoutError', (error) => {
|
|
1762
1779
|
console.log(error);
|
|
1763
1780
|
});
|
|
1764
1781
|
```
|
|
1765
1782
|
|
|
1783
|
+
Here you can see how you can use this methods to customize your checkout experience
|
|
1784
|
+
|
|
1766
1785
|
### Full example
|
|
1767
1786
|
|
|
1768
1787
|
```html
|
|
@@ -1774,73 +1793,64 @@ src.on('checkoutError', (error) => {
|
|
|
1774
1793
|
<style>iframe {border: 0;width: 40%;height: 450px;}</style>
|
|
1775
1794
|
</head>
|
|
1776
1795
|
<body>
|
|
1796
|
+
<div id="checkoutButton"></div>
|
|
1777
1797
|
<div id="checkoutIframe"></div>
|
|
1778
1798
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
1779
1799
|
<script>
|
|
1780
|
-
var src = new paydock.
|
|
1800
|
+
var src = new paydock.SRC(
|
|
1801
|
+
"#checkoutButton",
|
|
1781
1802
|
"#checkoutIframe",
|
|
1782
|
-
"
|
|
1803
|
+
"scheme_service_id",
|
|
1783
1804
|
"paydock_public_key_or_access_token",
|
|
1784
1805
|
{},
|
|
1785
1806
|
);
|
|
1786
|
-
|
|
1787
|
-
console.log("Initial iframe loaded");
|
|
1788
|
-
});
|
|
1807
|
+
|
|
1789
1808
|
src.on('checkoutReady', () => {
|
|
1790
1809
|
console.log("Checkout ready to be used");
|
|
1791
1810
|
});
|
|
1811
|
+
|
|
1792
1812
|
src.on('checkoutCompleted', (token) => {
|
|
1793
1813
|
console.log(token);
|
|
1794
1814
|
});
|
|
1795
|
-
src.on('checkoutError', (error) => {
|
|
1796
|
-
console.log(error);
|
|
1797
|
-
});
|
|
1798
1815
|
src.load();
|
|
1799
1816
|
</script>
|
|
1800
1817
|
</body>
|
|
1801
1818
|
</html>
|
|
1802
1819
|
```
|
|
1803
1820
|
|
|
1804
|
-
##
|
|
1821
|
+
## Customization options for address fields
|
|
1822
|
+
### Shipping address:
|
|
1805
1823
|
|
|
1806
|
-
To customize
|
|
1807
|
-
The options for this customization are NONE (default option), and POSTAL_COUNTRY or FULL.
|
|
1824
|
+
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.
|
|
1808
1825
|
|
|
1809
1826
|
```
|
|
1810
|
-
var src = new paydock.
|
|
1827
|
+
var src = new paydock.SRC(
|
|
1828
|
+
"#checkoutButton",
|
|
1811
1829
|
"#checkoutIframe",
|
|
1812
|
-
"
|
|
1830
|
+
"scheme_service_id",
|
|
1813
1831
|
"paydock_public_key_or_access_token",
|
|
1814
1832
|
{
|
|
1815
1833
|
"dpa_transaction_options": {
|
|
1816
|
-
"
|
|
1834
|
+
"dpa_shipping_preference": "ALL"
|
|
1817
1835
|
}
|
|
1818
1836
|
},
|
|
1819
1837
|
);
|
|
1820
1838
|
```
|
|
1821
1839
|
|
|
1822
|
-
|
|
1823
|
-
You can also provide the billing address at the time of creating the charge. For example, if you have a different method for collecting the billing address, such as outside of the SRC checkout, you can provide it alongside other information at the charge creation step:
|
|
1840
|
+
With this the Visa popup requires the shipping address from consumer, and these information will be stored in the Paydock charge.
|
|
1824
1841
|
|
|
1825
|
-
|
|
1826
|
-
2. Get your One Time Token from the SRC widget alongside other details that may have been collected outside the SRC checkout as the shipping address.
|
|
1827
|
-
3. Send the billing address when creating the charge.
|
|
1842
|
+
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:
|
|
1828
1843
|
|
|
1829
1844
|
```
|
|
1830
1845
|
POST v1/charges
|
|
1846
|
+
|
|
1831
1847
|
{
|
|
1832
1848
|
"amount": "10.00",
|
|
1833
1849
|
"currency": "AUD",
|
|
1834
|
-
"token": "
|
|
1850
|
+
"token": "token",
|
|
1835
1851
|
"customer": {
|
|
1836
1852
|
"payment_source": {
|
|
1837
|
-
"gateway_id": "gateway_id"
|
|
1838
|
-
"address_line1": "address_line1",
|
|
1839
|
-
"address_line2": "address_line2",
|
|
1840
|
-
"address_city": "address_city",
|
|
1841
|
-
"address_postcode": "address_postcode",
|
|
1842
|
-
"address_state": "address_state",
|
|
1843
|
-
"address_country": "address_country"
|
|
1853
|
+
"gateway_id": "gateway_id"
|
|
1844
1854
|
}
|
|
1845
1855
|
},
|
|
1846
1856
|
"shipping": {
|
|
@@ -1855,44 +1865,60 @@ POST v1/charges
|
|
|
1855
1865
|
}
|
|
1856
1866
|
```
|
|
1857
1867
|
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
You can send a flag `unaccepted_card_type` to block the usage of a specific card type. The available options are 'DEBIT' and 'CREDIT'.
|
|
1868
|
+
- Billing address:
|
|
1861
1869
|
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
The following example demonstrates how to block the card:
|
|
1870
|
+
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:
|
|
1865
1871
|
|
|
1866
1872
|
```
|
|
1867
|
-
var src = new paydock.
|
|
1873
|
+
var src = new paydock.SRC(
|
|
1874
|
+
"#checkoutButton",
|
|
1868
1875
|
"#checkoutIframe",
|
|
1869
|
-
"
|
|
1870
|
-
"
|
|
1876
|
+
"scheme_service_id",
|
|
1877
|
+
"paydock_public_key_or_access_token",
|
|
1871
1878
|
{
|
|
1872
|
-
|
|
1879
|
+
"customer": {
|
|
1880
|
+
"email": "test@email.com",
|
|
1881
|
+
"first_name": "Name",
|
|
1882
|
+
"last_name": "Surname",
|
|
1883
|
+
"phone": {
|
|
1884
|
+
"country_code": "1",
|
|
1885
|
+
"phone": "2124567890"
|
|
1886
|
+
},
|
|
1887
|
+
"payment_source": {
|
|
1888
|
+
"address_line1": "Line 1",
|
|
1889
|
+
"address_line2": "Line 2",
|
|
1890
|
+
"address_city": "Miami",
|
|
1891
|
+
"address_postcode": "33126",
|
|
1892
|
+
"address_state": "FL",
|
|
1893
|
+
"address_country": "US"
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1873
1896
|
},
|
|
1874
1897
|
);
|
|
1875
1898
|
```
|
|
1876
1899
|
|
|
1877
|
-
##
|
|
1900
|
+
## Personalization Styling
|
|
1878
1901
|
|
|
1879
|
-
|
|
1902
|
+
To improve the experience in the use of the widget, it is allowed to send props that customize the UI.
|
|
1880
1903
|
|
|
1881
1904
|
### Example code
|
|
1882
1905
|
|
|
1883
1906
|
```
|
|
1884
|
-
var src = new paydock.
|
|
1907
|
+
var src = new paydock.SRC(
|
|
1908
|
+
"#checkoutButton",
|
|
1885
1909
|
"#checkoutIframe",
|
|
1886
|
-
"
|
|
1910
|
+
"scheme_service_id",
|
|
1887
1911
|
"paydock_public_key",
|
|
1888
|
-
{},
|
|
1889
1912
|
);
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
secondary_button_color: 'red',
|
|
1894
|
-
primary_button_text_color: 'red',
|
|
1895
|
-
secondary_button_text_color: 'red',
|
|
1896
|
-
font_family: 'Arial',
|
|
1897
|
-
});
|
|
1913
|
+
|
|
1914
|
+
button.setStyles({"primary_color":"#a83232","button_text_color":"#171e9c","font_family":"sans-serif"})
|
|
1915
|
+
|
|
1898
1916
|
```
|
|
1917
|
+
## Event and Values
|
|
1918
|
+
|
|
1919
|
+
| Event Value | Type | Description |
|
|
1920
|
+
| ------------------- | ------------------- | -------------------------------------------------------------- |
|
|
1921
|
+
| primary_color | <code>string</code> | HEX color for the principal buttons, example : #32a852 |
|
|
1922
|
+
| button_text_color | <code>string</code> | HEX color for the text of the buttons, example : #32a852|
|
|
1923
|
+
| font_family | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family)|
|
|
1924
|
+
| card_schemes | <code>[string] - array of string</code> | Possible values "visa", "mastercard", "amex" and "discover" - Default show all logos
|