@paydock/client-sdk 1.104.3-beta → 1.105.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nvmrc +1 -0
- package/README.md +572 -290
- package/api.d.ts +1 -0
- package/api.js +1 -0
- package/bundles/widget.umd.js +9130 -8655
- package/bundles/widget.umd.min.js +1 -2
- package/canvas3ds.d.ts +1 -0
- package/canvas3ds.js +1 -0
- package/checkout-button.d.ts +1 -0
- package/checkout-button.js +1 -0
- package/inicialization-guide.md +7 -0
- package/{bundles/types → lib}/api/api-base.d.ts +1 -2
- package/lib/api/api-base.js +101 -0
- package/lib/api/api-base.js.map +1 -0
- package/{bundles/types → lib}/api/api-charge-internal.d.ts +0 -1
- package/lib/api/api-charge-internal.js +30 -0
- package/lib/api/api-charge-internal.js.map +1 -0
- package/{bundles/types → lib}/api/api-charge.d.ts +0 -1
- package/lib/api/api-charge.js +49 -0
- package/lib/api/api-charge.js.map +1 -0
- package/{bundles/types → lib}/api/api-internal.d.ts +0 -1
- package/lib/api/api-internal.js +13 -0
- package/lib/api/api-internal.js.map +1 -0
- package/{bundles/types → lib}/api/api-service-internal.d.ts +0 -1
- package/lib/api/api-service-internal.js +18 -0
- package/lib/api/api-service-internal.js.map +1 -0
- package/{bundles/types → lib}/api/api.d.ts +1 -2
- package/lib/api/api.js +62 -0
- package/lib/api/api.js.map +1 -0
- package/lib/api/index.d.ts +1 -0
- package/lib/api/index.js +2 -0
- package/lib/api/index.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/canvas-3ds.d.ts +1 -2
- package/lib/canvas-3ds/canvas-3ds.js +157 -0
- package/lib/canvas-3ds/canvas-3ds.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/index.d.ts +0 -1
- package/lib/canvas-3ds/index.js +2 -0
- package/lib/canvas-3ds/index.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/services/gpayments-service.d.ts +0 -1
- package/lib/canvas-3ds/services/gpayments-service.js +181 -0
- package/lib/canvas-3ds/services/gpayments-service.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/services/index.d.ts +0 -1
- package/lib/canvas-3ds/services/index.js +2 -0
- package/lib/canvas-3ds/services/index.js.map +1 -0
- package/{bundles/types → lib}/canvas-3ds/services/standalone3ds-service.d.ts +0 -1
- package/lib/canvas-3ds/services/standalone3ds-service.js +32 -0
- package/lib/canvas-3ds/services/standalone3ds-service.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -2
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js +50 -0
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/afterpay/afterpay.runner.d.ts +0 -1
- package/lib/checkout-button/afterpay/afterpay.runner.js +41 -0
- package/lib/checkout-button/afterpay/afterpay.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/checkout-button.d.ts +1 -2
- package/{bundles/types → lib}/checkout-button/checkout-button.interface.d.ts +0 -1
- package/lib/checkout-button/checkout-button.interface.js +45 -0
- package/lib/checkout-button/checkout-button.interface.js.map +1 -0
- package/lib/checkout-button/checkout-button.js +266 -0
- package/lib/checkout-button/checkout-button.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/checkout-contextual-handler.d.ts +0 -1
- package/lib/checkout-button/checkout-contextual-handler.js +75 -0
- package/lib/checkout-button/checkout-contextual-handler.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/index.d.ts +1 -2
- package/lib/checkout-button/index.js +85 -0
- package/lib/checkout-button/index.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/paypal/paypal-checkout-button.d.ts +1 -2
- package/lib/checkout-button/paypal/paypal-checkout-button.js +25 -0
- package/lib/checkout-button/paypal/paypal-checkout-button.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/paypal/paypal.runner.d.ts +0 -1
- package/lib/checkout-button/paypal/paypal.runner.js +14 -0
- package/lib/checkout-button/paypal/paypal.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/base.runner.d.ts +3 -4
- package/lib/checkout-button/runner/base.runner.js +13 -0
- package/lib/checkout-button/runner/base.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/contextual.runner.d.ts +1 -2
- package/lib/checkout-button/runner/contextual.runner.js +40 -0
- package/lib/checkout-button/runner/contextual.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/index.d.ts +0 -1
- package/lib/checkout-button/runner/index.js +11 -0
- package/lib/checkout-button/runner/index.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/popup.runner.d.ts +1 -2
- package/lib/checkout-button/runner/popup.runner.js +68 -0
- package/lib/checkout-button/runner/popup.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/runner/redirect.runner.d.ts +1 -2
- package/lib/checkout-button/runner/redirect.runner.js +15 -0
- package/lib/checkout-button/runner/redirect.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -2
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +64 -0
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +1 -2
- package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js +78 -0
- package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +1 -2
- package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js +49 -0
- package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.config.d.ts +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.config.js +4 -0
- package/lib/checkout-button/zipmoney/zipmoney.config.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.runner.d.ts +1 -2
- package/lib/checkout-button/zipmoney/zipmoney.runner.js +23 -0
- package/lib/checkout-button/zipmoney/zipmoney.runner.js.map +1 -0
- package/{bundles/types → lib}/checkout-button/zipmoney/zipmoney.types.d.ts +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.types.js +1 -0
- package/lib/checkout-button/zipmoney/zipmoney.types.js.map +1 -0
- package/{bundles/types → lib}/components/ability-guard.d.ts +0 -1
- package/lib/components/ability-guard.js +44 -0
- package/lib/components/ability-guard.js.map +1 -0
- package/{bundles/types → lib}/components/background.d.ts +0 -1
- package/lib/components/background.js +193 -0
- package/lib/components/background.js.map +1 -0
- package/{bundles/types → lib}/components/container.d.ts +1 -1
- package/lib/components/container.js +63 -0
- package/lib/components/container.js.map +1 -0
- package/{bundles/types → lib}/components/dispatcher.d.ts +1 -2
- package/lib/components/dispatcher.js +39 -0
- package/lib/components/dispatcher.js.map +1 -0
- package/{bundles/types → lib}/components/element-style.d.ts +1 -2
- package/lib/components/element-style.js +52 -0
- package/lib/components/element-style.js.map +1 -0
- package/{bundles/types → lib}/components/flypay-iframe-event.d.ts +0 -1
- package/lib/components/flypay-iframe-event.js +28 -0
- package/lib/components/flypay-iframe-event.js.map +1 -0
- package/{bundles/types/components/form-interceptor.d.ts → lib/components/form-Interceptor.d.ts} +0 -1
- package/lib/components/form-Interceptor.js +38 -0
- package/lib/components/form-Interceptor.js.map +1 -0
- package/{bundles/types → lib}/components/http-core.d.ts +0 -1
- package/lib/components/http-core.js +57 -0
- package/lib/components/http-core.js.map +1 -0
- package/{bundles/types → lib}/components/iframe-event.d.ts +15 -13
- package/lib/components/iframe-event.js +75 -0
- package/lib/components/iframe-event.js.map +1 -0
- package/{bundles/types → lib}/components/iframe.d.ts +0 -1
- package/lib/components/iframe.js +62 -0
- package/lib/components/iframe.js.map +1 -0
- package/{bundles/types → lib}/components/link.d.ts +1 -2
- package/lib/components/link.js +59 -0
- package/lib/components/link.js.map +1 -0
- package/{bundles/types → lib}/components/loader.d.ts +0 -1
- package/lib/components/loader.js +234 -0
- package/lib/components/loader.js.map +1 -0
- package/{bundles/types → lib}/components/param.d.ts +9 -12
- package/lib/components/param.js +147 -0
- package/lib/components/param.js.map +1 -0
- package/{bundles/types → lib}/components/popup.d.ts +0 -1
- package/lib/components/popup.js +104 -0
- package/lib/components/popup.js.map +1 -0
- package/{bundles/types → lib}/components/storage-dispatcher.d.ts +0 -1
- package/lib/components/storage-dispatcher.js +75 -0
- package/lib/components/storage-dispatcher.js.map +1 -0
- package/{bundles/types → lib}/components/trigger.d.ts +0 -1
- package/lib/components/trigger.js +49 -0
- package/lib/components/trigger.js.map +1 -0
- package/{bundles/types → lib}/components/vault-display-iframe-event.d.ts +0 -1
- package/lib/components/vault-display-iframe-event.js +27 -0
- package/lib/components/vault-display-iframe-event.js.map +1 -0
- package/{bundles/types → lib}/components/wallet-background.d.ts +2 -2
- package/lib/components/wallet-background.js +63 -0
- package/lib/components/wallet-background.js.map +1 -0
- package/{bundles/types → lib}/components/wallet-trigger.d.ts +0 -1
- package/lib/components/wallet-trigger.js +27 -0
- package/lib/components/wallet-trigger.js.map +1 -0
- package/{bundles/types/configs/env/environment.paydock.d.ts → lib/configs/env/env.d.ts} +8 -5
- package/lib/configs/env/env.js +117 -0
- package/lib/configs/env/env.js.map +1 -0
- package/{bundles/types → lib}/configs/sdk.d.ts +2 -3
- package/lib/configs/sdk.js +16 -0
- package/lib/configs/sdk.js.map +1 -0
- package/lib/constants/validators.d.ts +44 -0
- package/lib/constants/validators.js +42 -0
- package/lib/constants/validators.js.map +1 -0
- package/{bundles/types → lib}/external-checkout/builder.d.ts +0 -1
- package/lib/external-checkout/builder.js +45 -0
- package/lib/external-checkout/builder.js.map +1 -0
- package/{bundles/types → lib}/external-checkout/checker.d.ts +0 -1
- package/lib/external-checkout/checker.js +22 -0
- package/lib/external-checkout/checker.js.map +1 -0
- package/lib/external-checkout/index.d.ts +2 -0
- package/lib/external-checkout/index.js +3 -0
- package/lib/external-checkout/index.js.map +1 -0
- package/{bundles/types → lib}/helper/access-token.d.ts +0 -1
- package/lib/helper/access-token.js +44 -0
- package/lib/helper/access-token.js.map +1 -0
- package/{bundles/types → lib}/helper/browser.d.ts +0 -1
- package/lib/helper/browser.js +79 -0
- package/lib/helper/browser.js.map +1 -0
- package/{bundles/types → lib}/helper/event-emitter.d.ts +0 -1
- package/lib/helper/event-emitter.js +23 -0
- package/lib/helper/event-emitter.js.map +1 -0
- package/{bundles/types → lib}/helper/event.d.ts +0 -1
- package/lib/helper/event.js +23 -0
- package/lib/helper/event.js.map +1 -0
- package/{bundles/types → lib}/helper/ms.d.ts +0 -1
- package/lib/helper/ms.js +32 -0
- package/lib/helper/ms.js.map +1 -0
- package/{bundles/types → lib}/helper/object.d.ts +0 -1
- package/lib/helper/object.js +6 -0
- package/lib/helper/object.js.map +1 -0
- package/{bundles/types → lib}/helper/url.d.ts +0 -1
- package/lib/helper/url.js +11 -0
- package/lib/helper/url.js.map +1 -0
- package/{bundles/types → lib}/helper/uuid.d.ts +0 -1
- package/lib/helper/uuid.js +26 -0
- package/lib/helper/uuid.js.map +1 -0
- package/lib/index.d.ts +15 -0
- package/lib/index.js +15 -0
- package/lib/index.js.map +1 -0
- package/{bundles/types → lib}/payment-source/builder.d.ts +0 -1
- package/lib/payment-source/builder.js +49 -0
- package/lib/payment-source/builder.js.map +1 -0
- package/{bundles/types → lib}/payment-source/index.d.ts +0 -1
- package/lib/payment-source/index.js +2 -0
- package/lib/payment-source/index.js.map +1 -0
- package/{bundles/types → lib}/payment-source-widget/html-payment-source-widget.d.ts +17 -14
- package/lib/payment-source-widget/html-payment-source-widget.js +172 -0
- package/lib/payment-source-widget/html-payment-source-widget.js.map +1 -0
- package/{bundles/types → lib}/payment-source-widget/index.d.ts +0 -1
- package/lib/payment-source-widget/index.js +35 -0
- package/lib/payment-source-widget/index.js.map +1 -0
- package/{bundles/types → lib}/payment-source-widget/interfaces.d.ts +0 -1
- package/lib/payment-source-widget/interfaces.js +2 -0
- package/lib/payment-source-widget/interfaces.js.map +1 -0
- package/{bundles/types → lib}/payment-source-widget/payment-source-widget.d.ts +1 -2
- package/lib/payment-source-widget/payment-source-widget.js +142 -0
- package/lib/payment-source-widget/payment-source-widget.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/index.d.ts +0 -1
- package/lib/secure-remote-commerce/index.js +2 -0
- package/lib/secure-remote-commerce/index.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/interfaces.d.ts +5 -6
- package/lib/secure-remote-commerce/interfaces.js +28 -0
- package/lib/secure-remote-commerce/interfaces.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/providers/src-provider.d.ts +0 -1
- package/lib/secure-remote-commerce/providers/src-provider.js +1 -0
- package/lib/secure-remote-commerce/providers/src-provider.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/helper.js +36 -0
- package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/index.d.ts +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/index.js +2 -0
- package/lib/secure-remote-commerce/providers/visa-src/index.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/visa-src.d.ts +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +113 -0
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +10 -0
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +1 -0
- package/{bundles/types → lib}/secure-remote-commerce/secure-remote-commerce.d.ts +1 -2
- package/lib/secure-remote-commerce/secure-remote-commerce.js +239 -0
- package/lib/secure-remote-commerce/secure-remote-commerce.js.map +1 -0
- package/{bundles/types → lib}/vault-display-widget/index.d.ts +0 -1
- package/lib/vault-display-widget/index.js +14 -0
- package/lib/vault-display-widget/index.js.map +1 -0
- package/{bundles/types → lib}/vault-display-widget/vault-display-widget.d.ts +1 -2
- package/lib/vault-display-widget/vault-display-widget.js +99 -0
- package/lib/vault-display-widget/vault-display-widget.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/afterpay.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/afterpay.wallet-service.js +152 -0
- package/lib/wallet-buttons/afterpay.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/apple.wallet-service.d.ts +2 -1
- package/lib/wallet-buttons/apple.wallet-service.js +324 -0
- package/lib/wallet-buttons/apple.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/flypay-v2.wallet-service.d.ts +9 -2
- package/lib/wallet-buttons/flypay-v2.wallet-service.js +165 -0
- package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/flypay.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/flypay.wallet-service.js +117 -0
- package/lib/wallet-buttons/flypay.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/google.wallet-service.d.ts +3 -1
- package/lib/wallet-buttons/google.wallet-service.js +301 -0
- package/lib/wallet-buttons/google.wallet-service.js.map +1 -0
- package/lib/wallet-buttons/helpers/flypay-v2.helper.d.ts +3 -0
- package/lib/wallet-buttons/helpers/flypay-v2.helper.js +151 -0
- package/lib/wallet-buttons/helpers/flypay-v2.helper.js.map +1 -0
- package/lib/wallet-buttons/index.d.ts +127 -0
- package/lib/wallet-buttons/index.js +128 -0
- package/lib/wallet-buttons/index.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/interfaces.d.ts +3 -1
- package/lib/wallet-buttons/interfaces.js +1 -0
- package/lib/wallet-buttons/interfaces.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/mastercard.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/mastercard.wallet-service.js +27 -0
- package/lib/wallet-buttons/mastercard.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/paypal.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/paypal.wallet-service.js +144 -0
- package/lib/wallet-buttons/paypal.wallet-service.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/stripe.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/stripe.wallet-service.js +100 -0
- package/lib/wallet-buttons/stripe.wallet-service.js.map +1 -0
- package/{bundles/types/wallet-buttons/wallet-cba-buttons.d.ts → lib/wallet-buttons/wallet-buttons.d.ts} +92 -115
- package/lib/wallet-buttons/wallet-buttons.js +479 -0
- package/lib/wallet-buttons/wallet-buttons.js.map +1 -0
- package/{bundles/types → lib}/wallet-buttons/wallet-service.d.ts +7 -1
- package/lib/wallet-buttons/wallet-service.js +60 -0
- package/lib/wallet-buttons/wallet-service.js.map +1 -0
- package/{bundles/types → lib}/widget/configuration.d.ts +2 -3
- package/lib/widget/configuration.js +260 -0
- package/lib/widget/configuration.js.map +1 -0
- package/lib/widget/html-multi-widget.d.ts +336 -0
- package/lib/widget/html-multi-widget.js +422 -0
- package/lib/widget/html-multi-widget.js.map +1 -0
- package/{bundles/types → lib}/widget/html-widget.d.ts +1 -2
- package/lib/widget/html-widget.js +127 -0
- package/lib/widget/html-widget.js.map +1 -0
- package/{bundles/types → lib}/widget/index.d.ts +1 -2
- package/lib/widget/index.js +132 -0
- package/lib/widget/index.js.map +1 -0
- package/{bundles/types → lib}/widget/meta.d.ts +0 -1
- package/lib/widget/meta.js +8 -0
- package/lib/widget/meta.js.map +1 -0
- package/{bundles/types → lib}/widget/multi-widget.d.ts +1 -2
- package/lib/widget/multi-widget.js +437 -0
- package/lib/widget/multi-widget.js.map +1 -0
- package/{bundles/types → lib}/widget/style.d.ts +0 -1
- package/lib/widget/style.js +204 -0
- package/lib/widget/style.js.map +1 -0
- package/package.json +42 -164
- package/payment-source-widget.d.ts +1 -0
- package/payment-source-widget.js +1 -0
- package/slate.md +136 -107
- package/tslint.json +129 -0
- package/typings/globals/@auspayplus/open-payments-checkout/index.d.ts +43 -0
- package/typings/globals/jasmine/index.d.ts +576 -0
- package/typings/globals/jasmine-ajax/index.d.ts +83 -0
- package/typings/globals/jquery/index.d.ts +3759 -0
- package/typings/index.d.ts +4 -0
- package/vault-display-widget.d.ts +1 -0
- package/vault-display-widget.js +1 -0
- package/vendors/zipmoney.d.ts +18 -0
- package/vendors/zipmoney.js +2 -0
- package/widget.d.ts +1 -0
- package/widget.js +1 -0
- package/bundles/index.cjs +0 -10674
- package/bundles/index.cjs.d.ts +0 -3163
- package/bundles/index.cjs.map +0 -1
- package/bundles/index.mjs +0 -10642
- package/bundles/index.mjs.d.ts +0 -3163
- package/bundles/index.mjs.map +0 -1
- package/bundles/types/api/api-base.d.ts.map +0 -1
- package/bundles/types/api/api-charge-internal.d.ts.map +0 -1
- package/bundles/types/api/api-charge.d.ts.map +0 -1
- package/bundles/types/api/api-internal.d.ts.map +0 -1
- package/bundles/types/api/api-service-internal.d.ts.map +0 -1
- package/bundles/types/api/api.d.ts.map +0 -1
- package/bundles/types/api/index.d.ts +0 -2
- package/bundles/types/api/index.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/index.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/services/index.d.ts.map +0 -1
- package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +0 -1
- package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +0 -1
- package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/checkout-button.d.ts.map +0 -1
- package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +0 -1
- package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +0 -1
- package/bundles/types/checkout-button/index.d.ts.map +0 -1
- package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +0 -1
- package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/base.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/index.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/runner/redirect.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/index.d.ts +0 -4
- package/bundles/types/checkout-button/zipmoney/index.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +0 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +0 -1
- package/bundles/types/components/ability-guard.d.ts.map +0 -1
- package/bundles/types/components/background.d.ts.map +0 -1
- package/bundles/types/components/container.d.ts.map +0 -1
- package/bundles/types/components/dispatcher.d.ts.map +0 -1
- package/bundles/types/components/element-style.d.ts.map +0 -1
- package/bundles/types/components/flypay-iframe-event.d.ts.map +0 -1
- package/bundles/types/components/form-interceptor.d.ts.map +0 -1
- package/bundles/types/components/http-core.d.ts.map +0 -1
- package/bundles/types/components/iframe-event.d.ts.map +0 -1
- package/bundles/types/components/iframe.d.ts.map +0 -1
- package/bundles/types/components/link.d.ts.map +0 -1
- package/bundles/types/components/loader.d.ts.map +0 -1
- package/bundles/types/components/param.d.ts.map +0 -1
- package/bundles/types/components/popup.d.ts.map +0 -1
- package/bundles/types/components/storage-dispatcher.d.ts.map +0 -1
- package/bundles/types/components/trigger.d.ts.map +0 -1
- package/bundles/types/components/vault-display-iframe-event.d.ts.map +0 -1
- package/bundles/types/components/wallet-background.d.ts.map +0 -1
- package/bundles/types/components/wallet-trigger.d.ts.map +0 -1
- package/bundles/types/configs/env/environment.cba.d.ts +0 -29
- package/bundles/types/configs/env/environment.cba.d.ts.map +0 -1
- package/bundles/types/configs/env/environment.interface.d.ts +0 -12
- package/bundles/types/configs/env/environment.interface.d.ts.map +0 -1
- package/bundles/types/configs/env/environment.paydock.d.ts.map +0 -1
- package/bundles/types/configs/env/index.d.ts +0 -3
- package/bundles/types/configs/env/index.d.ts.map +0 -1
- package/bundles/types/configs/sdk.d.ts.map +0 -1
- package/bundles/types/external-checkout/builder.d.ts.map +0 -1
- package/bundles/types/external-checkout/checker.d.ts.map +0 -1
- package/bundles/types/external-checkout/index.d.ts +0 -3
- package/bundles/types/external-checkout/index.d.ts.map +0 -1
- package/bundles/types/helper/access-token.d.ts.map +0 -1
- package/bundles/types/helper/browser.d.ts.map +0 -1
- package/bundles/types/helper/event-emitter.d.ts.map +0 -1
- package/bundles/types/helper/event.d.ts.map +0 -1
- package/bundles/types/helper/ms.d.ts.map +0 -1
- package/bundles/types/helper/object.d.ts.map +0 -1
- package/bundles/types/helper/url.d.ts.map +0 -1
- package/bundles/types/helper/uuid.d.ts.map +0 -1
- package/bundles/types/index-cba.d.ts +0 -13
- package/bundles/types/index-cba.d.ts.map +0 -1
- package/bundles/types/index.d.ts +0 -14
- package/bundles/types/index.d.ts.map +0 -1
- package/bundles/types/payment-source/builder.d.ts.map +0 -1
- package/bundles/types/payment-source/index.d.ts.map +0 -1
- package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +0 -1
- package/bundles/types/payment-source-widget/index.d.ts.map +0 -1
- package/bundles/types/payment-source-widget/interfaces.d.ts.map +0 -1
- package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/index.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +0 -1
- package/bundles/types/vault-display-widget/index.d.ts.map +0 -1
- package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/index-cba.d.ts +0 -2
- package/bundles/types/wallet-buttons/index-cba.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/index.d.ts +0 -2
- package/bundles/types/wallet-buttons/index.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/interfaces.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts +0 -366
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +0 -1
- package/bundles/types/wallet-buttons/wallet-service.d.ts.map +0 -1
- package/bundles/types/widget/configuration.d.ts.map +0 -1
- package/bundles/types/widget/html-multi-widget.d.ts +0 -266
- package/bundles/types/widget/html-multi-widget.d.ts.map +0 -1
- package/bundles/types/widget/html-widget.d.ts.map +0 -1
- package/bundles/types/widget/index.d.ts.map +0 -1
- package/bundles/types/widget/meta.d.ts.map +0 -1
- package/bundles/types/widget/multi-widget.d.ts.map +0 -1
- package/bundles/types/widget/style.d.ts.map +0 -1
- package/bundles/widget.umd.js.d.ts +0 -3163
- package/bundles/widget.umd.js.map +0 -1
- package/bundles/widget.umd.js.min.d.ts +0 -3163
- package/bundles/widget.umd.min.js.map +0 -1
- package/docs/api-canvas3ds.md +0 -158
- package/docs/api-checkout-button.md +0 -912
- package/docs/api-examples.md +0 -65
- package/docs/api-ps-widget.md +0 -585
- package/docs/api-vault-display.md +0 -94
- package/docs/api-widget.md +0 -2444
- package/docs/api-wrapper.md +0 -78
- package/docs/canvas3ds-examples.md +0 -242
- package/docs/cba-header.md +0 -13
- package/docs/cba-license.md +0 -2
- package/docs/checkout-examples.md +0 -248
- package/docs/header.md +0 -15
- package/docs/html/layout.html +0 -78
- package/docs/html/marked.js +0 -23
- package/docs/html/style.css +0 -365
- package/docs/install/npm.content.md +0 -16
- package/docs/install/npm.example.md +0 -24
- package/docs/install/umd.content.md +0 -20
- package/docs/install/umd.example.md +0 -6
- package/docs/install.md +0 -43
- package/docs/install.readme.t.md +0 -17
- package/docs/install.slate.t.md +0 -17
- package/docs/license.md +0 -2
- package/docs/partials/header.hbs +0 -3
- package/docs/ps-examples.md +0 -129
- package/docs/secure-remote-commerce-examples.md +0 -258
- package/docs/secure-remote-commerce.md +0 -265
- package/docs/vault-display-example.md +0 -132
- package/docs/wallet-buttons-examples.md +0 -580
- package/docs/wallet-buttons.md +0 -424
- package/docs/wallet-cba-buttons-examples.md +0 -388
- package/docs/widget-examples.md +0 -134
|
@@ -12,7 +12,7 @@ declare const PopupRunner_base: {
|
|
|
12
12
|
setBackgroundTitle(text: string): void;
|
|
13
13
|
setBackgroundDescription(text: string): void;
|
|
14
14
|
turnOffBackdrop(): void;
|
|
15
|
-
widgetEnv: import("../../configs/env").Env;
|
|
15
|
+
widgetEnv: import("../../configs/env/env").Env;
|
|
16
16
|
setEnv(env: string, alias?: string): void;
|
|
17
17
|
};
|
|
18
18
|
} & import("./base.runner").Constructable<import("./base.runner").BaseRunner>;
|
|
@@ -32,4 +32,3 @@ export declare abstract class PopupRunner extends PopupRunner_base {
|
|
|
32
32
|
setEnv(env: string, alias?: string): void;
|
|
33
33
|
}
|
|
34
34
|
export {};
|
|
35
|
-
//# sourceMappingURL=popup.runner.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ContextualRunner } from './contextual.runner';
|
|
2
|
+
import { Dispatcher } from '../../components/dispatcher';
|
|
3
|
+
import { Popup } from '../../components/popup';
|
|
4
|
+
import { Browser } from '../../helper/browser';
|
|
5
|
+
export class PopupRunner extends ContextualRunner() {
|
|
6
|
+
constructor(publicKey) {
|
|
7
|
+
super();
|
|
8
|
+
this.publicKey = publicKey;
|
|
9
|
+
this.checkout = null;
|
|
10
|
+
this.dispatcher = new Dispatcher('checkout.paydock');
|
|
11
|
+
setTimeout(() => this.dispatcher.restartDispatcher(), 200);
|
|
12
|
+
this.popup = new Popup();
|
|
13
|
+
}
|
|
14
|
+
run() {
|
|
15
|
+
if (this.isRunning())
|
|
16
|
+
return;
|
|
17
|
+
this.popup.init();
|
|
18
|
+
this.background.initControl();
|
|
19
|
+
}
|
|
20
|
+
isRunning() {
|
|
21
|
+
return this.popup.isExist();
|
|
22
|
+
}
|
|
23
|
+
next(checkoutData) {
|
|
24
|
+
this.checkout = checkoutData;
|
|
25
|
+
if (!Browser.isSupportPopUp())
|
|
26
|
+
window.localStorage.setItem('paydock_checkout_token', JSON.stringify(this.checkout));
|
|
27
|
+
this.popup.redirect(this.checkout.link);
|
|
28
|
+
}
|
|
29
|
+
continue() {
|
|
30
|
+
this.popup.focus();
|
|
31
|
+
}
|
|
32
|
+
stop() {
|
|
33
|
+
this.popup.close();
|
|
34
|
+
}
|
|
35
|
+
onStop(cb) {
|
|
36
|
+
this.popup.onClose(() => {
|
|
37
|
+
this.background.clear();
|
|
38
|
+
this.checkout = null;
|
|
39
|
+
cb();
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
onCheckout(event, cb) {
|
|
43
|
+
this.dispatcher.on(event, (data) => {
|
|
44
|
+
if (this.checkout && this.checkout.reference_id === data.reference_id) {
|
|
45
|
+
this.background.clear();
|
|
46
|
+
cb(this.checkout);
|
|
47
|
+
}
|
|
48
|
+
else if (!Browser.isSupportPopUp()) {
|
|
49
|
+
let item = window.localStorage.getItem('paydock_checkout_token');
|
|
50
|
+
if (!item)
|
|
51
|
+
return;
|
|
52
|
+
let checkout = JSON.parse(item);
|
|
53
|
+
if (checkout && checkout.reference_id === data.reference_id) {
|
|
54
|
+
window.localStorage.removeItem('paydock_checkout_token');
|
|
55
|
+
this.checkout = checkout;
|
|
56
|
+
this.background.clear();
|
|
57
|
+
cb(this.checkout);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
setEnv(env, alias) {
|
|
63
|
+
super.setEnv(env, alias);
|
|
64
|
+
this.dispatcher.setEnv(env, alias);
|
|
65
|
+
this.popup.setEnv(env);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=../../../src/lib/checkout-button/runner/popup.runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popup.runner.js","sourceRoot":"","sources":["../../../checkout-button/runner/popup.runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAmB,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAM/C,MAAM,OAAgB,WAAY,SAAQ,gBAAgB,EAAE;IA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declare function RedirectRunner<BR extends Constructable>(Runner?: BR): {
|
|
|
10
10
|
setRedirectUrl(url: string): void;
|
|
11
11
|
getRedirectUrl(): string;
|
|
12
12
|
error(error: string, code: string, callback: any): void;
|
|
13
|
-
widgetEnv: import("../../configs/env").Env;
|
|
13
|
+
widgetEnv: import("../../configs/env/env").Env;
|
|
14
14
|
setEnv(env: string, alias?: string): void;
|
|
15
15
|
};
|
|
16
16
|
} & BR;
|
|
17
|
-
//# sourceMappingURL=redirect.runner.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseRunner } from './base.runner';
|
|
2
|
+
export function RedirectRunner(Runner = BaseRunner) {
|
|
3
|
+
return class extends Runner {
|
|
4
|
+
setRedirectUrl(url) {
|
|
5
|
+
this.merchantRedirectUrl = url;
|
|
6
|
+
}
|
|
7
|
+
getRedirectUrl() {
|
|
8
|
+
return this.merchantRedirectUrl;
|
|
9
|
+
}
|
|
10
|
+
error(error, code, callback) {
|
|
11
|
+
callback(false);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=../../../src/lib/checkout-button/runner/redirect.runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redirect.runner.js","sourceRoot":"","sources":["../../../checkout-button/runner/redirect.runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA0B,MAAM,eAAe,CAAC;AAUnE,MAAM,UAAU,cAAc,CAA2B,SAAa,UAAgB;IAClF,OAAO,KAAM,SAAQ,MAAM;QAIhB,cAAc,CAAC,GAAW;YAC7B,IAAI,CAAC,mBAAmB,GAAG,GAAG,CAAC;QACnC,CAAC;QAEM,cAAc;YACjB,OAAO,IAAI,CAAC,mBAAmB,CAAC;QACpC,CAAC;QAEM,KAAK,CAAC,KAAa,EAAE,IAAY,EAAE,QAAQ;YAC9C,QAAQ,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC;KACJ,CAAA;AACL,CAAC"}
|
|
@@ -19,7 +19,7 @@ declare class ZipmoneyCheckoutButton extends CheckoutButton {
|
|
|
19
19
|
protected publicKey: string;
|
|
20
20
|
protected gatewayId: string;
|
|
21
21
|
protected mode: CHECKOUT_MODE;
|
|
22
|
-
constructor(selector: string, publicKey: string, gatewayId?: string, mode?: CHECKOUT_MODE);
|
|
22
|
+
/** @constructs */ constructor(selector: string, publicKey: string, gatewayId?: string, mode?: CHECKOUT_MODE);
|
|
23
23
|
/**
|
|
24
24
|
* Method for setting suspended redirect uri. Redirect after referred checkout
|
|
25
25
|
*
|
|
@@ -46,4 +46,3 @@ declare class ZipmoneyCheckoutButton extends CheckoutButton {
|
|
|
46
46
|
protected buildAdditionalParams(): ZipmoneyRunnerParams;
|
|
47
47
|
}
|
|
48
48
|
export { ZipmoneyCheckoutButton };
|
|
49
|
-
//# sourceMappingURL=zipmoney-checkout-button.d.ts.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { CheckoutButton } from '../checkout-button';
|
|
2
|
+
import { GATEWAY_TYPE, CHECKOUT_MODE } from '../checkout-button.interface';
|
|
3
|
+
import { isContextualRunner } from '../runner';
|
|
4
|
+
/**
|
|
5
|
+
* Class ZipmoneyCheckoutButton is wrapper of CheckoutButton transform usual button into checkout
|
|
6
|
+
*
|
|
7
|
+
* @extends CheckoutButton
|
|
8
|
+
*
|
|
9
|
+
* @constructor
|
|
10
|
+
*
|
|
11
|
+
* @param {string} selector - Selector of html element.
|
|
12
|
+
* @param {string} publicKey - PayDock users public key
|
|
13
|
+
* @param {string} [gatewayId=default] - PayDock's gatewayId. By default or if put 'default', it will use the selected default gateway
|
|
14
|
+
* @param {string} [gatewayId=default] - Checkout mode, it could be set to 'contextual' or 'redirect'. By default it 'contextual'
|
|
15
|
+
* @example
|
|
16
|
+
* var widget = new ZipmoneyCheckoutButton('#button', 'publicKey','gatewayId');
|
|
17
|
+
*/
|
|
18
|
+
class ZipmoneyCheckoutButton extends CheckoutButton {
|
|
19
|
+
/** @constructs */ // constructs added for correct parse classes jsdoc2md
|
|
20
|
+
constructor(selector, publicKey, gatewayId = 'default', mode = CHECKOUT_MODE.CONTEXTUAL) {
|
|
21
|
+
super(selector, publicKey, gatewayId, GATEWAY_TYPE.ZIPMONEY, mode);
|
|
22
|
+
this.publicKey = publicKey;
|
|
23
|
+
this.gatewayId = gatewayId;
|
|
24
|
+
this.mode = mode;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Method for setting suspended redirect uri. Redirect after referred checkout
|
|
28
|
+
*
|
|
29
|
+
* The URI is used for a redirect after the checkout is complete.
|
|
30
|
+
* This can be provided, even if using in-context checkout (sdk). By default, the standard styled page will be used.
|
|
31
|
+
* If using in-context (sdk) we will not automatically redirect to this URI.
|
|
32
|
+
*
|
|
33
|
+
|
|
34
|
+
* @param {uri} string - uri for suspended redirect (by default)
|
|
35
|
+
*/
|
|
36
|
+
setSuspendedRedirectUri(uri) {
|
|
37
|
+
super.setSuspendedRedirectUri(uri);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Method for setting the merchant redirect URL.
|
|
41
|
+
* The merchant's customers would be redirected to the specified URL
|
|
42
|
+
* at the end of ZipMoney checkout flow.
|
|
43
|
+
*
|
|
44
|
+
* Once the redirect URL would be set, the checkout flow would be immediately switched
|
|
45
|
+
* from 'contextual' mode to the 'redirect' mode.
|
|
46
|
+
* The merchant's customer would be automatically redirected to this URL after the checkout is complete.
|
|
47
|
+
*
|
|
48
|
+
* @param {url} string - URL for redirect
|
|
49
|
+
*/
|
|
50
|
+
setRedirectUrl(url) {
|
|
51
|
+
if (isContextualRunner(this.runner)) {
|
|
52
|
+
super.chooseRunner(GATEWAY_TYPE.ZIPMONEY, CHECKOUT_MODE.REDIRECT);
|
|
53
|
+
super.setEnv(this.env, this.alias);
|
|
54
|
+
}
|
|
55
|
+
super.setRedirectUrl(url);
|
|
56
|
+
}
|
|
57
|
+
buildAdditionalParams() {
|
|
58
|
+
const defaultParams = super.buildAdditionalParams();
|
|
59
|
+
const params = Object.assign(Object.assign({}, defaultParams), { public_key: this.publicKey, gateway_id: this.gatewayId });
|
|
60
|
+
return params;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export { ZipmoneyCheckoutButton };
|
|
64
|
+
//# sourceMappingURL=../../../src/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zipmoney-checkout-button.js","sourceRoot":"","sources":["../../../checkout-button/zipmoney/zipmoney-checkout-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C;;;;;;;;;;;;;GAaG;AACH,MAAM,sBAAuB,SAAQ,cAAc;IAE/C,kBAAkB,CAAC,sDAAsD;IACzE,YACI,QAAgB,EACN,SAAiB,EACjB,YAAoB,SAAS,EAC7B,OAAsB,aAAa,CAAC,UAAU;QAExD,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;QAJxD,cAAS,GAAT,SAAS,CAAQ;QACjB,cAAS,GAAT,SAAS,CAAoB;QAC7B,SAAI,GAAJ,IAAI,CAA0C;IAG5D,CAAC;IAED;;;;;;;;;OASG;IACI,uBAAuB,CAAC,GAAW;QACtC,KAAK,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACvC,CAAC;IAED;;;;;;;;;;OAUG;IACI,cAAc,CAAC,GAAW;QAC7B,IAAI,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YACjC,KAAK,CAAC,YAAY,CAAC,YAAY,CAAC,QAAQ,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;YAClE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;SACtC;QACD,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAES,qBAAqB;QAC3B,MAAM,aAAa,GAAG,KAAK,CAAC,qBAAqB,EAAE,CAAC;QACpD,MAAM,MAAM,mCACL,aAAa,KAChB,UAAU,EAAE,IAAI,CAAC,SAAS,EAC1B,UAAU,EAAE,IAAI,CAAC,SAAS,GAC7B,CAAA;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -14,7 +14,7 @@ declare const ZipmoneyContextualRunner_base: {
|
|
|
14
14
|
setBackgroundTitle(text: string): void;
|
|
15
15
|
setBackgroundDescription(text: string): void;
|
|
16
16
|
turnOffBackdrop(): void;
|
|
17
|
-
widgetEnv: import("../../configs/env").Env;
|
|
17
|
+
widgetEnv: import("../../configs/env/env").Env;
|
|
18
18
|
setEnv(env: string, alias?: string): void;
|
|
19
19
|
};
|
|
20
20
|
} & typeof ZipmoneyRunner;
|
|
@@ -36,4 +36,3 @@ export declare class ZipmoneyContextualRunner extends ZipmoneyContextualRunner_b
|
|
|
36
36
|
}): void;
|
|
37
37
|
}
|
|
38
38
|
export {};
|
|
39
|
-
//# sourceMappingURL=zipmoney-contextual.runner.d.ts.map
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import '../../../vendors/zipmoney';
|
|
2
|
+
import { ContextualRunner, RUNNER_EVENT } from '../runner/contextual.runner';
|
|
3
|
+
import { ZipmoneyRunner, LOG_PREFIX } from './zipmoney.runner';
|
|
4
|
+
import { EventEmitter } from '../../helper/event-emitter';
|
|
5
|
+
import { ZIPMONEY_DEFAULT_SUSPENDED_URL } from './zipmoney.config';
|
|
6
|
+
export class ZipmoneyContextualRunner extends ContextualRunner(ZipmoneyRunner) {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.runs = false;
|
|
10
|
+
this.eventEmitter = new EventEmitter();
|
|
11
|
+
}
|
|
12
|
+
run() {
|
|
13
|
+
this.runs = true;
|
|
14
|
+
this.background.initLoader();
|
|
15
|
+
}
|
|
16
|
+
isRunning() {
|
|
17
|
+
return this.runs;
|
|
18
|
+
}
|
|
19
|
+
next(checkoutData) {
|
|
20
|
+
this.background.clear();
|
|
21
|
+
this.checkout = checkoutData;
|
|
22
|
+
const checkoutUri = this.getCheckoutUri(this.checkout.link);
|
|
23
|
+
Zip.Checkout.init({
|
|
24
|
+
checkoutUri,
|
|
25
|
+
onComplete: (args) => this.eventHandler(args),
|
|
26
|
+
onError: (args) => this.eventHandler(args),
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
getSuccessRedirectUri() {
|
|
30
|
+
return this.suspendedRedirectUri ? this.suspendedRedirectUri : this.widgetEnv.getConf().url + String(ZIPMONEY_DEFAULT_SUSPENDED_URL);
|
|
31
|
+
}
|
|
32
|
+
getErrorRedirectUri() {
|
|
33
|
+
return this.getSuccessRedirectUri();
|
|
34
|
+
}
|
|
35
|
+
stop() {
|
|
36
|
+
super.stop();
|
|
37
|
+
this.runs = false;
|
|
38
|
+
const element = document.querySelector('.zipmoney-overlay');
|
|
39
|
+
if (element)
|
|
40
|
+
element.remove();
|
|
41
|
+
this.eventEmitter.emit(RUNNER_EVENT.CLOSE);
|
|
42
|
+
}
|
|
43
|
+
onStop(cb) {
|
|
44
|
+
this.eventEmitter.subscribe(RUNNER_EVENT.CLOSE, () => {
|
|
45
|
+
this.background.clear();
|
|
46
|
+
cb();
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
onCheckout(event, cb) {
|
|
50
|
+
this.eventEmitter.subscribe(event, () => {
|
|
51
|
+
cb(this.checkout);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
eventHandler(args) {
|
|
55
|
+
this.runs = false;
|
|
56
|
+
switch (args.state) {
|
|
57
|
+
case "approved" /* APPROVED */:
|
|
58
|
+
this.eventEmitter.emit(RUNNER_EVENT.CLOSE);
|
|
59
|
+
this.eventEmitter.emit(RUNNER_EVENT.SUCCESS);
|
|
60
|
+
break;
|
|
61
|
+
case "declined" /* DECLINED */:
|
|
62
|
+
this.eventEmitter.emit(RUNNER_EVENT.CLOSE);
|
|
63
|
+
this.eventEmitter.emit(RUNNER_EVENT.DECLINED);
|
|
64
|
+
break;
|
|
65
|
+
case "cancelled" /* CANCELLED */:
|
|
66
|
+
this.eventEmitter.emit(RUNNER_EVENT.CLOSE);
|
|
67
|
+
break;
|
|
68
|
+
case "referred" /* REFERRED */:
|
|
69
|
+
this.eventEmitter.emit(RUNNER_EVENT.CLOSE);
|
|
70
|
+
this.eventEmitter.emit(RUNNER_EVENT.REFERRED);
|
|
71
|
+
break;
|
|
72
|
+
default:
|
|
73
|
+
console.warn(`${LOG_PREFIX} Unknown gateway status.`);
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=../../../src/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zipmoney-contextual.runner.js","sourceRoot":"","sources":["../../../checkout-button/zipmoney/zipmoney-contextual.runner.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAqB,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAEnE,MAAM,OAAO,wBAAyB,SAAQ,gBAAgB,CAAC,cAAc,CAAC;IAK1E;QACI,KAAK,EAAE,CAAC;QAJF,SAAI,GAAG,KAAK,CAAC;QAKnB,IAAI,CAAC,YAAY,GAA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 +9,7 @@ declare const ZipmoneyRedirectRunner_base: {
|
|
|
9
9
|
setRedirectUrl(url: string): void;
|
|
10
10
|
getRedirectUrl(): string;
|
|
11
11
|
error(error: string, code: string, callback: any): void;
|
|
12
|
-
widgetEnv: import("../../configs/env").Env;
|
|
12
|
+
widgetEnv: import("../../configs/env/env").Env;
|
|
13
13
|
setEnv(env: string, alias?: string): void;
|
|
14
14
|
};
|
|
15
15
|
} & typeof ZipmoneyRunner;
|
|
@@ -23,4 +23,3 @@ export declare class ZipmoneyRedirectRunner extends ZipmoneyRedirectRunner_base
|
|
|
23
23
|
setEnv(env: string, alias?: string): void;
|
|
24
24
|
}
|
|
25
25
|
export {};
|
|
26
|
-
//# sourceMappingURL=zipmoney-redirect.runner.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import '../../../vendors/zipmoney';
|
|
2
|
+
import { RedirectRunner } from '../runner';
|
|
3
|
+
import { ZipmoneyRunner } from './zipmoney.runner';
|
|
4
|
+
import { StorageDispatcher, StorageDataIntent } from '../../components/storage-dispatcher';
|
|
5
|
+
import { ZIPMONEY_PROXY_REDIRECT_URL, ZIPMONEY_MESSAGE_SOURCE } from './zipmoney.config';
|
|
6
|
+
export class ZipmoneyRedirectRunner extends RedirectRunner(ZipmoneyRunner) {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.storageDispatcher = new StorageDispatcher(ZIPMONEY_MESSAGE_SOURCE);
|
|
10
|
+
}
|
|
11
|
+
getProxyRedirectUrl() {
|
|
12
|
+
return this.widgetEnv.getConf().url + ZIPMONEY_PROXY_REDIRECT_URL;
|
|
13
|
+
}
|
|
14
|
+
next(checkout, params) {
|
|
15
|
+
this.storageDispatcher.create(() => {
|
|
16
|
+
const widgetSessionData = {
|
|
17
|
+
merchant_redirect_url: this.getRedirectUrl(),
|
|
18
|
+
checkout_token: checkout.token,
|
|
19
|
+
public_key: params.public_key,
|
|
20
|
+
gateway_id: params.gateway_id,
|
|
21
|
+
};
|
|
22
|
+
this.storageDispatcher.push({ intent: StorageDataIntent.WIDGET_SESSION, data: widgetSessionData }, {
|
|
23
|
+
onSuccess: () => {
|
|
24
|
+
const checkoutUri = this.getCheckoutUri(checkout.link);
|
|
25
|
+
Zip.Checkout.init({
|
|
26
|
+
checkoutUri: checkoutUri,
|
|
27
|
+
redirect: true,
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
onError: () => {
|
|
31
|
+
console.error('Error initializing Zip Checkout');
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
// for backward compatibility
|
|
37
|
+
getSuccessRedirectUri() {
|
|
38
|
+
return this.getProxyRedirectUrl();
|
|
39
|
+
}
|
|
40
|
+
// for backward compatibility
|
|
41
|
+
getErrorRedirectUri() {
|
|
42
|
+
return this.getProxyRedirectUrl();
|
|
43
|
+
}
|
|
44
|
+
setEnv(env, alias) {
|
|
45
|
+
super.setEnv(env, alias);
|
|
46
|
+
this.storageDispatcher.setEnv(env, alias);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=../../../src/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zipmoney-redirect.runner.js","sourceRoot":"","sources":["../../../checkout-button/zipmoney/zipmoney-redirect.runner.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAmB,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAC,MAAM,mBAAmB,CAAC;AAGxF,MAAM,OAAO,sBAAuB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAGtE;QACI,KAAK,EAAE,CAAC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AG,EAAE,KAAK,CAAC,CAAC;QACzB,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;CACJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export declare const ZIPMONEY_PROXY_REDIRECT_URL = "/checkout/zipmoney/response";
|
|
2
2
|
export declare const ZIPMONEY_DEFAULT_SUSPENDED_URL = "/checkout/zipmoney/suspended";
|
|
3
3
|
export declare const ZIPMONEY_MESSAGE_SOURCE = "zipmoney.checkout.paydock";
|
|
4
|
-
//# sourceMappingURL=zipmoney.config.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export const ZIPMONEY_PROXY_REDIRECT_URL = '/checkout/zipmoney/response';
|
|
2
|
+
export const ZIPMONEY_DEFAULT_SUSPENDED_URL = '/checkout/zipmoney/suspended';
|
|
3
|
+
export const ZIPMONEY_MESSAGE_SOURCE = 'zipmoney.checkout.paydock';
|
|
4
|
+
//# sourceMappingURL=../../../src/lib/checkout-button/zipmoney/zipmoney.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zipmoney.config.js","sourceRoot":"","sources":["../../../checkout-button/zipmoney/zipmoney.config.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,2BAA2B,GAAG,6BAA6B,CAAC;AAEzE,MAAM,CAAC,MAAM,8BAA8B,GAAG,8BAA8B,CAAC;AAE7E,MAAM,CAAC,MAAM,uBAAuB,GAAG,2BAA2B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseRunner, IRunner } from '../runner';
|
|
2
|
-
import { Env } from '../../configs/env';
|
|
2
|
+
import { Env } from '../../configs/env/env';
|
|
3
3
|
export declare const LOG_PREFIX = "[CheckoutButton:Zipmoney]";
|
|
4
4
|
export declare class ZipmoneyRunner extends BaseRunner implements Partial<IRunner> {
|
|
5
5
|
protected apiEnv: Env;
|
|
@@ -7,4 +7,3 @@ export declare class ZipmoneyRunner extends BaseRunner implements Partial<IRunne
|
|
|
7
7
|
setEnv(env: string, alias?: string): void;
|
|
8
8
|
protected getCheckoutUri(redirectUri: string): string;
|
|
9
9
|
}
|
|
10
|
-
//# sourceMappingURL=zipmoney.runner.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseRunner } from '../runner';
|
|
2
|
+
import { API_URL, Env } from '../../configs/env/env';
|
|
3
|
+
import { Url } from '../../helper/url';
|
|
4
|
+
const ECHO_URI = '/v1/echo';
|
|
5
|
+
export const LOG_PREFIX = '[CheckoutButton:Zipmoney]';
|
|
6
|
+
export class ZipmoneyRunner extends BaseRunner {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.apiEnv = new Env(API_URL);
|
|
10
|
+
}
|
|
11
|
+
setEnv(env, alias) {
|
|
12
|
+
super.setEnv(env, alias);
|
|
13
|
+
this.apiEnv.setEnv(env, alias);
|
|
14
|
+
}
|
|
15
|
+
getCheckoutUri(redirectUri) {
|
|
16
|
+
return this.apiEnv.getConf().url + ECHO_URI + '?' + Url.serialize({
|
|
17
|
+
json_body: JSON.stringify({
|
|
18
|
+
redirect_uri: redirectUri,
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=../../../src/lib/checkout-button/zipmoney/zipmoney.runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zipmoney.runner.js","sourceRoot":"","sources":["../../../checkout-button/zipmoney/zipmoney.runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAW,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC,MAAM,QAAQ,GAAG,UAAU,CAAC;AAE5B,MAAM,CAAC,MAAM,UAAU,GAAG,2BAA2B,CAAC;AAEtD,MAAM,OAAO,cAAe,SAAQ,UAAU;IAG1C;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAEM,MAAM,CAAC,GAAW,EAAE,KAAc;QACrC,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACzB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC;IAES,cAAc,CAAC,WAAmB;QACxC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,GAAG,QAAQ,GAAG,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC;YAC9D,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC;gBACtB,YAAY,EAAE,WAAW;aAC5B,CAAC;SACL,CAAC,CAAC;IACP,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=../../../src/lib/checkout-button/zipmoney/zipmoney.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zipmoney.types.js","sourceRoot":"","sources":["../../../checkout-button/zipmoney/zipmoney.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export var ABILITY;
|
|
2
|
+
(function (ABILITY) {
|
|
3
|
+
ABILITY[ABILITY["POPUP_CLOSE"] = 0] = "POPUP_CLOSE";
|
|
4
|
+
ABILITY[ABILITY["BACKDROP_DISPLAY_CONTINUE"] = 1] = "BACKDROP_DISPLAY_CONTINUE";
|
|
5
|
+
ABILITY[ABILITY["POPUP_FOCUS"] = 2] = "POPUP_FOCUS";
|
|
6
|
+
})(ABILITY || (ABILITY = {}));
|
|
7
|
+
;
|
|
8
|
+
const GATEWAY = {
|
|
9
|
+
PAYPAL_CLASSIC: 'PaypalClassic',
|
|
10
|
+
AFTERPAY: 'Afterpay',
|
|
11
|
+
ZIP_MONEY: 'ZipMoney',
|
|
12
|
+
};
|
|
13
|
+
const GatewayAbilityMaps = [
|
|
14
|
+
{
|
|
15
|
+
gateway: '*',
|
|
16
|
+
abilities: [ABILITY.BACKDROP_DISPLAY_CONTINUE, ABILITY.POPUP_CLOSE, ABILITY.POPUP_FOCUS],
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
gateway: GATEWAY.ZIP_MONEY,
|
|
20
|
+
abilities: [],
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
export class AbilityGuard {
|
|
24
|
+
constructor() {
|
|
25
|
+
this.usedGateway = null;
|
|
26
|
+
}
|
|
27
|
+
useGateway(gateway) {
|
|
28
|
+
this.usedGateway = gateway;
|
|
29
|
+
}
|
|
30
|
+
reset() {
|
|
31
|
+
this.usedGateway = null;
|
|
32
|
+
}
|
|
33
|
+
isAllow(ability) {
|
|
34
|
+
let gatewayAbility = null;
|
|
35
|
+
for (let item of GatewayAbilityMaps) {
|
|
36
|
+
if (item.gateway === this.usedGateway)
|
|
37
|
+
gatewayAbility = item;
|
|
38
|
+
}
|
|
39
|
+
if (!gatewayAbility)
|
|
40
|
+
gatewayAbility = GatewayAbilityMaps[0];
|
|
41
|
+
return !!(ABILITY[ability] in gatewayAbility.abilities);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=../../src/lib/components/ability-guard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ability-guard.js","sourceRoot":"","sources":["../../components/ability-guard.ts"],"names":[],"mappings":"AAKA,MAAM,CAAN,IAAY,OAIX;AAJD,WAAY,OAAO;IACf,mDAAW,CAAA;IACX,+EAAyB,CAAA;IACzB,mDAAW,CAAA;AACf,CAAC,EAJW,OAAO,KAAP,OAAO,QAIlB;AAAA,CAAC;AAEF,MAAM,OAAO,GAAG;IACZ,cAAc,EAAE,eAAe;IAC/B,QAAQ,EAAE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