@paydock/client-sdk 0.1.0 → 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/.idea/client-sdk-3.iml +0 -12
- package/.idea/jsLibraryMappings.xml +0 -7
- package/.idea/misc.xml +0 -16
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
- package/.idea/workspace.xml +0 -639
- package/.npmignore +0 -14
- 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,231 @@
|
|
|
1
|
+
# Click To Pay
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Integrate with Click To Pay using Paydock's Click To Pay widget.
|
|
6
|
+
For a full description of the methods and parameters, reference the [README file](https://www.npmjs.com/package/@paydock/client-sdk#ClickToPay).
|
|
7
|
+
|
|
8
|
+
## Click To Pay simple example
|
|
9
|
+
|
|
10
|
+
The following section provides an example use case and integration for the widget.
|
|
11
|
+
|
|
12
|
+
### Create a Container
|
|
13
|
+
|
|
14
|
+
To integrate the Click To Pay checkout iFrame, create a container in your HTML code. This container serves as the placeholder for the iFrame.
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<div id="checkoutIframe"></div>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Initialize the Widget
|
|
21
|
+
|
|
22
|
+
Use the following code to initialize your widget:
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
var src = new paydock.ClickToPay(
|
|
26
|
+
"#checkoutIframe",
|
|
27
|
+
"service_id",
|
|
28
|
+
"paydock_public_key_or_access_token",
|
|
29
|
+
{}, // meta
|
|
30
|
+
);
|
|
31
|
+
src.load();
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```javascript
|
|
35
|
+
// ES2015 | TypeScript
|
|
36
|
+
import { ClickToPay } from '@paydock/client-sdk';
|
|
37
|
+
var src = new ClickToPay(
|
|
38
|
+
"#checkoutIframe",
|
|
39
|
+
"service_id",
|
|
40
|
+
"paydock_public_key_or_access_token",
|
|
41
|
+
{}, // meta
|
|
42
|
+
);
|
|
43
|
+
src.load();
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
*NOTE:* Paydock recommends that you use a Paydock Access Token instead of a public key for security reasons in production environments. When creating your access token, you must enable the `Secure Remote Commerce` and add a whitelist for the domain of your checkout screen.
|
|
47
|
+
|
|
48
|
+
### Full example
|
|
49
|
+
|
|
50
|
+
A full example of the container and the initialized widget is as follows:
|
|
51
|
+
|
|
52
|
+
```html
|
|
53
|
+
<!DOCTYPE html>
|
|
54
|
+
<html lang="en">
|
|
55
|
+
<head>
|
|
56
|
+
<meta charset="UTF-8">
|
|
57
|
+
<title>Title</title>
|
|
58
|
+
<style>iframe {border: 0;width: 40%;height: 300px;}</style>
|
|
59
|
+
</head>
|
|
60
|
+
<body>
|
|
61
|
+
<div id="checkoutIframe"></div>
|
|
62
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
63
|
+
<script>
|
|
64
|
+
var src = new paydock.ClickToPay(
|
|
65
|
+
"#checkoutIframe",
|
|
66
|
+
"service_id",
|
|
67
|
+
"paydock_public_key_or_access_token",
|
|
68
|
+
{},
|
|
69
|
+
);
|
|
70
|
+
src.load();
|
|
71
|
+
</script>
|
|
72
|
+
</body>
|
|
73
|
+
</html>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Customize your Click To Pay Checkout
|
|
77
|
+
|
|
78
|
+
The following is an advanced example that includes customization. You can use these methods to enhance your checkout experience.
|
|
79
|
+
|
|
80
|
+
### Settings
|
|
81
|
+
|
|
82
|
+
```javascript
|
|
83
|
+
src.setEnv('sandbox'); // set environment
|
|
84
|
+
src.hideCheckout(); // hide checkout iframe
|
|
85
|
+
src.showCheckout(); // show checkout iframe
|
|
86
|
+
src.on('iframeLoaded', () => {
|
|
87
|
+
console.log("Initial iframe loaded");
|
|
88
|
+
});
|
|
89
|
+
src.on('checkoutReady', () => {
|
|
90
|
+
console.log("Checkout ready to be used");
|
|
91
|
+
});
|
|
92
|
+
src.on('checkoutCompleted', (token) => {
|
|
93
|
+
console.log(token);
|
|
94
|
+
});
|
|
95
|
+
src.on('checkoutError', (error) => {
|
|
96
|
+
console.log(error);
|
|
97
|
+
});
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Full example
|
|
101
|
+
|
|
102
|
+
```html
|
|
103
|
+
<!DOCTYPE html>
|
|
104
|
+
<html lang="en">
|
|
105
|
+
<head>
|
|
106
|
+
<meta charset="UTF-8">
|
|
107
|
+
<title>Title</title>
|
|
108
|
+
<style>iframe {border: 0;width: 40%;height: 450px;}</style>
|
|
109
|
+
</head>
|
|
110
|
+
<body>
|
|
111
|
+
<div id="checkoutIframe"></div>
|
|
112
|
+
<script src="https://widget.paydock.com/sdk/latest/widget.umd.min.js" ></script>
|
|
113
|
+
<script>
|
|
114
|
+
var src = new paydock.ClickToPay(
|
|
115
|
+
"#checkoutIframe",
|
|
116
|
+
"service_id",
|
|
117
|
+
"paydock_public_key_or_access_token",
|
|
118
|
+
{},
|
|
119
|
+
);
|
|
120
|
+
src.on('iframeLoaded', () => {
|
|
121
|
+
console.log("Initial iframe loaded");
|
|
122
|
+
});
|
|
123
|
+
src.on('checkoutReady', () => {
|
|
124
|
+
console.log("Checkout ready to be used");
|
|
125
|
+
});
|
|
126
|
+
src.on('checkoutCompleted', (token) => {
|
|
127
|
+
console.log(token);
|
|
128
|
+
});
|
|
129
|
+
src.on('checkoutError', (error) => {
|
|
130
|
+
console.log(error);
|
|
131
|
+
});
|
|
132
|
+
src.load();
|
|
133
|
+
</script>
|
|
134
|
+
</body>
|
|
135
|
+
</html>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Customize your billing address fields
|
|
139
|
+
|
|
140
|
+
To customize your billing address experience, Paydock uses a flag that manages whether a customer's billing address is mandatory.
|
|
141
|
+
The options for this customization are NONE (default option), and POSTAL_COUNTRY or FULL.
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
var src = new paydock.ClickToPay(
|
|
145
|
+
"#checkoutIframe",
|
|
146
|
+
"service_id",
|
|
147
|
+
"paydock_public_key_or_access_token",
|
|
148
|
+
{
|
|
149
|
+
"dpa_transaction_options": {
|
|
150
|
+
"dpa_billing_preference": "FULL"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
);
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
The Click To Pay checkout in the example requires the billing address from the customer, which is then returned as a part of the checkout data. The data is then stored and leveraged in the Paydock charge.
|
|
157
|
+
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 Click To Pay checkout, you can provide it alongside other information at the charge creation step:
|
|
158
|
+
1. Disable the billing address in Paydock's Click To Pay widget.
|
|
159
|
+
2. Get your One Time Token from the Click To Pay widget alongside other details that may have been collected outside the Click To Pay checkout as the shipping address.
|
|
160
|
+
3. Send the billing address when creating the charge.
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
POST v1/charges
|
|
164
|
+
{
|
|
165
|
+
"amount": "10.00",
|
|
166
|
+
"currency": "AUD",
|
|
167
|
+
"token": "one_time_token",
|
|
168
|
+
"customer": {
|
|
169
|
+
"payment_source": {
|
|
170
|
+
"gateway_id": "gateway_id",
|
|
171
|
+
"address_line1": "address_line1",
|
|
172
|
+
"address_line2": "address_line2",
|
|
173
|
+
"address_city": "address_city",
|
|
174
|
+
"address_postcode": "address_postcode",
|
|
175
|
+
"address_state": "address_state",
|
|
176
|
+
"address_country": "address_country"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"shipping": {
|
|
180
|
+
"address_line1": "address_line1",
|
|
181
|
+
"address_line2": "address_line2",
|
|
182
|
+
"address_line3": "address_line3",
|
|
183
|
+
"address_city": "address_city",
|
|
184
|
+
"address_postcode": "address_postcode",
|
|
185
|
+
"address_state": "address_state",
|
|
186
|
+
"address_country": "address_country"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## How to customize accepted cards
|
|
192
|
+
|
|
193
|
+
You can send a flag `unaccepted_card_type` to block the usage of a specific card type. The available options are 'DEBIT' and 'CREDIT'.
|
|
194
|
+
|
|
195
|
+
### Example code
|
|
196
|
+
|
|
197
|
+
The following example demonstrates how to block the card:
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
var src = new paydock.ClickToPay(
|
|
201
|
+
"#checkoutIframe",
|
|
202
|
+
"service_id",
|
|
203
|
+
"paydock_public_key",
|
|
204
|
+
{
|
|
205
|
+
unaccepted_card_type: 'DEBIT'
|
|
206
|
+
},
|
|
207
|
+
);
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Personalize the Style
|
|
211
|
+
|
|
212
|
+
Customize the look and feel of your UI. The following example demonstrates changes in the styling of the buttons.
|
|
213
|
+
|
|
214
|
+
### Example code
|
|
215
|
+
|
|
216
|
+
```
|
|
217
|
+
var src = new paydock.ClickToPay(
|
|
218
|
+
"#checkoutIframe",
|
|
219
|
+
"service_id",
|
|
220
|
+
"paydock_public_key",
|
|
221
|
+
{},
|
|
222
|
+
);
|
|
223
|
+
src.setStyles({
|
|
224
|
+
enable_src_popup: true,
|
|
225
|
+
primary_button_color: 'red',
|
|
226
|
+
secondary_button_color: 'red',
|
|
227
|
+
primary_button_text_color: 'red',
|
|
228
|
+
secondary_button_text_color: 'red',
|
|
229
|
+
font_family: 'Arial',
|
|
230
|
+
});
|
|
231
|
+
```
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
## Classes
|
|
2
|
+
|
|
3
|
+
<dl>
|
|
4
|
+
<dt><a href="#ClickToPay">ClickToPay</a> ⇐ <code>SRC</code></dt>
|
|
5
|
+
<dd><p>Class ClickToPay include methods for interacting with the ClickToPay checkout and Manual Card option</p>
|
|
6
|
+
</dd>
|
|
7
|
+
</dl>
|
|
8
|
+
|
|
9
|
+
## Interfaces
|
|
10
|
+
|
|
11
|
+
<dl>
|
|
12
|
+
<dt><a href="#IMastercardSRCMeta">IMastercardSRCMeta</a> : <code>object</code></dt>
|
|
13
|
+
<dd><p>Interface of data used for the Mastercard Checkout. For further information refer to <a href="https://developer.mastercard.com/unified-checkout-solutions/documentation/sdk-reference/init">the documentation</a>.</p>
|
|
14
|
+
</dd>
|
|
15
|
+
<dt><a href="#EventData">EventData</a> : <code>object</code></dt>
|
|
16
|
+
<dd><p>Interface for data returned in callbacks</p>
|
|
17
|
+
</dd>
|
|
18
|
+
<dt><a href="#EventDataCheckoutCompletedData">EventDataCheckoutCompletedData</a> : <code>object</code></dt>
|
|
19
|
+
<dd><p>Event data returned for checkoutCompleted callback, holding the One Time Token and the flow type completed.
|
|
20
|
+
When the flow type is src, masked checkoutData available is also returned</p>
|
|
21
|
+
</dd>
|
|
22
|
+
<dt><a href="#IStyles">IStyles</a> : <code>object</code></dt>
|
|
23
|
+
<dd><p>Interface for style configs inyected to the Click to Pay checkout</p>
|
|
24
|
+
</dd>
|
|
25
|
+
</dl>
|
|
26
|
+
|
|
27
|
+
<a name="IMastercardSRCMeta" id="IMastercardSRCMeta" href="#IMastercardSRCMeta"> </a>
|
|
28
|
+
|
|
29
|
+
## IMastercardSRCMeta : <code>object</code>
|
|
30
|
+
Interface of data used for the Mastercard Checkout. For further information refer to [the documentation](https://developer.mastercard.com/unified-checkout-solutions/documentation/sdk-reference/init).
|
|
31
|
+
|
|
32
|
+
**Kind**: global interface
|
|
33
|
+
|
|
34
|
+
| Param | Type | Description |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| [disable_summary_screen] | <code>boolean</code> | Boolean flag that controls if a final summary screen is presented in the checkout flow. |
|
|
37
|
+
| [dpa_data] | <code>object</code> | Object where the DPA creation data is stored. |
|
|
38
|
+
| [dpa_data.dpa_presentation_name] | <code>string</code> | Name in which the DPA is presented. |
|
|
39
|
+
| [dpa_data.dpa_uri] | <code>string</code> | Used for indicating the DPA URI. |
|
|
40
|
+
| [dpa_data.dpa_address] | <code>string</code> | Address associated with the DPA. |
|
|
41
|
+
| [dpa_data.dpa_email_address] | <code>string</code> | Email address for DPA communication. |
|
|
42
|
+
| [dpa_data.dpa_phone_number] | <code>object</code> | Phone number structure for DPA communication. |
|
|
43
|
+
| [dpa_data.dpa_phone_number.country_code] | <code>string</code> | The country code of the phone number. |
|
|
44
|
+
| [dpa_data.dpa_phone_number.phone_number] | <code>string</code> | The phone number part of the phone number. |
|
|
45
|
+
| [dpa_data.dpa_logo_uri] | <code>string</code> | URI for the DPA logo. |
|
|
46
|
+
| [dpa_data.dpa_supported_email_address] | <code>string</code> | Supported email address for DPA support. |
|
|
47
|
+
| [dpa_data.dpa_supported_phone_number] | <code>object</code> | Supported phone number for DPA support. |
|
|
48
|
+
| [dpa_data.dpa_supported_phone_number.country_code] | <code>string</code> | The country code of the phone number. |
|
|
49
|
+
| [dpa_data.dpa_supported_phone_number.phone_number] | <code>string</code> | The phone number part of the phone number. |
|
|
50
|
+
| [dpa_data.dpa_support_uri] | <code>string</code> | URI for DPA support. |
|
|
51
|
+
| [dpa_data.application_type] | <code>string</code> | Application type, either 'WEB_BROWSER' or 'MOBILE_APP'. |
|
|
52
|
+
| [co_brand_names] | <code>Array.<string></code> | List of co-brand names associated with the Click to Pay experience. |
|
|
53
|
+
| [checkout_experience] | <code>string</code> | Checkout experience type, either 'WITHIN_CHECKOUT' or 'PAYMENT_SETTINGS'. |
|
|
54
|
+
| [services] | <code>string</code> | Services offered, such as 'INLINE_CHECKOUT' or 'INLINE_INSTALLMENTS'. |
|
|
55
|
+
| [dpa_transaction_options] | <code>object</code> | Object that stores options for creating a transaction with DPA. |
|
|
56
|
+
| [dpa_transaction_options.dpa_locale] | <code>string</code> | DPA’s preferred locale, example en_US. |
|
|
57
|
+
| [dpa_transaction_options.dpa_accepted_billing_countries] | <code>Array.<string></code> | List of accepted billing countries for DPA in ISO 3166-1 alpha-2 format. |
|
|
58
|
+
| [dpa_transaction_options.dpa_billing_preference] | <code>string</code> | Billing preferences for DPA, options are 'FULL', 'POSTAL_COUNTRY', 'NONE'. |
|
|
59
|
+
| [dpa_transaction_options.payment_options] | <code>Array.<object></code> | Payment options included in the transaction. |
|
|
60
|
+
| [dpa_transaction_options.payment_options.dynamic_data_type] | <code>string</code> | Dynamic data types. |
|
|
61
|
+
| [dpa_transaction_options.order_type] | <code>string</code> | Type of the order, options are 'SPLIT_SHIPMENT', 'PREFERRED_CARD'. |
|
|
62
|
+
| [dpa_transaction_options.three_ds_preference] | <code>string</code> | Preference for 3DS usage in the transaction. |
|
|
63
|
+
| [dpa_transaction_options.confirm_payment] | <code>boolean</code> | Indicates if payment confirmation is required. |
|
|
64
|
+
| [dpa_transaction_options.consumer_name_requested] | <code>boolean</code> | Indicates if consumer name is requested. |
|
|
65
|
+
| [dpa_transaction_options.consumer_email_address_requested] | <code>boolean</code> | Indicates if consumer email address is requested. |
|
|
66
|
+
| [dpa_transaction_options.consumer_phone_number_requested] | <code>boolean</code> | Indicates if consumer phone number is requested. |
|
|
67
|
+
| [dpa_transaction_options.transaction_amount] | <code>object</code> | Details of the transaction amount. |
|
|
68
|
+
| [dpa_transaction_options.transaction_amount.transaction_amount] | <code>number</code> | Amount of the transaction. |
|
|
69
|
+
| [dpa_transaction_options.transaction_amount.transaction_currency_code] | <code>string</code> | Currency code of the transaction in 3 letter ISO code format. |
|
|
70
|
+
| [dpa_transaction_options.merchant_order_id] | <code>string</code> | Merchant's order ID. |
|
|
71
|
+
| [dpa_transaction_options.merchant_category_code] | <code>string</code> | Merchant's category code. |
|
|
72
|
+
| [dpa_transaction_options.merchant_country_code] | <code>string</code> | Merchant's country code in ISO 3166-1 alpha-2 format. |
|
|
73
|
+
| [customer] | <code>object</code> | Object where the customer data is stored to prefill in the checkout. |
|
|
74
|
+
| [customer.email] | <code>string</code> | Customer email. |
|
|
75
|
+
| [customer.first_name] | <code>string</code> | Customer first name. |
|
|
76
|
+
| [customer.last_name] | <code>string</code> | Customer last name. |
|
|
77
|
+
| [customer.phone] | <code>object</code> | Object where the customer phone is stored. |
|
|
78
|
+
| [customer.phone.country_code] | <code>string</code> | Customer phone country code (example "1" for US). |
|
|
79
|
+
| [customer.phone.phone] | <code>string</code> | Customer phone number. |
|
|
80
|
+
| [unaccepted_card_type] | <code>string</code> | Used to block a specific card type. Options are 'CREDIT', 'DEBIT'. |
|
|
81
|
+
|
|
82
|
+
<a name="EventData" id="EventData" href="#EventData"> </a>
|
|
83
|
+
|
|
84
|
+
## EventData : <code>object</code>
|
|
85
|
+
Interface for data returned in callbacks
|
|
86
|
+
|
|
87
|
+
**Kind**: global interface
|
|
88
|
+
|
|
89
|
+
| Param | Type | Description |
|
|
90
|
+
| --- | --- | --- |
|
|
91
|
+
| type | [<code>EVENT\_DATA\_TYPE</code>](#EVENT_DATA_TYPE) | Event type of type [EVENT_DATA_TYPE](#EVENT_DATA_TYPE) |
|
|
92
|
+
| data | <code>string</code> \| [<code>EventDataCheckoutCompletedData</code>](#EventDataCheckoutCompletedData) | optional data returning a string for checkoutError event or [EventDataCheckoutCompletedData](#EventDataCheckoutCompletedData) for checkoutCompleted |
|
|
93
|
+
|
|
94
|
+
<a name="EventDataCheckoutCompletedData" id="EventDataCheckoutCompletedData" href="#EventDataCheckoutCompletedData"> </a>
|
|
95
|
+
|
|
96
|
+
## EventDataCheckoutCompletedData : <code>object</code>
|
|
97
|
+
Event data returned for checkoutCompleted callback, holding the One Time Token and the flow type completed.
|
|
98
|
+
When the flow type is src, masked checkoutData available is also returned
|
|
99
|
+
|
|
100
|
+
**Kind**: global interface
|
|
101
|
+
|
|
102
|
+
| Param | Type | Description |
|
|
103
|
+
| --- | --- | --- |
|
|
104
|
+
| type | <code>string</code> | type of the checkout, can be `src` or `manual`. |
|
|
105
|
+
| token | <code>string</code> | one time token value. |
|
|
106
|
+
| token_type | <code>string</code> | one time token type value, can be `card` or `card_scheme_token`. |
|
|
107
|
+
| [checkoutData] | <code>object</code> | Optional checkout data related to the checkout information. Only available on src flow. |
|
|
108
|
+
| [checkoutData.card_number_bin] | <code>string</code> | The BIN of the card used for the transaction. |
|
|
109
|
+
| [checkoutData.card_number_last4] | <code>string</code> | The last four digits of the card number. |
|
|
110
|
+
| [checkoutData.card_scheme] | <code>string</code> | The card scheme. Values: visa, mastercard, amex, diners, discover. |
|
|
111
|
+
| [checkoutData.card_type] | <code>string</code> | The type of card. Values: credit, debit, prepaid, combo, flex. |
|
|
112
|
+
| [checkoutData.address_line1] | <code>string</code> | Address line 1 for billing address. |
|
|
113
|
+
| [checkoutData.address_line2] | <code>string</code> | Address line 2 for billing address. |
|
|
114
|
+
| [checkoutData.address_line3] | <code>string</code> | Address line 3 for billing address. |
|
|
115
|
+
| [checkoutData.address_city] | <code>string</code> | City for billing address. |
|
|
116
|
+
| [checkoutData.address_postcode] | <code>string</code> | Postal code for billing address. |
|
|
117
|
+
| [checkoutData.address_state] | <code>string</code> | State or province for billing address. |
|
|
118
|
+
| [checkoutData.address_country] | <code>string</code> | Country for billing address. |
|
|
119
|
+
| [checkoutData.shipping] | <code>object</code> | Optional shipping information. |
|
|
120
|
+
| [checkoutData.shipping.address_line1] | <code>string</code> | Address line 1 for shipping address. |
|
|
121
|
+
| [checkoutData.shipping.address_line2] | <code>string</code> | Address line 2 for shipping address. |
|
|
122
|
+
| [checkoutData.shipping.address_line3] | <code>string</code> | Address line 3 for shipping address. |
|
|
123
|
+
| [checkoutData.shipping.address_city] | <code>string</code> | City for shipping address. |
|
|
124
|
+
| [checkoutData.shipping.address_postcode] | <code>string</code> | Postal code for shipping address. |
|
|
125
|
+
| [checkoutData.shipping.address_state] | <code>string</code> | State or province for shipping address. |
|
|
126
|
+
| [checkoutData.shipping.address_country] | <code>string</code> | Country for shipping address. |
|
|
127
|
+
|
|
128
|
+
<a name="IStyles" id="IStyles" href="#IStyles"> </a>
|
|
129
|
+
|
|
130
|
+
## IStyles : <code>object</code>
|
|
131
|
+
Interface for style configs inyected to the Click to Pay checkout
|
|
132
|
+
|
|
133
|
+
**Kind**: global interface
|
|
134
|
+
|
|
135
|
+
| Param | Type | Description |
|
|
136
|
+
| --- | --- | --- |
|
|
137
|
+
| [primary_button_color] | <code>string</code> | Color Code for primary button. |
|
|
138
|
+
| [primary_button_text_color] | <code>string</code> | Color Code for primary button text. |
|
|
139
|
+
| [secondary_button_color] | <code>string</code> | Color Code for secondary button. |
|
|
140
|
+
| [secondary_button_text_color] | <code>string</code> | Color Code for secondary button text. |
|
|
141
|
+
| [font_family] | <code>string</code> | Font family to be used. |
|
|
142
|
+
| [enable_src_popup] | <code>boolean</code> | Boolean flag to make the Click to Pay checkout show in a popup window instead of embedded in iframe. |
|
|
143
|
+
|
|
144
|
+
<a name="ClickToPay" id="ClickToPay" href="#ClickToPay"> </a>
|
|
145
|
+
|
|
146
|
+
## ClickToPay ⇐ <code>SRC</code>
|
|
147
|
+
Class ClickToPay include methods for interacting with the ClickToPay checkout and Manual Card option
|
|
148
|
+
|
|
149
|
+
**Kind**: global class
|
|
150
|
+
**Extends**: <code>SRC</code>
|
|
151
|
+
|
|
152
|
+
* [ClickToPay](#ClickToPay) ⇐ <code>SRC</code>
|
|
153
|
+
* [new ClickToPay(iframe_selector, service_id, public_key_or_access_token, meta)](#new_ClickToPay_new)
|
|
154
|
+
* [.load()](#ClickToPay+load)
|
|
155
|
+
* [.setStyles(fields)](#SRC+setStyles)
|
|
156
|
+
* [.setEnv(env, [alias])](#SRC+setEnv)
|
|
157
|
+
* [.getEnv()](#SRC+getEnv)
|
|
158
|
+
* [.on(eventName, [cb])](#SRC+on) ⇒ <code>Promise.<any></code> \| <code>void</code>
|
|
159
|
+
* [.hideCheckout([saveSize])](#SRC+hideCheckout)
|
|
160
|
+
* [.showCheckout()](#SRC+showCheckout)
|
|
161
|
+
* [.reload()](#SRC+reload)
|
|
162
|
+
* [.useAutoResize()](#SRC+useAutoResize)
|
|
163
|
+
|
|
164
|
+
<a name="new_ClickToPay_new" id="new_ClickToPay_new" href="#new_ClickToPay_new"> </a>
|
|
165
|
+
|
|
166
|
+
### new ClickToPay(iframe_selector, service_id, public_key_or_access_token, meta)
|
|
167
|
+
|
|
168
|
+
| Param | Type | Description |
|
|
169
|
+
| --- | --- | --- |
|
|
170
|
+
| iframe_selector | <code>string</code> | Selector of html element. Container for Click To Pay checkout iFrame. |
|
|
171
|
+
| service_id | <code>string</code> | Card Scheme Service ID |
|
|
172
|
+
| public_key_or_access_token | <code>string</code> | Paydock public key or Access Token |
|
|
173
|
+
| meta | <code>IClickToPayMeta</code> | Data that configures the Click To Pay checkout |
|
|
174
|
+
|
|
175
|
+
**Example**
|
|
176
|
+
```js
|
|
177
|
+
var mastercardSRC = new ClickToPay('#checkoutIframe', 'service_id', 'public_key', {});
|
|
178
|
+
```
|
|
179
|
+
<a name="ClickToPay+load" id="ClickToPay+load" href="#ClickToPay+load"> </a>
|
|
180
|
+
|
|
181
|
+
### clickToPay.load()
|
|
182
|
+
The final method after configuring the SRC to start the load process of Click To Pay checkout
|
|
183
|
+
|
|
184
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
185
|
+
<a name="SRC+setStyles" id="SRC+setStyles" href="#SRC+setStyles"> </a>
|
|
186
|
+
|
|
187
|
+
### clickToPay.setStyles(fields)
|
|
188
|
+
Object contain styles for widget - call before `.load()`.
|
|
189
|
+
|
|
190
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
191
|
+
**Overrides**: [<code>setStyles</code>](#SRC+setStyles)
|
|
192
|
+
|
|
193
|
+
| Param | Type | Description |
|
|
194
|
+
| --- | --- | --- |
|
|
195
|
+
| fields | [<code>IStyles</code>](#IStyles) | name of styles which can be shown in widget [STYLE](STYLE) |
|
|
196
|
+
|
|
197
|
+
**Example**
|
|
198
|
+
```js
|
|
199
|
+
widget.setStyles({
|
|
200
|
+
enable_src_popup: true
|
|
201
|
+
primary_button_color: 'red',
|
|
202
|
+
secondary_button_color: 'blue',
|
|
203
|
+
primary_button_text_color: 'white',
|
|
204
|
+
secondary_button_text_color: 'white',
|
|
205
|
+
font_family: 'Arial',
|
|
206
|
+
});
|
|
207
|
+
```
|
|
208
|
+
<a name="SRC+setEnv" id="SRC+setEnv" href="#SRC+setEnv"> </a>
|
|
209
|
+
|
|
210
|
+
### clickToPay.setEnv(env, [alias])
|
|
211
|
+
Current method can change environment. By default environment = sandbox.
|
|
212
|
+
Also we can change domain alias for this environment. By default domain_alias = paydock.com
|
|
213
|
+
|
|
214
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
215
|
+
**Overrides**: [<code>setEnv</code>](#SRC+setEnv)
|
|
216
|
+
|
|
217
|
+
| Param | Type | Description |
|
|
218
|
+
| --- | --- | --- |
|
|
219
|
+
| env | <code>string</code> | sandbox, production |
|
|
220
|
+
| [alias] | <code>string</code> | Own domain alias |
|
|
221
|
+
|
|
222
|
+
**Example**
|
|
223
|
+
```js
|
|
224
|
+
SRC.setEnv('production');
|
|
225
|
+
```
|
|
226
|
+
<a name="SRC+getEnv" id="SRC+getEnv" href="#SRC+getEnv"> </a>
|
|
227
|
+
|
|
228
|
+
### clickToPay.getEnv()
|
|
229
|
+
Method to read the current environment
|
|
230
|
+
|
|
231
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
232
|
+
**Overrides**: [<code>getEnv</code>](#SRC+getEnv)
|
|
233
|
+
**Example**
|
|
234
|
+
```js
|
|
235
|
+
SRC.getEnv();
|
|
236
|
+
```
|
|
237
|
+
<a name="SRC+on" id="SRC+on" href="#SRC+on"> </a>
|
|
238
|
+
|
|
239
|
+
### clickToPay.on(eventName, [cb]) ⇒ <code>Promise.<any></code> \| <code>void</code>
|
|
240
|
+
Listen to events of SRC
|
|
241
|
+
|
|
242
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
243
|
+
**Overrides**: [<code>on</code>](#SRC+on)
|
|
244
|
+
|
|
245
|
+
| Param | Type | Description |
|
|
246
|
+
| --- | --- | --- |
|
|
247
|
+
| eventName | <code>string</code> | Available event names [EVENT](#EVENT) |
|
|
248
|
+
| [cb] | <code>listener</code> | The callback to handle the event. When available, it will send back data of type [EventData](#EventData) |
|
|
249
|
+
|
|
250
|
+
**Example**
|
|
251
|
+
```js
|
|
252
|
+
SRC.on('checkoutCompleted', function (token) {
|
|
253
|
+
console.log(token);
|
|
254
|
+
});
|
|
255
|
+
// or
|
|
256
|
+
SRC.on('checkoutCompleted').then(function (token) {
|
|
257
|
+
console.log(token);
|
|
258
|
+
});
|
|
259
|
+
```
|
|
260
|
+
<a name="SRC+hideCheckout" id="SRC+hideCheckout" href="#SRC+hideCheckout"> </a>
|
|
261
|
+
|
|
262
|
+
### clickToPay.hideCheckout([saveSize])
|
|
263
|
+
Using this method you can hide checkout after load and button click
|
|
264
|
+
|
|
265
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
266
|
+
**Overrides**: [<code>hideCheckout</code>](#SRC+hideCheckout)
|
|
267
|
+
|
|
268
|
+
| Param | Type | Default | Description |
|
|
269
|
+
| --- | --- | --- | --- |
|
|
270
|
+
| [saveSize] | <code>boolean</code> | <code>false</code> | using this param you can save iframe's size (if applicable) |
|
|
271
|
+
|
|
272
|
+
**Example**
|
|
273
|
+
```js
|
|
274
|
+
SRC.hideCheckout();
|
|
275
|
+
```
|
|
276
|
+
<a name="SRC+showCheckout" id="SRC+showCheckout" href="#SRC+showCheckout"> </a>
|
|
277
|
+
|
|
278
|
+
### clickToPay.showCheckout()
|
|
279
|
+
Using this method you can show checkout after using hideCheckout method
|
|
280
|
+
|
|
281
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
282
|
+
**Overrides**: [<code>showCheckout</code>](#SRC+showCheckout)
|
|
283
|
+
**Example**
|
|
284
|
+
```js
|
|
285
|
+
SRC.showCheckout()
|
|
286
|
+
```
|
|
287
|
+
<a name="SRC+reload" id="SRC+reload" href="#SRC+reload"> </a>
|
|
288
|
+
|
|
289
|
+
### clickToPay.reload()
|
|
290
|
+
Using this method you can reload the whole checkout
|
|
291
|
+
|
|
292
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
293
|
+
**Overrides**: [<code>reload</code>](#SRC+reload)
|
|
294
|
+
**Example**
|
|
295
|
+
```js
|
|
296
|
+
SRC.reload()
|
|
297
|
+
```
|
|
298
|
+
<a name="SRC+useAutoResize" id="SRC+useAutoResize" href="#SRC+useAutoResize"> </a>
|
|
299
|
+
|
|
300
|
+
### clickToPay.useAutoResize()
|
|
301
|
+
Use this method for resize checkout iFrame according to content height, if applicable
|
|
302
|
+
|
|
303
|
+
**Kind**: instance method of [<code>ClickToPay</code>](#ClickToPay)
|
|
304
|
+
**Overrides**: [<code>useAutoResize</code>](#SRC+useAutoResize)
|
|
305
|
+
**Example**
|
|
306
|
+
```js
|
|
307
|
+
SRC.useAutoResize();
|
|
308
|
+
```
|
|
309
|
+
<a name="EVENT" id="EVENT" href="#EVENT"> </a>
|
|
310
|
+
|
|
311
|
+
## EVENT : <code>enum</code>
|
|
312
|
+
List of available event's name in the Click To Pay checkout lifecycle
|
|
313
|
+
|
|
314
|
+
**Kind**: global enum
|
|
315
|
+
|
|
316
|
+
| Param | Type | Default | Description |
|
|
317
|
+
| --- | --- | --- | --- |
|
|
318
|
+
| IFRAME_LOADED | <code>string</code> | <code>"iframeLoaded"</code> | Initial event sent when IFrame is initially loaded. |
|
|
319
|
+
| CHECKOUT_READY | <code>string</code> | <code>"checkoutReady"</code> | Event sent when checkout is loaded and ready to be used by customer. Leverage alongside [showCheckout](#SRC+showCheckout) and [hideCheckout](#SRC+hideCheckout). |
|
|
320
|
+
| CHECKOUT_POPUP_OPEN | <code>string</code> | <code>"checkoutPopupOpen"</code> | Event sent when Click To Pay checkout flow is started, regardless of embedded or windowed mode. |
|
|
321
|
+
| CHECKOUT_POPUP_CLOSE | <code>string</code> | <code>"checkoutPopupClose"</code> | Event sent when Click To Pay checkout flow is closed, regardless of embedded or windowed mode. |
|
|
322
|
+
| CHECKOUT_COMPLETED | <code>string</code> | <code>"checkoutCompleted"</code> | Event sent on successful checkout by customer. Check [data](#EventDataCheckoutCompletedData) for more information. |
|
|
323
|
+
| CHECKOUT_ERROR | <code>string</code> | <code>"checkoutError"</code> | Event sent on error checkout by customer. Check [data](#EventData) for more information. |
|
|
324
|
+
|
|
325
|
+
<a name="EVENT_DATA_TYPE" id="EVENT_DATA_TYPE" href="#EVENT_DATA_TYPE"> </a>
|
|
326
|
+
|
|
327
|
+
## EVENT\_DATA\_TYPE : <code>enum</code>
|
|
328
|
+
List of available event data types
|
|
329
|
+
|
|
330
|
+
**Kind**: global enum
|
|
331
|
+
|
|
332
|
+
| Param | Type | Default | Description |
|
|
333
|
+
| --- | --- | --- | --- |
|
|
334
|
+
| 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 |
|
|
335
|
+
| 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 |
|
|
336
|
+
| SUCCESS | <code>string</code> | <code>"Success"</code> | |
|
|
337
|
+
|