@paydock/client-sdk 1.103.1 → 1.104.1-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 +102 -104
- package/bundles/index.cjs +10674 -0
- package/bundles/index.cjs.d.ts +3163 -0
- package/bundles/index.cjs.map +1 -0
- package/bundles/index.mjs +10642 -0
- package/bundles/index.mjs.d.ts +3163 -0
- package/bundles/index.mjs.map +1 -0
- package/{lib → bundles/types}/api/api-base.d.ts +2 -1
- package/bundles/types/api/api-base.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api-charge-internal.d.ts +1 -0
- package/bundles/types/api/api-charge-internal.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api-charge.d.ts +1 -0
- package/bundles/types/api/api-charge.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api-internal.d.ts +1 -0
- package/bundles/types/api/api-internal.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api-service-internal.d.ts +1 -0
- package/bundles/types/api/api-service-internal.d.ts.map +1 -0
- package/{lib → bundles/types}/api/api.d.ts +1 -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/{lib → bundles/types}/canvas-3ds/canvas-3ds.d.ts +1 -0
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/index.d.ts +1 -0
- package/bundles/types/canvas-3ds/index.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/services/gpayments-service.d.ts +1 -0
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/services/index.d.ts +1 -0
- package/bundles/types/canvas-3ds/services/index.d.ts.map +1 -0
- package/{lib → bundles/types}/canvas-3ds/services/standalone3ds-service.d.ts +1 -0
- package/bundles/types/canvas-3ds/services/standalone3ds-service.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -0
- package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/afterpay/afterpay.runner.d.ts +1 -0
- package/bundles/types/checkout-button/afterpay/afterpay.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/checkout-button.d.ts +1 -0
- package/bundles/types/checkout-button/checkout-button.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/checkout-button.interface.d.ts +1 -0
- package/bundles/types/checkout-button/checkout-button.interface.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/checkout-contextual-handler.d.ts +1 -0
- package/bundles/types/checkout-button/checkout-contextual-handler.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/index.d.ts +2 -1
- package/bundles/types/checkout-button/index.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/paypal/paypal-checkout-button.d.ts +1 -0
- package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/paypal/paypal.runner.d.ts +1 -0
- package/bundles/types/checkout-button/paypal/paypal.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/base.runner.d.ts +4 -3
- package/bundles/types/checkout-button/runner/base.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/contextual.runner.d.ts +2 -1
- package/bundles/types/checkout-button/runner/contextual.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/index.d.ts +1 -0
- package/bundles/types/checkout-button/runner/index.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/popup.runner.d.ts +2 -1
- package/bundles/types/checkout-button/runner/popup.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/runner/redirect.runner.d.ts +2 -1
- 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/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts +2 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-contextual.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts +2 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-redirect.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.config.d.ts +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney.config.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.runner.d.ts +2 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney.runner.d.ts.map +1 -0
- package/{lib → bundles/types}/checkout-button/zipmoney/zipmoney.types.d.ts +1 -0
- package/bundles/types/checkout-button/zipmoney/zipmoney.types.d.ts.map +1 -0
- package/{lib → bundles/types}/components/ability-guard.d.ts +1 -0
- package/bundles/types/components/ability-guard.d.ts.map +1 -0
- package/{lib → bundles/types}/components/background.d.ts +1 -0
- package/bundles/types/components/background.d.ts.map +1 -0
- package/{lib → bundles/types}/components/container.d.ts +1 -0
- package/bundles/types/components/container.d.ts.map +1 -0
- package/{lib → bundles/types}/components/dispatcher.d.ts +2 -1
- package/bundles/types/components/dispatcher.d.ts.map +1 -0
- package/{lib → bundles/types}/components/element-style.d.ts +2 -1
- package/bundles/types/components/element-style.d.ts.map +1 -0
- package/{lib → bundles/types}/components/flypay-iframe-event.d.ts +1 -0
- package/bundles/types/components/flypay-iframe-event.d.ts.map +1 -0
- package/{lib → bundles/types}/components/form-Interceptor.d.ts +1 -0
- package/bundles/types/components/form-Interceptor.d.ts.map +1 -0
- package/{lib → bundles/types}/components/http-core.d.ts +1 -0
- package/bundles/types/components/http-core.d.ts.map +1 -0
- package/{lib → bundles/types}/components/iframe-event.d.ts +2 -0
- package/bundles/types/components/iframe-event.d.ts.map +1 -0
- package/{lib → bundles/types}/components/iframe.d.ts +1 -0
- package/bundles/types/components/iframe.d.ts.map +1 -0
- package/{lib → bundles/types}/components/link.d.ts +2 -1
- package/bundles/types/components/link.d.ts.map +1 -0
- package/{lib → bundles/types}/components/loader.d.ts +1 -0
- package/bundles/types/components/loader.d.ts.map +1 -0
- package/{lib → bundles/types}/components/param.d.ts +6 -5
- package/bundles/types/components/param.d.ts.map +1 -0
- package/{lib → bundles/types}/components/popup.d.ts +1 -0
- package/bundles/types/components/popup.d.ts.map +1 -0
- package/{lib → bundles/types}/components/storage-dispatcher.d.ts +1 -0
- package/bundles/types/components/storage-dispatcher.d.ts.map +1 -0
- package/{lib → bundles/types}/components/trigger.d.ts +1 -0
- package/bundles/types/components/trigger.d.ts.map +1 -0
- package/{lib → bundles/types}/components/vault-display-iframe-event.d.ts +1 -0
- package/bundles/types/components/vault-display-iframe-event.d.ts.map +1 -0
- package/{lib → bundles/types}/components/wallet-background.d.ts +1 -0
- package/bundles/types/components/wallet-background.d.ts.map +1 -0
- package/{lib → bundles/types}/components/wallet-trigger.d.ts +1 -0
- package/bundles/types/components/wallet-trigger.d.ts.map +1 -0
- package/bundles/types/configs/env/environment.cba.d.ts +29 -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/{lib/configs/env/env.d.ts → bundles/types/configs/env/environment.paydock.d.ts} +5 -8
- 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/{lib → bundles/types}/configs/sdk.d.ts +3 -2
- package/bundles/types/configs/sdk.d.ts.map +1 -0
- package/{lib → bundles/types}/external-checkout/builder.d.ts +1 -0
- package/bundles/types/external-checkout/builder.d.ts.map +1 -0
- package/{lib → bundles/types}/external-checkout/checker.d.ts +1 -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/{lib → bundles/types}/helper/access-token.d.ts +1 -0
- package/bundles/types/helper/access-token.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/browser.d.ts +1 -0
- package/bundles/types/helper/browser.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/event-emitter.d.ts +1 -0
- package/bundles/types/helper/event-emitter.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/event.d.ts +1 -0
- package/bundles/types/helper/event.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/ms.d.ts +1 -0
- package/bundles/types/helper/ms.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/object.d.ts +1 -0
- package/bundles/types/helper/object.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/url.d.ts +1 -0
- package/bundles/types/helper/url.d.ts.map +1 -0
- package/{lib → bundles/types}/helper/uuid.d.ts +1 -0
- package/bundles/types/helper/uuid.d.ts.map +1 -0
- package/bundles/types/index-cba.d.ts +13 -0
- package/bundles/types/index-cba.d.ts.map +1 -0
- package/bundles/types/index.d.ts +14 -0
- package/bundles/types/index.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source/builder.d.ts +1 -0
- package/bundles/types/payment-source/builder.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source/index.d.ts +1 -0
- package/bundles/types/payment-source/index.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source-widget/html-payment-source-widget.d.ts +1 -0
- package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source-widget/index.d.ts +1 -0
- package/bundles/types/payment-source-widget/index.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source-widget/interfaces.d.ts +1 -0
- package/bundles/types/payment-source-widget/interfaces.d.ts.map +1 -0
- package/{lib → bundles/types}/payment-source-widget/payment-source-widget.d.ts +1 -0
- package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/index.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/interfaces.d.ts +6 -5
- package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/src-provider.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/src-provider.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/helper.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/index.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/visa-src.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +1 -0
- package/{lib → bundles/types}/secure-remote-commerce/secure-remote-commerce.d.ts +1 -0
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +1 -0
- package/{lib → bundles/types}/vault-display-widget/index.d.ts +1 -0
- package/bundles/types/vault-display-widget/index.d.ts.map +1 -0
- package/{lib → bundles/types}/vault-display-widget/vault-display-widget.d.ts +1 -0
- package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/afterpay.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/afterpay.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/apple.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/flypay-v2.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/flypay.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/flypay.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/google.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/google.wallet-service.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/{lib → bundles/types}/wallet-buttons/index.d.ts +1 -0
- package/bundles/types/wallet-buttons/index.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/interfaces.d.ts +1 -0
- package/bundles/types/wallet-buttons/interfaces.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/mastercard.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/mastercard.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/paypal.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/stripe.wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/stripe.wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/wallet-buttons/wallet-buttons.d.ts +1 -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/{lib → bundles/types}/wallet-buttons/wallet-service.d.ts +1 -0
- package/bundles/types/wallet-buttons/wallet-service.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/configuration.d.ts +2 -1
- package/bundles/types/widget/configuration.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/html-multi-widget.d.ts +1 -0
- package/bundles/types/widget/html-multi-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/html-widget.d.ts +1 -0
- package/bundles/types/widget/html-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/index.d.ts +2 -1
- package/bundles/types/widget/index.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/meta.d.ts +1 -0
- package/bundles/types/widget/meta.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/multi-widget.d.ts +2 -1
- package/bundles/types/widget/multi-widget.d.ts.map +1 -0
- package/{lib → bundles/types}/widget/style.d.ts +1 -0
- package/bundles/types/widget/style.d.ts.map +1 -0
- package/bundles/widget.umd.js +6813 -6963
- package/bundles/widget.umd.js.d.ts +3163 -0
- package/bundles/widget.umd.js.map +1 -0
- package/bundles/widget.umd.js.min.d.ts +3163 -0
- package/bundles/widget.umd.min.js +2 -1
- package/bundles/widget.umd.min.js.map +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 +2444 -0
- package/docs/api-wrapper.md +78 -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/header.md +15 -0
- package/docs/html/layout.html +78 -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 +21 -0
- package/docs/install/umd.example.md +6 -0
- package/docs/install.md +53 -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/ps-examples.md +129 -0
- package/docs/secure-remote-commerce-examples.md +258 -0
- package/docs/secure-remote-commerce.md +265 -0
- package/docs/vault-display-example.md +132 -0
- package/docs/wallet-buttons-examples.md +580 -0
- package/docs/wallet-buttons.md +424 -0
- package/docs/wallet-cba-buttons-examples.md +388 -0
- package/docs/widget-examples.md +134 -0
- package/package.json +164 -42
- package/slate.md +89 -88
- package/.nvmrc +0 -1
- package/api.d.ts +0 -1
- package/api.js +0 -1
- package/canvas3ds.d.ts +0 -1
- package/canvas3ds.js +0 -1
- package/checkout-button.d.ts +0 -1
- package/checkout-button.js +0 -1
- package/inicialization-guide.md +0 -7
- package/lib/api/api-base.js +0 -101
- package/lib/api/api-base.js.map +0 -1
- package/lib/api/api-charge-internal.js +0 -30
- package/lib/api/api-charge-internal.js.map +0 -1
- package/lib/api/api-charge.js +0 -49
- package/lib/api/api-charge.js.map +0 -1
- package/lib/api/api-internal.js +0 -13
- package/lib/api/api-internal.js.map +0 -1
- package/lib/api/api-service-internal.js +0 -18
- package/lib/api/api-service-internal.js.map +0 -1
- package/lib/api/api.js +0 -61
- package/lib/api/api.js.map +0 -1
- package/lib/api/index.d.ts +0 -1
- package/lib/api/index.js +0 -2
- package/lib/api/index.js.map +0 -1
- package/lib/canvas-3ds/canvas-3ds.js +0 -156
- package/lib/canvas-3ds/canvas-3ds.js.map +0 -1
- package/lib/canvas-3ds/index.js +0 -2
- package/lib/canvas-3ds/index.js.map +0 -1
- package/lib/canvas-3ds/services/gpayments-service.js +0 -181
- package/lib/canvas-3ds/services/gpayments-service.js.map +0 -1
- package/lib/canvas-3ds/services/index.js +0 -2
- package/lib/canvas-3ds/services/index.js.map +0 -1
- package/lib/canvas-3ds/services/standalone3ds-service.js +0 -32
- package/lib/canvas-3ds/services/standalone3ds-service.js.map +0 -1
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js +0 -49
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +0 -1
- package/lib/checkout-button/afterpay/afterpay.runner.js +0 -41
- package/lib/checkout-button/afterpay/afterpay.runner.js.map +0 -1
- package/lib/checkout-button/checkout-button.interface.js +0 -45
- package/lib/checkout-button/checkout-button.interface.js.map +0 -1
- package/lib/checkout-button/checkout-button.js +0 -265
- package/lib/checkout-button/checkout-button.js.map +0 -1
- package/lib/checkout-button/checkout-contextual-handler.js +0 -75
- package/lib/checkout-button/checkout-contextual-handler.js.map +0 -1
- package/lib/checkout-button/index.js +0 -85
- package/lib/checkout-button/index.js.map +0 -1
- package/lib/checkout-button/paypal/paypal-checkout-button.js +0 -24
- package/lib/checkout-button/paypal/paypal-checkout-button.js.map +0 -1
- package/lib/checkout-button/paypal/paypal.runner.js +0 -14
- package/lib/checkout-button/paypal/paypal.runner.js.map +0 -1
- package/lib/checkout-button/runner/base.runner.js +0 -13
- package/lib/checkout-button/runner/base.runner.js.map +0 -1
- package/lib/checkout-button/runner/contextual.runner.js +0 -40
- package/lib/checkout-button/runner/contextual.runner.js.map +0 -1
- package/lib/checkout-button/runner/index.js +0 -11
- package/lib/checkout-button/runner/index.js.map +0 -1
- package/lib/checkout-button/runner/popup.runner.js +0 -68
- package/lib/checkout-button/runner/popup.runner.js.map +0 -1
- package/lib/checkout-button/runner/redirect.runner.js +0 -15
- package/lib/checkout-button/runner/redirect.runner.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +0 -63
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js +0 -78
- package/lib/checkout-button/zipmoney/zipmoney-contextual.runner.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js +0 -49
- package/lib/checkout-button/zipmoney/zipmoney-redirect.runner.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.config.js +0 -4
- package/lib/checkout-button/zipmoney/zipmoney.config.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.runner.js +0 -23
- package/lib/checkout-button/zipmoney/zipmoney.runner.js.map +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.types.js +0 -1
- package/lib/checkout-button/zipmoney/zipmoney.types.js.map +0 -1
- package/lib/components/ability-guard.js +0 -44
- package/lib/components/ability-guard.js.map +0 -1
- package/lib/components/background.js +0 -193
- package/lib/components/background.js.map +0 -1
- package/lib/components/container.js +0 -60
- package/lib/components/container.js.map +0 -1
- package/lib/components/dispatcher.js +0 -39
- package/lib/components/dispatcher.js.map +0 -1
- package/lib/components/element-style.js +0 -52
- package/lib/components/element-style.js.map +0 -1
- package/lib/components/flypay-iframe-event.js +0 -28
- package/lib/components/flypay-iframe-event.js.map +0 -1
- package/lib/components/form-Interceptor.js +0 -38
- package/lib/components/form-Interceptor.js.map +0 -1
- package/lib/components/http-core.js +0 -57
- package/lib/components/http-core.js.map +0 -1
- package/lib/components/iframe-event.js +0 -84
- package/lib/components/iframe-event.js.map +0 -1
- package/lib/components/iframe.js +0 -62
- package/lib/components/iframe.js.map +0 -1
- package/lib/components/link.js +0 -59
- package/lib/components/link.js.map +0 -1
- package/lib/components/loader.js +0 -234
- package/lib/components/loader.js.map +0 -1
- package/lib/components/param.js +0 -147
- package/lib/components/param.js.map +0 -1
- package/lib/components/popup.js +0 -104
- package/lib/components/popup.js.map +0 -1
- package/lib/components/storage-dispatcher.js +0 -75
- package/lib/components/storage-dispatcher.js.map +0 -1
- package/lib/components/trigger.js +0 -49
- package/lib/components/trigger.js.map +0 -1
- package/lib/components/vault-display-iframe-event.js +0 -27
- package/lib/components/vault-display-iframe-event.js.map +0 -1
- package/lib/components/wallet-background.js +0 -60
- package/lib/components/wallet-background.js.map +0 -1
- package/lib/components/wallet-trigger.js +0 -27
- package/lib/components/wallet-trigger.js.map +0 -1
- package/lib/configs/env/env.js +0 -117
- package/lib/configs/env/env.js.map +0 -1
- package/lib/configs/sdk.js +0 -16
- package/lib/configs/sdk.js.map +0 -1
- package/lib/external-checkout/builder.js +0 -45
- package/lib/external-checkout/builder.js.map +0 -1
- package/lib/external-checkout/checker.js +0 -22
- package/lib/external-checkout/checker.js.map +0 -1
- package/lib/external-checkout/index.d.ts +0 -2
- package/lib/external-checkout/index.js +0 -3
- package/lib/external-checkout/index.js.map +0 -1
- package/lib/helper/access-token.js +0 -44
- package/lib/helper/access-token.js.map +0 -1
- package/lib/helper/browser.js +0 -79
- package/lib/helper/browser.js.map +0 -1
- package/lib/helper/event-emitter.js +0 -23
- package/lib/helper/event-emitter.js.map +0 -1
- package/lib/helper/event.js +0 -23
- package/lib/helper/event.js.map +0 -1
- package/lib/helper/ms.js +0 -32
- package/lib/helper/ms.js.map +0 -1
- package/lib/helper/object.js +0 -6
- package/lib/helper/object.js.map +0 -1
- package/lib/helper/url.js +0 -11
- package/lib/helper/url.js.map +0 -1
- package/lib/helper/uuid.js +0 -26
- package/lib/helper/uuid.js.map +0 -1
- package/lib/index.d.ts +0 -15
- package/lib/index.js +0 -15
- package/lib/index.js.map +0 -1
- package/lib/payment-source/builder.js +0 -49
- package/lib/payment-source/builder.js.map +0 -1
- package/lib/payment-source/index.js +0 -2
- package/lib/payment-source/index.js.map +0 -1
- package/lib/payment-source-widget/html-payment-source-widget.js +0 -167
- package/lib/payment-source-widget/html-payment-source-widget.js.map +0 -1
- package/lib/payment-source-widget/index.js +0 -35
- package/lib/payment-source-widget/index.js.map +0 -1
- package/lib/payment-source-widget/interfaces.js +0 -2
- package/lib/payment-source-widget/interfaces.js.map +0 -1
- package/lib/payment-source-widget/payment-source-widget.js +0 -141
- package/lib/payment-source-widget/payment-source-widget.js.map +0 -1
- package/lib/secure-remote-commerce/index.js +0 -2
- package/lib/secure-remote-commerce/index.js.map +0 -1
- package/lib/secure-remote-commerce/interfaces.js +0 -28
- package/lib/secure-remote-commerce/interfaces.js.map +0 -1
- package/lib/secure-remote-commerce/providers/src-provider.js +0 -1
- package/lib/secure-remote-commerce/providers/src-provider.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/helper.js +0 -36
- package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/index.js +0 -2
- package/lib/secure-remote-commerce/providers/visa-src/index.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +0 -113
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +0 -10
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +0 -1
- package/lib/secure-remote-commerce/secure-remote-commerce.js +0 -238
- package/lib/secure-remote-commerce/secure-remote-commerce.js.map +0 -1
- package/lib/vault-display-widget/index.js +0 -14
- package/lib/vault-display-widget/index.js.map +0 -1
- package/lib/vault-display-widget/vault-display-widget.js +0 -98
- package/lib/vault-display-widget/vault-display-widget.js.map +0 -1
- package/lib/wallet-buttons/afterpay.wallet-service.js +0 -152
- package/lib/wallet-buttons/afterpay.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/apple.wallet-service.js +0 -291
- package/lib/wallet-buttons/apple.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/flypay-v2.wallet-service.js +0 -192
- package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/flypay.wallet-service.js +0 -117
- package/lib/wallet-buttons/flypay.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/google.wallet-service.js +0 -268
- package/lib/wallet-buttons/google.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/index.js +0 -2
- package/lib/wallet-buttons/index.js.map +0 -1
- package/lib/wallet-buttons/interfaces.js +0 -1
- package/lib/wallet-buttons/interfaces.js.map +0 -1
- package/lib/wallet-buttons/mastercard.wallet-service.js +0 -27
- package/lib/wallet-buttons/mastercard.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/paypal.wallet-service.js +0 -129
- package/lib/wallet-buttons/paypal.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/stripe.wallet-service.js +0 -100
- package/lib/wallet-buttons/stripe.wallet-service.js.map +0 -1
- package/lib/wallet-buttons/wallet-buttons.js +0 -454
- package/lib/wallet-buttons/wallet-buttons.js.map +0 -1
- package/lib/wallet-buttons/wallet-service.js +0 -49
- package/lib/wallet-buttons/wallet-service.js.map +0 -1
- package/lib/widget/configuration.js +0 -259
- package/lib/widget/configuration.js.map +0 -1
- package/lib/widget/html-multi-widget.js +0 -380
- package/lib/widget/html-multi-widget.js.map +0 -1
- package/lib/widget/html-widget.js +0 -126
- package/lib/widget/html-widget.js.map +0 -1
- package/lib/widget/index.js +0 -132
- package/lib/widget/index.js.map +0 -1
- package/lib/widget/meta.js +0 -8
- package/lib/widget/meta.js.map +0 -1
- package/lib/widget/multi-widget.js +0 -436
- package/lib/widget/multi-widget.js.map +0 -1
- package/lib/widget/style.js +0 -204
- package/lib/widget/style.js.map +0 -1
- package/payment-source-widget.d.ts +0 -1
- package/payment-source-widget.js +0 -1
- package/tslint.json +0 -130
- package/typings/globals/@auspayplus/open-payments-checkout/index.d.ts +0 -43
- package/typings/globals/jasmine/index.d.ts +0 -576
- package/typings/globals/jasmine-ajax/index.d.ts +0 -83
- package/typings/globals/jquery/index.d.ts +0 -3759
- package/typings/index.d.ts +0 -4
- package/vault-display-widget.d.ts +0 -1
- package/vault-display-widget.js +0 -1
- package/vendors/zipmoney.d.ts +0 -18
- package/vendors/zipmoney.js +0 -2
- package/widget.d.ts +0 -1
- package/widget.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkout-button.js","sourceRoot":"","sources":["../../checkout-button/checkout-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAa,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,YAAY,EAA4B,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACpJ,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,M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/B,MAAM,KAAK,CAAC,GAAG,uBAAuB,aAAa,WAAW,qBAAqB,IAAI,QAAQ,CAAC,CAAC;YAErG,OAAO,cAAc,CAAC;SACzB;aAAM,IAAI,WAAW,KAAK,YAAY,CAAC,QAAQ,EAAE;YAC9C,OAAO,IAAI,KAAK,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,sBAAsB,CAAC;SAChG;aAAM;YACH,MAAM,KAAK,CAAC,GAAG,uBAAuB,uBAAuB,CAAC,CAAC;SAClE;IACL,CAAC;IAIO,mBAAmB,CAAC,MAA2C,EAAE,IAAmB;QACxF,MAAM,WAAW,GAAG,GAAG,uBAAuB,wCAAwC,IAAI,SAAS,CAAA;QAEnG,QAAQ,IAAI,EAAE;YACV,KAAK,aAAa,CAAC,UAAU;gBACzB,IAAI,kBAAkB,CAAC,MAAM,CAAC;oBAC1B,OAAO,IAAI,CAAC;;oBAEZ,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC9B,MAAM;YAEV,KAAK,aAAa,CAAC,QAAQ;gBACvB,IAAI,gBAAgB,CAAC,MAAM,CAAC;oBACxB,OAAO,IAAI,CAAC;;oBAEZ,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC9B,MAAM;YAEV;gBACI,MAAM;SACb;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AAED;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { PaymentSourceBuilder, TYPE as TOKEN_TYPE } from '../payment-source/index';
|
|
2
|
-
import { ExternalCheckoutChecker } from '../external-checkout/index';
|
|
3
|
-
import { RUNNER_EVENT } from './runner';
|
|
4
|
-
import { CHECKOUT_BTN_LOG_PREFIX, CHECKOUT_BUTTON_EVENT } from './checkout-button.interface';
|
|
5
|
-
export class CheckoutContextualHandler {
|
|
6
|
-
constructor(background, runner, eventEmitter, params) {
|
|
7
|
-
this.background = background;
|
|
8
|
-
this.runner = runner;
|
|
9
|
-
this.eventEmitter = eventEmitter;
|
|
10
|
-
this.params = params;
|
|
11
|
-
this.runner.onStop(() => {
|
|
12
|
-
this.eventEmitter.emit(CHECKOUT_BUTTON_EVENT.CLOSE);
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
init(env) {
|
|
16
|
-
this.setEnv(env);
|
|
17
|
-
this.runner.onCheckout(RUNNER_EVENT.SUCCESS, (checkout) => {
|
|
18
|
-
this.eventEmitter.emit(CHECKOUT_BUTTON_EVENT.ACCEPTED, {});
|
|
19
|
-
this.background.initLoader();
|
|
20
|
-
this.runner.stop();
|
|
21
|
-
this.checkToken(checkout.token, () => {
|
|
22
|
-
this.createOneTimeToken(checkout.token);
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
this.runner.onCheckout(RUNNER_EVENT.ERROR, () => {
|
|
26
|
-
this.eventEmitter.emit(CHECKOUT_BUTTON_EVENT.ERROR);
|
|
27
|
-
console.error(`${CHECKOUT_BTN_LOG_PREFIX} Error from checkout server.`);
|
|
28
|
-
this.runner.stop();
|
|
29
|
-
});
|
|
30
|
-
this.runner.onCheckout(RUNNER_EVENT.REFERRED, () => {
|
|
31
|
-
this.eventEmitter.emit(CHECKOUT_BUTTON_EVENT.REFERRED);
|
|
32
|
-
this.runner.stop();
|
|
33
|
-
});
|
|
34
|
-
this.runner.onCheckout(RUNNER_EVENT.DECLINED, () => {
|
|
35
|
-
this.eventEmitter.emit(CHECKOUT_BUTTON_EVENT.DECLINED);
|
|
36
|
-
this.runner.stop();
|
|
37
|
-
});
|
|
38
|
-
this.eventEmitter.subscribe(CHECKOUT_BUTTON_EVENT.ERROR, () => {
|
|
39
|
-
this.runner.stop();
|
|
40
|
-
});
|
|
41
|
-
this.eventEmitter.subscribe(CHECKOUT_BUTTON_EVENT.FINISH, (data) => {
|
|
42
|
-
this.background.clear();
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
setEnv(env) {
|
|
46
|
-
this.env = env;
|
|
47
|
-
}
|
|
48
|
-
checkToken(token, cb) {
|
|
49
|
-
let checker = new ExternalCheckoutChecker(token);
|
|
50
|
-
checker.setEnv(this.env);
|
|
51
|
-
checker.send(this.params.accessToken, (details) => {
|
|
52
|
-
this.details = details;
|
|
53
|
-
cb();
|
|
54
|
-
}, () => {
|
|
55
|
-
this.eventEmitter.emit(CHECKOUT_BUTTON_EVENT.ERROR, {});
|
|
56
|
-
console.error(`${CHECKOUT_BTN_LOG_PREFIX} Error during creating payment source token.`);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
createOneTimeToken(token) {
|
|
60
|
-
let paymentSourceToken = new PaymentSourceBuilder(this.params.gatewayId, token, TOKEN_TYPE.CHECKOUT_TOKEN);
|
|
61
|
-
paymentSourceToken.setEnv(this.env);
|
|
62
|
-
paymentSourceToken.send(this.params.accessToken, (token) => {
|
|
63
|
-
this.eventEmitter.emit(CHECKOUT_BUTTON_EVENT.FINISH, {
|
|
64
|
-
payment_source_token: token,
|
|
65
|
-
checkout_email: this.details.checkout_email,
|
|
66
|
-
checkout_holder: this.details.checkout_holder,
|
|
67
|
-
gateway_type: this.details.gateway_type,
|
|
68
|
-
});
|
|
69
|
-
}, () => {
|
|
70
|
-
this.eventEmitter.emit(CHECKOUT_BUTTON_EVENT.ERROR, {});
|
|
71
|
-
console.error(`${CHECKOUT_BTN_LOG_PREFIX} Error during creating payment source token.`);
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
//# sourceMappingURL=../../src/lib/checkout-button/checkout-contextual-handler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkout-contextual-handler.js","sourceRoot":"","sources":["../../checkout-button/checkout-contextual-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,uB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|
-
export { AfterpayCheckoutButton } from './afterpay/afterpay-checkout-button';
|
|
4
|
-
export { PaypalCheckoutButton } from './paypal/paypal-checkout-button';
|
|
5
|
-
/**
|
|
6
|
-
* Interface for PayPal checkout meta information
|
|
7
|
-
* @interface IPayPalMeta
|
|
8
|
-
*
|
|
9
|
-
* @param {string} [brand_name] A label that overrides the business name in the PayPal account on the PayPal hosted checkout pages
|
|
10
|
-
* @param {string} [cart_border_color] The HTML hex code for your principal identifying color
|
|
11
|
-
* @param {string} [reference] Merchant Customer Service number displayed on the PayPal pages
|
|
12
|
-
* @param {string} [email] The consumer’s email
|
|
13
|
-
* @param {string} [hdr_img] URL for the image you want to appear at the top left of the payment page
|
|
14
|
-
* @param {string} [logo_img] A URL to your logo image
|
|
15
|
-
* @param {string} [pay_flow_color] Sets the background color for the payment page. By default, the color is white.
|
|
16
|
-
* @param {string} [first_name] The consumer’s given names
|
|
17
|
-
* @param {string} [last_name] The consumer’s surname
|
|
18
|
-
* @param {string} [address_line] Street address
|
|
19
|
-
* @param {string} [address_line2] Second line of the address
|
|
20
|
-
* @param {string} [address_city] City
|
|
21
|
-
* @param {string} [address_state] State
|
|
22
|
-
* @param {string} [address_postcode] Postcode
|
|
23
|
-
* @param {string} [address_country] Country
|
|
24
|
-
* @param {string} [phone] The consumer’s phone number in E.164 international notation (Example: +12345678901)
|
|
25
|
-
* @param {boolean} [hide_shipping_address] Determines whether PayPal displays shipping address fields on the PayPal pages
|
|
26
|
-
*/
|
|
27
|
-
/**
|
|
28
|
-
* Interface for ZipMoney checkout meta information
|
|
29
|
-
* @interface IZipmoneyMeta
|
|
30
|
-
|
|
31
|
-
* @param {string} first_name First name for the customer
|
|
32
|
-
* @param {string} last_name Last name for the customer
|
|
33
|
-
* @param {string} [phone] The consumer’s phone number in E.164 international notation (Example: +12345678901)
|
|
34
|
-
* @param {boolean} [tokenize] Controls whether to tokenize the zip pay / zip money account, defaults to ‘false’
|
|
35
|
-
* @param {string} email The consumer’s email
|
|
36
|
-
* @param {string} [gender] Gender name for the customer
|
|
37
|
-
* @param {string} [date_of_birth] Date of birth name for the customer
|
|
38
|
-
* @param {number} charge.amount Amount to be paid
|
|
39
|
-
* @param {string} [charge.currency] Currency code
|
|
40
|
-
* @param {string} [charge.reference] Reference
|
|
41
|
-
* @param {array} charge.items Collections of orders
|
|
42
|
-
* @param {string} charge.items[].name Name of the item
|
|
43
|
-
* @param {number} charge.items[].amount Amount of the item
|
|
44
|
-
* @param {integer} charge.items[].quantity Quantity of the item
|
|
45
|
-
* @param {string} [charge.items[].type] type of the item, values can be: ‘sku’, ‘tax’, ‘shipping’, ‘discount’
|
|
46
|
-
* @param {string} [charge.items[].reference] reference of the item
|
|
47
|
-
* @param {string} [charge.items[].item_uri] url of the item in your store
|
|
48
|
-
* @param {string} [charge.items[].image_url] url of the image in your store
|
|
49
|
-
* @param {string} [charge.shipping_type] Shipping type, values can be: ‘pickup’, ‘delivery’, defaults to ‘delivery’
|
|
50
|
-
* @param {string} [charge.shipping_address] Object with shipping address details
|
|
51
|
-
* @param {string} [charge.shipping_address.first_name] Shipping first name
|
|
52
|
-
* @param {string} [charge.shipping_address.last_name] Shipping last name
|
|
53
|
-
* @param {string} charge.shipping_address.line1 Shipping address line 1
|
|
54
|
-
* @param {string} charge.shipping_address.line2 Shipping address line 2
|
|
55
|
-
* @param {string} charge.shipping_address.city Shipping city
|
|
56
|
-
* @param {string} charge.shipping_address.state Shipping state
|
|
57
|
-
* @param {string} charge.shipping_address.postcode Shipping postcode
|
|
58
|
-
* @param {string} charge.shipping_address.country Shipping country
|
|
59
|
-
* @param {string} charge.billing_address Object with billing address details
|
|
60
|
-
* @param {string} [charge.billing_address.first_name] Billing first name
|
|
61
|
-
* @param {string} [charge.billing_address.last_name] Billing last name
|
|
62
|
-
* @param {string} charge.billing_address.line1 Billing address line 1
|
|
63
|
-
* @param {string} [charge.billing_address.line2] Billing address line 1
|
|
64
|
-
* @param {string} charge.billing_address.city Billing city
|
|
65
|
-
* @param {string} charge.billing_address.state Billing state
|
|
66
|
-
* @param {string} charge.billing_address.postcode Billing postcode
|
|
67
|
-
* @param {string} charge.billing_address.country Billing country
|
|
68
|
-
*/
|
|
69
|
-
/**
|
|
70
|
-
* Interface for Afterpay checkout meta information
|
|
71
|
-
* @interface IAfterpayMeta
|
|
72
|
-
* @param {number} [amount]
|
|
73
|
-
* @param {number} [currency]
|
|
74
|
-
* @param {string} [first_name]
|
|
75
|
-
* @param {string} [last_name]
|
|
76
|
-
* @param {string} [email]
|
|
77
|
-
* @param {string} [address_line]
|
|
78
|
-
* @param {string} [address_line2]
|
|
79
|
-
* @param {string} [address_city]
|
|
80
|
-
* @param {string} [address_state]
|
|
81
|
-
* @param {string} [address_postcode]
|
|
82
|
-
* @param {string} [address_country]
|
|
83
|
-
* @param {string} [phone]
|
|
84
|
-
*/
|
|
85
|
-
//# sourceMappingURL=../../src/lib/checkout-button/index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../checkout-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAA4B,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAEtE;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH;;;;;;;;;;;;;;;GAeG"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { CheckoutButton } from '../checkout-button';
|
|
2
|
-
import { GATEWAY_TYPE } from '../checkout-button.interface';
|
|
3
|
-
/**
|
|
4
|
-
* Class PaypalCheckoutButton is wrapper of CheckoutButton transform usual button into checkout
|
|
5
|
-
*
|
|
6
|
-
* @extends CheckoutButton
|
|
7
|
-
*
|
|
8
|
-
* @constructor
|
|
9
|
-
*
|
|
10
|
-
* @param {string} selector - Selector of html element.
|
|
11
|
-
* @param {string} publicKey - PayDock users public key
|
|
12
|
-
* @param {string} [gatewayId=default] - PayDock's gatewayId. By default or if put 'default', it will use the selected default gateway
|
|
13
|
-
* @example
|
|
14
|
-
* var widget = new PaypalCheckoutButton('#button', 'publicKey','gatewayId');
|
|
15
|
-
*/
|
|
16
|
-
class PaypalCheckoutButton extends CheckoutButton {
|
|
17
|
-
constructor(selector, publicKey, gatewayId = 'default') {
|
|
18
|
-
super(selector, publicKey, gatewayId, GATEWAY_TYPE.PAYPAL);
|
|
19
|
-
this.publicKey = publicKey;
|
|
20
|
-
this.gatewayId = gatewayId;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export { PaypalCheckoutButton };
|
|
24
|
-
//# sourceMappingURL=../../../src/lib/checkout-button/paypal/paypal-checkout-button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paypal-checkout-button.js","sourceRoot":"","sources":["../../../checkout-button/paypal/paypal-checkout-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D;;;;;;;;;;;;GAYG;AACH,MAAM,oBAAqB,SAAQ,cAAc;IAC7C,YAAY,QAAgB,EAAY,SAAiB,EAAY,YAAoB,SAAS;QAC9F,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;QADvB,cAAS,GAAT,SAAS,CAAQ;QAAY,cAAS,GAAT,SAAS,CAAoB;IAElG,CAAC;CACJ;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { PopupRunner } from '../runner';
|
|
2
|
-
import { Url } from '../../helper/url';
|
|
3
|
-
const REDIRECT_URI_SUCCESS = '/checkout/success';
|
|
4
|
-
const REDIRECT_URI_ERROR = '/checkout/error';
|
|
5
|
-
export class PaypalRunner extends PopupRunner {
|
|
6
|
-
getSuccessRedirectUri() {
|
|
7
|
-
return (this.widgetEnv.getConf().url +
|
|
8
|
-
Url.extendSearchParams(REDIRECT_URI_SUCCESS, 'merchant', encodeURIComponent(window.location.href)));
|
|
9
|
-
}
|
|
10
|
-
getErrorRedirectUri() {
|
|
11
|
-
return (this.widgetEnv.getConf().url + Url.extendSearchParams(REDIRECT_URI_ERROR, 'merchant', encodeURIComponent(window.location.href)));
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=../../../src/lib/checkout-button/paypal/paypal.runner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paypal.runner.js","sourceRoot":"","sources":["../../../checkout-button/paypal/paypal.runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,WAAW,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC;AACjD,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;AAE7C,MAAM,OAAO,YAAa,SAAQ,WAAW;IAClC,qBAAqB;QACxB,OAAO,CACH,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,GAAG;YAC5B,GAAG,CAAC,kBAAkB,CAAC,oBAAoB,EAAE,UAAU,EAAE,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CACrG,CAAC;IACN,CAAC;IAEM,mBAAmB;QACtB,OAAO,CACH,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,kBAAkB,CAAC,kBAAkB,EAAE,UAAU,EAAE,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAClI,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Env, WIDGET_URL } from '../../configs/env/env';
|
|
2
|
-
export class BaseRunner {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.widgetEnv = new Env(WIDGET_URL);
|
|
5
|
-
}
|
|
6
|
-
error(error, code, callback) {
|
|
7
|
-
callback(true);
|
|
8
|
-
}
|
|
9
|
-
setEnv(env, alias) {
|
|
10
|
-
this.widgetEnv.setEnv(env, alias);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=../../../src/lib/checkout-button/runner/base.runner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.runner.js","sourceRoot":"","sources":["../../../checkout-button/runner/base.runner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAkBxD,MAAM,OAAgB,UAAU;IAG5B;QACI,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC;IAEM,KAAK,CAAC,KAAa,EAAE,IAAY,EAAE,QAAQ;QAC9C,QAAQ,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC;IAEM,MAAM,CAAC,GAAW,EAAE,KAAc;QACrC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC;CACJ"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Background, TRIGGER as BACKGROUND_TRIGGER } from '../../components/background';
|
|
2
|
-
import { BaseRunner } from './base.runner';
|
|
3
|
-
export var RUNNER_EVENT;
|
|
4
|
-
(function (RUNNER_EVENT) {
|
|
5
|
-
RUNNER_EVENT["SUCCESS"] = "success";
|
|
6
|
-
RUNNER_EVENT["DECLINED"] = "declined";
|
|
7
|
-
RUNNER_EVENT["CLOSE"] = "close";
|
|
8
|
-
RUNNER_EVENT["REFERRED"] = "referred";
|
|
9
|
-
RUNNER_EVENT["ERROR"] = "error";
|
|
10
|
-
})(RUNNER_EVENT || (RUNNER_EVENT = {}));
|
|
11
|
-
;
|
|
12
|
-
export function ContextualRunner(Runner = BaseRunner) {
|
|
13
|
-
return class extends Runner {
|
|
14
|
-
constructor(...args) {
|
|
15
|
-
super(...args);
|
|
16
|
-
this.background = new Background();
|
|
17
|
-
this.background.onTrigger(BACKGROUND_TRIGGER.FOCUS, () => this.continue());
|
|
18
|
-
this.background.onTrigger(BACKGROUND_TRIGGER.CLOSE, () => this.stop());
|
|
19
|
-
}
|
|
20
|
-
continue() { }
|
|
21
|
-
stop() { }
|
|
22
|
-
error(error, code, callback) {
|
|
23
|
-
callback(true);
|
|
24
|
-
}
|
|
25
|
-
setSuspendedRedirectUri(uri) {
|
|
26
|
-
this.suspendedRedirectUri = uri;
|
|
27
|
-
}
|
|
28
|
-
setBackgroundTitle(text) {
|
|
29
|
-
this.background.setBackdropTitle(text);
|
|
30
|
-
}
|
|
31
|
-
setBackgroundDescription(text) {
|
|
32
|
-
this.background.setBackdropDescription(text);
|
|
33
|
-
}
|
|
34
|
-
turnOffBackdrop() {
|
|
35
|
-
this.background.turnOffControl();
|
|
36
|
-
this.background.turnOffLoader();
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=../../../src/lib/checkout-button/runner/contextual.runner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextual.runner.js","sourceRoot":"","sources":["../../../checkout-button/runner/contextual.runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACxF,OAAO,EAAE,UAAU,EAA0B,MAAM,eAAe,CAAC;AAGnE,MAAM,CAAN,IAAY,YAMX;AAND,WAAY,YAAY;IACpB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;IACrB,+BAAe,C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
export * from './popup.runner';
|
|
4
|
-
export * from './redirect.runner';
|
|
5
|
-
export function isContextualRunner(runner) {
|
|
6
|
-
return 'run' in runner;
|
|
7
|
-
}
|
|
8
|
-
export function isRedirectRunner(runner) {
|
|
9
|
-
return 'setRedirectUrl' in runner;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=../../../src/lib/checkout-button/runner/index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../checkout-button/runner/index.ts"],"names":[],"mappings":"AAGA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAElC,MAAM,UAAU,kBAAkB,CAAC,MAA2C;IAC1E,OAAO,KAAK,IAAI,MAAM,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAA2C;IACxE,OAAO,gBAAgB,IAAI,MAAM,CAAC;AACtC,CAAC"}
|
|
@@ -1,68 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"popup.runner.js","sourceRoot":"","sources":["../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CAAC,CAAC;IACP,CAAC;IAEM,MAAM,CAAC,GAAW,EAAE,KAAc;QACrC,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACzB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACnC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;CACJ"}
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,63 +0,0 @@
|
|
|
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
|
-
constructor(selector, publicKey, gatewayId = 'default', mode = CHECKOUT_MODE.CONTEXTUAL) {
|
|
20
|
-
super(selector, publicKey, gatewayId, GATEWAY_TYPE.ZIPMONEY, mode);
|
|
21
|
-
this.publicKey = publicKey;
|
|
22
|
-
this.gatewayId = gatewayId;
|
|
23
|
-
this.mode = mode;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Method for setting suspended redirect uri. Redirect after referred checkout
|
|
27
|
-
*
|
|
28
|
-
* The URI is used for a redirect after the checkout is complete.
|
|
29
|
-
* This can be provided, even if using in-context checkout (sdk). By default, the standard styled page will be used.
|
|
30
|
-
* If using in-context (sdk) we will not automatically redirect to this URI.
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
* @param {uri} string - uri for suspended redirect (by default)
|
|
34
|
-
*/
|
|
35
|
-
setSuspendedRedirectUri(uri) {
|
|
36
|
-
super.setSuspendedRedirectUri(uri);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Method for setting the merchant redirect URL.
|
|
40
|
-
* The merchant's customers would be redirected to the specified URL
|
|
41
|
-
* at the end of ZipMoney checkout flow.
|
|
42
|
-
*
|
|
43
|
-
* Once the redirect URL would be set, the checkout flow would be immediately switched
|
|
44
|
-
* from 'contextual' mode to the 'redirect' mode.
|
|
45
|
-
* The merchant's customer would be automatically redirected to this URL after the checkout is complete.
|
|
46
|
-
*
|
|
47
|
-
* @param {url} string - URL for redirect
|
|
48
|
-
*/
|
|
49
|
-
setRedirectUrl(url) {
|
|
50
|
-
if (isContextualRunner(this.runner)) {
|
|
51
|
-
super.chooseRunner(GATEWAY_TYPE.ZIPMONEY, CHECKOUT_MODE.REDIRECT);
|
|
52
|
-
super.setEnv(this.env, this.alias);
|
|
53
|
-
}
|
|
54
|
-
super.setRedirectUrl(url);
|
|
55
|
-
}
|
|
56
|
-
buildAdditionalParams() {
|
|
57
|
-
const defaultParams = super.buildAdditionalParams();
|
|
58
|
-
const params = Object.assign(Object.assign({}, defaultParams), { public_key: this.publicKey, gateway_id: this.gatewayId });
|
|
59
|
-
return params;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
export { ZipmoneyCheckoutButton };
|
|
63
|
-
//# sourceMappingURL=../../../src/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,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"}
|
|
@@ -1,78 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,CA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AI,CAAC,GAAG,UAAU,0BAA0B,CAAC,CAAC;gBACtD,MAAM;SACb;IACL,CAAC;CACJ"}
|
|
@@ -1,49 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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;QAER,IAAI,CAAC,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,uBAAuB,CAAC,CAAA;IAC3E,CAAC;IAEM,mBAAmB;QACtB,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,GAAG,GAAG,2BAA2B,CAAC;IACtE,CAAC;IAEM,IAAI,CAAC,QAAmB,EAAE,MAA4B;QACzD,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,GAAG,EAAE;YAC/B,MAAM,iBAAiB,GAA8B;gBACjD,qBAAqB,EAAE,IAAI,CAAC,cAAc,EAAE;gBAC5C,cAAc,EAAE,QAAQ,CAAC,KAAK;gBAC9B,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,UAAU,EAAE,MAAM,CAAC,UAAU;aAChC,CAAC;YACF,IAAI,CAAC,iBAAiB,CAAC,IAAI,CACvB,EAAE,MAAM,EAAE,iBAAiB,CAAC,cAAc,EAAE,IAAI,EAAE,iBAAiB,EAAE,EACrE;gBACI,SAAS,EAAE,GAAG,EAAE;oBACZ,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;oBACvD,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;wBACd,WAAW,EAAE,WAAW;wBACxB,QAAQ,EAAE,IAAI;qBACjB,CAAC,CAAC;gBACP,CAAC;gBACD,OAAO,EAAE,GAAG,EAAE;oBACV,OAAO,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;gBACrD,CAAC;aACJ,CACJ,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;IAED,6BAA6B;IACtB,qBAAqB;QACxB,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC;IACtC,CAAC;IAED,6BAA6B;IACtB,mBAAmB;QACtB,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC;IACtC,CAAC;IAEM,MAAM,CAAC,GAAW,EAAE,KAAc;QACrC,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACzB,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;CACJ"}
|
|
@@ -1,4 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|