@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,131 @@
|
|
|
1
|
+
import { Container } from "../../components/container";
|
|
2
|
+
import { IWalletMeta, IShippingOption, WALLET_TYPE } from "../../components/param";
|
|
3
|
+
import { EventEmitter } from "../../helper/event-emitter";
|
|
4
|
+
export interface IWalletButtonsAvailability {
|
|
5
|
+
apple_pay: boolean;
|
|
6
|
+
google_pay: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface IWalletServiceMeta extends IWalletMeta {
|
|
9
|
+
amount: number;
|
|
10
|
+
currency: string;
|
|
11
|
+
capture?: boolean;
|
|
12
|
+
id?: string;
|
|
13
|
+
gateway_mode?: string;
|
|
14
|
+
credentials?: object;
|
|
15
|
+
reference?: string;
|
|
16
|
+
success_url?: string;
|
|
17
|
+
error_url?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface IWalletServiceUpdateData {
|
|
20
|
+
amount: number;
|
|
21
|
+
shipping_options?: IShippingOption[];
|
|
22
|
+
}
|
|
23
|
+
export interface IWalletServiceUpdate {
|
|
24
|
+
success: boolean;
|
|
25
|
+
body?: IWalletServiceUpdateData;
|
|
26
|
+
}
|
|
27
|
+
export interface IPaymentMethod {
|
|
28
|
+
payment_method_id?: string;
|
|
29
|
+
device?: string;
|
|
30
|
+
customer: {
|
|
31
|
+
payer_name: string;
|
|
32
|
+
payer_email: string;
|
|
33
|
+
payer_phone: string;
|
|
34
|
+
payment_source: {
|
|
35
|
+
wallet_type: WALLET_TYPE;
|
|
36
|
+
card_name: string;
|
|
37
|
+
type: string;
|
|
38
|
+
card_scheme: string;
|
|
39
|
+
card_number_last4: string;
|
|
40
|
+
expire_month: number;
|
|
41
|
+
expire_year: number;
|
|
42
|
+
address_line1: string;
|
|
43
|
+
address_line2: string;
|
|
44
|
+
address_city: string;
|
|
45
|
+
address_postcode: string;
|
|
46
|
+
address_state: string;
|
|
47
|
+
address_country: string;
|
|
48
|
+
ref_token?: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
shipping?: {
|
|
52
|
+
method?: string;
|
|
53
|
+
options?: IShippingOption[];
|
|
54
|
+
address_line1?: string;
|
|
55
|
+
address_line2?: string;
|
|
56
|
+
address_city?: string;
|
|
57
|
+
address_postcode?: string;
|
|
58
|
+
address_state?: string;
|
|
59
|
+
address_country?: string;
|
|
60
|
+
address_company?: string;
|
|
61
|
+
address_origin_postcode?: string;
|
|
62
|
+
contact?: {
|
|
63
|
+
first_name?: string;
|
|
64
|
+
last_name?: string;
|
|
65
|
+
email?: string;
|
|
66
|
+
phone?: string;
|
|
67
|
+
phone2?: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export declare const WALLET_EVENT: {
|
|
72
|
+
UNAVAILABLE: string;
|
|
73
|
+
UPDATE: string;
|
|
74
|
+
PAYMENT_METHOD_SELECTED: string;
|
|
75
|
+
PAYMENT_SUCCESS: string;
|
|
76
|
+
PAYMENT_IN_REVIEW: string;
|
|
77
|
+
PAYMENT_ERROR: string;
|
|
78
|
+
CALLBACK: string;
|
|
79
|
+
AUTH_TOKENS_CHANGED: string;
|
|
80
|
+
BUTTON_CLICK: string;
|
|
81
|
+
CHECKOUT_OPEN: string;
|
|
82
|
+
CHECKOUT_CLOSE: string;
|
|
83
|
+
};
|
|
84
|
+
export interface IUnavailableWalletEventBody {
|
|
85
|
+
}
|
|
86
|
+
export interface IPaymentMethodSelectedWalletEventBody {
|
|
87
|
+
data: IPaymentMethod;
|
|
88
|
+
onSuccess: () => void;
|
|
89
|
+
onError: (message?: string) => void;
|
|
90
|
+
}
|
|
91
|
+
export interface ICallbackData {
|
|
92
|
+
request_type: string;
|
|
93
|
+
}
|
|
94
|
+
export interface ICallbackSuccessData {
|
|
95
|
+
id: string;
|
|
96
|
+
status: string;
|
|
97
|
+
callback_method: string;
|
|
98
|
+
callback_rel: string;
|
|
99
|
+
callback_url: string;
|
|
100
|
+
}
|
|
101
|
+
export interface IWalletCallbackEventBody {
|
|
102
|
+
data: ICallbackData;
|
|
103
|
+
onSuccess: (data?: ICallbackSuccessData) => void;
|
|
104
|
+
onError: (message?: string, code?: string) => void;
|
|
105
|
+
}
|
|
106
|
+
export interface IWalletService {
|
|
107
|
+
load(container: Container): Promise<void>;
|
|
108
|
+
close?(): void;
|
|
109
|
+
update(data: IWalletServiceUpdate): void;
|
|
110
|
+
enable(): void;
|
|
111
|
+
disable(): void;
|
|
112
|
+
setEnv(env: string): any;
|
|
113
|
+
on(eventName: string, cb?: (data: IUnavailableWalletEventBody | IPaymentMethodSelectedWalletEventBody | any) => void): any;
|
|
114
|
+
}
|
|
115
|
+
export declare abstract class WalletService {
|
|
116
|
+
protected publicKey: string;
|
|
117
|
+
protected meta: IWalletServiceMeta;
|
|
118
|
+
protected env: string;
|
|
119
|
+
protected childWallets: IWalletService[];
|
|
120
|
+
protected eventEmitter: EventEmitter;
|
|
121
|
+
constructor(publicKey: string, meta: IWalletServiceMeta);
|
|
122
|
+
protected initializeChildWallets(): void;
|
|
123
|
+
protected getGatewayName(): string;
|
|
124
|
+
setEnv(env: string): this;
|
|
125
|
+
load(container: Container): Promise<void>;
|
|
126
|
+
update(data: IWalletServiceUpdate): void;
|
|
127
|
+
enable(): void;
|
|
128
|
+
disable(): void;
|
|
129
|
+
on(eventName: string, cb?: (data: IUnavailableWalletEventBody | IPaymentMethodSelectedWalletEventBody) => void): Promise<unknown> | (() => void);
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=wallet-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet-service.d.ts","sourceRoot":"","sources":["../../../src/wallet-buttons/wallet-services/wallet-service.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { ApiInternal } from '../api/api-internal';
|
|
2
|
+
import { Container } from '../components/container';
|
|
3
|
+
import { EventEmitter } from '../helper/event-emitter';
|
|
4
|
+
import type { OnClickEventData } from './interfaces/on-click-event-data.interface';
|
|
5
|
+
import type { OnPaymentSuccessfulEventData } from './interfaces/on-payment-successful-event-data.interface';
|
|
6
|
+
import type { OnCloseEventData } from './interfaces/on-close-event-data.interface';
|
|
7
|
+
import type { OnPaymentInReviewEventData } from './interfaces/on-payment-in-review-event-data.interface';
|
|
8
|
+
import type { OnPaymentErrorEventData } from './interfaces/on-payment-error-event-data.interface';
|
|
9
|
+
import type { WalletCaptureRequest } from './interfaces/wallet-capture-request.interface';
|
|
10
|
+
import type { OnUnavailableEventData } from './interfaces/on-unavailable-event-data.interface';
|
|
11
|
+
import type { BaseGatewayConfig } from './interfaces/base-gateway-config.interface';
|
|
12
|
+
import type { ChargeWalletTokenMeta } from './interfaces/charge-wallet-token-meta.interface';
|
|
13
|
+
import type { BaseWalletMeta } from './interfaces/base-wallet-meta.interface';
|
|
14
|
+
import type { OnErrorEventData } from './interfaces/on-error-event-data.interface';
|
|
15
|
+
import type { OnShippingAddressChangeEventData } from './interfaces/on-shipping-address-change-event-data.interface';
|
|
16
|
+
import type { OnShippingOptionChangeEventData } from './interfaces/on-shipping-option-change-event-data.interface';
|
|
17
|
+
import type { OnShippingAddressChangeEventResponse } from './interfaces/on-shipping-address-change-event-response.interface';
|
|
18
|
+
import type { OnShippingOptionChangeEventResponse } from './interfaces/on-shipping-option-change-event-response.interface';
|
|
19
|
+
import type { ShippingEventToResponse } from './types/shipping-event-to-response.type';
|
|
20
|
+
declare abstract class BaseWalletButton<T extends BaseWalletMeta> {
|
|
21
|
+
protected container: Container;
|
|
22
|
+
protected api: ApiInternal;
|
|
23
|
+
protected env: string;
|
|
24
|
+
protected gatewayId: string;
|
|
25
|
+
protected meta: T;
|
|
26
|
+
protected eventEmitter: EventEmitter;
|
|
27
|
+
protected chargeWalletTokenMeta?: ChargeWalletTokenMeta;
|
|
28
|
+
private onShippingOptionsChangeHandlerRegistered;
|
|
29
|
+
constructor(selector: string, publicKeyOrAccessToken: string, gatewayId: string, meta: T, requiredMetaFields: string[]);
|
|
30
|
+
private getApiAuthType;
|
|
31
|
+
/**
|
|
32
|
+
* Current method can change environment. By default environment = sandbox.
|
|
33
|
+
* Also we can change domain alias for this environment. By default domain_alias = paydock.com
|
|
34
|
+
* Bear in mind that you must set an environment before calling `button.load()`.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* button.setEnv('production', 'paydock.com');
|
|
38
|
+
* @param {string} env - sandbox, production
|
|
39
|
+
* @param {string} [alias] - Own domain alias
|
|
40
|
+
*/
|
|
41
|
+
setEnv(env: string, alias?: string): void;
|
|
42
|
+
/**
|
|
43
|
+
* Callback for onClick method.
|
|
44
|
+
*
|
|
45
|
+
* @callback OnClickCallback
|
|
46
|
+
* @param {OnClickEventData} data
|
|
47
|
+
* @return {Promise<string>} walletToken string result
|
|
48
|
+
*/
|
|
49
|
+
/**
|
|
50
|
+
* Registers a callback function to be invoked when the wallet button gets clicked.
|
|
51
|
+
* **Note:** is mandatory to handle this event to perform the wallet initialization (and optionally any validation logic).
|
|
52
|
+
* The event handler needs to return the wallet token string in order for the Wallet charge processing to proceed, or throw an error in case of failure or validation errors.
|
|
53
|
+
* **Note:** this callback may be called multiple times as the customer closes the payment checkout and re-clicks the button.
|
|
54
|
+
* It's the merchant's responsibility to handle this situation and evaluate in each case if generating a new WalletCharge Token is required or the previous one can be used in each case, depending on order data and updates.
|
|
55
|
+
* In case a new one needs to be generated, remember it will need to be preceded by a `setMeta` call.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* button.onClick(async (data) => {
|
|
59
|
+
* const responseData = await fetch('https://your-server.com/init-wallet-charge');
|
|
60
|
+
* return responseData.walletToken;
|
|
61
|
+
* });
|
|
62
|
+
*
|
|
63
|
+
* @param {OnClickCallback} handler - Function to be called when the wallet button is clicked.
|
|
64
|
+
*/
|
|
65
|
+
onClick(handler: (data: OnClickEventData) => Promise<string>): () => void;
|
|
66
|
+
/**
|
|
67
|
+
* Callback for onPaymentSuccessful method.
|
|
68
|
+
*
|
|
69
|
+
* @callback OnPaymentSuccessfulCallback
|
|
70
|
+
* @param {OnPaymentSuccessfulEventData} data
|
|
71
|
+
*/
|
|
72
|
+
/**
|
|
73
|
+
* If the payment was successful, the function passed as parameter will be called.
|
|
74
|
+
* Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* button.onPaymentSuccessful((data) => {
|
|
78
|
+
* console.log('Payment successful!');
|
|
79
|
+
* });
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* button.onPaymentSuccessful().then((data) => console.log('Payment successful!'));
|
|
83
|
+
*
|
|
84
|
+
* @param {OnPaymentSuccessfulCallback} [handler] - Function to be called when the payment was successful.
|
|
85
|
+
*/
|
|
86
|
+
onPaymentSuccessful(handler?: (data: OnPaymentSuccessfulEventData) => void): Promise<unknown> | (() => void);
|
|
87
|
+
/**
|
|
88
|
+
* Callback for onPaymentInReview method.
|
|
89
|
+
*
|
|
90
|
+
* @callback OnPaymentInReviewCallback
|
|
91
|
+
* @param {OnPaymentInReviewEventData} data
|
|
92
|
+
*/
|
|
93
|
+
/**
|
|
94
|
+
* If the payment was left in fraud review, the function passed as parameter will be called.
|
|
95
|
+
* Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* button.onPaymentInReview((data) => {
|
|
99
|
+
* console.log('Payment in fraud review');
|
|
100
|
+
* });
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* button.onPaymentInReview().then((data) => console.log('Payment in fraud review'));
|
|
104
|
+
*
|
|
105
|
+
* @param {OnPaymentInReviewCallback} [handler] - Function to be called when the payment was left in fraud review status.
|
|
106
|
+
*/
|
|
107
|
+
onPaymentInReview(handler?: (err: OnPaymentInReviewEventData) => void): Promise<unknown> | (() => void);
|
|
108
|
+
/**
|
|
109
|
+
* Callback for onPaymentError method.
|
|
110
|
+
*
|
|
111
|
+
* @callback OnPaymentErrorCallback
|
|
112
|
+
* @param {OnPaymentErrorEventData} data
|
|
113
|
+
*/
|
|
114
|
+
/**
|
|
115
|
+
* If the payment was not successful, the function passed as parameter will be called.
|
|
116
|
+
* Important: Do not perform thread blocking operations in callback such as window.alert() calls.
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* button.onPaymentError((err) => {
|
|
120
|
+
* console.log('Payment not successful');
|
|
121
|
+
* });
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* button.onPaymentError().then((err) => console.log('Payment not successful'));
|
|
125
|
+
*
|
|
126
|
+
* @param {OnPaymentErrorCallback} [handler] - Function to be called when the payment was not successful.
|
|
127
|
+
*/
|
|
128
|
+
onPaymentError(handler?: (err: OnPaymentErrorEventData) => void): Promise<unknown> | (() => void);
|
|
129
|
+
/**
|
|
130
|
+
* Callback for onCheckoutClose method.
|
|
131
|
+
*
|
|
132
|
+
* @callback OnCheckoutCloseCallback
|
|
133
|
+
* @param {OnCloseEventData} data
|
|
134
|
+
*/
|
|
135
|
+
/**
|
|
136
|
+
* Registers a callback function to be invoked when the wallet checkout closes.
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* button.onCheckoutClose(() => {
|
|
140
|
+
* console.log('Wallet checkout closes');
|
|
141
|
+
* });
|
|
142
|
+
*
|
|
143
|
+
* @param {OnCheckoutCloseCallback} handler - Function to be called when the wallet checkout closes.
|
|
144
|
+
*/
|
|
145
|
+
onCheckoutClose(handler?: (err: OnCloseEventData) => void): Promise<unknown> | (() => void);
|
|
146
|
+
/**
|
|
147
|
+
* Callback for onShippingAddressChange method.
|
|
148
|
+
*
|
|
149
|
+
* @callback OnShippingAddressChangeCallback
|
|
150
|
+
* @param {OnShippingAddressChangeEventData} data
|
|
151
|
+
* @return {Promise<OnShippingAddressChangeEventResponse>} Address update result
|
|
152
|
+
*/
|
|
153
|
+
/**
|
|
154
|
+
* If shipping address data is updated, the function passed as parameter will be called.
|
|
155
|
+
* Use this method to listen for shipping address selection or input from customer when shipping is enabled.
|
|
156
|
+
* The event handler needs to return a new token in case a backend to backend wallet update call was executed.
|
|
157
|
+
* In addition, if any error occured, an error string must be supplied.
|
|
158
|
+
* By default, the event handler will be processed successfuly if neither token nor error is returned.
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* button.onShippingAddressChange((data) => {
|
|
162
|
+
* const responseData = await fetch('https://your-server.com/update-shipping-info');
|
|
163
|
+
* return { error: null, token: responseData.walletToken };
|
|
164
|
+
* });
|
|
165
|
+
*
|
|
166
|
+
* @param {OnShippingAddressChangeCallback} [handler] - Function to be called when the shipping address data is updated.
|
|
167
|
+
*/
|
|
168
|
+
onShippingAddressChange(handler?: (data: OnShippingAddressChangeEventData) => Promise<OnShippingAddressChangeEventResponse>): () => void;
|
|
169
|
+
/**
|
|
170
|
+
* Callback for onShippingOptionsChange method.
|
|
171
|
+
*
|
|
172
|
+
* @callback OnShippingOptionsChangeCallback
|
|
173
|
+
* @param {OnShippingOptionChangeEventData} data
|
|
174
|
+
* @return {Promise<OnShippingOptionChangeEventResponse>} Address update result
|
|
175
|
+
*/
|
|
176
|
+
/**
|
|
177
|
+
* If shipping options data is updated, the function passed as parameter will be called.
|
|
178
|
+
* Use this method to listen for shipping option selection from customer when shipping is enabled.
|
|
179
|
+
* The event handler needs to return a new token in case a backend to backend wallet update call was executed.
|
|
180
|
+
* In addition, if any error occured, an error string must be supplied.
|
|
181
|
+
* By default, the event handler will be processed successfuly if neither token nor error is returned.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* button.onShippingOptionsChange((data) => {
|
|
185
|
+
* const responseData = await fetch('https://your-server.com/update-shipping-info');
|
|
186
|
+
* return { error: null, token: responseData.walletToken };
|
|
187
|
+
* });
|
|
188
|
+
*
|
|
189
|
+
* @param {OnShippingOptionsChangeCallback} [handler] - Function to be called when the shipping options data is updated.
|
|
190
|
+
*/
|
|
191
|
+
onShippingOptionsChange(handler?: (data: OnShippingOptionChangeEventData) => Promise<OnShippingOptionChangeEventResponse>): () => void;
|
|
192
|
+
/**
|
|
193
|
+
* Callback for onUnavailable method.
|
|
194
|
+
*
|
|
195
|
+
* @callback OnUnavailableCallback
|
|
196
|
+
* @param {OnUnavailableEventData} data
|
|
197
|
+
*/
|
|
198
|
+
/**
|
|
199
|
+
* Registers a callback function to be invoked when the wallet is not available in the current context.
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* button.onUnavailable(() => {
|
|
203
|
+
* console.log('Wallet not available');
|
|
204
|
+
* });
|
|
205
|
+
*
|
|
206
|
+
* @param {OnUnavailableCallback} handler - Function to be called when the wallet is not available in the current context.
|
|
207
|
+
*/
|
|
208
|
+
onUnavailable(handler?: (err: OnUnavailableEventData) => void): Promise<unknown> | (() => void);
|
|
209
|
+
/**
|
|
210
|
+
* Callback for onError method.
|
|
211
|
+
*
|
|
212
|
+
* @callback OnErrorCallback
|
|
213
|
+
* @param {OnErrorEventData} data
|
|
214
|
+
*/
|
|
215
|
+
/**
|
|
216
|
+
* Registers a callback function to be invoked when an error that is not related to payment execution occurs.
|
|
217
|
+
* For example, if the amount of the wallet token injected via the `onClick` event handler does not match the amount provided via the initial `meta` or `setMeta` method.
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* button.onError((error) => {
|
|
221
|
+
* console.log('WalletButtonExpress error', error);
|
|
222
|
+
* });
|
|
223
|
+
*
|
|
224
|
+
* @param {OnErrorCallback} handler - Function to be called when the WalletButton has an error.
|
|
225
|
+
*/
|
|
226
|
+
onError(handler?: (err: OnErrorEventData) => void): Promise<unknown> | (() => void);
|
|
227
|
+
/**
|
|
228
|
+
* Add docs on each child class
|
|
229
|
+
*/
|
|
230
|
+
abstract load(): void;
|
|
231
|
+
/**
|
|
232
|
+
* Add docs on each child class
|
|
233
|
+
*/
|
|
234
|
+
abstract setMeta(meta: object): void;
|
|
235
|
+
protected getGatewayWalletConfig<T>(): Promise<BaseGatewayConfig<T>>;
|
|
236
|
+
protected executeWalletCallback<T, U extends {
|
|
237
|
+
request_type: string;
|
|
238
|
+
}>(data: U): Promise<T>;
|
|
239
|
+
protected executeWalletCapture<T>(data: WalletCaptureRequest): Promise<T>;
|
|
240
|
+
protected handleMerchantOnExpressButtonClickEvent(): Promise<void>;
|
|
241
|
+
protected handleMerchantOnShippingChangedEvent<T extends OnShippingAddressChangeEventData | OnShippingOptionChangeEventData>(eventData: T): Promise<ShippingEventToResponse<T>>;
|
|
242
|
+
protected setWalletToken(token: string, opts?: {
|
|
243
|
+
skipApiAuth: boolean;
|
|
244
|
+
}): void;
|
|
245
|
+
protected handleCheckoutClose(): void;
|
|
246
|
+
protected handleOnUnavailable(): void;
|
|
247
|
+
protected handleOnError(error?: Error): void;
|
|
248
|
+
protected eventDataFromApiError(err: any): OnPaymentErrorEventData['data'];
|
|
249
|
+
protected validateRequiredMetaFields(requiredMetaFields: string[]): void;
|
|
250
|
+
}
|
|
251
|
+
export { BaseWalletButton };
|
|
252
|
+
//# sourceMappingURL=base.wallet-button-express.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.wallet-button-express.d.ts","sourceRoot":"","sources":["../../src/wallet-buttons-express/base.wallet-button-express.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum EVENT {
|
|
2
|
+
UNAVAILABLE = "unavailable",
|
|
3
|
+
ERROR = "error",
|
|
4
|
+
PAYMENT_SUCCESSFUL = "paymentSuccessful",
|
|
5
|
+
PAYMENT_ERROR = "paymentError",
|
|
6
|
+
PAYMENT_IN_REVIEW = "paymentInReview",
|
|
7
|
+
ON_CLICK = "onClick",
|
|
8
|
+
ON_CHECKOUT_CLOSE = "onCheckoutClose",
|
|
9
|
+
ON_SHIPPING_ADDRESS_CHANGE = "onShippingAddressChange",
|
|
10
|
+
ON_SHIPPING_OPTIONS_CHANGE = "onShippingOptionsChange"
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=event.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.enum.d.ts","sourceRoot":"","sources":["../../../src/wallet-buttons-express/enum/event.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,KAAK;IACb,WAAW,gBAAgB;IAC3B,KAAK,UAAU;IACf,kBAAkB,sBAAsB;IACxC,aAAa,iBAAiB;IAC9B,iBAAiB,oBAAoB;IACrC,QAAQ,YAAY;IACpB,iBAAiB,oBAAoB;IACrC,0BAA0B,4BAA4B;IACtD,0BAA0B,4BAA4B;CACzD"}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
export { ApplePayWalletButtonExpress } from "./services/apple-pay/apple-pay.wallet-button-express";
|
|
2
|
+
export { PaypalWalletButtonExpress } from "./services/paypal/paypal.wallet-button-express";
|
|
3
|
+
/**
|
|
4
|
+
* Interface for configuration metadata specific to ApplePay integration in the wallet checkout and payment process.
|
|
5
|
+
* For further information about ApplePay Capabilities refer to [the documentation](https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/4440085-applepaycapabilities).
|
|
6
|
+
* Apple will determinate if the device has an ApplePay wallet available and at least one active payment.
|
|
7
|
+
* If the determinated value is credentials_status_unknown, the payment possbily should might be not able to be finished on the web, and the buyer must complete it on a compatible device, like Iphone or Ipad.
|
|
8
|
+
*
|
|
9
|
+
* @interface ApplePayWalletMeta
|
|
10
|
+
*
|
|
11
|
+
* @type {object}
|
|
12
|
+
* @param {string} amount_label - Label shown next to the total amount to be paid, used in ApplePay popups.
|
|
13
|
+
* @param {string} country - Country of the user in 2 letter ISO code format, required for ApplePay.
|
|
14
|
+
* @param {string} currency - Currency of the transaction. ISO 4217 currency code format.
|
|
15
|
+
* @param {number} amount - Total transaction amount number. **Note:** this amount will be presented in the payment sheet regardless of amount sent in the Wallet Initialization Backend to Backend call. Use `setMeta` method to keep it up to date.
|
|
16
|
+
* @param {Array<'supports3DS' | 'supportsEMV' | 'supportsCredit' | 'supportsDebit'>} [merchant_capabilities] - Array of capabilities that the merchant supports, influencing the transaction processing features available.
|
|
17
|
+
* @param {Array<'visa' | 'masterCard' | 'amex' | 'chinaUnionPay' | 'discover' | 'interac' | 'jcb' | 'privateLabel'>} [supported_networks] - List of payment networks supported by the merchant for ApplePay transactions.
|
|
18
|
+
* @param {Array<'email' | 'name' | 'phone' | 'postalAddress'>} [required_billing_contact_fields] - Contact fields required from the user for billing purposes, improving transaction verification and fraud prevention. Phone and email are currently not returned by Apple.
|
|
19
|
+
* @param {Array<'email' | 'phone'>} [required_shipping_contact_fields] - Shipping contact fields that are mandatory to complete the transaction. Use email and phone to collect from customer wallet in the abscense of billing one. Required for onShippingAddressChange callback.
|
|
20
|
+
* @param {string[]} [supported_countries] - List of countries where ApplePay is supported by the merchant, restricting usage to specified regions.
|
|
21
|
+
* @param {object} [style] - Styling configuration for ApplePay buttons displayed during checkout.
|
|
22
|
+
* @param {ApplePayButtonType} [style.button_type] - Enum type to select the type of ApplePay button (e.g., 'buy', 'donate', etc.), providing user interface customization.
|
|
23
|
+
* @param {ApplePayButtonStyle} [style.button_style] - Style applied to the ApplePay button, which can include color and form factor adjustments according to the brand's visual guidelines.
|
|
24
|
+
* @param {'available' | 'store_pickup'} [shipping_editing_mode] - ApplePay - available for allowing editing shipping, store_pickup for not allowing editing shipping.
|
|
25
|
+
* @param {object} [shipping_data] - ApplePay - Preloaded data used for populate shipping address information
|
|
26
|
+
* @param {string} [shipping_data.email_address] - ApplePay - The shipping address email
|
|
27
|
+
* @param {Array<'credentials_available' | 'credentials_status_unknown' | 'credentials_unavailable'>} [apple_pay_capabilities] Device capabilities needed for wallet button to be available.
|
|
28
|
+
**/
|
|
29
|
+
/**
|
|
30
|
+
* Interface for configuration metadata specific to PayPal integration in the wallet checkout and payment process.
|
|
31
|
+
* For in-depth information, please refer to the [Paypal documentation](https://developer.paypal.com/docs/multiparty/checkout/standard/customize/buttons-style-guide/).
|
|
32
|
+
* @interface PaypalWalletMeta
|
|
33
|
+
*
|
|
34
|
+
* @type {object}
|
|
35
|
+
* @param {number} amount - Total amount of the transaction. Represents the money to be charged.
|
|
36
|
+
* @param {string} currency - Currency of the transaction in ISO 4217 currency code format.
|
|
37
|
+
* @param {boolean} [pay_later] - Flag to enable Pay Later feature of PayPal, allowing Pay in 4. Default false.
|
|
38
|
+
* @param {boolean} [hide_message] Used to hide Pay Later message in PayPal Smart Checkout WalletButton integration. Optional for [PayPal]. N/A for other wallets.
|
|
39
|
+
* @param {boolean} [standalone] - Flag to specify if the PayPal standalone button should be used. Default false.
|
|
40
|
+
* @param {boolean} [capture] - Flag to specify if the transaction amount should be captured immediately or authorized for later capture. Default false.
|
|
41
|
+
* @param {object} [style] - Styling configurations for the PayPal widget.
|
|
42
|
+
* @param {('vertical' | 'horizontal')} [style.layout] - Layout orientation of the PayPal button.
|
|
43
|
+
* @param {('gold' | 'blue' | 'silver' | 'black' | 'white')} [style.color] - Color theme of the PayPal button.
|
|
44
|
+
* @param {('rect' | 'pill' | 'sharp')} [style.shape] - Shape of the PayPal button.
|
|
45
|
+
* @param {number} [style.borderRadius] - Border radius for the button, allowing customization of corner roundness.
|
|
46
|
+
* @param {number} [style.height] - Height of the PayPal button, allowing for size customization.
|
|
47
|
+
* @param {boolean} [style.disableMaxWidth] - Flag to disable the maximum width constraint of the button.
|
|
48
|
+
* @param {('paypal' | 'checkout' | 'buynow' | 'pay' | 'installment')} [style.label] - Label text displayed on the PayPal button.
|
|
49
|
+
* @param {boolean} [style.tagline] - Flag to include or exclude a tagline beneath the button text.
|
|
50
|
+
* @param {object} [style.messages] - Messaging options related to the PayPal button to enhance user interaction.
|
|
51
|
+
* @param {('text' | 'flex')} [style.messages.layout] - Layout type for the messages displayed near the PayPal button.
|
|
52
|
+
* @param {object} [style.messages.logo] - Configuration for the logo to be displayed with the PayPal button.
|
|
53
|
+
* @param {('primary' | 'alternative' | 'inline' | 'none')} [style.messages.logo.type] - Type of logo to display.
|
|
54
|
+
* @param {('left' | 'right' | 'top')} [style.messages.logo.position] - Position of the logo relative to the button or message.
|
|
55
|
+
* @param {object} [style.messages.text] - Text styling within the message component.
|
|
56
|
+
* @param {('black' | 'white' | 'monochrome' | 'grayscale')} [style.messages.text.color] - Color of the message text.
|
|
57
|
+
* @param {(10 | 11 | 12 | 13 | 14 | 15 | 16)} [style.messages.text.size] - Font size of the message text.
|
|
58
|
+
* @param {('left' | 'center' | 'right')} [style.messages.text.align] - Text alignment within the message area.
|
|
59
|
+
* @param {('blue' | 'black' | 'white' | 'white-no-border' | 'gray' | 'monochrome' | 'grayscale')} [style.messages.color] - Background color of the message area.
|
|
60
|
+
* @param {('1x1' | '1x4' | '8x1' | '20x1')} [style.messages.ratio] - Aspect ratio of the message area, affecting its layout and display.
|
|
61
|
+
**/
|
|
62
|
+
/**
|
|
63
|
+
* List of available event's name in the wallet button lifecycle
|
|
64
|
+
* @const EVENT
|
|
65
|
+
*
|
|
66
|
+
* @type {object}
|
|
67
|
+
* @param {string} UNAVAILABLE=unavailable
|
|
68
|
+
* @param {string} ERROR=error
|
|
69
|
+
* @param {string} PAYMENT_SUCCESSFUL=paymentSuccessful
|
|
70
|
+
* @param {string} PAYMENT_ERROR=paymentError
|
|
71
|
+
* @param {string} PAYMENT_IN_REVIEW=paymentInReview
|
|
72
|
+
* @param {string} ON_CLICK=onClick
|
|
73
|
+
* @param {string} ON_CHECKOUT_CLOSE=onCheckoutClose
|
|
74
|
+
* @param {string} ON_SHIPPING_ADDRESS_CHANGE=onShippingAddressChange
|
|
75
|
+
* @param {string} ON_SHIPPING_OPTIONS_CHANGE=onShippingOptionsChange
|
|
76
|
+
*/
|
|
77
|
+
/**
|
|
78
|
+
* Interface for OnClickEventData
|
|
79
|
+
* @interface OnClickEventData
|
|
80
|
+
*
|
|
81
|
+
* @type {object}
|
|
82
|
+
* @param {string} event - Event Name is 'onClick'
|
|
83
|
+
**/
|
|
84
|
+
/**
|
|
85
|
+
* Interface for OnCloseEventData
|
|
86
|
+
* @interface OnCloseEventData
|
|
87
|
+
*
|
|
88
|
+
* @type {object}
|
|
89
|
+
* @param {string} event - Event Name is 'onCheckoutClose'
|
|
90
|
+
* @param {string} [chargeId] - chargeId in case it's already set after onClick event
|
|
91
|
+
**/
|
|
92
|
+
/**
|
|
93
|
+
* Interface for OnPaymentSuccessfulEventData. For final secure results, fetch backend to backend data.
|
|
94
|
+
* @interface OnPaymentSuccessfulEventData
|
|
95
|
+
*
|
|
96
|
+
* @type {object}
|
|
97
|
+
* @param {string} event - Event Name is 'paymentSuccessful'
|
|
98
|
+
* @param {string} chargeId - chargeId set after onClick event
|
|
99
|
+
* @param {string} data.id - Charge ID returned by server
|
|
100
|
+
* @param {string} data.amount - Charge amount returned by server
|
|
101
|
+
* @param {string} data.currency - Charge currency returned by server
|
|
102
|
+
* @param {string} data.status - Charge status returned by server
|
|
103
|
+
**/
|
|
104
|
+
/**
|
|
105
|
+
* Interface for OnPaymentInReviewEventData. For final secure results, fetch backend to backend data.
|
|
106
|
+
* @interface OnPaymentInReviewEventData
|
|
107
|
+
*
|
|
108
|
+
* @type {object}
|
|
109
|
+
* @param {string} event - Event Name is 'paymentInReview'
|
|
110
|
+
* @param {string} chargeId - chargeId set after onClick event
|
|
111
|
+
* @param {string} data.id - Charge ID returned by server
|
|
112
|
+
* @param {string} data.amount - Charge amount returned by server
|
|
113
|
+
* @param {string} data.currency - Charge currency returned by server
|
|
114
|
+
* @param {string} data.status - Charge status returned by server
|
|
115
|
+
**/
|
|
116
|
+
/**
|
|
117
|
+
* Interface for OnPaymentErrorEventData. For final secure results, fetch backend to backend data.
|
|
118
|
+
* @interface OnPaymentErrorEventData
|
|
119
|
+
*
|
|
120
|
+
* @type {object}
|
|
121
|
+
* @param {string} event - Event Name is 'paymentError'
|
|
122
|
+
* @param {string} chargeId - chargeId set after onClick event
|
|
123
|
+
* @param {string} [data.message] - Error message
|
|
124
|
+
* @param {string} [data.code] - Error code
|
|
125
|
+
**/
|
|
126
|
+
/**
|
|
127
|
+
* Interface for OnUnavailableEventData
|
|
128
|
+
* @interface OnUnavailableEventData
|
|
129
|
+
*
|
|
130
|
+
* @type {object}
|
|
131
|
+
* @param {string} event - Event Name is 'unavailable'
|
|
132
|
+
**/
|
|
133
|
+
/**
|
|
134
|
+
* Interface for OnErrorEventData
|
|
135
|
+
* @interface OnErrorEventData
|
|
136
|
+
*
|
|
137
|
+
* @type {object}
|
|
138
|
+
* @param {string} event - Event Name is 'error'
|
|
139
|
+
* @param {string} [chargeId] - chargeId in case it's already set after onClick event
|
|
140
|
+
* @param {Error} [data] Error object if present
|
|
141
|
+
**/
|
|
142
|
+
/**
|
|
143
|
+
* Interface for OnShippingAddressChangeEventData.
|
|
144
|
+
* @interface OnShippingAddressChangeEventData
|
|
145
|
+
*
|
|
146
|
+
* @type {object}
|
|
147
|
+
* @param {string} event - Event Name is 'onShippingAddressChange'
|
|
148
|
+
* @param {string} chargeId - chargeId set after onClick event
|
|
149
|
+
* @param {string} data.address_city - PayPal and ApplePay - Shipping address city
|
|
150
|
+
* @param {string} data.address_state - PayPal and ApplePay - Shipping address state
|
|
151
|
+
* @param {string} data.address_postcode - PayPal and ApplePay - Shipping address postcode
|
|
152
|
+
* @param {string} data.address_country - PayPal and ApplePay - Shipping address country code
|
|
153
|
+
* @param {string} [data.address_line1] - ApplePay - Shipping address line 1
|
|
154
|
+
* @param {string} [data.address_line2] - ApplePay - Shipping address line 2
|
|
155
|
+
* @param {string} [data.contact.phone] - ApplePay - Shipping contact phone
|
|
156
|
+
* @param {string} [data.contact.email] - ApplePay - Shipping contact email
|
|
157
|
+
* @param {string} [data.contact.first_name] - ApplePay - Shipping contact first name
|
|
158
|
+
* @param {string} [data.contact.last_name] - ApplePay - Shipping contact last name
|
|
159
|
+
**/
|
|
160
|
+
/**
|
|
161
|
+
* Interface for OnShippingAddressChangeEventResponse.
|
|
162
|
+
* @interface OnShippingAddressChangeEventResponse
|
|
163
|
+
*
|
|
164
|
+
* @type {object}
|
|
165
|
+
* @param {string} [token] - Updated Wallet Token if any
|
|
166
|
+
* @param {string} [label] - ApplePay - Required. Label to show to the customer.
|
|
167
|
+
* @param {string} [amount] - ApplePay - Required. New amount for shipping option.
|
|
168
|
+
* @param {string} [error] - PayPal and ApplePay - Error object in case of error when processing shipping address in if new address unsupported or any other possible error.
|
|
169
|
+
* @param {string} error.code - PayPal and ApplePay - Error code, mandatory in case of error.
|
|
170
|
+
* Possible values for Paypal are 'address_error', 'country_error', 'state_error', 'zip_error' or any other string if none applies.
|
|
171
|
+
* For ApplePay values are 'address_error', 'shipping_contact_invalid' and 'billing_contact_invalid'.
|
|
172
|
+
* @param {string} [error.field] - ApplePay - Error field in case of specifically showing it. Possible values for Apple Pay are 'phone', 'email', 'name', 'phonetic_name', 'address_lines', 'locality', 'postal_code', 'administrative_area', 'country', 'country_code'.
|
|
173
|
+
* @param {string} [error.message] - ApplePay - Custom user facing error message.
|
|
174
|
+
**/
|
|
175
|
+
/**
|
|
176
|
+
* Interface for IApplePayShippingOption.
|
|
177
|
+
* Used for adding new shippings options when customer updates the shipping address.
|
|
178
|
+
* @interface IApplePayShippingOption
|
|
179
|
+
*
|
|
180
|
+
* @type {object}
|
|
181
|
+
* @param {string} [id] - Updated Wallet Token if any
|
|
182
|
+
* @param {string} [label] - ApplePay - Required. Label to show to the customer.
|
|
183
|
+
* @param {string} [amount] - ApplePay - Required. New amount for shipping option.
|
|
184
|
+
* @param {string} [detail] - ApplePay - Optional detail for shipping option.
|
|
185
|
+
* @param {object} [date_components_range] - ApplePay - Object that contains the dates for shipping
|
|
186
|
+
* @param {object} [date_components_range.start_date_components] - ApplePay - Contains the start date object
|
|
187
|
+
* @param {string} [date_components_range.start_date_components.years] - ApplePay - Contains the start date year
|
|
188
|
+
* @param {string} [date_components_range.start_date_components.months] - ApplePay - Contains the start date month
|
|
189
|
+
* @param {string} [date_components_range.start_date_components.days] - ApplePay - Contains the start date day
|
|
190
|
+
* @param {string} [date_components_range.start_date_components.hours] - ApplePay - Contains the start date hour
|
|
191
|
+
* @param {object} [date_components_range.end_date_components] - ApplePay - Contains the end date year
|
|
192
|
+
* @param {string} [date_components_range.end_date_components.years] - ApplePay - Contains the end date year
|
|
193
|
+
* @param {string} [date_components_range.end_date_components.months] - ApplePay - Contains the end date month
|
|
194
|
+
* @param {string} [date_components_range.end_date_components.days] - ApplePay - Contains the end date day
|
|
195
|
+
* @param {string} [date_components_range.end_date_components.hours] - ApplePay - Contains the end date hour
|
|
196
|
+
**/
|
|
197
|
+
/**
|
|
198
|
+
* Interface for OnShippingOptionChangeEventData.
|
|
199
|
+
* @interface OnShippingOptionChangeEventData
|
|
200
|
+
*
|
|
201
|
+
* @type {object}
|
|
202
|
+
* @param {string} event - Event Name is 'onShippingOptionsChange'
|
|
203
|
+
* @param {string} chargeId - chargeId set after onClick event
|
|
204
|
+
* @param {string} [data.shipping_option_id] - PayPal and ApplePay - Selected shipping option id
|
|
205
|
+
* @param {string} [data.amount] - Paypal and ApplePay - Selected shipping option amount
|
|
206
|
+
* @param {string} [data.label] - ApplePay - Selected shipping option label
|
|
207
|
+
* @param {string} [data.detail] - ApplePay - Selected shipping option detail
|
|
208
|
+
**/
|
|
209
|
+
/**
|
|
210
|
+
* Interface for OnShippingOptionChangeEventResponse.
|
|
211
|
+
* @interface OnShippingOptionChangeEventResponse
|
|
212
|
+
*
|
|
213
|
+
* @type {object}
|
|
214
|
+
* @param {string} [token] - Updated Wallet Token if any
|
|
215
|
+
* @param {string} [label] - ApplePay - Required. Label to show to the customer.
|
|
216
|
+
* @param {string} [amount] - ApplePay - Required. New amount for shipping option.
|
|
217
|
+
* @param {string} [error] - PayPal - Error object in case of error when processing shipping option selection.
|
|
218
|
+
* @param {string} error.code - Possible values for Paypal are 'method_unavailable', 'store_unavailable' or any other string if none applies.
|
|
219
|
+
**/
|
|
220
|
+
/**
|
|
221
|
+
* Interface for IApplePayError.
|
|
222
|
+
* @interface IApplePayError
|
|
223
|
+
*
|
|
224
|
+
* @type {object}
|
|
225
|
+
* @param {'shipping_contact_invalid' | 'billing_contact_invalid' | 'address_unserviceable' | 'coupon_code_invalid' | 'coupon_code_expired' | 'unknown'} code The error code for this instance.
|
|
226
|
+
* @param {ContactFieldType} contact_field The error code for this instance.
|
|
227
|
+
* @param {string|undefined} message TA localized, user-facing string that describes the error.
|
|
228
|
+
**/
|
|
229
|
+
/**
|
|
230
|
+
* List of available contact fields for ContactFieldType
|
|
231
|
+
* @const ContactFieldType
|
|
232
|
+
*
|
|
233
|
+
* @type {object}
|
|
234
|
+
* @param {string} phone
|
|
235
|
+
* @param {string} email
|
|
236
|
+
* @param {string} name
|
|
237
|
+
* @param {string} phonetic_name
|
|
238
|
+
* @param {string} address_lines
|
|
239
|
+
* @param {string} address_city
|
|
240
|
+
* @param {string} address_postcode
|
|
241
|
+
* @param {string} address_state
|
|
242
|
+
* @param {string} address_country
|
|
243
|
+
* @param {string} address_country_code
|
|
244
|
+
*/
|
|
245
|
+
//# sourceMappingURL=index.d.ts.map
|