@paydock/client-sdk 1.104.3-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 +572 -290
- package/api.d.ts +1 -0
- package/api.js +1 -0
- package/bundles/widget.umd.js +9130 -8655
- 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 +0 -1
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -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 +15 -13
- 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 +1 -2
- 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 -12
- 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 +2 -2
- 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/lib/constants/validators.d.ts +44 -0
- 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 +17 -14
- 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 +1 -2
- package/lib/payment-source-widget/payment-source-widget.js +142 -0
- package/lib/payment-source-widget/payment-source-widget.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/index.d.ts +0 -1
- package/lib/secure-remote-commerce/index.js +2 -0
- package/lib/secure-remote-commerce/index.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/interfaces.d.ts +5 -6
- 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/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -1
- 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/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/index.d.ts +0 -1
- 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 → lib}/secure-remote-commerce/providers/visa-src/visa-src.d.ts +0 -1
- 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/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +0 -1
- 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/{bundles/types → lib}/secure-remote-commerce/secure-remote-commerce.d.ts +1 -2
- 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 +1 -2
- 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 +2 -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 +9 -2
- 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 +3 -1
- package/lib/wallet-buttons/google.wallet-service.js +301 -0
- package/lib/wallet-buttons/google.wallet-service.js.map +1 -0
- package/lib/wallet-buttons/helpers/flypay-v2.helper.d.ts +3 -0
- package/lib/wallet-buttons/helpers/flypay-v2.helper.js +151 -0
- package/lib/wallet-buttons/helpers/flypay-v2.helper.js.map +1 -0
- package/lib/wallet-buttons/index.d.ts +127 -0
- 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 +3 -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/wallet-buttons/wallet-cba-buttons.d.ts → lib/wallet-buttons/wallet-buttons.d.ts} +92 -115
- 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 +7 -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 +2 -3
- package/lib/widget/configuration.js +260 -0
- package/lib/widget/configuration.js.map +1 -0
- package/lib/widget/html-multi-widget.d.ts +336 -0
- 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 +1 -2
- 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 +136 -107
- 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 -10674
- package/bundles/index.cjs.d.ts +0 -3163
- package/bundles/index.cjs.map +0 -1
- package/bundles/index.mjs +0 -10642
- package/bundles/index.mjs.d.ts +0 -3163
- 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/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.map +0 -1
- package/bundles/types/secure-remote-commerce/interfaces.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/providers/visa-src/helper.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +0 -1
- 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/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 +0 -2
- 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 +0 -366
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +0 -1
- 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 +0 -266
- 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 -3163
- package/bundles/widget.umd.js.map +0 -1
- package/bundles/widget.umd.js.min.d.ts +0 -3163
- 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 -2444
- 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 -258
- package/docs/secure-remote-commerce.md +0 -265
- package/docs/vault-display-example.md +0 -132
- package/docs/wallet-buttons-examples.md +0 -580
- package/docs/wallet-buttons.md +0 -424
- 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:
|
|
31
|
+
|
|
32
|
+
*Compressed version for production*
|
|
33
|
+
`https://widget.paydock.com/sdk/latest/widget.umd.min.js`
|
|
32
34
|
|
|
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`.
|
|
35
|
+
*Full version for development and debug*
|
|
36
|
+
`https://widget.paydock.com/sdk/latest/widget.umd.js`
|
|
37
37
|
|
|
38
|
-
For production we recommend using the compressed version (`.min.js`) since
|
|
39
|
-
it will result in faster loading times for your end users.
|
|
40
38
|
|
|
41
|
-
- *Compressed version for production: `https://widget.paydock.com/sdk/latest/widget.umd.min.js`*
|
|
42
39
|
|
|
43
|
-
- *Full version for development and debug: `https://widget.paydock.com/sdk/latest/widget.umd.js`*
|
|
44
40
|
|
|
45
|
-
|
|
46
|
-
and, the development version [here][max].
|
|
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
|
|
|
@@ -1206,6 +1206,14 @@ In some situations you may want to forcibly close the checkout so that your user
|
|
|
1206
1206
|
button.close();
|
|
1207
1207
|
```
|
|
1208
1208
|
|
|
1209
|
+
### Performing actions when the wallet button is clicked
|
|
1210
|
+
|
|
1211
|
+
In some situations you may want to perform some validations or actions when the user clicks on the wallet button, for which you can use this method. Currently supported by Paypal, ApplePay and GooglePay wallets.
|
|
1212
|
+
|
|
1213
|
+
```javascript
|
|
1214
|
+
button.onClick(() => console.log("Perform actions on button click"));
|
|
1215
|
+
```
|
|
1216
|
+
|
|
1209
1217
|
### Performing actions when shipping info is updated
|
|
1210
1218
|
|
|
1211
1219
|
In Flypay, Paypal, ApplePay via MPGS and GooglePay via MPGS integrations after each shipping info update the `onUpdate(data)` will be called with the selected shipping address information, plus selected shipping method when applicable for Paypal, ApplePay and GooglePay. Merchants should handle this callback, recalculate shipping costs in their server by analyzing the new data, and submit a backend to backend request to `POST charges/:id` with the new total amount and shipping amount (you can find the documentation of this call in the PayDock API documentation).
|
|
@@ -1333,30 +1341,51 @@ _(Required `meta` fields: - . Optional `meta` fields: `request_shipping`, `pay_l
|
|
|
1333
1341
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
1334
1342
|
<script>
|
|
1335
1343
|
let button = new paydock.WalletButtons(
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1344
|
+
"#widget",
|
|
1345
|
+
charge_token,
|
|
1346
|
+
{
|
|
1347
|
+
request_shipping: true,
|
|
1348
|
+
pay_later: true,
|
|
1349
|
+
standalone: false,
|
|
1350
|
+
style: {
|
|
1351
|
+
layout: 'horizontal',
|
|
1352
|
+
color: 'blue',
|
|
1353
|
+
shape: 'rect',
|
|
1354
|
+
label: 'paypal',
|
|
1355
|
+
},
|
|
1356
|
+
}
|
|
1357
|
+
);
|
|
1350
1358
|
button.setEnv('sandbox');
|
|
1351
1359
|
button.onUnavailable(() => console.log("No wallet buttons available"));
|
|
1352
1360
|
button.onUpdate((data) => {
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1361
|
+
console.log("Updating amount via a backend to backend call to POST charges/:id");
|
|
1362
|
+
// call `POST charges/:id` to modify charge
|
|
1363
|
+
button.update({ success: true });
|
|
1364
|
+
});
|
|
1357
1365
|
button.onPaymentSuccessful((data) => console.log("The payment was successful"));
|
|
1358
1366
|
button.onPaymentError((data) => console.log("The payment was not successful"));
|
|
1359
1367
|
button.onPaymentInReview((data) => console.log("The payment is on fraud review"));
|
|
1368
|
+
|
|
1369
|
+
// Example 1: Asynchronous onClick handler
|
|
1370
|
+
const asyncLogic = async () => {
|
|
1371
|
+
// Perform asynchronous logic. Expectation is that a Promise is returned and attached to response via `attachResult`,
|
|
1372
|
+
// and resolve or reject of it will dictate how wallet behaves.
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
button.onClick(({ data: { attachResult } }) => {
|
|
1376
|
+
// Promise is attached to the result. On Paypal, when promise is resolved, the user Journey will continue.
|
|
1377
|
+
// If no promise is attached then the Paypal journey will not depend on the promise being resolved or rejected
|
|
1378
|
+
attachResult(asyncLogic());
|
|
1379
|
+
});
|
|
1380
|
+
|
|
1381
|
+
// Example 2: Synchronous onClick handler
|
|
1382
|
+
// button.onClick(({ data: { attachResult } }) => {
|
|
1383
|
+
// // Perform synchronous logic
|
|
1384
|
+
// console.log("Synchronous onClick: Button clicked");
|
|
1385
|
+
// // Optionally return a boolean flag to halt the operation
|
|
1386
|
+
// attachResult(false);
|
|
1387
|
+
// });
|
|
1388
|
+
|
|
1360
1389
|
button.load();
|
|
1361
1390
|
</script>
|
|
1362
1391
|
</html>
|
|
@@ -1490,6 +1519,7 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `ra
|
|
|
1490
1519
|
button.onUnavailable(() => console.log("No wallet buttons available"));
|
|
1491
1520
|
button.onPaymentSuccessful((data) => console.log("The payment was successful"));
|
|
1492
1521
|
button.onPaymentError((data) => console.log("The payment was not successful"));
|
|
1522
|
+
button.onClick(() => console.log("On WalletButton Click"));
|
|
1493
1523
|
button.onUpdate((data) => {
|
|
1494
1524
|
console.log("Updating amount via a backend to backend call to POST charges/:id");
|
|
1495
1525
|
// call `POST charges/:id` to modify charge
|
|
@@ -1522,7 +1552,6 @@ _(Required `meta` fields: `amount_label`, `country`. Optional `meta` fields: `ra
|
|
|
1522
1552
|
Also, for **ApplePay via MPGS** you can initialize the `ApplePayPaymentRequest` with your own values instead of using the default ones. Below you can see an example on how to initialize the `ApplePayPaymentRequest` with the `raw_data_initialization` meta field.
|
|
1523
1553
|
|
|
1524
1554
|
Similarly, for **GooglePay via MPGS** you can initialize the `PaymentMethodSpecification` with your own values instead of using the default ones. Below you can see an example on how to initialize the `PaymentMethodSpecification` with the `raw_data_initialization` meta field.
|
|
1525
|
-
|
|
1526
1555
|
### ApplePay and GooglePay via MPGS Raw data initialization example
|
|
1527
1556
|
|
|
1528
1557
|
```html
|
|
@@ -1664,7 +1693,7 @@ var src = new paydock.SRC(
|
|
|
1664
1693
|
src.load();
|
|
1665
1694
|
```
|
|
1666
1695
|
|
|
1667
|
-
```javascript
|
|
1696
|
+
```javascript--es2015
|
|
1668
1697
|
// ES2015 | TypeScript
|
|
1669
1698
|
|
|
1670
1699
|
import { SRC } from '@paydock/client-sdk';
|
package/tslint.json
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"defaultSeverity": "error",
|
|
3
|
+
"extends": [
|
|
4
|
+
"tslint:recommended"
|
|
5
|
+
],
|
|
6
|
+
"jsRules": {
|
|
7
|
+
"no-unused-expression": true
|
|
8
|
+
},
|
|
9
|
+
"rules": {
|
|
10
|
+
"ordered-imports": false,
|
|
11
|
+
"arrow-return-shorthand": false,
|
|
12
|
+
"callable-types": true,
|
|
13
|
+
"class-name": false,
|
|
14
|
+
"comment-format": [
|
|
15
|
+
true,
|
|
16
|
+
"check-space"
|
|
17
|
+
],
|
|
18
|
+
"curly": false,
|
|
19
|
+
"eofline": true,
|
|
20
|
+
"forin": true,
|
|
21
|
+
"import-blacklist": [
|
|
22
|
+
true,
|
|
23
|
+
"rxjs"
|
|
24
|
+
],
|
|
25
|
+
"import-spacing": true,
|
|
26
|
+
"indent": [
|
|
27
|
+
true,
|
|
28
|
+
"spaces"
|
|
29
|
+
],
|
|
30
|
+
"interface-over-type-literal": true,
|
|
31
|
+
"label-position": true,
|
|
32
|
+
"max-line-length": [
|
|
33
|
+
true,
|
|
34
|
+
300
|
|
35
|
+
],
|
|
36
|
+
"member-access": false,
|
|
37
|
+
"member-ordering": [
|
|
38
|
+
true,
|
|
39
|
+
{
|
|
40
|
+
"order": [
|
|
41
|
+
"static-field",
|
|
42
|
+
"instance-field",
|
|
43
|
+
"static-method",
|
|
44
|
+
"instance-method"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"no-arg": true,
|
|
49
|
+
"no-bitwise": true,
|
|
50
|
+
"no-console": [
|
|
51
|
+
true,
|
|
52
|
+
"debug",
|
|
53
|
+
"log",
|
|
54
|
+
"time",
|
|
55
|
+
"timeEnd",
|
|
56
|
+
"trace"
|
|
57
|
+
],
|
|
58
|
+
"no-construct": true,
|
|
59
|
+
"no-debugger": true,
|
|
60
|
+
"no-duplicate-super": true,
|
|
61
|
+
"no-empty": false,
|
|
62
|
+
"no-empty-interface": false,
|
|
63
|
+
"interface-name": [false, "always-prefix"],
|
|
64
|
+
"no-eval": true,
|
|
65
|
+
"no-inferrable-types": [
|
|
66
|
+
true,
|
|
67
|
+
"ignore-params"
|
|
68
|
+
],
|
|
69
|
+
"max-classes-per-file": [true, 6, "exclude-class-expressions"],
|
|
70
|
+
"no-misused-new": true,
|
|
71
|
+
"no-non-null-assertion": true,
|
|
72
|
+
"no-shadowed-variable": false,
|
|
73
|
+
"no-string-literal": false,
|
|
74
|
+
"no-string-throw": true,
|
|
75
|
+
"jsdoc-format": false,
|
|
76
|
+
"no-switch-case-fall-through": true,
|
|
77
|
+
"no-trailing-whitespace": false,
|
|
78
|
+
"no-unnecessary-initializer": true,
|
|
79
|
+
"no-angle-bracket-type-assertion": false,
|
|
80
|
+
"no-unused-expression": true,
|
|
81
|
+
"no-consecutive-blank-lines": false,
|
|
82
|
+
"no-var-keyword": true,
|
|
83
|
+
"no-reference": false,
|
|
84
|
+
"ban-types": false,
|
|
85
|
+
"object-literal-sort-keys": false,
|
|
86
|
+
"object-literal-shorthand": false,
|
|
87
|
+
"one-line": [
|
|
88
|
+
true,
|
|
89
|
+
"check-open-brace",
|
|
90
|
+
"check-catch",
|
|
91
|
+
"check-else",
|
|
92
|
+
"check-whitespace"
|
|
93
|
+
],
|
|
94
|
+
"prefer-const": false,
|
|
95
|
+
"quotemark": [
|
|
96
|
+
false,
|
|
97
|
+
"single"
|
|
98
|
+
],
|
|
99
|
+
"radix": true,
|
|
100
|
+
"semicolon": [
|
|
101
|
+
false
|
|
102
|
+
],
|
|
103
|
+
"triple-equals": [
|
|
104
|
+
true,
|
|
105
|
+
"allow-null-check"
|
|
106
|
+
],
|
|
107
|
+
"typedef-whitespace": [
|
|
108
|
+
true,
|
|
109
|
+
{
|
|
110
|
+
"call-signature": "nospace",
|
|
111
|
+
"index-signature": "nospace",
|
|
112
|
+
"parameter": "nospace",
|
|
113
|
+
"property-declaration": "nospace",
|
|
114
|
+
"variable-declaration": "nospace"
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"unified-signatures": false,
|
|
118
|
+
"variable-name": false,
|
|
119
|
+
"whitespace": [
|
|
120
|
+
false,
|
|
121
|
+
"check-branch",
|
|
122
|
+
"check-decl",
|
|
123
|
+
"check-operator",
|
|
124
|
+
"check-separator",
|
|
125
|
+
"check-type"
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
"rulesDirectory": []
|
|
129
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare module '@auspayplus/open-payments-checkout' {
|
|
2
|
+
// WindowFeatures type
|
|
3
|
+
type WindowFeatures = {
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
left?: number;
|
|
7
|
+
popup?: 'yes' | 'no' | '1' | '0';
|
|
8
|
+
resizable?: 'yes' | 'no' | '1' | '0';
|
|
9
|
+
top?: number;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// Callbacks type
|
|
13
|
+
interface ICheckoutCallback {
|
|
14
|
+
orderId: string;
|
|
15
|
+
error?: Error;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Constructor options for Checkout
|
|
19
|
+
interface CheckoutOptions {
|
|
20
|
+
orderId: string;
|
|
21
|
+
url: string;
|
|
22
|
+
accessToken?: string;
|
|
23
|
+
refreshToken?: string;
|
|
24
|
+
clientId?: string;
|
|
25
|
+
onCheckoutClosed?: (callbackData: ICheckoutCallback) => void;
|
|
26
|
+
onError?: (callbackData: ICheckoutCallback) => void;
|
|
27
|
+
onPaymentSuccess?: (callbackData: ICheckoutCallback) => void;
|
|
28
|
+
onPaymentError?: (callbackData: ICheckoutCallback) => void;
|
|
29
|
+
onTokensChanged?: ({ accessToken, refreshToken }: { accessToken: string; refreshToken: string; }) => void;
|
|
30
|
+
windowFeatures?: WindowFeatures;
|
|
31
|
+
auth?: { access_token?: string; refresh_token?: string };
|
|
32
|
+
mode?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Checkout class declaration
|
|
36
|
+
export class Checkout {
|
|
37
|
+
constructor(options: CheckoutOptions);
|
|
38
|
+
isCheckoutOpen(): boolean;
|
|
39
|
+
listenMessage(): void;
|
|
40
|
+
open(): void;
|
|
41
|
+
close(): void;
|
|
42
|
+
}
|
|
43
|
+
}
|