@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/README.md
CHANGED
|
@@ -16,78 +16,76 @@ 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
|
### With package manager
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
`pnpm`, `bun`). Using `npm` the following command would add the Client SDK as a
|
|
27
|
-
production dependency.
|
|
21
|
+
To install with package manager, enter the following command:
|
|
28
22
|
|
|
29
|
-
|
|
30
|
-
npm install @paydock/client-sdk
|
|
31
|
-
```
|
|
23
|
+
`npm install @paydock/client-sdk`
|
|
32
24
|
|
|
33
|
-
After installation is complete, if you are developing in NodeJS environments or
|
|
34
|
-
using tools that expect your JavaScript code to be in CJS format (e.g., Jest,
|
|
35
|
-
Karma, RequireJS, Webpack), you can import the Client SDK using CommonJS modules.
|
|
36
|
-
For these environments the UMD format (`@paydock/client-sdk/bundles/widget.umd.js`)
|
|
37
|
-
can also be used as a fallback. Alternatively, in case you are developing in
|
|
38
|
-
projects that have access to modern bundlers such as Vite or others (e.g., SPA
|
|
39
|
-
libs or SSR Metaframeworks), you can import the Client SDK features using ESM
|
|
40
|
-
through named imports or namespaced imports.
|
|
41
25
|
|
|
26
|
+
You can use ES2015 or TypeScript modules
|
|
42
27
|
|
|
43
|
-
|
|
44
|
-
// module import - CommonJS/Node projects ✅
|
|
45
|
-
const paydock = require('@paydock/client-sdk')
|
|
46
|
-
const api = new paydock.Api('publicKey');
|
|
47
|
-
```
|
|
28
|
+
`@paydock/client-sdk/widget`
|
|
48
29
|
|
|
49
|
-
```mjs
|
|
50
|
-
// named import - ESM projects or TypeScript projects ✅
|
|
51
|
-
import { HtmlWidget } from '@paydock/client-sdk'
|
|
52
|
-
const widget = new HtmlWidget('#selector', 'publicKey', 'gatewayId');
|
|
53
|
-
```
|
|
54
30
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
31
|
+
Also can use UMD module (global visibility, see above)
|
|
32
|
+
|
|
33
|
+
`@paydock/client-sdk/bundles/widget.umd.js`
|
|
34
|
+
|
|
35
|
+
`@paydock/client-sdk/bundles/widget.umd.min.js`
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
```javascript--es2015
|
|
40
|
+
// ES2015 / TypeScript
|
|
41
|
+
|
|
42
|
+
import { HtmlWidget } from '@paydock/client-sdk/widget';
|
|
43
|
+
|
|
44
|
+
let widget = new HtmlWidget('#selector', 'publicKey', 'gatewayId');
|
|
59
45
|
```
|
|
60
46
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<script src="@paydock/client-sdk/bundles/widget.umd.min.js"></script>
|
|
50
|
+
<script>
|
|
51
|
+
var widget = new paydock.HtmlWidget('#tag', 'publicKey', 'gatewayId');
|
|
52
|
+
</script>
|
|
66
53
|
```
|
|
67
54
|
|
|
68
55
|
|
|
56
|
+
|
|
69
57
|
### Download from CDN
|
|
70
58
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
59
|
+
You should begin by including the library in your page.
|
|
60
|
+
|
|
61
|
+
Add this script tag to your page to get started with with the url below:
|
|
62
|
+
|
|
63
|
+
*Compressed version for production*
|
|
64
|
+
`https://widget.paydock.com/sdk/latest/widget.umd.min.js`
|
|
75
65
|
|
|
76
|
-
|
|
77
|
-
|
|
66
|
+
*Full version for development and debug*
|
|
67
|
+
`https://widget.paydock.com/sdk/latest/widget.umd.js`
|
|
78
68
|
|
|
79
|
-
- *Compressed version for production: `https://widget.paydock.com/sdk/latest/widget.umd.min.js`*
|
|
80
69
|
|
|
81
|
-
- *Full version for development and debug: `https://widget.paydock.com/sdk/latest/widget.umd.js`*
|
|
82
70
|
|
|
83
|
-
|
|
84
|
-
|
|
71
|
+
|
|
72
|
+
Also can download library the [production version][min] or the [development version][max]
|
|
85
73
|
|
|
86
74
|
[min]: https://widget.paydock.com/sdk/latest/widget.umd.min.js
|
|
87
75
|
[max]: https://widget.paydock.com/sdk/latest/widget.umd.js
|
|
88
76
|
|
|
89
|
-
|
|
90
|
-
|
|
77
|
+
|
|
78
|
+
The library will always be available via the global variable `paydock`.
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
Also for more advanced use, the library has [UMD](https://github.com/umdjs/umd) format, thus can be used in requireJs, webpack, etc.
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
91
89
|
|
|
92
90
|
|
|
93
91
|
```html
|
|
@@ -97,7 +95,6 @@ format that can be used in RequireJS, Webpack, etc.
|
|
|
97
95
|
</script>
|
|
98
96
|
```
|
|
99
97
|
|
|
100
|
-
|
|
101
98
|
## Widget
|
|
102
99
|
You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#widget-simple-example)
|
|
103
100
|
|
|
@@ -122,11 +119,11 @@ var widget = new paydock.HtmlWidget('#widget', 'publicKey');
|
|
|
122
119
|
widget.load();
|
|
123
120
|
```
|
|
124
121
|
|
|
125
|
-
```javascript
|
|
122
|
+
```javascript--es2015
|
|
126
123
|
// ES2015 | TypeScript
|
|
127
124
|
|
|
128
|
-
import { HtmlWidget } from '@paydock/client-sdk';
|
|
129
|
-
|
|
125
|
+
import { HtmlWidget } from '@paydock/client-sdk/widget';
|
|
126
|
+
|
|
130
127
|
var widget = new HtmlWidget('#widget', 'publicKey');
|
|
131
128
|
widget.load();
|
|
132
129
|
```
|
|
@@ -134,7 +131,7 @@ widget.load();
|
|
|
134
131
|
Then write only need 2 lines of code in js to initialize widget
|
|
135
132
|
|
|
136
133
|
|
|
137
|
-
### Full example
|
|
134
|
+
### Full example
|
|
138
135
|
|
|
139
136
|
```html
|
|
140
137
|
<!DOCTYPE html>
|
|
@@ -197,9 +194,9 @@ widget.setFormFields(['phone', 'email']); // add additional fields for form of w
|
|
|
197
194
|
widget.setSupportedCardIcons(['mastercard', 'visa']); // add icons of supported card types
|
|
198
195
|
```
|
|
199
196
|
|
|
200
|
-
This example shows how you can use a lot of other methods to settings your form
|
|
197
|
+
This example shows how you can use a lot of other methods to settings your form
|
|
201
198
|
|
|
202
|
-
### Full example
|
|
199
|
+
### Full example
|
|
203
200
|
|
|
204
201
|
```html
|
|
205
202
|
<!DOCTYPE html>
|
|
@@ -220,12 +217,12 @@ This example shows how you can use a lot of other methods to settings your form
|
|
|
220
217
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.js" ></script>
|
|
221
218
|
<script>
|
|
222
219
|
var widget = new paydock.HtmlWidget('#widget', 'publicKey', 'gatewayId');
|
|
223
|
-
|
|
220
|
+
|
|
224
221
|
widget.setSupportedCardIcons(['mastercard', 'visa']);
|
|
225
222
|
widget.setFormFields(['phone', 'email']);
|
|
226
223
|
widget.setRefId('custom-ref-id');
|
|
227
224
|
widget.onFinishInsert('input[name="payment_source_token"]', 'payment_source');z
|
|
228
|
-
|
|
225
|
+
|
|
229
226
|
widget.load();
|
|
230
227
|
</script>
|
|
231
228
|
</script>
|
|
@@ -651,7 +648,7 @@ Class Widget include method for working on html and include extended by HtmlMult
|
|
|
651
648
|
* [.setFormValues(fieldValues)](#user-content-w_MultiWidget+setFormValues)
|
|
652
649
|
* [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
|
|
653
650
|
* [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
|
|
654
|
-
*
|
|
651
|
+
* [.setIcons()](#user-content-w_MultiWidget+setIcons)
|
|
655
652
|
* [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
|
|
656
653
|
* [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
|
|
657
654
|
* [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
|
|
@@ -1216,13 +1213,15 @@ widget.setFormPlaceholders({
|
|
|
1216
1213
|
```
|
|
1217
1214
|
<a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons"> </a>
|
|
1218
1215
|
|
|
1219
|
-
###
|
|
1220
|
-
***Deprecated***
|
|
1221
|
-
|
|
1216
|
+
### htmlWidget.setIcons()
|
|
1222
1217
|
The method to change the widget icons
|
|
1223
1218
|
|
|
1224
1219
|
**Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
|
|
1225
1220
|
**Overrides**: [<code>setIcons</code>](#user-content-w_MultiWidget+setIcons)
|
|
1221
|
+
**Todo**
|
|
1222
|
+
|
|
1223
|
+
- [ ] DEPRECATED
|
|
1224
|
+
|
|
1226
1225
|
<a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements"> </a>
|
|
1227
1226
|
|
|
1228
1227
|
### htmlWidget.setHiddenElements(elements)
|
|
@@ -1376,7 +1375,7 @@ Class HtmlMultiWidget include method for working with html
|
|
|
1376
1375
|
* [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
|
|
1377
1376
|
* [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
|
|
1378
1377
|
* [.setFormElements(elements)](#user-content-w_MultiWidget+setFormElements)
|
|
1379
|
-
*
|
|
1378
|
+
* [.setIcons()](#user-content-w_MultiWidget+setIcons)
|
|
1380
1379
|
* [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
|
|
1381
1380
|
* [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
|
|
1382
1381
|
* [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
|
|
@@ -1842,13 +1841,15 @@ widget.setFormElements([
|
|
|
1842
1841
|
```
|
|
1843
1842
|
<a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons"> </a>
|
|
1844
1843
|
|
|
1845
|
-
###
|
|
1846
|
-
***Deprecated***
|
|
1847
|
-
|
|
1844
|
+
### htmlMultiWidget.setIcons()
|
|
1848
1845
|
The method to change the widget icons
|
|
1849
1846
|
|
|
1850
1847
|
**Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
|
|
1851
1848
|
**Overrides**: [<code>setIcons</code>](#user-content-w_MultiWidget+setIcons)
|
|
1849
|
+
**Todo**
|
|
1850
|
+
|
|
1851
|
+
- [ ] DEPRECATED
|
|
1852
|
+
|
|
1852
1853
|
<a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements"> </a>
|
|
1853
1854
|
|
|
1854
1855
|
### htmlMultiWidget.setHiddenElements(elements)
|
|
@@ -2161,7 +2162,7 @@ Class MultiWidget include method for for creating iframe url
|
|
|
2161
2162
|
* [.setFormLabels(fieldLabels)](#user-content-w_MultiWidget+setFormLabels)
|
|
2162
2163
|
* [.setFormPlaceholders(fieldPlaceholders)](#user-content-w_MultiWidget+setFormPlaceholders)
|
|
2163
2164
|
* [.setFormElements(elements)](#user-content-w_MultiWidget+setFormElements)
|
|
2164
|
-
*
|
|
2165
|
+
* [.setIcons()](#user-content-w_MultiWidget+setIcons)
|
|
2165
2166
|
* [.setHiddenElements(elements)](#user-content-w_MultiWidget+setHiddenElements)
|
|
2166
2167
|
* [.setRefId(refId)](#user-content-w_MultiWidget+setRefId)
|
|
2167
2168
|
* [.useGatewayFieldValidation()](#user-content-w_MultiWidget+useGatewayFieldValidation)
|
|
@@ -2387,12 +2388,14 @@ widget.setFormElements([
|
|
|
2387
2388
|
```
|
|
2388
2389
|
<a name="w_MultiWidget+setIcons" id="w_MultiWidget+setIcons" href="#user-content-w_MultiWidget+setIcons"> </a>
|
|
2389
2390
|
|
|
2390
|
-
###
|
|
2391
|
-
***Deprecated***
|
|
2392
|
-
|
|
2391
|
+
### multiWidget.setIcons()
|
|
2393
2392
|
The method to change the widget icons
|
|
2394
2393
|
|
|
2395
2394
|
**Kind**: instance method of [<code>MultiWidget</code>](#user-content-w_MultiWidget)
|
|
2395
|
+
**Todo**
|
|
2396
|
+
|
|
2397
|
+
- [ ] DEPRECATED
|
|
2398
|
+
|
|
2396
2399
|
<a name="w_MultiWidget+setHiddenElements" id="w_MultiWidget+setHiddenElements" href="#user-content-w_MultiWidget+setHiddenElements"> </a>
|
|
2397
2400
|
|
|
2398
2401
|
### multiWidget.setHiddenElements(elements)
|
|
@@ -2762,10 +2765,10 @@ var list = new paydock.HtmlPaymentSourceWidget('#list', 'publicKey', 'queryToken
|
|
|
2762
2765
|
list.load();
|
|
2763
2766
|
```
|
|
2764
2767
|
|
|
2765
|
-
```javascript
|
|
2768
|
+
```javascript--es2015
|
|
2766
2769
|
// ES2015 | TypeScript
|
|
2767
2770
|
|
|
2768
|
-
import { HtmlPaymentSourceWidget } from '@paydock/client-sdk';
|
|
2771
|
+
import { HtmlPaymentSourceWidget } from '@paydock/client-sdk/payment-source-widget';
|
|
2769
2772
|
|
|
2770
2773
|
var list = new HtmlPaymentSourceWidget('#list', 'publicKey', 'queryToken');
|
|
2771
2774
|
list.load();
|
|
@@ -3478,7 +3481,7 @@ You must create a button to turn it into checkout-button
|
|
|
3478
3481
|
var button = new paydock.PaypalCheckoutButton('#button', 'publicKey', 'gatewayId');
|
|
3479
3482
|
```
|
|
3480
3483
|
|
|
3481
|
-
```javascript
|
|
3484
|
+
```javascript--es2015
|
|
3482
3485
|
// ES2015 | TypeScript
|
|
3483
3486
|
|
|
3484
3487
|
|
|
@@ -4621,11 +4624,11 @@ This wrapper helps you to work with paydock api emdpoints
|
|
|
4621
4624
|
var browserDetails = await new paydock.Api('publicKey').setEnv('env').getBrowserDetails();
|
|
4622
4625
|
```
|
|
4623
4626
|
|
|
4624
|
-
```javascript
|
|
4627
|
+
```javascript--es2015
|
|
4625
4628
|
// ES2015 | TypeScript
|
|
4626
4629
|
|
|
4627
|
-
import { Api } from '@paydock/client-sdk';
|
|
4628
|
-
|
|
4630
|
+
import { Api } from '@paydock/client-sdk/api';
|
|
4631
|
+
|
|
4629
4632
|
var browserDetails = await new paydock.Api('publicKey').setEnv('env').getBrowserDetails();
|
|
4630
4633
|
```
|
|
4631
4634
|
|
|
@@ -4638,11 +4641,11 @@ var response = await new paydock.Api('publicKey').setEnv('env').charge().preAuth
|
|
|
4638
4641
|
});
|
|
4639
4642
|
```
|
|
4640
4643
|
|
|
4641
|
-
```javascript
|
|
4644
|
+
```javascript--es2015
|
|
4642
4645
|
// ES2015 | TypeScript
|
|
4643
4646
|
|
|
4644
|
-
import { Api } from '@paydock/client-sdk';
|
|
4645
|
-
|
|
4647
|
+
import { Api } from '@paydock/client-sdk/api';
|
|
4648
|
+
|
|
4646
4649
|
var response = await new Api('publicKey').setEnv('env').charge().preAuth({
|
|
4647
4650
|
amount: 100,
|
|
4648
4651
|
currency: 'AUD',
|
|
@@ -4652,7 +4655,7 @@ var response = await new Api('publicKey').setEnv('env').charge().preAuth({
|
|
|
4652
4655
|
|
|
4653
4656
|
Then write only need 2 lines of code in js to make request
|
|
4654
4657
|
|
|
4655
|
-
### Initialization full example
|
|
4658
|
+
### Initialization full example
|
|
4656
4659
|
|
|
4657
4660
|
```html
|
|
4658
4661
|
<!DOCTYPE html>
|
|
@@ -4699,10 +4702,10 @@ var canvas3ds = new paydock.Canvas3ds('#widget', 'token');
|
|
|
4699
4702
|
canvas3ds.load();
|
|
4700
4703
|
```
|
|
4701
4704
|
|
|
4702
|
-
```javascript
|
|
4705
|
+
```javascript--es2015
|
|
4703
4706
|
// ES2015 | TypeScript
|
|
4704
4707
|
|
|
4705
|
-
import { Canvas3ds } from '@paydock/client-sdk';
|
|
4708
|
+
import { Canvas3ds } from '@paydock/client-sdk/canvas3ds';
|
|
4706
4709
|
|
|
4707
4710
|
var list = new Canvas3ds('#widget', 'token');
|
|
4708
4711
|
list.load();
|
|
@@ -4923,7 +4926,7 @@ After you initialized the standalone 3ds charge via `v1/charges/standalone-3ds`
|
|
|
4923
4926
|
## Vault Display Widget
|
|
4924
4927
|
You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#vault-display-widget)
|
|
4925
4928
|
|
|
4926
|
-
The vault display form allows viewing card number and CVV. The form can be customised according to your needs.
|
|
4929
|
+
The vault display form allows viewing card number and CVV. The form can be customised according to your needs.
|
|
4927
4930
|
You can set styles as well as subscribe to widget events that help monitor user’s actions in real time.
|
|
4928
4931
|
|
|
4929
4932
|
## Vault Display Widget simple example
|
|
@@ -4943,18 +4946,18 @@ var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
|
4943
4946
|
widget.load();
|
|
4944
4947
|
```
|
|
4945
4948
|
|
|
4946
|
-
```javascript
|
|
4949
|
+
```javascript--es2015
|
|
4947
4950
|
// ES2015 | TypeScript
|
|
4948
4951
|
|
|
4949
|
-
import { VaultDisplayWidget } from '@paydock/client-sdk';
|
|
4950
|
-
|
|
4952
|
+
import { VaultDisplayWidget } from '@paydock/client-sdk/vault-display-widget';
|
|
4953
|
+
|
|
4951
4954
|
var widget = new VaultDisplayWidget('#widget', 'token');
|
|
4952
4955
|
widget.load();
|
|
4953
4956
|
```
|
|
4954
4957
|
|
|
4955
4958
|
Then write only need 2 lines of code in js to initialize widget
|
|
4956
4959
|
|
|
4957
|
-
### Full example
|
|
4960
|
+
### Full example
|
|
4958
4961
|
|
|
4959
4962
|
```html
|
|
4960
4963
|
<!DOCTYPE html>
|
|
@@ -4965,9 +4968,9 @@ Then write only need 2 lines of code in js to initialize widget
|
|
|
4965
4968
|
<style>iframe {border: 0;width: 100%;height: 300px;}</style>
|
|
4966
4969
|
</head>
|
|
4967
4970
|
<body>
|
|
4968
|
-
|
|
4971
|
+
|
|
4969
4972
|
<div id="widget"></div>
|
|
4970
|
-
|
|
4973
|
+
|
|
4971
4974
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
4972
4975
|
<script>
|
|
4973
4976
|
var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
@@ -5005,9 +5008,9 @@ widget.setStyles({
|
|
|
5005
5008
|
});
|
|
5006
5009
|
```
|
|
5007
5010
|
|
|
5008
|
-
This example shows how you can use a lot of other methods to settings your form
|
|
5011
|
+
This example shows how you can use a lot of other methods to settings your form
|
|
5009
5012
|
|
|
5010
|
-
### Full example
|
|
5013
|
+
### Full example
|
|
5011
5014
|
|
|
5012
5015
|
```html
|
|
5013
5016
|
<!DOCTYPE html>
|
|
@@ -5018,27 +5021,27 @@ This example shows how you can use a lot of other methods to settings your form
|
|
|
5018
5021
|
<style>iframe {border: 0;width: 40%;height: 450px;}</style>
|
|
5019
5022
|
</head>
|
|
5020
5023
|
<body>
|
|
5021
|
-
|
|
5024
|
+
|
|
5022
5025
|
<div id="widget"></div>
|
|
5023
|
-
|
|
5026
|
+
|
|
5024
5027
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
5025
5028
|
<script>
|
|
5026
5029
|
var widget = new paydock.VaultDisplayWidget('#widget', 'token');
|
|
5027
5030
|
|
|
5028
5031
|
widget.setEnv('sandbox');
|
|
5029
|
-
|
|
5032
|
+
|
|
5030
5033
|
widget.on('after_load', function (data) {
|
|
5031
5034
|
console.log(data);
|
|
5032
5035
|
});
|
|
5033
|
-
|
|
5036
|
+
|
|
5034
5037
|
widget.on('cvv_secure_code_requested', function (data) {
|
|
5035
5038
|
console.log(data);
|
|
5036
5039
|
});
|
|
5037
|
-
|
|
5040
|
+
|
|
5038
5041
|
widget.on('card_number_secure_code_requested', function (data) {
|
|
5039
5042
|
console.log(data);
|
|
5040
5043
|
});
|
|
5041
|
-
|
|
5044
|
+
|
|
5042
5045
|
widget.setStyles({
|
|
5043
5046
|
background_color: 'rgb(0, 0, 0)',
|
|
5044
5047
|
border_color: 'yellow',
|
|
@@ -5182,7 +5185,7 @@ let button = new paydock.WalletButtons(
|
|
|
5182
5185
|
button.load();
|
|
5183
5186
|
```
|
|
5184
5187
|
|
|
5185
|
-
```javascript
|
|
5188
|
+
```javascript--es2015
|
|
5186
5189
|
// ES2015 | TypeScript
|
|
5187
5190
|
import { WalletButtons } from '@paydock/client-sdk';
|
|
5188
5191
|
|
|
@@ -5207,7 +5210,7 @@ let button = new paydock.WalletButtons(
|
|
|
5207
5210
|
button.load();
|
|
5208
5211
|
```
|
|
5209
5212
|
|
|
5210
|
-
```javascript
|
|
5213
|
+
```javascript--es2015
|
|
5211
5214
|
// ES2015 | TypeScript
|
|
5212
5215
|
import { WalletButtons } from '@paydock/client-sdk';
|
|
5213
5216
|
|
|
@@ -5231,7 +5234,7 @@ let button = new paydock.WalletButtons(
|
|
|
5231
5234
|
button.load();
|
|
5232
5235
|
```
|
|
5233
5236
|
|
|
5234
|
-
```javascript
|
|
5237
|
+
```javascript--es2015
|
|
5235
5238
|
// ES2015 | TypeScript
|
|
5236
5239
|
import { WalletButtons } from '@paydock/client-sdk';
|
|
5237
5240
|
|
|
@@ -6378,57 +6381,54 @@ List of available event's name in the wallet button lifecycle
|
|
|
6378
6381
|
| ON_CLICK | <code>string</code> | <code>"onClick"</code> |
|
|
6379
6382
|
|
|
6380
6383
|
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
## Overview
|
|
6384
|
+
## Secure Remote Commerce
|
|
6385
|
+
You can find description of all methods and parameters [here](https://www.npmjs.com/package/@paydock/client-sdk#SRC).
|
|
6384
6386
|
|
|
6385
|
-
|
|
6386
|
-
For a full description of the methods and parameters, reference the [README file](https://www.npmjs.com/package/@paydock/client-sdk#SRC).
|
|
6387
|
+
This widget provides you with the ability to easily integrate with SRC providers. Currently Visa SRC is supported.
|
|
6387
6388
|
|
|
6388
6389
|
## SRC simple example
|
|
6389
6390
|
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
### Create a Container
|
|
6393
|
-
|
|
6394
|
-
To integrate the SRC checkout iFrame, create a container in your HTML code. This container serves as the placeholder for the iFrame.
|
|
6391
|
+
### Container
|
|
6395
6392
|
|
|
6396
6393
|
```html
|
|
6394
|
+
<div id="checkoutButton"></div>
|
|
6397
6395
|
<div id="checkoutIframe"></div>
|
|
6398
6396
|
```
|
|
6399
6397
|
|
|
6400
|
-
|
|
6398
|
+
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.
|
|
6401
6399
|
|
|
6402
|
-
Use the following code to initialize your widget:
|
|
6403
6400
|
|
|
6401
|
+
### Initialization
|
|
6404
6402
|
```javascript
|
|
6405
|
-
var src = new paydock.
|
|
6403
|
+
var src = new paydock.SRC(
|
|
6404
|
+
"#checkoutButton",
|
|
6406
6405
|
"#checkoutIframe",
|
|
6407
|
-
"
|
|
6406
|
+
"scheme_service_id",
|
|
6408
6407
|
"paydock_public_key_or_access_token",
|
|
6409
6408
|
{}, // meta
|
|
6410
6409
|
);
|
|
6411
6410
|
src.load();
|
|
6412
6411
|
```
|
|
6413
6412
|
|
|
6414
|
-
```javascript
|
|
6413
|
+
```javascript--es2015
|
|
6415
6414
|
// ES2015 | TypeScript
|
|
6416
|
-
|
|
6417
|
-
|
|
6415
|
+
|
|
6416
|
+
import { SRC } from '@paydock/client-sdk';
|
|
6417
|
+
|
|
6418
|
+
var src = new SRC(
|
|
6419
|
+
"#checkoutButton",
|
|
6418
6420
|
"#checkoutIframe",
|
|
6419
|
-
"
|
|
6421
|
+
"scheme_service_id",
|
|
6420
6422
|
"paydock_public_key_or_access_token",
|
|
6421
6423
|
{}, // meta
|
|
6422
6424
|
);
|
|
6423
6425
|
src.load();
|
|
6424
6426
|
```
|
|
6425
6427
|
|
|
6426
|
-
*NOTE:*
|
|
6428
|
+
*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.
|
|
6427
6429
|
|
|
6428
6430
|
### Full example
|
|
6429
6431
|
|
|
6430
|
-
A full example of the container and the initialized widget is as follows:
|
|
6431
|
-
|
|
6432
6432
|
```html
|
|
6433
6433
|
<!DOCTYPE html>
|
|
6434
6434
|
<html lang="en">
|
|
@@ -6438,12 +6438,14 @@ A full example of the container and the initialized widget is as follows:
|
|
|
6438
6438
|
<style>iframe {border: 0;width: 40%;height: 300px;}</style>
|
|
6439
6439
|
</head>
|
|
6440
6440
|
<body>
|
|
6441
|
+
<div id="checkoutButton"></div>
|
|
6441
6442
|
<div id="checkoutIframe"></div>
|
|
6442
6443
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
6443
6444
|
<script>
|
|
6444
|
-
var src = new paydock.
|
|
6445
|
+
var src = new paydock.SRC(
|
|
6446
|
+
"#checkoutButton",
|
|
6445
6447
|
"#checkoutIframe",
|
|
6446
|
-
"
|
|
6448
|
+
"scheme_service_id",
|
|
6447
6449
|
"paydock_public_key_or_access_token",
|
|
6448
6450
|
{},
|
|
6449
6451
|
);
|
|
@@ -6453,30 +6455,50 @@ A full example of the container and the initialized widget is as follows:
|
|
|
6453
6455
|
</html>
|
|
6454
6456
|
```
|
|
6455
6457
|
|
|
6456
|
-
## Customize your SRC Checkout
|
|
6457
6458
|
|
|
6458
|
-
|
|
6459
|
+
## SRC advanced example
|
|
6459
6460
|
|
|
6460
6461
|
### Settings
|
|
6461
6462
|
|
|
6462
6463
|
```javascript
|
|
6463
|
-
|
|
6464
|
+
|
|
6465
|
+
src.setEnv('sandbox'); // set enviroment
|
|
6466
|
+
|
|
6467
|
+
src.hideButton(); // hide button
|
|
6468
|
+
|
|
6469
|
+
src.showButton(); // show button
|
|
6470
|
+
|
|
6464
6471
|
src.hideCheckout(); // hide checkout iframe
|
|
6472
|
+
|
|
6465
6473
|
src.showCheckout(); // show checkout iframe
|
|
6474
|
+
|
|
6475
|
+
src.on('checkoutButtonLoaded', () => {
|
|
6476
|
+
console.log("Button loaded");
|
|
6477
|
+
});
|
|
6478
|
+
|
|
6479
|
+
src.on('checkoutButtonClicked', () => {
|
|
6480
|
+
console.log("Button clicked");
|
|
6481
|
+
});
|
|
6482
|
+
|
|
6466
6483
|
src.on('iframeLoaded', () => {
|
|
6467
6484
|
console.log("Initial iframe loaded");
|
|
6468
6485
|
});
|
|
6486
|
+
|
|
6469
6487
|
src.on('checkoutReady', () => {
|
|
6470
6488
|
console.log("Checkout ready to be used");
|
|
6471
6489
|
});
|
|
6490
|
+
|
|
6472
6491
|
src.on('checkoutCompleted', (token) => {
|
|
6473
6492
|
console.log(token);
|
|
6474
6493
|
});
|
|
6494
|
+
|
|
6475
6495
|
src.on('checkoutError', (error) => {
|
|
6476
6496
|
console.log(error);
|
|
6477
6497
|
});
|
|
6478
6498
|
```
|
|
6479
6499
|
|
|
6500
|
+
Here you can see how you can use this methods to customize your checkout experience
|
|
6501
|
+
|
|
6480
6502
|
### Full example
|
|
6481
6503
|
|
|
6482
6504
|
```html
|
|
@@ -6488,73 +6510,64 @@ src.on('checkoutError', (error) => {
|
|
|
6488
6510
|
<style>iframe {border: 0;width: 40%;height: 450px;}</style>
|
|
6489
6511
|
</head>
|
|
6490
6512
|
<body>
|
|
6513
|
+
<div id="checkoutButton"></div>
|
|
6491
6514
|
<div id="checkoutIframe"></div>
|
|
6492
6515
|
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
6493
6516
|
<script>
|
|
6494
|
-
var src = new paydock.
|
|
6517
|
+
var src = new paydock.SRC(
|
|
6518
|
+
"#checkoutButton",
|
|
6495
6519
|
"#checkoutIframe",
|
|
6496
|
-
"
|
|
6520
|
+
"scheme_service_id",
|
|
6497
6521
|
"paydock_public_key_or_access_token",
|
|
6498
6522
|
{},
|
|
6499
6523
|
);
|
|
6500
|
-
|
|
6501
|
-
console.log("Initial iframe loaded");
|
|
6502
|
-
});
|
|
6524
|
+
|
|
6503
6525
|
src.on('checkoutReady', () => {
|
|
6504
6526
|
console.log("Checkout ready to be used");
|
|
6505
6527
|
});
|
|
6528
|
+
|
|
6506
6529
|
src.on('checkoutCompleted', (token) => {
|
|
6507
6530
|
console.log(token);
|
|
6508
6531
|
});
|
|
6509
|
-
src.on('checkoutError', (error) => {
|
|
6510
|
-
console.log(error);
|
|
6511
|
-
});
|
|
6512
6532
|
src.load();
|
|
6513
6533
|
</script>
|
|
6514
6534
|
</body>
|
|
6515
6535
|
</html>
|
|
6516
6536
|
```
|
|
6517
6537
|
|
|
6518
|
-
##
|
|
6538
|
+
## Customization options for address fields
|
|
6539
|
+
### Shipping address:
|
|
6519
6540
|
|
|
6520
|
-
To customize
|
|
6521
|
-
The options for this customization are NONE (default option), and POSTAL_COUNTRY or FULL.
|
|
6541
|
+
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.
|
|
6522
6542
|
|
|
6523
6543
|
```
|
|
6524
|
-
var src = new paydock.
|
|
6544
|
+
var src = new paydock.SRC(
|
|
6545
|
+
"#checkoutButton",
|
|
6525
6546
|
"#checkoutIframe",
|
|
6526
|
-
"
|
|
6547
|
+
"scheme_service_id",
|
|
6527
6548
|
"paydock_public_key_or_access_token",
|
|
6528
6549
|
{
|
|
6529
6550
|
"dpa_transaction_options": {
|
|
6530
|
-
"
|
|
6551
|
+
"dpa_shipping_preference": "ALL"
|
|
6531
6552
|
}
|
|
6532
6553
|
},
|
|
6533
6554
|
);
|
|
6534
6555
|
```
|
|
6535
6556
|
|
|
6536
|
-
|
|
6537
|
-
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:
|
|
6557
|
+
With this the Visa popup requires the shipping address from consumer, and these information will be stored in the Paydock charge.
|
|
6538
6558
|
|
|
6539
|
-
|
|
6540
|
-
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.
|
|
6541
|
-
3. Send the billing address when creating the charge.
|
|
6559
|
+
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:
|
|
6542
6560
|
|
|
6543
6561
|
```
|
|
6544
6562
|
POST v1/charges
|
|
6563
|
+
|
|
6545
6564
|
{
|
|
6546
6565
|
"amount": "10.00",
|
|
6547
6566
|
"currency": "AUD",
|
|
6548
|
-
"token": "
|
|
6567
|
+
"token": "token",
|
|
6549
6568
|
"customer": {
|
|
6550
6569
|
"payment_source": {
|
|
6551
|
-
"gateway_id": "gateway_id"
|
|
6552
|
-
"address_line1": "address_line1",
|
|
6553
|
-
"address_line2": "address_line2",
|
|
6554
|
-
"address_city": "address_city",
|
|
6555
|
-
"address_postcode": "address_postcode",
|
|
6556
|
-
"address_state": "address_state",
|
|
6557
|
-
"address_country": "address_country"
|
|
6570
|
+
"gateway_id": "gateway_id"
|
|
6558
6571
|
}
|
|
6559
6572
|
},
|
|
6560
6573
|
"shipping": {
|
|
@@ -6569,262 +6582,201 @@ POST v1/charges
|
|
|
6569
6582
|
}
|
|
6570
6583
|
```
|
|
6571
6584
|
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
You can send a flag `unaccepted_card_type` to block the usage of a specific card type. The available options are 'DEBIT' and 'CREDIT'.
|
|
6575
|
-
|
|
6576
|
-
### Example code
|
|
6585
|
+
- Billing address:
|
|
6577
6586
|
|
|
6578
|
-
|
|
6587
|
+
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:
|
|
6579
6588
|
|
|
6580
6589
|
```
|
|
6581
|
-
var src = new paydock.
|
|
6590
|
+
var src = new paydock.SRC(
|
|
6591
|
+
"#checkoutButton",
|
|
6582
6592
|
"#checkoutIframe",
|
|
6583
|
-
"
|
|
6584
|
-
"
|
|
6593
|
+
"scheme_service_id",
|
|
6594
|
+
"paydock_public_key_or_access_token",
|
|
6585
6595
|
{
|
|
6586
|
-
|
|
6596
|
+
"customer": {
|
|
6597
|
+
"email": "test@email.com",
|
|
6598
|
+
"first_name": "Name",
|
|
6599
|
+
"last_name": "Surname",
|
|
6600
|
+
"phone": {
|
|
6601
|
+
"country_code": "1",
|
|
6602
|
+
"phone": "2124567890"
|
|
6603
|
+
},
|
|
6604
|
+
"payment_source": {
|
|
6605
|
+
"address_line1": "Line 1",
|
|
6606
|
+
"address_line2": "Line 2",
|
|
6607
|
+
"address_city": "Miami",
|
|
6608
|
+
"address_postcode": "33126",
|
|
6609
|
+
"address_state": "FL",
|
|
6610
|
+
"address_country": "US"
|
|
6611
|
+
}
|
|
6612
|
+
}
|
|
6587
6613
|
},
|
|
6588
6614
|
);
|
|
6589
6615
|
```
|
|
6590
6616
|
|
|
6591
|
-
##
|
|
6617
|
+
## Personalization Styling
|
|
6592
6618
|
|
|
6593
|
-
|
|
6619
|
+
To improve the experience in the use of the widget, it is allowed to send props that customize the UI.
|
|
6594
6620
|
|
|
6595
6621
|
### Example code
|
|
6596
6622
|
|
|
6597
6623
|
```
|
|
6598
|
-
var src = new paydock.
|
|
6624
|
+
var src = new paydock.SRC(
|
|
6625
|
+
"#checkoutButton",
|
|
6599
6626
|
"#checkoutIframe",
|
|
6600
|
-
"
|
|
6627
|
+
"scheme_service_id",
|
|
6601
6628
|
"paydock_public_key",
|
|
6602
|
-
{},
|
|
6603
6629
|
);
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
secondary_button_color: 'red',
|
|
6608
|
-
primary_button_text_color: 'red',
|
|
6609
|
-
secondary_button_text_color: 'red',
|
|
6610
|
-
font_family: 'Arial',
|
|
6611
|
-
});
|
|
6630
|
+
|
|
6631
|
+
button.setStyles({"primary_color":"#a83232","button_text_color":"#171e9c","font_family":"sans-serif"})
|
|
6632
|
+
|
|
6612
6633
|
```
|
|
6634
|
+
## Event and Values
|
|
6635
|
+
|
|
6636
|
+
| Event Value | Type | Description |
|
|
6637
|
+
| ------------------- | ------------------- | -------------------------------------------------------------- |
|
|
6638
|
+
| primary_color | <code>string</code> | HEX color for the principal buttons, example : #32a852 |
|
|
6639
|
+
| button_text_color | <code>string</code> | HEX color for the text of the buttons, example : #32a852|
|
|
6640
|
+
| font_family | <code>string</code> | Look more [mozilla.org/color](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family)|
|
|
6641
|
+
| card_schemes | <code>[string] - array of string</code> | Possible values "visa", "mastercard", "amex" and "discover" - Default show all logos
|
|
6613
6642
|
|
|
6614
6643
|
## Classes
|
|
6615
6644
|
|
|
6616
6645
|
<dl>
|
|
6617
|
-
<dt><a href="#
|
|
6618
|
-
<dd><p>Class
|
|
6646
|
+
<dt><a href="#SRC">SRC</a></dt>
|
|
6647
|
+
<dd><p>Class SRC include methods for interacting with different secure remote commerce options such as Visa SRC</p>
|
|
6619
6648
|
</dd>
|
|
6620
6649
|
</dl>
|
|
6621
6650
|
|
|
6622
6651
|
## Interfaces
|
|
6623
6652
|
|
|
6624
6653
|
<dl>
|
|
6625
|
-
<dt><a href="#
|
|
6626
|
-
<dd><p>Interface of data used for the
|
|
6627
|
-
</dd>
|
|
6628
|
-
<dt><a href="#EventData">EventData</a> : <code>object</code></dt>
|
|
6629
|
-
<dd><p>Interface for data returned in callbacks</p>
|
|
6630
|
-
</dd>
|
|
6631
|
-
<dt><a href="#EventDataCheckoutCompletedData">EventDataCheckoutCompletedData</a> : <code>object</code></dt>
|
|
6632
|
-
<dd><p>Event data returned for checkoutCompleted callback, holding the One Time Token and the flow type completed.
|
|
6633
|
-
When the flow type is src, masked checkoutData available is also returned</p>
|
|
6634
|
-
</dd>
|
|
6635
|
-
<dt><a href="#IStyles">IStyles</a> : <code>object</code></dt>
|
|
6636
|
-
<dd><p>Interface for style configs inyected to the SRC checkout</p>
|
|
6654
|
+
<dt><a href="#IVisaSRCMeta">IVisaSRCMeta</a> : <code>object</code></dt>
|
|
6655
|
+
<dd><p>Interface of data used for the Visa Checkout.</p>
|
|
6637
6656
|
</dd>
|
|
6638
6657
|
</dl>
|
|
6639
6658
|
|
|
6640
|
-
<a name="
|
|
6659
|
+
<a name="IVisaSRCMeta" id="IVisaSRCMeta" href="#IVisaSRCMeta"> </a>
|
|
6641
6660
|
|
|
6642
|
-
##
|
|
6643
|
-
Interface of data used for the
|
|
6661
|
+
## IVisaSRCMeta : <code>object</code>
|
|
6662
|
+
Interface of data used for the Visa Checkout.
|
|
6644
6663
|
|
|
6645
6664
|
**Kind**: global interface
|
|
6646
6665
|
|
|
6647
6666
|
| Param | Type | Description |
|
|
6648
6667
|
| --- | --- | --- |
|
|
6649
|
-
| [
|
|
6668
|
+
| [srci_transaction_id] | <code>string</code> | Used to identify the SRC Id. |
|
|
6650
6669
|
| [dpa_data] | <code>object</code> | Object where the DPA creation data is stored. |
|
|
6651
|
-
| [dpa_data.dpa_presentation_name] | <code>string</code> | Name in which the DPA is presented. |
|
|
6670
|
+
| [dpa_data.dpa_presentation_name] | <code>string</code> | Name in which the DPA is presented in. |
|
|
6652
6671
|
| [dpa_data.dpa_uri] | <code>string</code> | Used for indicating the DPA URI. |
|
|
6653
|
-
| [
|
|
6654
|
-
| [dpa_data.dpa_email_address] | <code>string</code> | Email address for DPA communication. |
|
|
6655
|
-
| [dpa_data.dpa_phone_number] | <code>object</code> | Phone number structure for DPA communication. |
|
|
6656
|
-
| [dpa_data.dpa_phone_number.country_code] | <code>string</code> | The country code of the phone number. |
|
|
6657
|
-
| [dpa_data.dpa_phone_number.phone_number] | <code>string</code> | The phone number part of the phone number. |
|
|
6658
|
-
| [dpa_data.dpa_logo_uri] | <code>string</code> | URI for the DPA logo. |
|
|
6659
|
-
| [dpa_data.dpa_supported_email_address] | <code>string</code> | Supported email address for DPA support. |
|
|
6660
|
-
| [dpa_data.dpa_supported_phone_number] | <code>object</code> | Supported phone number for DPA support. |
|
|
6661
|
-
| [dpa_data.dpa_supported_phone_number.country_code] | <code>string</code> | The country code of the phone number. |
|
|
6662
|
-
| [dpa_data.dpa_supported_phone_number.phone_number] | <code>string</code> | The phone number part of the phone number. |
|
|
6663
|
-
| [dpa_data.dpa_support_uri] | <code>string</code> | URI for DPA support. |
|
|
6664
|
-
| [dpa_data.application_type] | <code>string</code> | Application type, either 'WEB_BROWSER' or 'MOBILE_APP'. |
|
|
6665
|
-
| [co_brand_names] | <code>Array.<string></code> | List of co-brand names associated with the SRC experience. |
|
|
6666
|
-
| [checkout_experience] | <code>string</code> | Checkout experience type, either 'WITHIN_CHECKOUT' or 'PAYMENT_SETTINGS'. |
|
|
6667
|
-
| [services] | <code>string</code> | Services offered, such as 'INLINE_CHECKOUT' or 'INLINE_INSTALLMENTS'. |
|
|
6668
|
-
| [dpa_transaction_options] | <code>object</code> | Object that stores options for creating a transaction with DPA. |
|
|
6672
|
+
| [dpa_transaction_options] | <code>object</code> | Object that stores options for creating a trasaction with DPA. |
|
|
6669
6673
|
| [dpa_transaction_options.dpa_locale] | <code>string</code> | DPA’s preferred locale, example en_US. |
|
|
6670
|
-
| [dpa_transaction_options.dpa_accepted_billing_countries] | <code>Array
|
|
6671
|
-
| [dpa_transaction_options.
|
|
6672
|
-
| [dpa_transaction_options.
|
|
6673
|
-
| [dpa_transaction_options.
|
|
6674
|
-
| [dpa_transaction_options.
|
|
6675
|
-
| [dpa_transaction_options.
|
|
6676
|
-
| [dpa_transaction_options.
|
|
6677
|
-
| [dpa_transaction_options.
|
|
6678
|
-
| [dpa_transaction_options.
|
|
6679
|
-
| [dpa_transaction_options.
|
|
6680
|
-
| [dpa_transaction_options.
|
|
6681
|
-
| [dpa_transaction_options.
|
|
6682
|
-
| [dpa_transaction_options.
|
|
6683
|
-
| [dpa_transaction_options.
|
|
6684
|
-
| [dpa_transaction_options.
|
|
6685
|
-
| [dpa_transaction_options.
|
|
6674
|
+
| [dpa_transaction_options.dpa_accepted_billing_countries] | <code>Array</code> | Used to indicate list of accepted billing countries for DPA. |
|
|
6675
|
+
| [dpa_transaction_options.dpa_accepted_shipping_countries] | <code>Array</code> | Used to indicate list of accepted shipping countries for DPA. |
|
|
6676
|
+
| [dpa_transaction_options.dpa_billing_preference] | <code>string</code> | Used for listing the enumeration for billing preferences for DPA. Options are 'ALL', 'POSTAL_COUNTRY' and 'NONE'. |
|
|
6677
|
+
| [dpa_transaction_options.dpa_shipping_preference] | <code>string</code> | Used for listing the enumeration for shipping preferences for DPA. Options are 'ALL', 'POSTAL_COUNTRY' and 'NONE'. |
|
|
6678
|
+
| [dpa_transaction_options.consumer_name_requested] | <code>boolean</code> | Used to check if the name of the consumer is needed. |
|
|
6679
|
+
| [dpa_transaction_options.consumer_email_address_requested] | <code>boolean</code> | Used to check if the email of the consumer is needed. |
|
|
6680
|
+
| [dpa_transaction_options.consumer_phone_number_requested] | <code>boolean</code> | Used to check if the phone number of the consumer is needed. |
|
|
6681
|
+
| [dpa_transaction_options.payment_options] | <code>object</code> | Object used to check the payment options that are included. |
|
|
6682
|
+
| [dpa_transaction_options.payment_options.dpa_dynamic_data_ttl_minutes] | <code>number</code> | The minimum requested validity period for the transaction credentials. |
|
|
6683
|
+
| [dpa_transaction_options.payment_options.dynamic_data_type] | <code>string</code> | Used for listing the enumeration for dynamic data types. Options are 'TAVV' and 'DTVV'. |
|
|
6684
|
+
| [dpa_transaction_options.payment_options.dpa_pan_requested] | <code>boolean</code> | Used to check if PAN number was requested. |
|
|
6685
|
+
| [dpa_transaction_options.review_action] | <code>string</code> | Used for listing the enumeration of review actions. Options are 'pay' and 'continue'. |
|
|
6686
|
+
| [dpa_transaction_options.checkout_description] | <code>string</code> | Used for indicating the description of the checkout. |
|
|
6687
|
+
| [dpa_transaction_options.transaction_type] | <code>string</code> | Used for listing the enumeration of the type of the transaction. 'PURCHASE', 'BILL_PAYMENT' and 'MONEY_TRANSFER' |
|
|
6688
|
+
| [dpa_transaction_options.order_type] | <code>string</code> | Used for listing the enumeration of the type of the order. Options are 'REAUTHORIZATION', 'RECURRING' and 'INSTALLMENT'. |
|
|
6689
|
+
| [dpa_transaction_options.transaction_amount] | <code>object</code> | Object used to describe the details of the transaction. |
|
|
6690
|
+
| [dpa_transaction_options.transaction_amount.transaction_amount] | <code>number</code> | Used to indicate the amount of the transaction. |
|
|
6691
|
+
| [dpa_transaction_options.transaction_amount.transaction_currency_code] | <code>string</code> | Used to indicate the currency code of the transaction. 3 letter ISO code format. |
|
|
6692
|
+
| [dpa_transaction_options.merchant_order_id] | <code>string</code> | Used to indicate the merchants order Id. |
|
|
6693
|
+
| [dpa_transaction_options.merchant_category_code] | <code>string</code> | Used to indicate the merchants category code. |
|
|
6694
|
+
| [dpa_transaction_options.merchant_country_code] | <code>string</code> | Used to indicate the merchants country code. 2 letter ISO code format. |
|
|
6686
6695
|
| [customer] | <code>object</code> | Object where the customer data is stored to prefill in the checkout. |
|
|
6687
6696
|
| [customer.email] | <code>string</code> | Customer email. |
|
|
6688
6697
|
| [customer.first_name] | <code>string</code> | Customer first name. |
|
|
6689
6698
|
| [customer.last_name] | <code>string</code> | Customer last name. |
|
|
6690
6699
|
| [customer.phone] | <code>object</code> | Object where the customer phone is stored. |
|
|
6691
|
-
| [customer.phone.country_code] | <code>string</code> | Customer phone country code (example "1" for US).
|
|
6700
|
+
| [customer.phone.country_code] | <code>string</code> | Customer phone country code (example "1" for US). |
|
|
6692
6701
|
| [customer.phone.phone] | <code>string</code> | Customer phone number. |
|
|
6693
|
-
| [
|
|
6702
|
+
| [customer.payment_source] | <code>object</code> | Object where the customer billing address data is stored. |
|
|
6703
|
+
| [customer.payment_source.address_line1] | <code>string</code> | Customer billing address line 1. |
|
|
6704
|
+
| [customer.payment_source.address_line2] | <code>string</code> | Customer billing address line 2. |
|
|
6705
|
+
| [customer.payment_source.address_city] | <code>string</code> | Customer billing address city. |
|
|
6706
|
+
| [customer.payment_source.address_postcode] | <code>string</code> | Customer billing address postcode. |
|
|
6707
|
+
| [customer.payment_source.address_state] | <code>string</code> | Customer billing address state code (if applicable for the country, example "FL" for Florida). |
|
|
6708
|
+
| [customer.payment_source.address_country] | <code>string</code> | Customer billing address country code (example "US"). |
|
|
6694
6709
|
|
|
6695
|
-
<a name="
|
|
6710
|
+
<a name="SRC" id="SRC" href="#SRC"> </a>
|
|
6696
6711
|
|
|
6697
|
-
##
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
**Kind**: global interface
|
|
6701
|
-
|
|
6702
|
-
| Param | Type | Description |
|
|
6703
|
-
| --- | --- | --- |
|
|
6704
|
-
| type | [<code>EVENT\_DATA\_TYPE</code>](#EVENT_DATA_TYPE) | Event type of type [EVENT_DATA_TYPE](#EVENT_DATA_TYPE) |
|
|
6705
|
-
| data | <code>string</code> \| [<code>EventDataCheckoutCompletedData</code>](#EventDataCheckoutCompletedData) | optional data returning a string for checkoutError event or [EventDataCheckoutCompletedData](#EventDataCheckoutCompletedData) for checkoutCompleted |
|
|
6706
|
-
|
|
6707
|
-
<a name="EventDataCheckoutCompletedData" id="EventDataCheckoutCompletedData" href="#EventDataCheckoutCompletedData"> </a>
|
|
6708
|
-
|
|
6709
|
-
## EventDataCheckoutCompletedData : <code>object</code>
|
|
6710
|
-
Event data returned for checkoutCompleted callback, holding the One Time Token and the flow type completed.
|
|
6711
|
-
When the flow type is src, masked checkoutData available is also returned
|
|
6712
|
-
|
|
6713
|
-
**Kind**: global interface
|
|
6714
|
-
|
|
6715
|
-
| Param | Type | Description |
|
|
6716
|
-
| --- | --- | --- |
|
|
6717
|
-
| type | <code>string</code> | type of the checkout, can be `src` or `manual`. |
|
|
6718
|
-
| token | <code>string</code> | one time token value. |
|
|
6719
|
-
| [checkoutData] | <code>object</code> | Optional checkout data related to the checkout information. Only available on src flow. |
|
|
6720
|
-
| [checkoutData.card_number_bin] | <code>string</code> | The BIN of the card used for the transaction. |
|
|
6721
|
-
| [checkoutData.card_number_last4] | <code>string</code> | The last four digits of the card number. |
|
|
6722
|
-
| [checkoutData.card_scheme] | <code>string</code> | The card scheme. Values: visa, mastercard, amex, diners, discover. |
|
|
6723
|
-
| [checkoutData.card_type] | <code>string</code> | The type of card. Values: credit, debit, prepaid, combo, flex. |
|
|
6724
|
-
| [checkoutData.address_line1] | <code>string</code> | Address line 1 for billing address. |
|
|
6725
|
-
| [checkoutData.address_line2] | <code>string</code> | Address line 2 for billing address. |
|
|
6726
|
-
| [checkoutData.address_line3] | <code>string</code> | Address line 3 for billing address. |
|
|
6727
|
-
| [checkoutData.address_city] | <code>string</code> | City for billing address. |
|
|
6728
|
-
| [checkoutData.address_postcode] | <code>string</code> | Postal code for billing address. |
|
|
6729
|
-
| [checkoutData.address_state] | <code>string</code> | State or province for billing address. |
|
|
6730
|
-
| [checkoutData.address_country] | <code>string</code> | Country for billing address. |
|
|
6731
|
-
| [checkoutData.shipping] | <code>object</code> | Optional shipping information. |
|
|
6732
|
-
| [checkoutData.shipping.address_line1] | <code>string</code> | Address line 1 for shipping address. |
|
|
6733
|
-
| [checkoutData.shipping.address_line2] | <code>string</code> | Address line 2 for shipping address. |
|
|
6734
|
-
| [checkoutData.shipping.address_line3] | <code>string</code> | Address line 3 for shipping address. |
|
|
6735
|
-
| [checkoutData.shipping.address_city] | <code>string</code> | City for shipping address. |
|
|
6736
|
-
| [checkoutData.shipping.address_postcode] | <code>string</code> | Postal code for shipping address. |
|
|
6737
|
-
| [checkoutData.shipping.address_state] | <code>string</code> | State or province for shipping address. |
|
|
6738
|
-
| [checkoutData.shipping.address_country] | <code>string</code> | Country for shipping address. |
|
|
6739
|
-
|
|
6740
|
-
<a name="IStyles" id="IStyles" href="#IStyles"> </a>
|
|
6741
|
-
|
|
6742
|
-
## IStyles : <code>object</code>
|
|
6743
|
-
Interface for style configs inyected to the SRC checkout
|
|
6744
|
-
|
|
6745
|
-
**Kind**: global interface
|
|
6746
|
-
|
|
6747
|
-
| Param | Type | Description |
|
|
6748
|
-
| --- | --- | --- |
|
|
6749
|
-
| [primary_button_color] | <code>string</code> | Color Code for primary button. |
|
|
6750
|
-
| [primary_button_text_color] | <code>string</code> | Color Code for primary button text. |
|
|
6751
|
-
| [secondary_button_color] | <code>string</code> | Color Code for secondary button. |
|
|
6752
|
-
| [secondary_button_text_color] | <code>string</code> | Color Code for secondary button text. |
|
|
6753
|
-
| [font_family] | <code>string</code> | Font family to be used. |
|
|
6754
|
-
| [enable_src_popup] | <code>boolean</code> | Boolean flag to make the SRC checkout show in a popup window instead of embedded in iframe. |
|
|
6755
|
-
|
|
6756
|
-
<a name="MastercardSRCClickToPay" id="MastercardSRCClickToPay" href="#MastercardSRCClickToPay"> </a>
|
|
6757
|
-
|
|
6758
|
-
## MastercardSRCClickToPay ⇐ <code>SRC</code>
|
|
6759
|
-
Class MastercardSRCClickToPay include methods for interacting with the MastercardSRC checkout and Manual Card option
|
|
6712
|
+
## SRC
|
|
6713
|
+
Class SRC include methods for interacting with different secure remote commerce options such as Visa SRC
|
|
6760
6714
|
|
|
6761
6715
|
**Kind**: global class
|
|
6762
|
-
**Extends**: <code>SRC</code>
|
|
6763
6716
|
|
|
6764
|
-
* [
|
|
6765
|
-
* [new
|
|
6766
|
-
* [.load()](#MastercardSRCClickToPay+load)
|
|
6717
|
+
* [SRC](#SRC)
|
|
6718
|
+
* [new SRC(button_selector, iframe_selector, service_id, public_key_or_access_token, meta)](#new_SRC_new)
|
|
6767
6719
|
* [.setStyles(fields)](#SRC+setStyles)
|
|
6720
|
+
* [.load()](#SRC+load)
|
|
6768
6721
|
* [.setEnv(env, [alias])](#SRC+setEnv)
|
|
6769
6722
|
* [.getEnv()](#SRC+getEnv)
|
|
6770
6723
|
* [.on(eventName, [cb])](#SRC+on) ⇒ <code>Promise.<any></code> \| <code>void</code>
|
|
6724
|
+
* [.hideButton([saveSize])](#SRC+hideButton)
|
|
6725
|
+
* [.showButton()](#SRC+showButton)
|
|
6771
6726
|
* [.hideCheckout([saveSize])](#SRC+hideCheckout)
|
|
6772
6727
|
* [.showCheckout()](#SRC+showCheckout)
|
|
6773
6728
|
* [.reload()](#SRC+reload)
|
|
6774
6729
|
* [.useAutoResize()](#SRC+useAutoResize)
|
|
6775
6730
|
|
|
6776
|
-
<a name="
|
|
6731
|
+
<a name="new_SRC_new" id="new_SRC_new" href="#new_SRC_new"> </a>
|
|
6777
6732
|
|
|
6778
|
-
### new
|
|
6733
|
+
### new SRC(button_selector, iframe_selector, service_id, public_key_or_access_token, meta)
|
|
6779
6734
|
|
|
6780
6735
|
| Param | Type | Description |
|
|
6781
6736
|
| --- | --- | --- |
|
|
6737
|
+
| button_selector | <code>string</code> | Selector of html element. Container for SRC checkout button. |
|
|
6782
6738
|
| iframe_selector | <code>string</code> | Selector of html element. Container for SRC checkout iFrame. |
|
|
6783
6739
|
| service_id | <code>string</code> | Card Scheme Service ID |
|
|
6784
6740
|
| public_key_or_access_token | <code>string</code> | Paydock public key or Access Token |
|
|
6785
|
-
| meta | [<code>
|
|
6741
|
+
| meta | [<code>IVisaSRCMeta</code>](#IVisaSRCMeta) | Data that configures the SRC checkout |
|
|
6786
6742
|
|
|
6787
6743
|
**Example**
|
|
6788
6744
|
```js
|
|
6789
|
-
var
|
|
6745
|
+
var SRC = new SRC('#checkoutButton', '#checkoutIframe', 'service_id', 'public_key', {});
|
|
6790
6746
|
```
|
|
6791
|
-
<a name="MastercardSRCClickToPay+load" id="MastercardSRCClickToPay+load" href="#MastercardSRCClickToPay+load"> </a>
|
|
6792
|
-
|
|
6793
|
-
### mastercardSRCClickToPay.load()
|
|
6794
|
-
The final method after configuring the SRC to start the load process of SRC checkout
|
|
6795
|
-
|
|
6796
|
-
**Kind**: instance method of [<code>MastercardSRCClickToPay</code>](#MastercardSRCClickToPay)
|
|
6797
6747
|
<a name="SRC+setStyles" id="SRC+setStyles" href="#SRC+setStyles"> </a>
|
|
6798
6748
|
|
|
6799
|
-
###
|
|
6749
|
+
### srC.setStyles(fields)
|
|
6800
6750
|
Object contain styles for widget - call before `.load()`.
|
|
6801
6751
|
|
|
6802
|
-
**Kind**: instance method of [<code>
|
|
6803
|
-
**Overrides**: [<code>setStyles</code>](#SRC+setStyles)
|
|
6752
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6804
6753
|
|
|
6805
6754
|
| Param | Type | Description |
|
|
6806
6755
|
| --- | --- | --- |
|
|
6807
|
-
| fields |
|
|
6756
|
+
| fields | <code>IStyles</code> | name of styles which can be shown in widget [STYLE](STYLE) |
|
|
6808
6757
|
|
|
6809
6758
|
**Example**
|
|
6810
6759
|
```js
|
|
6811
6760
|
widget.setStyles({
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
font_family: 'Arial',
|
|
6818
|
-
});
|
|
6761
|
+
button_text_color: '#32a852',
|
|
6762
|
+
primary_color: '#32a852',
|
|
6763
|
+
font_family: 'sans-serif',
|
|
6764
|
+
card_schemes: ['visa']
|
|
6765
|
+
});
|
|
6819
6766
|
```
|
|
6767
|
+
<a name="SRC+load" id="SRC+load" href="#SRC+load"> </a>
|
|
6768
|
+
|
|
6769
|
+
### srC.load()
|
|
6770
|
+
The final method after configuring the SRC to start the load process of SRC checkout
|
|
6771
|
+
|
|
6772
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6820
6773
|
<a name="SRC+setEnv" id="SRC+setEnv" href="#SRC+setEnv"> </a>
|
|
6821
6774
|
|
|
6822
|
-
###
|
|
6775
|
+
### srC.setEnv(env, [alias])
|
|
6823
6776
|
Current method can change environment. By default environment = sandbox.
|
|
6824
6777
|
Also we can change domain alias for this environment. By default domain_alias = paydock.com
|
|
6825
6778
|
|
|
6826
|
-
**Kind**: instance method of [<code>
|
|
6827
|
-
**Overrides**: [<code>setEnv</code>](#SRC+setEnv)
|
|
6779
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6828
6780
|
|
|
6829
6781
|
| Param | Type | Description |
|
|
6830
6782
|
| --- | --- | --- |
|
|
@@ -6837,27 +6789,25 @@ SRC.setEnv('production');
|
|
|
6837
6789
|
```
|
|
6838
6790
|
<a name="SRC+getEnv" id="SRC+getEnv" href="#SRC+getEnv"> </a>
|
|
6839
6791
|
|
|
6840
|
-
###
|
|
6792
|
+
### srC.getEnv()
|
|
6841
6793
|
Method to read the current environment
|
|
6842
6794
|
|
|
6843
|
-
**Kind**: instance method of [<code>
|
|
6844
|
-
**Overrides**: [<code>getEnv</code>](#SRC+getEnv)
|
|
6795
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6845
6796
|
**Example**
|
|
6846
6797
|
```js
|
|
6847
6798
|
SRC.getEnv();
|
|
6848
6799
|
```
|
|
6849
6800
|
<a name="SRC+on" id="SRC+on" href="#SRC+on"> </a>
|
|
6850
6801
|
|
|
6851
|
-
###
|
|
6802
|
+
### srC.on(eventName, [cb]) ⇒ <code>Promise.<any></code> \| <code>void</code>
|
|
6852
6803
|
Listen to events of SRC
|
|
6853
6804
|
|
|
6854
|
-
**Kind**: instance method of [<code>
|
|
6855
|
-
**Overrides**: [<code>on</code>](#SRC+on)
|
|
6805
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6856
6806
|
|
|
6857
6807
|
| Param | Type | Description |
|
|
6858
6808
|
| --- | --- | --- |
|
|
6859
6809
|
| eventName | <code>string</code> | Available event names [EVENT](#EVENT) |
|
|
6860
|
-
| [cb] | <code>listener</code> |
|
|
6810
|
+
| [cb] | <code>listener</code> | |
|
|
6861
6811
|
|
|
6862
6812
|
**Example**
|
|
6863
6813
|
```js
|
|
@@ -6869,13 +6819,37 @@ SRC.on('checkoutCompleted').then(function (token) {
|
|
|
6869
6819
|
console.log(token);
|
|
6870
6820
|
});
|
|
6871
6821
|
```
|
|
6822
|
+
<a name="SRC+hideButton" id="SRC+hideButton" href="#SRC+hideButton"> </a>
|
|
6823
|
+
|
|
6824
|
+
### srC.hideButton([saveSize])
|
|
6825
|
+
Using this method you can hide button
|
|
6826
|
+
|
|
6827
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6828
|
+
|
|
6829
|
+
| Param | Type | Default | Description |
|
|
6830
|
+
| --- | --- | --- | --- |
|
|
6831
|
+
| [saveSize] | <code>boolean</code> | <code>false</code> | using this param you can save iframe's size (if applicable) |
|
|
6832
|
+
|
|
6833
|
+
**Example**
|
|
6834
|
+
```js
|
|
6835
|
+
SRC.hideButton();
|
|
6836
|
+
```
|
|
6837
|
+
<a name="SRC+showButton" id="SRC+showButton" href="#SRC+showButton"> </a>
|
|
6838
|
+
|
|
6839
|
+
### srC.showButton()
|
|
6840
|
+
Using this method you can show the SRC button after using hideButton method
|
|
6841
|
+
|
|
6842
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6843
|
+
**Example**
|
|
6844
|
+
```js
|
|
6845
|
+
SRC.showButton();
|
|
6846
|
+
```
|
|
6872
6847
|
<a name="SRC+hideCheckout" id="SRC+hideCheckout" href="#SRC+hideCheckout"> </a>
|
|
6873
6848
|
|
|
6874
|
-
###
|
|
6849
|
+
### srC.hideCheckout([saveSize])
|
|
6875
6850
|
Using this method you can hide checkout after load and button click
|
|
6876
6851
|
|
|
6877
|
-
**Kind**: instance method of [<code>
|
|
6878
|
-
**Overrides**: [<code>hideCheckout</code>](#SRC+hideCheckout)
|
|
6852
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6879
6853
|
|
|
6880
6854
|
| Param | Type | Default | Description |
|
|
6881
6855
|
| --- | --- | --- | --- |
|
|
@@ -6887,33 +6861,30 @@ SRC.hideCheckout();
|
|
|
6887
6861
|
```
|
|
6888
6862
|
<a name="SRC+showCheckout" id="SRC+showCheckout" href="#SRC+showCheckout"> </a>
|
|
6889
6863
|
|
|
6890
|
-
###
|
|
6864
|
+
### srC.showCheckout()
|
|
6891
6865
|
Using this method you can show checkout after using hideCheckout method
|
|
6892
6866
|
|
|
6893
|
-
**Kind**: instance method of [<code>
|
|
6894
|
-
**Overrides**: [<code>showCheckout</code>](#SRC+showCheckout)
|
|
6867
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6895
6868
|
**Example**
|
|
6896
6869
|
```js
|
|
6897
6870
|
SRC.showCheckout()
|
|
6898
6871
|
```
|
|
6899
6872
|
<a name="SRC+reload" id="SRC+reload" href="#SRC+reload"> </a>
|
|
6900
6873
|
|
|
6901
|
-
###
|
|
6874
|
+
### srC.reload()
|
|
6902
6875
|
Using this method you can reload the whole checkout
|
|
6903
6876
|
|
|
6904
|
-
**Kind**: instance method of [<code>
|
|
6905
|
-
**Overrides**: [<code>reload</code>](#SRC+reload)
|
|
6877
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6906
6878
|
**Example**
|
|
6907
6879
|
```js
|
|
6908
6880
|
SRC.reload()
|
|
6909
6881
|
```
|
|
6910
6882
|
<a name="SRC+useAutoResize" id="SRC+useAutoResize" href="#SRC+useAutoResize"> </a>
|
|
6911
6883
|
|
|
6912
|
-
###
|
|
6884
|
+
### srC.useAutoResize()
|
|
6913
6885
|
Use this method for resize checkout iFrame according to content height, if applicable
|
|
6914
6886
|
|
|
6915
|
-
**Kind**: instance method of [<code>
|
|
6916
|
-
**Overrides**: [<code>useAutoResize</code>](#SRC+useAutoResize)
|
|
6887
|
+
**Kind**: instance method of [<code>SRC</code>](#SRC)
|
|
6917
6888
|
**Example**
|
|
6918
6889
|
```js
|
|
6919
6890
|
SRC.useAutoResize();
|
|
@@ -6925,28 +6896,15 @@ List of available event's name in the SRC checkout lifecycle
|
|
|
6925
6896
|
|
|
6926
6897
|
**Kind**: global enum
|
|
6927
6898
|
|
|
6928
|
-
| Param | Type | Default |
|
|
6929
|
-
| --- | --- | --- |
|
|
6930
|
-
|
|
|
6931
|
-
|
|
|
6932
|
-
|
|
|
6933
|
-
|
|
|
6934
|
-
| CHECKOUT_COMPLETED | <code>string</code> | <code>"checkoutCompleted"</code> |
|
|
6935
|
-
| CHECKOUT_ERROR | <code>string</code> | <code>"checkoutError"</code> |
|
|
6936
|
-
|
|
6937
|
-
<a name="EVENT_DATA_TYPE" id="EVENT_DATA_TYPE" href="#EVENT_DATA_TYPE"> </a>
|
|
6938
|
-
|
|
6939
|
-
## EVENT\_DATA\_TYPE : <code>enum</code>
|
|
6940
|
-
List of available event data types
|
|
6941
|
-
|
|
6942
|
-
**Kind**: global enum
|
|
6943
|
-
|
|
6944
|
-
| Param | Type | Default | Description |
|
|
6945
|
-
| --- | --- | --- | --- |
|
|
6946
|
-
| CRITICAL_ERROR | <code>string</code> | <code>"CriticalError"</code> | in this error scenario the checkout is understood to be in a non-recoverable state and should be closed by the merchant and give alternate payment options to the user |
|
|
6947
|
-
| USER_ERROR | <code>string</code> | <code>"UserError"</code> | in this error scenario the error in likely a user input error and the checkout is in a recoverable state, so the user will be kept within the checkout and can retry the flow |
|
|
6948
|
-
| SUCCESS | <code>string</code> | <code>"Success"</code> | |
|
|
6899
|
+
| Param | Type | Default |
|
|
6900
|
+
| --- | --- | --- |
|
|
6901
|
+
| CHECKOUT_BUTTON_LOADED | <code>string</code> | <code>"checkoutButtonLoaded"</code> |
|
|
6902
|
+
| CHECKOUT_BUTTON_CLICKED | <code>string</code> | <code>"checkoutButtonClicked"</code> |
|
|
6903
|
+
| IFRAME_LOADED | <code>string</code> | <code>"iframeLoaded"</code> |
|
|
6904
|
+
| CHECKOUT_READY | <code>string</code> | <code>"checkoutReady"</code> |
|
|
6905
|
+
| CHECKOUT_COMPLETED | <code>string</code> | <code>"checkoutCompleted"</code> |
|
|
6906
|
+
| CHECKOUT_ERROR | <code>string</code> | <code>"checkoutError"</code> |
|
|
6949
6907
|
|
|
6950
6908
|
|
|
6951
6909
|
## License
|
|
6952
|
-
Copyright (c)
|
|
6910
|
+
Copyright (c) 2023 paydock
|