@paydock/client-sdk 0.0.3 → 0.1.2-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9050 -52
- package/bundles/index.cjs +38558 -0
- package/bundles/index.cjs.d.ts +4777 -0
- package/bundles/index.mjs +38519 -0
- package/bundles/index.mjs.d.ts +4777 -0
- package/bundles/types/api/api-base.d.ts +54 -0
- package/bundles/types/api/api-base.d.ts.map +1 -0
- package/bundles/types/api/api-charge-internal.d.ts +99 -0
- package/bundles/types/api/api-charge-internal.d.ts.map +1 -0
- package/bundles/types/api/api-charge.d.ts +36 -0
- package/bundles/types/api/api-charge.d.ts.map +1 -0
- package/bundles/types/api/api-checkout-internal.d.ts +58 -0
- package/bundles/types/api/api-checkout-internal.d.ts.map +1 -0
- package/bundles/types/api/api-gateway-internal.d.ts +12 -0
- package/bundles/types/api/api-gateway-internal.d.ts.map +1 -0
- package/bundles/types/api/api-internal.d.ts +13 -0
- package/bundles/types/api/api-internal.d.ts.map +1 -0
- package/bundles/types/api/api-service-internal.d.ts +19 -0
- package/bundles/types/api/api-service-internal.d.ts.map +1 -0
- package/bundles/types/api/api.d.ts +55 -0
- package/bundles/types/api/api.d.ts.map +1 -0
- package/bundles/types/api/index.d.ts +2 -0
- package/bundles/types/api/index.d.ts.map +1 -0
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts +109 -0
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +1 -0
- package/bundles/types/canvas-3ds/index.d.ts +2 -0
- package/bundles/types/canvas-3ds/index.d.ts.map +1 -0
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts +43 -0
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -0
- package/bundles/types/canvas-3ds/services/index.d.ts +2 -0
- package/bundles/types/canvas-3ds/services/index.d.ts.map +1 -0
- package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts +22 -0
- package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +1 -0
- package/bundles/types/checkout/checkout.d.ts +107 -0
- package/bundles/types/checkout/checkout.d.ts.map +1 -0
- package/bundles/types/checkout/helpers/instruction-handler.d.ts +25 -0
- package/bundles/types/checkout/helpers/instruction-handler.d.ts.map +1 -0
- package/bundles/types/checkout/helpers/instruction-module.d.ts +6 -0
- package/bundles/types/checkout/helpers/instruction-module.d.ts.map +1 -0
- package/bundles/types/checkout/helpers/instruction-module.decorator.d.ts +6 -0
- package/bundles/types/checkout/helpers/instruction-module.decorator.d.ts.map +1 -0
- package/bundles/types/checkout/helpers/instruction.decorator.d.ts +5 -0
- package/bundles/types/checkout/helpers/instruction.decorator.d.ts.map +1 -0
- package/bundles/types/checkout/helpers/resource-helper.d.ts +6 -0
- package/bundles/types/checkout/helpers/resource-helper.d.ts.map +1 -0
- package/bundles/types/checkout/helpers/session-helper.d.ts +8 -0
- package/bundles/types/checkout/helpers/session-helper.d.ts.map +1 -0
- package/bundles/types/checkout/index.d.ts +2 -0
- package/bundles/types/checkout/index.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/index.d.ts +3 -0
- package/bundles/types/checkout/instructions/index.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/index.d.ts +4 -0
- package/bundles/types/checkout/instructions/v1/index.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.afterpay_checkout_form.show.d.ts +20 -0
- package/bundles/types/checkout/instructions/v1/instruction.afterpay_checkout_form.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.afterpay_wallet_form.show.d.ts +14 -0
- package/bundles/types/checkout/instructions/v1/instruction.afterpay_wallet_form.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.apple_pay_form.show.d.ts +18 -0
- package/bundles/types/checkout/instructions/v1/instruction.apple_pay_form.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.bank_account_form.show.d.ts +15 -0
- package/bundles/types/checkout/instructions/v1/instruction.bank_account_form.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.canvas_3ds.show.d.ts +11 -0
- package/bundles/types/checkout/instructions/v1/instruction.canvas_3ds.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.card_form.show.d.ts +19 -0
- package/bundles/types/checkout/instructions/v1/instruction.card_form.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.disable_payment_method_event.emit.d.ts +20 -0
- package/bundles/types/checkout/instructions/v1/instruction.disable_payment_method_event.emit.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.fraud_service.show.d.ts +21 -0
- package/bundles/types/checkout/instructions/v1/instruction.fraud_service.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.generic.show_message.d.ts +26 -0
- package/bundles/types/checkout/instructions/v1/instruction.generic.show_message.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.google_pay_form.show.d.ts +18 -0
- package/bundles/types/checkout/instructions/v1/instruction.google_pay_form.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.merchant_event.emit.d.ts +18 -0
- package/bundles/types/checkout/instructions/v1/instruction.merchant_event.emit.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.payment_methods.show.d.ts +18 -0
- package/bundles/types/checkout/instructions/v1/instruction.payment_methods.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.paypal_form.show.d.ts +21 -0
- package/bundles/types/checkout/instructions/v1/instruction.paypal_form.show.d.ts.map +1 -0
- package/bundles/types/checkout/instructions/v1/instruction.zip_checkout_form.show.d.ts +19 -0
- package/bundles/types/checkout/instructions/v1/instruction.zip_checkout_form.show.d.ts.map +1 -0
- package/bundles/types/checkout/layout-widgets/additionals.d.ts +3 -0
- package/bundles/types/checkout/layout-widgets/additionals.d.ts.map +1 -0
- package/bundles/types/checkout/layout-widgets/default-variables.enum.d.ts +9 -0
- package/bundles/types/checkout/layout-widgets/default-variables.enum.d.ts.map +1 -0
- package/bundles/types/checkout/layout-widgets/message.d.ts +34 -0
- package/bundles/types/checkout/layout-widgets/message.d.ts.map +1 -0
- package/bundles/types/checkout/layout-widgets/payment-methods-template.d.ts +13 -0
- package/bundles/types/checkout/layout-widgets/payment-methods-template.d.ts.map +1 -0
- package/bundles/types/checkout/layout-widgets/payment-methods.d.ts +55 -0
- package/bundles/types/checkout/layout-widgets/payment-methods.d.ts.map +1 -0
- package/bundles/types/checkout/layout-widgets/payment-template.d.ts +3 -0
- package/bundles/types/checkout/layout-widgets/payment-template.d.ts.map +1 -0
- package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts +36 -0
- package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +1 -0
- package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts +13 -0
- package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +1 -0
- package/bundles/types/checkout-button/checkout-button.d.ts +139 -0
- package/bundles/types/checkout-button/checkout-button.d.ts.map +1 -0
- package/bundles/types/checkout-button/checkout-button.interface.d.ts +49 -0
- package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +1 -0
- package/bundles/types/checkout-button/checkout-contextual-handler.d.ts +27 -0
- package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +1 -0
- package/bundles/types/checkout-button/index.d.ts +85 -0
- package/bundles/types/checkout-button/index.d.ts.map +1 -0
- package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts +21 -0
- package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +1 -0
- package/bundles/types/checkout-button/paypal/paypal.runner.d.ts +6 -0
- package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +1 -0
- package/bundles/types/checkout-button/runner/base.runner.d.ts +18 -0
- package/bundles/types/checkout-button/runner/base.runner.d.ts.map +1 -0
- package/bundles/types/checkout-button/runner/contextual.runner.d.ts +39 -0
- package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +1 -0
- package/bundles/types/checkout-button/runner/index.d.ts +9 -0
- package/bundles/types/checkout-button/runner/index.d.ts.map +1 -0
- package/bundles/types/checkout-button/runner/popup.runner.d.ts +35 -0
- package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +1 -0
- package/bundles/types/checkout-button/runner/redirect.runner.d.ts +17 -0
- package/bundles/types/checkout-button/runner/redirect.runner.d.ts.map +1 -0
- package/bundles/types/checkout-button/zipmoney/index.d.ts +4 -0
- package/bundles/types/checkout-button/zipmoney/index.d.ts.map +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +49 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +39 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +26 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts +4 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts +10 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts +12 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +1 -0
- package/bundles/types/components/ability-guard.d.ts +12 -0
- package/bundles/types/components/ability-guard.d.ts.map +1 -0
- package/bundles/types/components/background.d.ts +43 -0
- package/bundles/types/components/background.d.ts.map +1 -0
- package/bundles/types/components/container.d.ts +12 -0
- package/bundles/types/components/container.d.ts.map +1 -0
- package/bundles/types/components/dispatcher.d.ts +14 -0
- package/bundles/types/components/dispatcher.d.ts.map +1 -0
- package/bundles/types/components/element-style.d.ts +17 -0
- package/bundles/types/components/element-style.d.ts.map +1 -0
- package/bundles/types/components/flypay-iframe-event.d.ts +15 -0
- package/bundles/types/components/flypay-iframe-event.d.ts.map +1 -0
- package/{lib/widget/components/form-Interceptor.d.ts → bundles/types/components/form-interceptor.d.ts} +2 -1
- package/bundles/types/components/form-interceptor.d.ts.map +1 -0
- package/bundles/types/components/http-core.d.ts +14 -0
- package/bundles/types/components/http-core.d.ts.map +1 -0
- package/bundles/types/components/iframe-event.d.ts +72 -0
- package/bundles/types/components/iframe-event.d.ts.map +1 -0
- package/bundles/types/components/iframe.d.ts +20 -0
- package/bundles/types/components/iframe.d.ts.map +1 -0
- package/bundles/types/components/link.d.ts +27 -0
- package/bundles/types/components/link.d.ts.map +1 -0
- package/bundles/types/components/loader.d.ts +5 -0
- package/bundles/types/components/loader.d.ts.map +1 -0
- package/bundles/types/components/param.d.ts +430 -0
- package/bundles/types/components/param.d.ts.map +1 -0
- package/bundles/types/components/popup.d.ts +30 -0
- package/bundles/types/components/popup.d.ts.map +1 -0
- package/bundles/types/components/storage-dispatcher.d.ts +31 -0
- package/bundles/types/components/storage-dispatcher.d.ts.map +1 -0
- package/bundles/types/components/trigger.d.ts +48 -0
- package/bundles/types/components/trigger.d.ts.map +1 -0
- package/bundles/types/components/vault-display-iframe-event.d.ts +5 -0
- package/bundles/types/components/vault-display-iframe-event.d.ts.map +1 -0
- package/bundles/types/components/wallet-background.d.ts +13 -0
- package/bundles/types/components/wallet-background.d.ts.map +1 -0
- package/bundles/types/components/wallet-trigger.d.ts +19 -0
- package/bundles/types/components/wallet-trigger.d.ts.map +1 -0
- package/bundles/types/configs/env/environment.cba.d.ts +30 -0
- package/bundles/types/configs/env/environment.cba.d.ts.map +1 -0
- package/bundles/types/configs/env/environment.interface.d.ts +12 -0
- package/bundles/types/configs/env/environment.interface.d.ts.map +1 -0
- package/bundles/types/configs/env/environment.paydock.d.ts +49 -0
- package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -0
- package/bundles/types/configs/env/index.d.ts +3 -0
- package/bundles/types/configs/env/index.d.ts.map +1 -0
- package/bundles/types/configs/sdk.d.ts +10 -0
- package/bundles/types/configs/sdk.d.ts.map +1 -0
- package/bundles/types/constants/validators.d.ts +45 -0
- package/bundles/types/constants/validators.d.ts.map +1 -0
- package/bundles/types/external-checkout/builder.d.ts +29 -0
- package/bundles/types/external-checkout/builder.d.ts.map +1 -0
- package/bundles/types/external-checkout/checker.d.ts +14 -0
- package/bundles/types/external-checkout/checker.d.ts.map +1 -0
- package/bundles/types/external-checkout/index.d.ts +3 -0
- package/bundles/types/external-checkout/index.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/fraud-prevention.constants.d.ts +9 -0
- package/bundles/types/fraud-prevention/fraud-prevention.constants.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/fraud-prevention.events.d.ts +42 -0
- package/bundles/types/fraud-prevention/fraud-prevention.events.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/fraud-prevention.service.d.ts +163 -0
- package/bundles/types/fraud-prevention/fraud-prevention.service.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/index.d.ts +3 -0
- package/bundles/types/fraud-prevention/index.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/providers/forter/forter-device-agent.service.d.ts +79 -0
- package/bundles/types/fraud-prevention/providers/forter/forter-device-agent.service.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/providers/forter/templates/forter-snippet-2025-02-06t14:19:34z.template.d.ts +2 -0
- package/bundles/types/fraud-prevention/providers/forter/templates/forter-snippet-2025-02-06t14:19:34z.template.d.ts.map +1 -0
- package/bundles/types/fraud-prevention/resources/find-service-config.repository.d.ts +20 -0
- package/bundles/types/fraud-prevention/resources/find-service-config.repository.d.ts.map +1 -0
- package/bundles/types/helper/access-token.d.ts +26 -0
- package/bundles/types/helper/access-token.d.ts.map +1 -0
- package/bundles/types/helper/browser.d.ts +17 -0
- package/bundles/types/helper/browser.d.ts.map +1 -0
- package/bundles/types/helper/deep-clone.d.ts +13 -0
- package/bundles/types/helper/deep-clone.d.ts.map +1 -0
- package/bundles/types/helper/element-id.d.ts +5 -0
- package/bundles/types/helper/element-id.d.ts.map +1 -0
- package/bundles/types/helper/event-emitter.d.ts +7 -0
- package/bundles/types/helper/event-emitter.d.ts.map +1 -0
- package/bundles/types/helper/event-error.d.ts +55 -0
- package/bundles/types/helper/event-error.d.ts.map +1 -0
- package/bundles/types/helper/event.d.ts +10 -0
- package/bundles/types/helper/event.d.ts.map +1 -0
- package/bundles/types/helper/ms.d.ts +6 -0
- package/bundles/types/helper/ms.d.ts.map +1 -0
- package/{lib/widget → bundles/types}/helper/object.d.ts +1 -0
- package/bundles/types/helper/object.d.ts.map +1 -0
- package/bundles/types/helper/process-event-error.d.ts +9 -0
- package/bundles/types/helper/process-event-error.d.ts.map +1 -0
- package/bundles/types/helper/spiner.util.d.ts +6 -0
- package/bundles/types/helper/spiner.util.d.ts.map +1 -0
- package/bundles/types/helper/url.d.ts +5 -0
- package/bundles/types/helper/url.d.ts.map +1 -0
- package/bundles/types/helper/uuid.d.ts +6 -0
- package/bundles/types/helper/uuid.d.ts.map +1 -0
- package/bundles/types/index-cba.d.ts +52 -0
- package/bundles/types/index-cba.d.ts.map +1 -0
- package/bundles/types/index.d.ts +52 -0
- package/bundles/types/index.d.ts.map +1 -0
- package/bundles/types/payment-source/builder.d.ts +23 -0
- package/bundles/types/payment-source/builder.d.ts.map +1 -0
- package/bundles/types/payment-source/index.d.ts +2 -0
- package/bundles/types/payment-source/index.d.ts.map +1 -0
- package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts +181 -0
- package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +1 -0
- package/bundles/types/payment-source-widget/index.d.ts +35 -0
- package/bundles/types/payment-source-widget/index.d.ts.map +1 -0
- package/bundles/types/payment-source-widget/interfaces.d.ts +12 -0
- package/bundles/types/payment-source-widget/interfaces.d.ts.map +1 -0
- package/bundles/types/payment-source-widget/payment-source-widget.d.ts +93 -0
- package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +1 -0
- package/bundles/types/paypal-data-collector/index.d.ts +23 -0
- package/bundles/types/paypal-data-collector/index.d.ts.map +1 -0
- package/bundles/types/paypal-data-collector/paypal-data-collector.d.ts +58 -0
- package/bundles/types/paypal-data-collector/paypal-data-collector.d.ts.map +1 -0
- package/bundles/types/paypal-data-collector/paypal-data-collector.interfaces.d.ts +21 -0
- package/bundles/types/paypal-data-collector/paypal-data-collector.interfaces.d.ts.map +1 -0
- package/bundles/types/paypal-data-collector/paypal-data-collector.service.d.ts +17 -0
- package/bundles/types/paypal-data-collector/paypal-data-collector.service.d.ts.map +1 -0
- package/bundles/types/paypal-save-payment-source/index.d.ts +61 -0
- package/bundles/types/paypal-save-payment-source/index.d.ts.map +1 -0
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.d.ts +85 -0
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.d.ts.map +1 -0
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.interfaces.d.ts +83 -0
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.interfaces.d.ts.map +1 -0
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.service.d.ts +35 -0
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.service.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/click-to-pay-secure-remote-commerce.d.ts +31 -0
- package/bundles/types/secure-remote-commerce/click-to-pay-secure-remote-commerce.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/index.d.ts +105 -0
- package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/interfaces.d.ts +156 -0
- package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts +2 -0
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts +25 -0
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts +11 -0
- package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts +86 -0
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +1 -0
- package/bundles/types/shared/device/device-info.service.d.ts +13 -0
- package/bundles/types/shared/device/device-info.service.d.ts.map +1 -0
- package/bundles/types/shared/http/authorization-strategy.d.ts +41 -0
- package/bundles/types/shared/http/authorization-strategy.d.ts.map +1 -0
- package/bundles/types/shared/http/http-fetcher.d.ts +29 -0
- package/bundles/types/shared/http/http-fetcher.d.ts.map +1 -0
- package/bundles/types/shared/http/http-fetcher.factory.d.ts +17 -0
- package/bundles/types/shared/http/http-fetcher.factory.d.ts.map +1 -0
- package/bundles/types/shared/http/http-request.d.ts +14 -0
- package/bundles/types/shared/http/http-request.d.ts.map +1 -0
- package/bundles/types/shared/http/http-response.dto.d.ts +19 -0
- package/bundles/types/shared/http/http-response.dto.d.ts.map +1 -0
- package/bundles/types/shared/services/configuration-validation/configuration-validation.d.ts +12 -0
- package/bundles/types/shared/services/configuration-validation/configuration-validation.d.ts.map +1 -0
- package/bundles/types/shared/services/configuration-validation/types.d.ts +73 -0
- package/bundles/types/shared/services/configuration-validation/types.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts +15 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts +66 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts +14 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts +15 -0
- package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts +23 -0
- package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts +15 -0
- package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/index.d.ts +4 -0
- package/bundles/types/shared/services/instrumentation/repositories/index.d.ts.map +1 -0
- package/bundles/types/shared/shared.constants.d.ts +6 -0
- package/bundles/types/shared/shared.constants.d.ts.map +1 -0
- package/bundles/types/vault-display-widget/index.d.ts +14 -0
- package/bundles/types/vault-display-widget/index.d.ts.map +1 -0
- package/bundles/types/vault-display-widget/vault-display-widget.d.ts +69 -0
- package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/enums.d.ts +12 -0
- package/bundles/types/wallet-buttons/enums.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts +6 -0
- package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/index-cba.d.ts +2 -0
- package/bundles/types/wallet-buttons/index-cba.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/index.d.ts +138 -0
- package/bundles/types/wallet-buttons/index.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/interfaces.d.ts +128 -0
- package/bundles/types/wallet-buttons/interfaces.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts +321 -0
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts +330 -0
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/wallet-services/afterpay.wallet-service.d.ts +24 -0
- package/bundles/types/wallet-buttons/wallet-services/afterpay.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/wallet-services/apple.wallet-service.d.ts +49 -0
- package/bundles/types/wallet-buttons/wallet-services/apple.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/wallet-services/flypay-v2.wallet-service.d.ts +28 -0
- package/bundles/types/wallet-buttons/wallet-services/flypay-v2.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/wallet-services/flypay.wallet-service.d.ts +26 -0
- package/bundles/types/wallet-buttons/wallet-services/flypay.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/wallet-services/google.wallet-service.d.ts +35 -0
- package/bundles/types/wallet-buttons/wallet-services/google.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/wallet-services/mastercard.wallet-service.d.ts +8 -0
- package/bundles/types/wallet-buttons/wallet-services/mastercard.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/wallet-services/paypal.wallet-service.d.ts +26 -0
- package/bundles/types/wallet-buttons/wallet-services/paypal.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/wallet-services/stripe.wallet-service.d.ts +19 -0
- package/bundles/types/wallet-buttons/wallet-services/stripe.wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/wallet-services/wallet-service.d.ts +131 -0
- package/bundles/types/wallet-buttons/wallet-services/wallet-service.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts +252 -0
- package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/enum/event.enum.d.ts +12 -0
- package/bundles/types/wallet-buttons-express/enum/event.enum.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/index.d.ts +245 -0
- package/bundles/types/wallet-buttons-express/index.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/base-event-data.interface.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/interfaces/base-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/base-gateway-config.interface.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/interfaces/base-gateway-config.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/base-wallet-meta.interface.d.ts +5 -0
- package/bundles/types/wallet-buttons-express/interfaces/base-wallet-meta.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/charge-wallet-token-meta.interface.d.ts +44 -0
- package/bundles/types/wallet-buttons-express/interfaces/charge-wallet-token-meta.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-click-event-data.interface.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-click-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-close-event-data.interface.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-close-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-error-event-data.interface.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-error-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-error-event-data.interface.d.ts +9 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-error-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-in-review-event-data.interface.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-in-review-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-successful-event-data.interface.d.ts +11 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-payment-successful-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-address-change-event-data.interface.d.ts +21 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-address-change-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-address-change-event-response.interface.d.ts +9 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-address-change-event-response.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-option-change-event-data.interface.d.ts +13 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-option-change-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-option-change-event-response.interface.d.ts +9 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-shipping-option-change-event-response.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-unavailable-event-data.interface.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/interfaces/on-unavailable-event-data.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/interfaces/wallet-capture-request.interface.d.ts +22 -0
- package/bundles/types/wallet-buttons-express/interfaces/wallet-capture-request.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.d.ts +58 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/constants/apple-pay-button-style.constant.d.ts +2 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/constants/apple-pay-button-style.constant.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/constants/apple-pay-events.constant.d.ts +5 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/constants/apple-pay-events.constant.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-gateway-config.interface.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-gateway-config.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts +22 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-button-style.type.d.ts +2 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-button-style.type.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-button-type.type.d.ts +2 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-button-type.type.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-contact-editing-mode.type.d.ts +5 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-contact-editing-mode.type.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-shipping-data.d.ts +21 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-shipping-data.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-shipping-method.type.d.ts +21 -0
- package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-shipping-method.type.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-gateway-config.interface.d.ts +4 -0
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-gateway-config.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-sdk.interface.d.ts +164 -0
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-sdk.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts +32 -0
- package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/services/paypal/paypal.wallet-button-express.d.ts +53 -0
- package/bundles/types/wallet-buttons-express/services/paypal/paypal.wallet-button-express.d.ts.map +1 -0
- package/bundles/types/wallet-buttons-express/types/shipping-event-to-response.type.d.ts +6 -0
- package/bundles/types/wallet-buttons-express/types/shipping-event-to-response.type.d.ts.map +1 -0
- package/bundles/types/widget/configuration.d.ts +165 -0
- package/bundles/types/widget/configuration.d.ts.map +1 -0
- package/bundles/types/widget/html-multi-widget.d.ts +337 -0
- package/bundles/types/widget/html-multi-widget.d.ts.map +1 -0
- package/bundles/types/widget/html-widget.d.ts +107 -0
- package/bundles/types/widget/html-widget.d.ts.map +1 -0
- package/bundles/types/widget/index.d.ts +132 -0
- package/bundles/types/widget/index.d.ts.map +1 -0
- package/bundles/types/widget/meta.d.ts +8 -0
- package/bundles/types/widget/meta.d.ts.map +1 -0
- package/bundles/types/widget/multi-widget.d.ts +241 -0
- package/bundles/types/widget/multi-widget.d.ts.map +1 -0
- package/bundles/types/widget/style.d.ts +177 -0
- package/bundles/types/widget/style.d.ts.map +1 -0
- package/bundles/widget.umd.js +38429 -767
- package/bundles/widget.umd.js.d.ts +4777 -0
- package/bundles/widget.umd.js.min.d.ts +4777 -0
- package/bundles/widget.umd.min.js +1 -0
- package/docs/api-canvas3ds.md +158 -0
- package/docs/api-checkout-button.md +912 -0
- package/docs/api-examples.md +65 -0
- package/docs/api-ps-widget.md +585 -0
- package/docs/api-vault-display.md +94 -0
- package/docs/api-widget.md +2542 -0
- package/docs/api-wrapper.md +45 -0
- package/docs/canvas3ds-examples.md +242 -0
- package/docs/cba-header.md +13 -0
- package/docs/cba-license.md +2 -0
- package/docs/checkout-examples.md +248 -0
- package/docs/click-to-pay-examples.md +231 -0
- package/docs/click-to-pay.md +337 -0
- package/docs/fraud-prevention-examples.md +154 -0
- package/docs/fraud-prevention.md +0 -0
- package/docs/header.md +15 -0
- package/docs/html/layout.html +79 -0
- package/docs/html/marked.js +23 -0
- package/docs/html/style.css +365 -0
- package/docs/install/npm.content.md +16 -0
- package/docs/install/npm.example.md +24 -0
- package/docs/install/umd.content.md +20 -0
- package/docs/install/umd.example.md +6 -0
- package/docs/install.md +43 -0
- package/docs/install.readme.t.md +17 -0
- package/docs/install.slate.t.md +17 -0
- package/docs/license.md +2 -0
- package/docs/partials/header.hbs +3 -0
- package/docs/paypal-data-collector-examples.md +59 -0
- package/docs/paypal-data-collector.md +149 -0
- package/docs/paypal-save-payment-source-examples.md +63 -0
- package/docs/paypal-save-payment-source.md +256 -0
- package/docs/ps-examples.md +129 -0
- package/docs/vault-display-example.md +132 -0
- package/docs/wallet-buttons-examples.md +638 -0
- package/docs/wallet-buttons-express-examples.md +201 -0
- package/docs/wallet-buttons-express.md +1076 -0
- package/docs/wallet-buttons.md +625 -0
- package/docs/wallet-cba-buttons-examples.md +388 -0
- package/docs/widget-examples.md +271 -0
- package/examples/html-widget/actions.html +47 -0
- package/examples/html-widget/events.html +2 -2
- package/examples/html-widget/form.html +2 -3
- package/examples/html-widget/html-styles.html +29 -0
- package/examples/html-widget/insert-input.html +2 -2
- package/examples/html-widget/optional-settings.html +30 -0
- package/examples/html-widget/simple.html +3 -3
- package/examples/html-widget/styles.html +3 -3
- package/examples/multi-html-widget/extend.html +7 -2
- package/examples/multi-html-widget/simple.html +6 -8
- package/package.json +225 -55
- package/slate.md +2218 -0
- package/.npmignore +0 -15
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -3
- package/lib/index.js.map +0 -1
- package/lib/widget/components/container.d.ts +0 -9
- package/lib/widget/components/container.js +0 -18
- package/lib/widget/components/container.js.map +0 -1
- package/lib/widget/components/env.d.ts +0 -19
- package/lib/widget/components/env.js +0 -33
- package/lib/widget/components/env.js.map +0 -1
- package/lib/widget/components/event.d.ts +0 -26
- package/lib/widget/components/event.js +0 -49
- package/lib/widget/components/event.js.map +0 -1
- package/lib/widget/components/form-Interceptor.js +0 -38
- package/lib/widget/components/form-Interceptor.js.map +0 -1
- package/lib/widget/components/iframe.d.ts +0 -11
- package/lib/widget/components/iframe.js +0 -31
- package/lib/widget/components/iframe.js.map +0 -1
- package/lib/widget/components/link.d.ts +0 -13
- package/lib/widget/components/link.js +0 -37
- package/lib/widget/components/link.js.map +0 -1
- package/lib/widget/components/param.d.ts +0 -39
- package/lib/widget/components/param.js +0 -21
- package/lib/widget/components/param.js.map +0 -1
- package/lib/widget/components/trigger.d.ts +0 -19
- package/lib/widget/components/trigger.js +0 -22
- package/lib/widget/components/trigger.js.map +0 -1
- package/lib/widget/configuration.d.ts +0 -59
- package/lib/widget/configuration.js +0 -134
- package/lib/widget/configuration.js.map +0 -1
- package/lib/widget/helper/event.d.ts +0 -8
- package/lib/widget/helper/event.js +0 -15
- package/lib/widget/helper/event.js.map +0 -1
- package/lib/widget/helper/object.js +0 -6
- package/lib/widget/helper/object.js.map +0 -1
- package/lib/widget/helper/url.d.ts +0 -3
- package/lib/widget/helper/url.js +0 -8
- package/lib/widget/helper/url.js.map +0 -1
- package/lib/widget/html-multi-widget.d.ts +0 -56
- package/lib/widget/html-multi-widget.js +0 -89
- package/lib/widget/html-multi-widget.js.map +0 -1
- package/lib/widget/html-widget.d.ts +0 -37
- package/lib/widget/html-widget.js +0 -50
- package/lib/widget/html-widget.js.map +0 -1
- package/lib/widget/index.d.ts +0 -5
- package/lib/widget/index.js +0 -6
- package/lib/widget/index.js.map +0 -1
- package/lib/widget/multi-widget.d.ts +0 -22
- package/lib/widget/multi-widget.js +0 -83
- package/lib/widget/multi-widget.js.map +0 -1
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Fraud prevention
|
|
2
|
+
|
|
3
|
+
The Fraud Prevention module allows you to add security layers to your payment workflows
|
|
4
|
+
by integrating with any of our underlying fraud prevention providers.
|
|
5
|
+
|
|
6
|
+
## Real time user behavior analysis
|
|
7
|
+
|
|
8
|
+
### Forter
|
|
9
|
+
|
|
10
|
+
One of Forter's key features is our ability to track the user's real-time behavior on
|
|
11
|
+
the site and use it to separate fraudsters from legitimate buyers. To take advantage
|
|
12
|
+
of Forter's technology, a JavaScript snippet needs to be placed on EVERY page
|
|
13
|
+
of your commerce site beginning with the homepage and up to and including the final
|
|
14
|
+
"Thank you for your purchase" page.
|
|
15
|
+
|
|
16
|
+
The integration is simple and straightforward - you only need to configure event
|
|
17
|
+
listeners and then instantiate a FraudPreventionService with your site configuration.
|
|
18
|
+
|
|
19
|
+
Additional setup is required in case your website uses Content Security Policies (CSP)
|
|
20
|
+
|
|
21
|
+
#### Forter: Code snippet
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<!doctype html>
|
|
25
|
+
<html lang="en">
|
|
26
|
+
|
|
27
|
+
<head>
|
|
28
|
+
<meta charset="utf-8">
|
|
29
|
+
<title>Real time user behaviour anaylsis - Forter example</title>
|
|
30
|
+
<base href="/">
|
|
31
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
32
|
+
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
|
33
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.js" ></script>
|
|
34
|
+
</head>
|
|
35
|
+
|
|
36
|
+
<body>
|
|
37
|
+
<main>
|
|
38
|
+
<h1>Real time user behaviour anaylsis - Forter example</h1>
|
|
39
|
+
<div class="forter-test">
|
|
40
|
+
<h2>Forter Integration</h2>
|
|
41
|
+
|
|
42
|
+
<div class="status-card">
|
|
43
|
+
<p>
|
|
44
|
+
<strong>Integration Status:</strong>
|
|
45
|
+
<span data-fraud-prevention="status-indicator" class="status pending">
|
|
46
|
+
Pending
|
|
47
|
+
</span>
|
|
48
|
+
</p>
|
|
49
|
+
<p>
|
|
50
|
+
<strong>Token Value:</strong>
|
|
51
|
+
<code data-fraud-prevention="forter-token">Not available</code>
|
|
52
|
+
</p>
|
|
53
|
+
<p data-fraud-prevention="error-container" style="display: none;">
|
|
54
|
+
<strong>Error Code:</strong>
|
|
55
|
+
<span data-fraud-prevention="error-code" class="error"></span>
|
|
56
|
+
</p>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</main>
|
|
60
|
+
<script>
|
|
61
|
+
const { FRAUD_PREVENTION_EVENTS, FraudPreventionService } = window.paydock
|
|
62
|
+
|
|
63
|
+
let token = '';
|
|
64
|
+
let errorCode = '';
|
|
65
|
+
|
|
66
|
+
const render = () => {
|
|
67
|
+
const statusIndicator = document.querySelector('[data-fraud-prevention="status-indicator"]');
|
|
68
|
+
const tokenValue = document.querySelector('[data-fraud-prevention="forter-token"]');
|
|
69
|
+
const errorContainer = document.querySelector('[data-fraud-prevention="error-container"]');
|
|
70
|
+
const errorCodeElement = document.querySelector('[data-fraud-prevention="error-code"]');
|
|
71
|
+
|
|
72
|
+
if (token) {
|
|
73
|
+
statusIndicator.className = 'status success';
|
|
74
|
+
statusIndicator.textContent = 'Active';
|
|
75
|
+
tokenValue.textContent = token;
|
|
76
|
+
} else {
|
|
77
|
+
statusIndicator.className = 'status pending';
|
|
78
|
+
statusIndicator.textContent = 'Pending';
|
|
79
|
+
tokenValue.textContent = 'Not available';
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (errorCode) {
|
|
83
|
+
errorCodeElement.textContent = errorCode;
|
|
84
|
+
errorContainer.style.display = 'block';
|
|
85
|
+
} else {
|
|
86
|
+
errorContainer.style.display = 'none';
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
document.addEventListener(FRAUD_PREVENTION_EVENTS.NAMESPACE, (event) => {
|
|
91
|
+
switch (event.detail.type) {
|
|
92
|
+
case FRAUD_PREVENTION_EVENTS.TYPES.FINTERPRINT_TOKEN_READY: {
|
|
93
|
+
token = event.detail.payload.token;
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
case FRAUD_PREVENTION_EVENTS.TYPES.FINGERPRINT_TOKEN_ERROR: {
|
|
97
|
+
errorCode = event.detail.payload.code;
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
default: {
|
|
101
|
+
throw new Error(
|
|
102
|
+
`${FRAUD_PREVENTION_EVENTS.NAMESPACE} emitted an unsupported event: ${JSON.stringify(event.detail)}.`,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
render();
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
const fraudPreventionServiceConfig = {
|
|
111
|
+
environmentId: 'sandbox',
|
|
112
|
+
mode: 'test'
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Set "csp" to true if your website uses Content Security Policies
|
|
116
|
+
const csp = false;
|
|
117
|
+
|
|
118
|
+
new FraudPreventionService(fraudPreventionServiceConfig)
|
|
119
|
+
.withForter({
|
|
120
|
+
siteId: 'example_site_id_or_subsite_id',
|
|
121
|
+
csp,
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// new FraudPreventionService(fraudPreventionServiceConfig)
|
|
125
|
+
// .withAccessTokenStrategy("eyJhb_access_token_example_...")
|
|
126
|
+
// .withForter({
|
|
127
|
+
// providerId: environment.forter.serviceId,
|
|
128
|
+
// csp,
|
|
129
|
+
// });
|
|
130
|
+
|
|
131
|
+
// new FraudPreventionService(fraudPreventionServiceConfig)
|
|
132
|
+
// .withPublicKeyStrategy("pk_example_...")
|
|
133
|
+
// .withForter({
|
|
134
|
+
// providerId: environment.forter.serviceId,
|
|
135
|
+
// csp,
|
|
136
|
+
// });
|
|
137
|
+
</script>
|
|
138
|
+
</body>
|
|
139
|
+
|
|
140
|
+
</html>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
#### Forter: Content Security Policies
|
|
144
|
+
|
|
145
|
+
If your site enforces Content Security Policies (CSP), make sure to:
|
|
146
|
+
|
|
147
|
+
1. Set the `csp` option to `true` when invoking `withForter` on your `FraudPreventionService` instance.
|
|
148
|
+
2. Allowlist Forter's domains on `connect-src`, `script-src` and `worker-src` as shown below.
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
connect-src https://*.forter.com wss://cdn0.forter.com https://d2o5idwacg3gyw.cloudfront.net https://dz8rit8v72mig.cloudfront.net https://db7q4jg5rkhk8.cloudfront.net https://1.1.1.1 https://d94qwxh6czci4.cloudfront.net https://dr6vcclmzwk74.cloudfront.net https://d6rak4b14t5gp.cloudfront.net https://d3k4bt74u9esq1.cloudfront.net https://d1ezzflfzltk6e.cloudfront.net https://d3nocrch4qti4v.cloudfront.net https://duuytoqss3gu4.cloudfront.net https://df45ay5pw60dy.cloudfront.net
|
|
152
|
+
script-src https://*.forter.com https://dlthst9q2beh8.cloudfront.net https://d2nww8zpyj5pk0.cloudfront.net https://d2w2nqfk3z9hdt.cloudfront.net
|
|
153
|
+
worker-src blob:
|
|
154
|
+
```
|
|
File without changes
|
package/docs/header.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Client-sdk
|
|
2
|
+
|
|
3
|
+
It is a solution for collecting and handling payment sources in secure way.
|
|
4
|
+
|
|
5
|
+
With SDK you can create a payment form widget as an independent part or insert use inside your form.
|
|
6
|
+
|
|
7
|
+
The SDK supports methods for customization of widget by your needs (styling, form fields, etc)
|
|
8
|
+
|
|
9
|
+
## Other information
|
|
10
|
+
|
|
11
|
+
To work with the widget you will need public_key or access_token ([see Authentication](https://docs.paydock.com/#authentication))
|
|
12
|
+
|
|
13
|
+
Also you will need added gateway ([see API Reference by gateway](https://docs.paydock.com/#gateways))
|
|
14
|
+
|
|
15
|
+
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<link rel="stylesheet" type="text/css" href="./style.css">
|
|
5
|
+
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/styles/default.min.css">
|
|
6
|
+
<title></title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="container">
|
|
10
|
+
<header>
|
|
11
|
+
<a href="/">
|
|
12
|
+
<img alt="logo" class="logo" src="https://staging.powerboard.commbank.com.au/images/logo_cba.png" height="63px" width="150px"/>
|
|
13
|
+
</a>
|
|
14
|
+
</header>
|
|
15
|
+
<div style="display: flex">
|
|
16
|
+
<nav>
|
|
17
|
+
<ul>
|
|
18
|
+
<li>
|
|
19
|
+
<a href="#client-sdk">Client-sdk</a>
|
|
20
|
+
<ul>
|
|
21
|
+
<li><a href="#other-information">Other information</a></li>
|
|
22
|
+
<li><a href="#get-started">Get started</a></li>
|
|
23
|
+
<li><a href="#download-from-cdn">Download from CDN</a></li>
|
|
24
|
+
</ul>
|
|
25
|
+
</li>
|
|
26
|
+
<li>
|
|
27
|
+
<a href="#widget">Widget</a>
|
|
28
|
+
<ul>
|
|
29
|
+
<li><a href="#widget-simple-example">Simple example</a></li>
|
|
30
|
+
<li><a href="#widget-advanced-example">Advanced example</a></li>
|
|
31
|
+
<li><a href="#classes">Classes</a></li>
|
|
32
|
+
</ul>
|
|
33
|
+
</li>
|
|
34
|
+
<li>
|
|
35
|
+
<a href="#payment-sources-widget">Payment sources widget</a>
|
|
36
|
+
<ul>
|
|
37
|
+
<li><a href="#payment-sources-simple-example">Simple example</a></li>
|
|
38
|
+
<li><a href="#payment-sources-advanced-example">Advanced example</a></li>
|
|
39
|
+
<li><a href="#classes-1">Classes</a></li>
|
|
40
|
+
</ul>
|
|
41
|
+
</li>
|
|
42
|
+
<li>
|
|
43
|
+
<a href="#checkout-button">Checkout button</a>
|
|
44
|
+
<ul>
|
|
45
|
+
<li><a href="#checkout-button-simple-example">Simple example</a></li>
|
|
46
|
+
<li><a href="#checkout-button-advanced-example">Advanced example</a></li>
|
|
47
|
+
<li><a href="#classes-2">Classes</a></li>
|
|
48
|
+
</ul>
|
|
49
|
+
</li>
|
|
50
|
+
<li>
|
|
51
|
+
<a href="#canvas3ds">Canvas3ds</a>
|
|
52
|
+
<ul>
|
|
53
|
+
<li><a href="#canvas3ds-simple-example">Simple example</a></li>
|
|
54
|
+
<li><a href="#canvas3ds-advanced-example">Advanced example</a></li>
|
|
55
|
+
</ul>
|
|
56
|
+
</li>
|
|
57
|
+
<li>
|
|
58
|
+
<a href="#wallet-buttons">Wallet Buttons</a>
|
|
59
|
+
<ul>
|
|
60
|
+
<li><a href="#wallet-buttons-simple-example">Simple example</a></li>
|
|
61
|
+
<li><a href="#wallet-buttons-advanced-example">Advanced example</a></li>
|
|
62
|
+
<li><a href="#classes-3">Classes</a></li>
|
|
63
|
+
<li><a href="#express-wallet-buttons">Express Wallet Buttons</a></li>
|
|
64
|
+
</ul>
|
|
65
|
+
</li>
|
|
66
|
+
<li>
|
|
67
|
+
<a href="#click-to-pay">Click To Pay</a>
|
|
68
|
+
<ul>
|
|
69
|
+
<li><a href="#click-to-pay-simple-example">Click To Pay simple example</a></li>
|
|
70
|
+
<li><a href="#customize-your-click-to-pay-checkout">Click To Pay customizations and advanced example</a></li>
|
|
71
|
+
</ul>
|
|
72
|
+
</li>
|
|
73
|
+
</ul>
|
|
74
|
+
</nav>
|
|
75
|
+
<div id="content"><!--{{content}}--></div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</body>
|
|
79
|
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var fs = require('fs');
|
|
2
|
+
var marked = require('marked');
|
|
3
|
+
var hljs = require('highlight.js');
|
|
4
|
+
var renderer = new marked.Renderer();
|
|
5
|
+
var src = fs.readFileSync('./README.md', 'utf8');
|
|
6
|
+
var tmpl = fs.readFileSync('docs/html/layout.html', 'utf8');
|
|
7
|
+
var html = marked.marked(src, {
|
|
8
|
+
renderer: renderer,
|
|
9
|
+
highlight: function(code, lang) {
|
|
10
|
+
var language = hljs.getLanguage(lang) ? lang : 'plaintext';
|
|
11
|
+
return hljs.highlight(code, { language: language }).value;
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
var buffer = Buffer.from(tmpl
|
|
15
|
+
.replace('<!--{{content}}-->', html),
|
|
16
|
+
'utf8'
|
|
17
|
+
);
|
|
18
|
+
fs.writeFile('docs/html/readme.html', buffer, function(error) {
|
|
19
|
+
if (error)
|
|
20
|
+
console.log(error);
|
|
21
|
+
});
|
|
22
|
+
console.log('----Complete---');
|
|
23
|
+
|
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
/* sass-ified from npm-website */
|
|
2
|
+
.body {
|
|
3
|
+
margin: 0;
|
|
4
|
+
color: #333;
|
|
5
|
+
font-family: 'Source Sans Pro', 'Lucida Grande', sans-serif;
|
|
6
|
+
}
|
|
7
|
+
.logo {
|
|
8
|
+
margin-right: 15px;
|
|
9
|
+
padding: 5px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
ol {
|
|
13
|
+
list-style-position: outside;
|
|
14
|
+
font-weight: 600;
|
|
15
|
+
margin-bottom: 20px;
|
|
16
|
+
margin-left: 16px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
ol li {
|
|
20
|
+
margin-bottom: 2px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
li {
|
|
24
|
+
font-weight: 400;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
h1 {
|
|
28
|
+
margin: 24px 0 16px 0;
|
|
29
|
+
padding: 0;
|
|
30
|
+
padding-bottom: 7px;
|
|
31
|
+
line-height: 1.2;
|
|
32
|
+
white-space: normal;
|
|
33
|
+
text-transform: none;
|
|
34
|
+
letter-spacing: -0.8px;
|
|
35
|
+
font-weight: 700;
|
|
36
|
+
border-bottom: 1px solid rgba(0, 0, 0, .1);
|
|
37
|
+
font-size: 2.25rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
> h1 a {
|
|
41
|
+
color: text-color;
|
|
42
|
+
text-decoration: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
h2,
|
|
46
|
+
h3,
|
|
47
|
+
h4,
|
|
48
|
+
h5,
|
|
49
|
+
h6 {
|
|
50
|
+
font-weight: 600;
|
|
51
|
+
font-family: 'Source Sans Pro', 'Lucida Grande', sans-serif;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
> h2 a,
|
|
55
|
+
h3 a,
|
|
56
|
+
h4 a,
|
|
57
|
+
h5 a,
|
|
58
|
+
h6 a {
|
|
59
|
+
font-weight: 700;
|
|
60
|
+
text-decoration: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
> h2 a:hover,
|
|
64
|
+
h3 a:hover,
|
|
65
|
+
h4 a:hover,
|
|
66
|
+
h5 a:hover,
|
|
67
|
+
h6 a:hover {
|
|
68
|
+
text-decoration: underline;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
> h1,
|
|
72
|
+
h2 {
|
|
73
|
+
border-bottom: 1px solid greigh6;
|
|
74
|
+
margin: 8px 0 16px 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
h2 {
|
|
78
|
+
letter-spacing: -0.3px;
|
|
79
|
+
font-size: 1.875rem;
|
|
80
|
+
border-bottom: 1px solid rgba(0, 0, 0, .1);
|
|
81
|
+
padding-bottom: 8px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
h3 {
|
|
85
|
+
margin: 16px 0 4px 0;
|
|
86
|
+
font-size: 1.25rem;
|
|
87
|
+
letter-spacing: -.03rem;
|
|
88
|
+
font-family: 'Source Sans Pro', 'Lucida Grande', sans-serif;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
h4,
|
|
92
|
+
h5,
|
|
93
|
+
h6 {
|
|
94
|
+
margin: 16px 0 4px 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
ol ol,
|
|
98
|
+
ul ol,
|
|
99
|
+
ol ul,
|
|
100
|
+
ul ul {
|
|
101
|
+
margin: 0 0 0 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
p,
|
|
105
|
+
li {
|
|
106
|
+
color: #333;
|
|
107
|
+
font-size: 18px;
|
|
108
|
+
margin-top: 0;
|
|
109
|
+
margin-bottom: 4px;
|
|
110
|
+
line-height: 1.20;
|
|
111
|
+
letter-spacing: 0.1px;
|
|
112
|
+
font-family: 'Source Sans Pro', 'Lucida Grande', sans-serif;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
p a,
|
|
116
|
+
li a {
|
|
117
|
+
font-weight: 600;
|
|
118
|
+
color: #cb3837;
|
|
119
|
+
text-decoration: none;
|
|
120
|
+
font-size: 1em;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
th {
|
|
124
|
+
font-weight: bold;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
td,
|
|
128
|
+
th {
|
|
129
|
+
background: #fff;
|
|
130
|
+
border: 1px solid greigh6;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
img {
|
|
134
|
+
max-width: 100%;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
h1:hover .deep-link .deep-link-icon,
|
|
138
|
+
h2:hover .deep-link .deep-link-icon,
|
|
139
|
+
h3:hover .deep-link .deep-link-icon,
|
|
140
|
+
h4:hover .deep-link .deep-link-icon,
|
|
141
|
+
h5:hover .deep-link .deep-link-icon,
|
|
142
|
+
h6:hover .deep-link .deep-link-icon,
|
|
143
|
+
.deep-link:hover .deep-link-icon,
|
|
144
|
+
.deep-link-icon:hover {
|
|
145
|
+
visibility: visible;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.deep-link {
|
|
149
|
+
float: left;
|
|
150
|
+
margin-left: -20px;
|
|
151
|
+
padding-right: 4px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.deep-link .deep-link-icon {
|
|
155
|
+
visibility: hidden;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
blockquote {
|
|
159
|
+
background: #efefef;
|
|
160
|
+
padding: 1px 16px;
|
|
161
|
+
margin-left: 0;
|
|
162
|
+
margin-right: 0;
|
|
163
|
+
border-left: #cecece solid 10px;
|
|
164
|
+
border-radius: 3px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
table {
|
|
168
|
+
display: block;
|
|
169
|
+
white-space: normal;
|
|
170
|
+
overflow-x: auto;
|
|
171
|
+
width: max-content;
|
|
172
|
+
max-width: 100%;
|
|
173
|
+
border-spacing: 0;
|
|
174
|
+
border-collapse: collapse;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
td, th {
|
|
178
|
+
padding: 9px 13px;
|
|
179
|
+
border: 1px solid #d8d8d8;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
tr:nth-child(2n) td {
|
|
183
|
+
background-color: #f4f4f4;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
pre {
|
|
188
|
+
color: #000;
|
|
189
|
+
margin-bottom: 16px;
|
|
190
|
+
margin-top: 0;
|
|
191
|
+
padding: 12px;
|
|
192
|
+
font-size: 1em;
|
|
193
|
+
background: #f7f7f7;
|
|
194
|
+
border-radius: 2px;
|
|
195
|
+
overflow-x: auto;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
p code {
|
|
199
|
+
font-size: 0.9em;
|
|
200
|
+
border-radius: 2px;
|
|
201
|
+
background: #f7f7f7;
|
|
202
|
+
padding: 0px 5px;
|
|
203
|
+
font-variant-ligatures: none;
|
|
204
|
+
font-family: "Fira Mono", "Andale Mono", "Consolas", monospace;
|
|
205
|
+
letter-spacing: 0px;
|
|
206
|
+
line-height: 24px;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
dt a {
|
|
210
|
+
color: #cb3837;
|
|
211
|
+
text-decoration: none;
|
|
212
|
+
font-size: 1em;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
:root {
|
|
216
|
+
background-color: #fff;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
button, input, optgroup, select, textarea {
|
|
220
|
+
font-family: 'Source Sans Pro', 'Lucida Grande', sans-serif;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
*, *:before, *:after {
|
|
224
|
+
box-sizing: border-box;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.body {
|
|
228
|
+
min-height: 100vh;
|
|
229
|
+
display: -ms-flexbox;
|
|
230
|
+
display: flex;
|
|
231
|
+
-ms-flex-direction: column;
|
|
232
|
+
flex-direction: column;
|
|
233
|
+
-webkit-font-smoothing: antialiased;
|
|
234
|
+
-moz-osx-font-smoothing: grayscale;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
section {
|
|
238
|
+
width: 66%;
|
|
239
|
+
margin: 0 auto;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.body main {
|
|
243
|
+
position: relative;
|
|
244
|
+
-ms-flex: 0 0 auto;
|
|
245
|
+
flex: 0 0 auto;
|
|
246
|
+
-ms-flex-positive: 1;
|
|
247
|
+
flex-grow: 1;
|
|
248
|
+
display: -ms-flexbox;
|
|
249
|
+
display: flex;
|
|
250
|
+
-ms-flex-direction: column;
|
|
251
|
+
flex-direction: column;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
a {
|
|
255
|
+
color: black;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
a {
|
|
259
|
+
text-decoration: none;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
li, li {
|
|
263
|
+
padding: 3px;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
code {
|
|
267
|
+
font-feature-settings: none;
|
|
268
|
+
font-variant-ligatures: none;
|
|
269
|
+
font-family: "Fira Mono", "Andale Mono", "Consolas", monospace;
|
|
270
|
+
letter-spacing: 0px;
|
|
271
|
+
line-height: 24px;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
:-moz-ui-invalid {
|
|
275
|
+
box-shadow: none;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
body {
|
|
279
|
+
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
|
|
280
|
+
font-size: 16px;
|
|
281
|
+
line-height: 1.5;
|
|
282
|
+
word-wrap: break-word;
|
|
283
|
+
background: #F9F9F9;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.sidebar {
|
|
287
|
+
margin: 0;
|
|
288
|
+
padding: 0;
|
|
289
|
+
width: 200px;
|
|
290
|
+
background-color: #f1f1f1;
|
|
291
|
+
position: fixed;
|
|
292
|
+
height: 100%;
|
|
293
|
+
overflow: auto;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
#container {
|
|
298
|
+
width: 80%;
|
|
299
|
+
margin: 0 auto;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
#content {
|
|
303
|
+
width: 80%;
|
|
304
|
+
padding: 5px 10px;
|
|
305
|
+
border: 1px solid #ddd;
|
|
306
|
+
border-radius: 3px;
|
|
307
|
+
background: white;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
#content h1:first-child {
|
|
311
|
+
margin-top: 0px;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
nav {
|
|
315
|
+
border: 1px solid #ddd;
|
|
316
|
+
border-radius: 3px;
|
|
317
|
+
background: white;
|
|
318
|
+
margin-right: 10px;
|
|
319
|
+
min-width: fit-content;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
nav > ul {
|
|
323
|
+
position: sticky;
|
|
324
|
+
top: 5px;
|
|
325
|
+
margin: 10px 0px;
|
|
326
|
+
padding: 0;
|
|
327
|
+
list-style-type: none;
|
|
328
|
+
font-size: 14px;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
ul {
|
|
332
|
+
list-style-type: none;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
nav > ul > li {
|
|
336
|
+
min-width: 125px;
|
|
337
|
+
padding: 0px 15px;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
nav > ul > li > ul {
|
|
341
|
+
padding-left: 25px;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
nav > ul > li > ul > li {
|
|
345
|
+
font-size: 0.8em;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
nav .selected {
|
|
349
|
+
color: #111;
|
|
350
|
+
font-weight: bold;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
nav .selected:hover {
|
|
354
|
+
text-decoration: none;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
header {
|
|
358
|
+
display: flex;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
header a {
|
|
362
|
+
width: 27%;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
header h1 { margin: 0; }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Our NPM package is compatible with all package managers (e.g., `npm`, `yarn`,
|
|
2
|
+
`pnpm`, `bun`). Using `npm` the following command would add the Client SDK as a
|
|
3
|
+
production dependency.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @paydock/client-sdk
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
After installation is complete, if you are developing in NodeJS environments or
|
|
10
|
+
using tools that expect your JavaScript code to be in CJS format (e.g., Jest,
|
|
11
|
+
Karma, RequireJS, Webpack), you can import the Client SDK using CommonJS modules.
|
|
12
|
+
For these environments the UMD format (`@paydock/client-sdk/bundles/widget.umd.js`)
|
|
13
|
+
can also be used as a fallback. Alternatively, in case you are developing in
|
|
14
|
+
projects that have access to modern bundlers such as Vite or others (e.g., SPA
|
|
15
|
+
libs or SSR Metaframeworks), you can import the Client SDK features using ESM
|
|
16
|
+
through named imports or namespaced imports.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
```cjs
|
|
2
|
+
// module import - CommonJS/Node projects ✅
|
|
3
|
+
const paydock = require('@paydock/client-sdk')
|
|
4
|
+
const api = new paydock.Api('publicKey');
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
```mjs
|
|
8
|
+
// named import - ESM projects or TypeScript projects ✅
|
|
9
|
+
import { HtmlWidget } from '@paydock/client-sdk'
|
|
10
|
+
const widget = new HtmlWidget('#selector', 'publicKey', 'gatewayId');
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```mjs
|
|
14
|
+
// namespaced import - ESM projects or TypeScript projects ✅
|
|
15
|
+
import * as Paydock from '@paydock/client-sdk'
|
|
16
|
+
const widget = new Paydock.HtmlWidget('#selector', 'publicKey', 'gatewayId');
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
// default import - Not officially supported . They are handled differently by different tools / settings!
|
|
21
|
+
❌
|
|
22
|
+
import paydock from '@paydock/client-sdk'
|
|
23
|
+
>>> "Uncaught SyntaxError: The requested module does not provide an export named 'default'"
|
|
24
|
+
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
For browser environments, you can import the Client SDK directly from our CDN to
|
|
2
|
+
your project's HTML. To accomplish this, include the Client SDK in your page
|
|
3
|
+
using one and only of the two script tags below. After this step you will be
|
|
4
|
+
able to access the Client SDK features via the global variable `paydock`.
|
|
5
|
+
|
|
6
|
+
For production we recommend using the compressed version (`.min.js`) since
|
|
7
|
+
it will result in faster loading times for your end users.
|
|
8
|
+
|
|
9
|
+
- *Compressed version for production: `https://widget.paydock.com/sdk/latest/widget.umd.min.js`*
|
|
10
|
+
|
|
11
|
+
- *Full version for development and debug: `https://widget.paydock.com/sdk/latest/widget.umd.js`*
|
|
12
|
+
|
|
13
|
+
You may download the production version of the Client SDK scripts [here][min],
|
|
14
|
+
and, the development version [here][max].
|
|
15
|
+
|
|
16
|
+
[min]: https://widget.paydock.com/sdk/latest/widget.umd.min.js
|
|
17
|
+
[max]: https://widget.paydock.com/sdk/latest/widget.umd.js
|
|
18
|
+
|
|
19
|
+
For more advanced use-cases, the library has [UMD](https://github.com/umdjs/umd)
|
|
20
|
+
format that can be used in RequireJS, Webpack, etc.
|