@spare-technologies/spare-link 0.1.0-beta.1 → 1.0.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/README.md +119 -63
- package/lib/commonjs/core/models/payment-return-params.js +245 -20
- package/lib/commonjs/core/models/payment-return-params.js.map +1 -1
- package/lib/commonjs/core/models/pending-session-record.js +2 -0
- package/lib/commonjs/core/models/pending-session-record.js.map +1 -0
- package/lib/commonjs/core/services/hosted-flow-controller.js +333 -0
- package/lib/commonjs/core/services/hosted-flow-controller.js.map +1 -0
- package/lib/commonjs/core/services/hosted-flow-state.js +96 -0
- package/lib/commonjs/core/services/hosted-flow-state.js.map +1 -0
- package/lib/commonjs/index.js +42 -164
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/internal/bank-redirect.js +20 -9
- package/lib/commonjs/internal/bank-redirect.js.map +1 -1
- package/lib/commonjs/internal/hosted/bridge-message.js +107 -0
- package/lib/commonjs/internal/hosted/bridge-message.js.map +1 -0
- package/lib/commonjs/internal/hosted/hosted-url.js +41 -0
- package/lib/commonjs/internal/hosted/hosted-url.js.map +1 -0
- package/lib/commonjs/internal/index.js +0 -7
- package/lib/commonjs/internal/index.js.map +1 -1
- package/lib/commonjs/internal/redact-uri.js +59 -15
- package/lib/commonjs/internal/redact-uri.js.map +1 -1
- package/lib/commonjs/internal/secure-store-pending-session-store.js +20 -25
- package/lib/commonjs/internal/secure-store-pending-session-store.js.map +1 -1
- package/lib/commonjs/internal/url-parts.js +145 -0
- package/lib/commonjs/internal/url-parts.js.map +1 -0
- package/lib/commonjs/public/index.js +0 -37
- package/lib/commonjs/public/index.js.map +1 -1
- package/lib/commonjs/public/payment-result.js +16 -4
- package/lib/commonjs/public/payment-result.js.map +1 -1
- package/lib/commonjs/public/recovery-result.js +7 -18
- package/lib/commonjs/public/recovery-result.js.map +1 -1
- package/lib/commonjs/public/spare-link-config.js +41 -16
- package/lib/commonjs/public/spare-link-config.js.map +1 -1
- package/lib/commonjs/public/spare-link-event.js +27 -33
- package/lib/commonjs/public/spare-link-event.js.map +1 -1
- package/lib/commonjs/public/spare-link-instance.js +67 -77
- package/lib/commonjs/public/spare-link-instance.js.map +1 -1
- package/lib/commonjs/public/spare-link-session.js +2 -9
- package/lib/commonjs/public/spare-link-session.js.map +1 -1
- package/lib/commonjs/public/spare-link.js +0 -12
- package/lib/commonjs/public/spare-link.js.map +1 -1
- package/lib/commonjs/ui/hooks/{use-payment-flow-state.js → use-hosted-flow-state.js} +4 -4
- package/lib/commonjs/ui/hooks/use-hosted-flow-state.js.map +1 -0
- package/lib/commonjs/ui/hosted/hosted-payment-page.js +177 -0
- package/lib/commonjs/ui/hosted/hosted-payment-page.js.map +1 -0
- package/lib/commonjs/ui/hosted/hosted-payment-webview.js +168 -0
- package/lib/commonjs/ui/hosted/hosted-payment-webview.js.map +1 -0
- package/lib/commonjs/ui/screens/index.js +3 -17
- package/lib/commonjs/ui/screens/index.js.map +1 -1
- package/lib/commonjs/ui/screens/page-unavailable-screen.js +101 -0
- package/lib/commonjs/ui/screens/page-unavailable-screen.js.map +1 -0
- package/lib/commonjs/ui/spare-link-host.js +220 -234
- package/lib/commonjs/ui/spare-link-host.js.map +1 -1
- package/lib/commonjs/ui/widgets/index.js +3 -10
- package/lib/commonjs/ui/widgets/index.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/core/models/payment-return-params.js +235 -20
- package/lib/module/core/models/payment-return-params.js.map +1 -1
- package/lib/module/core/models/pending-session-record.js +2 -0
- package/lib/module/core/models/pending-session-record.js.map +1 -0
- package/lib/module/core/services/hosted-flow-controller.js +328 -0
- package/lib/module/core/services/hosted-flow-controller.js.map +1 -0
- package/lib/module/core/services/hosted-flow-state.js +91 -0
- package/lib/module/core/services/hosted-flow-state.js.map +1 -0
- package/lib/module/index.js +8 -22
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/bank-redirect.js +20 -9
- package/lib/module/internal/bank-redirect.js.map +1 -1
- package/lib/module/internal/hosted/bridge-message.js +104 -0
- package/lib/module/internal/hosted/bridge-message.js.map +1 -0
- package/lib/module/internal/hosted/hosted-url.js +36 -0
- package/lib/module/internal/hosted/hosted-url.js.map +1 -0
- package/lib/module/internal/index.js +0 -1
- package/lib/module/internal/index.js.map +1 -1
- package/lib/module/internal/redact-uri.js +59 -15
- package/lib/module/internal/redact-uri.js.map +1 -1
- package/lib/module/internal/secure-store-pending-session-store.js +20 -25
- package/lib/module/internal/secure-store-pending-session-store.js.map +1 -1
- package/lib/module/internal/url-parts.js +139 -0
- package/lib/module/internal/url-parts.js.map +1 -0
- package/lib/module/public/index.js +2 -3
- package/lib/module/public/index.js.map +1 -1
- package/lib/module/public/payment-result.js +16 -4
- package/lib/module/public/payment-result.js.map +1 -1
- package/lib/module/public/recovery-result.js +7 -17
- package/lib/module/public/recovery-result.js.map +1 -1
- package/lib/module/public/spare-link-config.js +42 -15
- package/lib/module/public/spare-link-config.js.map +1 -1
- package/lib/module/public/spare-link-event.js +27 -33
- package/lib/module/public/spare-link-event.js.map +1 -1
- package/lib/module/public/spare-link-instance.js +68 -72
- package/lib/module/public/spare-link-instance.js.map +1 -1
- package/lib/module/public/spare-link-session.js +2 -9
- package/lib/module/public/spare-link-session.js.map +1 -1
- package/lib/module/public/spare-link.js +1 -1
- package/lib/module/public/spare-link.js.map +1 -1
- package/lib/module/ui/hooks/{use-payment-flow-state.js → use-hosted-flow-state.js} +3 -3
- package/lib/module/ui/hooks/use-hosted-flow-state.js.map +1 -0
- package/lib/module/ui/hosted/hosted-payment-page.js +175 -0
- package/lib/module/ui/hosted/hosted-payment-page.js.map +1 -0
- package/lib/module/ui/hosted/hosted-payment-webview.js +163 -0
- package/lib/module/ui/hosted/hosted-payment-webview.js.map +1 -0
- package/lib/module/ui/screens/index.js +1 -3
- package/lib/module/ui/screens/index.js.map +1 -1
- package/lib/module/ui/screens/page-unavailable-screen.js +97 -0
- package/lib/module/ui/screens/page-unavailable-screen.js.map +1 -0
- package/lib/module/ui/spare-link-host.js +221 -236
- package/lib/module/ui/spare-link-host.js.map +1 -1
- package/lib/module/ui/widgets/index.js +1 -2
- package/lib/module/ui/widgets/index.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/commonjs/core/models/index.d.ts +1 -123
- package/lib/typescript/commonjs/core/models/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/core/models/payment-return-params.d.ts +91 -8
- package/lib/typescript/commonjs/core/models/payment-return-params.d.ts.map +1 -1
- package/lib/typescript/commonjs/core/models/pending-session-record.d.ts +11 -0
- package/lib/typescript/commonjs/core/models/pending-session-record.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/services/hosted-flow-controller.d.ts +119 -0
- package/lib/typescript/commonjs/core/services/hosted-flow-controller.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/services/hosted-flow-state.d.ts +75 -0
- package/lib/typescript/commonjs/core/services/hosted-flow-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +5 -14
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/internal/bank-redirect.d.ts.map +1 -1
- package/lib/typescript/commonjs/internal/hosted/bridge-message.d.ts +44 -0
- package/lib/typescript/commonjs/internal/hosted/bridge-message.d.ts.map +1 -0
- package/lib/typescript/commonjs/internal/hosted/hosted-url.d.ts +30 -0
- package/lib/typescript/commonjs/internal/hosted/hosted-url.d.ts.map +1 -0
- package/lib/typescript/commonjs/internal/index.d.ts +0 -1
- package/lib/typescript/commonjs/internal/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/internal/redact-uri.d.ts +21 -1
- package/lib/typescript/commonjs/internal/redact-uri.d.ts.map +1 -1
- package/lib/typescript/commonjs/internal/secure-store-pending-session-store.d.ts +3 -2
- package/lib/typescript/commonjs/internal/secure-store-pending-session-store.d.ts.map +1 -1
- package/lib/typescript/commonjs/internal/url-parts.d.ts +46 -0
- package/lib/typescript/commonjs/internal/url-parts.d.ts.map +1 -0
- package/lib/typescript/commonjs/public/index.d.ts +4 -6
- package/lib/typescript/commonjs/public/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/public/payment-result.d.ts +50 -12
- package/lib/typescript/commonjs/public/payment-result.d.ts.map +1 -1
- package/lib/typescript/commonjs/public/recovery-result.d.ts +11 -20
- package/lib/typescript/commonjs/public/recovery-result.d.ts.map +1 -1
- package/lib/typescript/commonjs/public/spare-link-config.d.ts +13 -31
- package/lib/typescript/commonjs/public/spare-link-config.d.ts.map +1 -1
- package/lib/typescript/commonjs/public/spare-link-event.d.ts +29 -31
- package/lib/typescript/commonjs/public/spare-link-event.d.ts.map +1 -1
- package/lib/typescript/commonjs/public/spare-link-host-api.d.ts +1 -12
- package/lib/typescript/commonjs/public/spare-link-host-api.d.ts.map +1 -1
- package/lib/typescript/commonjs/public/spare-link-instance.d.ts +26 -20
- package/lib/typescript/commonjs/public/spare-link-instance.d.ts.map +1 -1
- package/lib/typescript/commonjs/public/spare-link-session.d.ts +3 -8
- package/lib/typescript/commonjs/public/spare-link-session.d.ts.map +1 -1
- package/lib/typescript/commonjs/public/spare-link.d.ts +1 -1
- package/lib/typescript/commonjs/public/spare-link.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/use-hosted-flow-state.d.ts +9 -0
- package/lib/typescript/commonjs/ui/hooks/use-hosted-flow-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hosted/hosted-payment-page.d.ts +17 -0
- package/lib/typescript/commonjs/ui/hosted/hosted-payment-page.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hosted/hosted-payment-webview.d.ts +43 -0
- package/lib/typescript/commonjs/ui/hosted/hosted-payment-webview.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/index.d.ts +1 -3
- package/lib/typescript/commonjs/ui/screens/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/page-unavailable-screen.d.ts +18 -0
- package/lib/typescript/commonjs/ui/screens/page-unavailable-screen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/spare-link-host.d.ts +4 -5
- package/lib/typescript/commonjs/ui/spare-link-host.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/widgets/index.d.ts +1 -2
- package/lib/typescript/commonjs/ui/widgets/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/version.d.ts +1 -1
- package/lib/typescript/commonjs/version.d.ts.map +1 -1
- package/lib/typescript/module/core/models/index.d.ts +1 -123
- package/lib/typescript/module/core/models/index.d.ts.map +1 -1
- package/lib/typescript/module/core/models/payment-return-params.d.ts +91 -8
- package/lib/typescript/module/core/models/payment-return-params.d.ts.map +1 -1
- package/lib/typescript/module/core/models/pending-session-record.d.ts +11 -0
- package/lib/typescript/module/core/models/pending-session-record.d.ts.map +1 -0
- package/lib/typescript/module/core/services/hosted-flow-controller.d.ts +119 -0
- package/lib/typescript/module/core/services/hosted-flow-controller.d.ts.map +1 -0
- package/lib/typescript/module/core/services/hosted-flow-state.d.ts +75 -0
- package/lib/typescript/module/core/services/hosted-flow-state.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +5 -14
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/internal/bank-redirect.d.ts.map +1 -1
- package/lib/typescript/module/internal/hosted/bridge-message.d.ts +44 -0
- package/lib/typescript/module/internal/hosted/bridge-message.d.ts.map +1 -0
- package/lib/typescript/module/internal/hosted/hosted-url.d.ts +30 -0
- package/lib/typescript/module/internal/hosted/hosted-url.d.ts.map +1 -0
- package/lib/typescript/module/internal/index.d.ts +0 -1
- package/lib/typescript/module/internal/index.d.ts.map +1 -1
- package/lib/typescript/module/internal/redact-uri.d.ts +21 -1
- package/lib/typescript/module/internal/redact-uri.d.ts.map +1 -1
- package/lib/typescript/module/internal/secure-store-pending-session-store.d.ts +3 -2
- package/lib/typescript/module/internal/secure-store-pending-session-store.d.ts.map +1 -1
- package/lib/typescript/module/internal/url-parts.d.ts +46 -0
- package/lib/typescript/module/internal/url-parts.d.ts.map +1 -0
- package/lib/typescript/module/public/index.d.ts +4 -6
- package/lib/typescript/module/public/index.d.ts.map +1 -1
- package/lib/typescript/module/public/payment-result.d.ts +50 -12
- package/lib/typescript/module/public/payment-result.d.ts.map +1 -1
- package/lib/typescript/module/public/recovery-result.d.ts +11 -20
- package/lib/typescript/module/public/recovery-result.d.ts.map +1 -1
- package/lib/typescript/module/public/spare-link-config.d.ts +13 -31
- package/lib/typescript/module/public/spare-link-config.d.ts.map +1 -1
- package/lib/typescript/module/public/spare-link-event.d.ts +29 -31
- package/lib/typescript/module/public/spare-link-event.d.ts.map +1 -1
- package/lib/typescript/module/public/spare-link-host-api.d.ts +1 -12
- package/lib/typescript/module/public/spare-link-host-api.d.ts.map +1 -1
- package/lib/typescript/module/public/spare-link-instance.d.ts +26 -20
- package/lib/typescript/module/public/spare-link-instance.d.ts.map +1 -1
- package/lib/typescript/module/public/spare-link-session.d.ts +3 -8
- package/lib/typescript/module/public/spare-link-session.d.ts.map +1 -1
- package/lib/typescript/module/public/spare-link.d.ts +1 -1
- package/lib/typescript/module/public/spare-link.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/use-hosted-flow-state.d.ts +9 -0
- package/lib/typescript/module/ui/hooks/use-hosted-flow-state.d.ts.map +1 -0
- package/lib/typescript/module/ui/hosted/hosted-payment-page.d.ts +17 -0
- package/lib/typescript/module/ui/hosted/hosted-payment-page.d.ts.map +1 -0
- package/lib/typescript/module/ui/hosted/hosted-payment-webview.d.ts +43 -0
- package/lib/typescript/module/ui/hosted/hosted-payment-webview.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/index.d.ts +1 -3
- package/lib/typescript/module/ui/screens/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/page-unavailable-screen.d.ts +18 -0
- package/lib/typescript/module/ui/screens/page-unavailable-screen.d.ts.map +1 -0
- package/lib/typescript/module/ui/spare-link-host.d.ts +4 -5
- package/lib/typescript/module/ui/spare-link-host.d.ts.map +1 -1
- package/lib/typescript/module/ui/widgets/index.d.ts +1 -2
- package/lib/typescript/module/ui/widgets/index.d.ts.map +1 -1
- package/lib/typescript/module/version.d.ts +1 -1
- package/lib/typescript/module/version.d.ts.map +1 -1
- package/package.json +24 -22
- package/plugins/with-spare-link.js +6 -26
- package/src/core/models/index.ts +1 -139
- package/src/core/models/payment-return-params.ts +269 -21
- package/src/core/models/pending-session-record.ts +10 -0
- package/src/core/services/hosted-flow-controller.ts +374 -0
- package/src/core/services/hosted-flow-state.ts +123 -0
- package/src/index.ts +20 -89
- package/src/internal/bank-redirect.ts +23 -9
- package/src/internal/hosted/bridge-message.ts +106 -0
- package/src/internal/hosted/hosted-url.ts +33 -0
- package/src/internal/index.ts +0 -1
- package/src/internal/redact-uri.ts +69 -15
- package/src/internal/secure-store-pending-session-store.ts +28 -49
- package/src/internal/url-parts.ts +134 -0
- package/src/public/index.ts +2 -24
- package/src/public/payment-result.ts +50 -12
- package/src/public/recovery-result.ts +16 -25
- package/src/public/spare-link-config.ts +56 -43
- package/src/public/spare-link-event.ts +33 -42
- package/src/public/spare-link-host-api.ts +1 -14
- package/src/public/spare-link-instance.ts +57 -65
- package/src/public/spare-link-session.ts +4 -16
- package/src/public/spare-link.ts +1 -1
- package/src/ui/hooks/use-hosted-flow-state.ts +16 -0
- package/src/ui/hosted/hosted-payment-page.tsx +178 -0
- package/src/ui/hosted/hosted-payment-webview.tsx +164 -0
- package/src/ui/screens/index.ts +4 -6
- package/src/ui/screens/page-unavailable-screen.tsx +94 -0
- package/src/ui/spare-link-host.tsx +227 -247
- package/src/ui/widgets/index.ts +1 -2
- package/src/version.ts +1 -1
- package/CHANGELOG.md +0 -25
- package/lib/commonjs/core/client/link-api-client.js +0 -297
- package/lib/commonjs/core/client/link-api-client.js.map +0 -1
- package/lib/commonjs/core/errors/payment-api-error.js +0 -35
- package/lib/commonjs/core/errors/payment-api-error.js.map +0 -1
- package/lib/commonjs/core/models/link-session-status.js +0 -14
- package/lib/commonjs/core/models/link-session-status.js.map +0 -1
- package/lib/commonjs/core/models/payment-type.js +0 -45
- package/lib/commonjs/core/models/payment-type.js.map +0 -1
- package/lib/commonjs/core/models/wire-mappers.js +0 -277
- package/lib/commonjs/core/models/wire-mappers.js.map +0 -1
- package/lib/commonjs/core/services/consent-presenter.js +0 -150
- package/lib/commonjs/core/services/consent-presenter.js.map +0 -1
- package/lib/commonjs/core/services/execute-resume-if-needed.js +0 -216
- package/lib/commonjs/core/services/execute-resume-if-needed.js.map +0 -1
- package/lib/commonjs/core/services/multi-payment-rules-presenter.js +0 -151
- package/lib/commonjs/core/services/multi-payment-rules-presenter.js.map +0 -1
- package/lib/commonjs/core/services/payment-flow-controller.js +0 -547
- package/lib/commonjs/core/services/payment-flow-controller.js.map +0 -1
- package/lib/commonjs/core/services/payment-flow-state.js +0 -110
- package/lib/commonjs/core/services/payment-flow-state.js.map +0 -1
- package/lib/commonjs/core/services/payment-result-mapper.js +0 -49
- package/lib/commonjs/core/services/payment-result-mapper.js.map +0 -1
- package/lib/commonjs/core/services/presentation-utils.js +0 -11
- package/lib/commonjs/core/services/presentation-utils.js.map +0 -1
- package/lib/commonjs/core/services/redirect-buffer.js +0 -40
- package/lib/commonjs/core/services/redirect-buffer.js.map +0 -1
- package/lib/commonjs/core/services/user-friendly-messages.js +0 -46
- package/lib/commonjs/core/services/user-friendly-messages.js.map +0 -1
- package/lib/commonjs/internal/telemetry-collector.js +0 -80
- package/lib/commonjs/internal/telemetry-collector.js.map +0 -1
- package/lib/commonjs/public/constants.js +0 -21
- package/lib/commonjs/public/constants.js.map +0 -1
- package/lib/commonjs/public/spare-link-callbacks.js +0 -6
- package/lib/commonjs/public/spare-link-callbacks.js.map +0 -1
- package/lib/commonjs/ui/consent/charge-bearer-display.js +0 -99
- package/lib/commonjs/ui/consent/charge-bearer-display.js.map +0 -1
- package/lib/commonjs/ui/consent/consent-accordion.js +0 -94
- package/lib/commonjs/ui/consent/consent-accordion.js.map +0 -1
- package/lib/commonjs/ui/consent/consent-summary-section.js +0 -27
- package/lib/commonjs/ui/consent/consent-summary-section.js.map +0 -1
- package/lib/commonjs/ui/consent/cop-information.js +0 -168
- package/lib/commonjs/ui/consent/cop-information.js.map +0 -1
- package/lib/commonjs/ui/consent/international-payment-summary.js +0 -98
- package/lib/commonjs/ui/consent/international-payment-summary.js.map +0 -1
- package/lib/commonjs/ui/consent/label-value-rows.js +0 -59
- package/lib/commonjs/ui/consent/label-value-rows.js.map +0 -1
- package/lib/commonjs/ui/consent/multi-payment-rules-list.js +0 -130
- package/lib/commonjs/ui/consent/multi-payment-rules-list.js.map +0 -1
- package/lib/commonjs/ui/consent/multi-payment-summary.js +0 -99
- package/lib/commonjs/ui/consent/multi-payment-summary.js.map +0 -1
- package/lib/commonjs/ui/consent/single-payment-summary.js +0 -158
- package/lib/commonjs/ui/consent/single-payment-summary.js.map +0 -1
- package/lib/commonjs/ui/consent/terms-link.js +0 -35
- package/lib/commonjs/ui/consent/terms-link.js.map +0 -1
- package/lib/commonjs/ui/hooks/use-payment-flow-state.js.map +0 -1
- package/lib/commonjs/ui/payment-flow-page.js +0 -235
- package/lib/commonjs/ui/payment-flow-page.js.map +0 -1
- package/lib/commonjs/ui/screens/bank-selection-screen.js +0 -215
- package/lib/commonjs/ui/screens/bank-selection-screen.js.map +0 -1
- package/lib/commonjs/ui/screens/consent-details-screen.js +0 -124
- package/lib/commonjs/ui/screens/consent-details-screen.js.map +0 -1
- package/lib/commonjs/ui/screens/mandate-setup-success-screen.js +0 -79
- package/lib/commonjs/ui/screens/mandate-setup-success-screen.js.map +0 -1
- package/lib/commonjs/ui/widgets/layout-w-header.js +0 -106
- package/lib/commonjs/ui/widgets/layout-w-header.js.map +0 -1
- package/lib/commonjs/ui/widgets/stepper.js +0 -124
- package/lib/commonjs/ui/widgets/stepper.js.map +0 -1
- package/lib/module/core/client/link-api-client.js +0 -292
- package/lib/module/core/client/link-api-client.js.map +0 -1
- package/lib/module/core/errors/payment-api-error.js +0 -29
- package/lib/module/core/errors/payment-api-error.js.map +0 -1
- package/lib/module/core/models/link-session-status.js +0 -10
- package/lib/module/core/models/link-session-status.js.map +0 -1
- package/lib/module/core/models/payment-type.js +0 -36
- package/lib/module/core/models/payment-type.js.map +0 -1
- package/lib/module/core/models/wire-mappers.js +0 -263
- package/lib/module/core/models/wire-mappers.js.map +0 -1
- package/lib/module/core/services/consent-presenter.js +0 -140
- package/lib/module/core/services/consent-presenter.js.map +0 -1
- package/lib/module/core/services/execute-resume-if-needed.js +0 -211
- package/lib/module/core/services/execute-resume-if-needed.js.map +0 -1
- package/lib/module/core/services/multi-payment-rules-presenter.js +0 -146
- package/lib/module/core/services/multi-payment-rules-presenter.js.map +0 -1
- package/lib/module/core/services/payment-flow-controller.js +0 -544
- package/lib/module/core/services/payment-flow-controller.js.map +0 -1
- package/lib/module/core/services/payment-flow-state.js +0 -106
- package/lib/module/core/services/payment-flow-state.js.map +0 -1
- package/lib/module/core/services/payment-result-mapper.js +0 -45
- package/lib/module/core/services/payment-result-mapper.js.map +0 -1
- package/lib/module/core/services/presentation-utils.js +0 -7
- package/lib/module/core/services/presentation-utils.js.map +0 -1
- package/lib/module/core/services/redirect-buffer.js +0 -33
- package/lib/module/core/services/redirect-buffer.js.map +0 -1
- package/lib/module/core/services/user-friendly-messages.js +0 -42
- package/lib/module/core/services/user-friendly-messages.js.map +0 -1
- package/lib/module/internal/telemetry-collector.js +0 -75
- package/lib/module/internal/telemetry-collector.js.map +0 -1
- package/lib/module/public/constants.js +0 -17
- package/lib/module/public/constants.js.map +0 -1
- package/lib/module/public/spare-link-callbacks.js +0 -4
- package/lib/module/public/spare-link-callbacks.js.map +0 -1
- package/lib/module/ui/consent/charge-bearer-display.js +0 -95
- package/lib/module/ui/consent/charge-bearer-display.js.map +0 -1
- package/lib/module/ui/consent/consent-accordion.js +0 -90
- package/lib/module/ui/consent/consent-accordion.js.map +0 -1
- package/lib/module/ui/consent/consent-summary-section.js +0 -23
- package/lib/module/ui/consent/consent-summary-section.js.map +0 -1
- package/lib/module/ui/consent/cop-information.js +0 -165
- package/lib/module/ui/consent/cop-information.js.map +0 -1
- package/lib/module/ui/consent/international-payment-summary.js +0 -94
- package/lib/module/ui/consent/international-payment-summary.js.map +0 -1
- package/lib/module/ui/consent/label-value-rows.js +0 -55
- package/lib/module/ui/consent/label-value-rows.js.map +0 -1
- package/lib/module/ui/consent/multi-payment-rules-list.js +0 -125
- package/lib/module/ui/consent/multi-payment-rules-list.js.map +0 -1
- package/lib/module/ui/consent/multi-payment-summary.js +0 -95
- package/lib/module/ui/consent/multi-payment-summary.js.map +0 -1
- package/lib/module/ui/consent/single-payment-summary.js +0 -154
- package/lib/module/ui/consent/single-payment-summary.js.map +0 -1
- package/lib/module/ui/consent/terms-link.js +0 -31
- package/lib/module/ui/consent/terms-link.js.map +0 -1
- package/lib/module/ui/hooks/use-payment-flow-state.js.map +0 -1
- package/lib/module/ui/payment-flow-page.js +0 -232
- package/lib/module/ui/payment-flow-page.js.map +0 -1
- package/lib/module/ui/screens/bank-selection-screen.js +0 -211
- package/lib/module/ui/screens/bank-selection-screen.js.map +0 -1
- package/lib/module/ui/screens/consent-details-screen.js +0 -120
- package/lib/module/ui/screens/consent-details-screen.js.map +0 -1
- package/lib/module/ui/screens/mandate-setup-success-screen.js +0 -75
- package/lib/module/ui/screens/mandate-setup-success-screen.js.map +0 -1
- package/lib/module/ui/widgets/layout-w-header.js +0 -102
- package/lib/module/ui/widgets/layout-w-header.js.map +0 -1
- package/lib/module/ui/widgets/stepper.js +0 -120
- package/lib/module/ui/widgets/stepper.js.map +0 -1
- package/lib/typescript/commonjs/core/client/link-api-client.d.ts +0 -70
- package/lib/typescript/commonjs/core/client/link-api-client.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/errors/payment-api-error.d.ts +0 -15
- package/lib/typescript/commonjs/core/errors/payment-api-error.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/models/link-session-status.d.ts +0 -6
- package/lib/typescript/commonjs/core/models/link-session-status.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/models/payment-type.d.ts +0 -18
- package/lib/typescript/commonjs/core/models/payment-type.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/models/wire-mappers.d.ts +0 -19
- package/lib/typescript/commonjs/core/models/wire-mappers.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/services/consent-presenter.d.ts +0 -67
- package/lib/typescript/commonjs/core/services/consent-presenter.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/services/execute-resume-if-needed.d.ts +0 -32
- package/lib/typescript/commonjs/core/services/execute-resume-if-needed.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/services/multi-payment-rules-presenter.d.ts +0 -9
- package/lib/typescript/commonjs/core/services/multi-payment-rules-presenter.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/services/payment-flow-controller.d.ts +0 -146
- package/lib/typescript/commonjs/core/services/payment-flow-controller.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/services/payment-flow-state.d.ts +0 -64
- package/lib/typescript/commonjs/core/services/payment-flow-state.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/services/payment-result-mapper.d.ts +0 -5
- package/lib/typescript/commonjs/core/services/payment-result-mapper.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/services/presentation-utils.d.ts +0 -5
- package/lib/typescript/commonjs/core/services/presentation-utils.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/services/redirect-buffer.d.ts +0 -6
- package/lib/typescript/commonjs/core/services/redirect-buffer.d.ts.map +0 -1
- package/lib/typescript/commonjs/core/services/user-friendly-messages.d.ts +0 -6
- package/lib/typescript/commonjs/core/services/user-friendly-messages.d.ts.map +0 -1
- package/lib/typescript/commonjs/internal/telemetry-collector.d.ts +0 -2
- package/lib/typescript/commonjs/internal/telemetry-collector.d.ts.map +0 -1
- package/lib/typescript/commonjs/public/constants.d.ts +0 -12
- package/lib/typescript/commonjs/public/constants.d.ts.map +0 -1
- package/lib/typescript/commonjs/public/spare-link-callbacks.d.ts +0 -14
- package/lib/typescript/commonjs/public/spare-link-callbacks.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/consent/charge-bearer-display.d.ts +0 -5
- package/lib/typescript/commonjs/ui/consent/charge-bearer-display.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/consent/consent-accordion.d.ts +0 -10
- package/lib/typescript/commonjs/ui/consent/consent-accordion.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/consent/consent-summary-section.d.ts +0 -6
- package/lib/typescript/commonjs/ui/consent/consent-summary-section.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/consent/cop-information.d.ts +0 -6
- package/lib/typescript/commonjs/ui/consent/cop-information.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/consent/international-payment-summary.d.ts +0 -6
- package/lib/typescript/commonjs/ui/consent/international-payment-summary.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/consent/label-value-rows.d.ts +0 -10
- package/lib/typescript/commonjs/ui/consent/label-value-rows.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/consent/multi-payment-rules-list.d.ts +0 -15
- package/lib/typescript/commonjs/ui/consent/multi-payment-rules-list.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/consent/multi-payment-summary.d.ts +0 -6
- package/lib/typescript/commonjs/ui/consent/multi-payment-summary.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/consent/single-payment-summary.d.ts +0 -6
- package/lib/typescript/commonjs/ui/consent/single-payment-summary.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/consent/terms-link.d.ts +0 -2
- package/lib/typescript/commonjs/ui/consent/terms-link.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/hooks/use-payment-flow-state.d.ts +0 -9
- package/lib/typescript/commonjs/ui/hooks/use-payment-flow-state.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/payment-flow-page.d.ts +0 -20
- package/lib/typescript/commonjs/ui/payment-flow-page.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/screens/bank-selection-screen.d.ts +0 -15
- package/lib/typescript/commonjs/ui/screens/bank-selection-screen.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/screens/consent-details-screen.d.ts +0 -13
- package/lib/typescript/commonjs/ui/screens/consent-details-screen.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/screens/mandate-setup-success-screen.d.ts +0 -10
- package/lib/typescript/commonjs/ui/screens/mandate-setup-success-screen.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/widgets/layout-w-header.d.ts +0 -20
- package/lib/typescript/commonjs/ui/widgets/layout-w-header.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/widgets/stepper.d.ts +0 -15
- package/lib/typescript/commonjs/ui/widgets/stepper.d.ts.map +0 -1
- package/lib/typescript/module/core/client/link-api-client.d.ts +0 -70
- package/lib/typescript/module/core/client/link-api-client.d.ts.map +0 -1
- package/lib/typescript/module/core/errors/payment-api-error.d.ts +0 -15
- package/lib/typescript/module/core/errors/payment-api-error.d.ts.map +0 -1
- package/lib/typescript/module/core/models/link-session-status.d.ts +0 -6
- package/lib/typescript/module/core/models/link-session-status.d.ts.map +0 -1
- package/lib/typescript/module/core/models/payment-type.d.ts +0 -18
- package/lib/typescript/module/core/models/payment-type.d.ts.map +0 -1
- package/lib/typescript/module/core/models/wire-mappers.d.ts +0 -19
- package/lib/typescript/module/core/models/wire-mappers.d.ts.map +0 -1
- package/lib/typescript/module/core/services/consent-presenter.d.ts +0 -67
- package/lib/typescript/module/core/services/consent-presenter.d.ts.map +0 -1
- package/lib/typescript/module/core/services/execute-resume-if-needed.d.ts +0 -32
- package/lib/typescript/module/core/services/execute-resume-if-needed.d.ts.map +0 -1
- package/lib/typescript/module/core/services/multi-payment-rules-presenter.d.ts +0 -9
- package/lib/typescript/module/core/services/multi-payment-rules-presenter.d.ts.map +0 -1
- package/lib/typescript/module/core/services/payment-flow-controller.d.ts +0 -146
- package/lib/typescript/module/core/services/payment-flow-controller.d.ts.map +0 -1
- package/lib/typescript/module/core/services/payment-flow-state.d.ts +0 -64
- package/lib/typescript/module/core/services/payment-flow-state.d.ts.map +0 -1
- package/lib/typescript/module/core/services/payment-result-mapper.d.ts +0 -5
- package/lib/typescript/module/core/services/payment-result-mapper.d.ts.map +0 -1
- package/lib/typescript/module/core/services/presentation-utils.d.ts +0 -5
- package/lib/typescript/module/core/services/presentation-utils.d.ts.map +0 -1
- package/lib/typescript/module/core/services/redirect-buffer.d.ts +0 -6
- package/lib/typescript/module/core/services/redirect-buffer.d.ts.map +0 -1
- package/lib/typescript/module/core/services/user-friendly-messages.d.ts +0 -6
- package/lib/typescript/module/core/services/user-friendly-messages.d.ts.map +0 -1
- package/lib/typescript/module/internal/telemetry-collector.d.ts +0 -2
- package/lib/typescript/module/internal/telemetry-collector.d.ts.map +0 -1
- package/lib/typescript/module/public/constants.d.ts +0 -12
- package/lib/typescript/module/public/constants.d.ts.map +0 -1
- package/lib/typescript/module/public/spare-link-callbacks.d.ts +0 -14
- package/lib/typescript/module/public/spare-link-callbacks.d.ts.map +0 -1
- package/lib/typescript/module/ui/consent/charge-bearer-display.d.ts +0 -5
- package/lib/typescript/module/ui/consent/charge-bearer-display.d.ts.map +0 -1
- package/lib/typescript/module/ui/consent/consent-accordion.d.ts +0 -10
- package/lib/typescript/module/ui/consent/consent-accordion.d.ts.map +0 -1
- package/lib/typescript/module/ui/consent/consent-summary-section.d.ts +0 -6
- package/lib/typescript/module/ui/consent/consent-summary-section.d.ts.map +0 -1
- package/lib/typescript/module/ui/consent/cop-information.d.ts +0 -6
- package/lib/typescript/module/ui/consent/cop-information.d.ts.map +0 -1
- package/lib/typescript/module/ui/consent/international-payment-summary.d.ts +0 -6
- package/lib/typescript/module/ui/consent/international-payment-summary.d.ts.map +0 -1
- package/lib/typescript/module/ui/consent/label-value-rows.d.ts +0 -10
- package/lib/typescript/module/ui/consent/label-value-rows.d.ts.map +0 -1
- package/lib/typescript/module/ui/consent/multi-payment-rules-list.d.ts +0 -15
- package/lib/typescript/module/ui/consent/multi-payment-rules-list.d.ts.map +0 -1
- package/lib/typescript/module/ui/consent/multi-payment-summary.d.ts +0 -6
- package/lib/typescript/module/ui/consent/multi-payment-summary.d.ts.map +0 -1
- package/lib/typescript/module/ui/consent/single-payment-summary.d.ts +0 -6
- package/lib/typescript/module/ui/consent/single-payment-summary.d.ts.map +0 -1
- package/lib/typescript/module/ui/consent/terms-link.d.ts +0 -2
- package/lib/typescript/module/ui/consent/terms-link.d.ts.map +0 -1
- package/lib/typescript/module/ui/hooks/use-payment-flow-state.d.ts +0 -9
- package/lib/typescript/module/ui/hooks/use-payment-flow-state.d.ts.map +0 -1
- package/lib/typescript/module/ui/payment-flow-page.d.ts +0 -20
- package/lib/typescript/module/ui/payment-flow-page.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/bank-selection-screen.d.ts +0 -15
- package/lib/typescript/module/ui/screens/bank-selection-screen.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/consent-details-screen.d.ts +0 -13
- package/lib/typescript/module/ui/screens/consent-details-screen.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/mandate-setup-success-screen.d.ts +0 -10
- package/lib/typescript/module/ui/screens/mandate-setup-success-screen.d.ts.map +0 -1
- package/lib/typescript/module/ui/widgets/layout-w-header.d.ts +0 -20
- package/lib/typescript/module/ui/widgets/layout-w-header.d.ts.map +0 -1
- package/lib/typescript/module/ui/widgets/stepper.d.ts +0 -15
- package/lib/typescript/module/ui/widgets/stepper.d.ts.map +0 -1
- package/src/core/client/link-api-client.ts +0 -414
- package/src/core/errors/payment-api-error.ts +0 -35
- package/src/core/models/link-session-status.ts +0 -7
- package/src/core/models/payment-type.ts +0 -54
- package/src/core/models/wire-mappers.ts +0 -315
- package/src/core/services/consent-presenter.ts +0 -213
- package/src/core/services/execute-resume-if-needed.ts +0 -243
- package/src/core/services/multi-payment-rules-presenter.ts +0 -158
- package/src/core/services/payment-flow-controller.ts +0 -607
- package/src/core/services/payment-flow-state.ts +0 -124
- package/src/core/services/payment-result-mapper.ts +0 -41
- package/src/core/services/presentation-utils.ts +0 -4
- package/src/core/services/redirect-buffer.ts +0 -34
- package/src/core/services/user-friendly-messages.ts +0 -39
- package/src/internal/telemetry-collector.ts +0 -90
- package/src/public/constants.ts +0 -14
- package/src/public/spare-link-callbacks.ts +0 -20
- package/src/ui/consent/charge-bearer-display.tsx +0 -68
- package/src/ui/consent/consent-accordion.tsx +0 -89
- package/src/ui/consent/consent-summary-section.tsx +0 -19
- package/src/ui/consent/cop-information.tsx +0 -121
- package/src/ui/consent/international-payment-summary.tsx +0 -83
- package/src/ui/consent/label-value-rows.tsx +0 -50
- package/src/ui/consent/multi-payment-rules-list.tsx +0 -138
- package/src/ui/consent/multi-payment-summary.tsx +0 -82
- package/src/ui/consent/single-payment-summary.tsx +0 -123
- package/src/ui/consent/terms-link.tsx +0 -27
- package/src/ui/hooks/use-payment-flow-state.ts +0 -16
- package/src/ui/payment-flow-page.tsx +0 -254
- package/src/ui/screens/bank-selection-screen.tsx +0 -209
- package/src/ui/screens/consent-details-screen.tsx +0 -106
- package/src/ui/screens/mandate-setup-success-screen.tsx +0 -72
- package/src/ui/widgets/layout-w-header.tsx +0 -89
- package/src/ui/widgets/stepper.tsx +0 -126
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
-
import { ActivityIndicator, Modal,
|
|
4
|
+
import { ActivityIndicator, Modal, StyleSheet, View } from 'react-native';
|
|
5
|
+
// `react-native`'s own SafeAreaView applies nothing on Android, which left the
|
|
6
|
+
// hosted page's header under the status bar there. This one insets both platforms.
|
|
7
|
+
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
5
8
|
import { enableScreens } from 'react-native-screens';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { executeResumeIfNeeded } from "../core/services/execute-resume-if-needed.js";
|
|
9
|
-
import { PaymentFlowController } from "../core/services/payment-flow-controller.js";
|
|
10
|
-
import { setBufferedRedirect } from "../core/services/redirect-buffer.js";
|
|
11
|
-
import { userFriendlyMessageFor } from "../core/services/user-friendly-messages.js";
|
|
12
|
-
import { launchBankRedirect as defaultLaunchBankRedirect } from "../internal/bank-redirect.js";
|
|
9
|
+
import { isPaymentReturnCallbackUri, readPaymentReturn } from "../core/models/payment-return-params.js";
|
|
10
|
+
import { HostedFlowController } from "../core/services/hosted-flow-controller.js";
|
|
13
11
|
import { createLogger } from "../internal/logger.js";
|
|
14
|
-
import {
|
|
12
|
+
import { redactPaymentReturnUri } from "../internal/redact-uri.js";
|
|
15
13
|
import { paymentAbandoned, paymentCancelled, paymentFailed, paymentSuccess } from "../public/payment-result.js";
|
|
16
|
-
import { tenantCountryCode } from "../public/spare-link-config.js";
|
|
17
14
|
import { SpareLinkEvents } from "../public/spare-link-event.js";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
15
|
+
import { noRecovery } from "../public/spare-link-instance.js";
|
|
16
|
+
import { HostedPaymentPage } from "./hosted/hosted-payment-page.js";
|
|
20
17
|
import { Colors } from "./theme/index.js";
|
|
21
18
|
import { useLinkFonts } from "./theme/fonts.js";
|
|
22
19
|
import { ModalDismissButton } from "./widgets/modal-dismiss-button.js";
|
|
@@ -25,7 +22,7 @@ enableScreens();
|
|
|
25
22
|
const log = createLogger('SpareLinkHost');
|
|
26
23
|
/**
|
|
27
24
|
* Host component that mounts the SDK modal and connects a {@link SpareLink}
|
|
28
|
-
* instance —
|
|
25
|
+
* instance — one instance, one host.
|
|
29
26
|
*/
|
|
30
27
|
export function SpareLinkHost(props) {
|
|
31
28
|
const {
|
|
@@ -37,194 +34,200 @@ export function SpareLinkHost(props) {
|
|
|
37
34
|
const fontsLoaded = useLinkFonts();
|
|
38
35
|
const [active, setActive] = useState(null);
|
|
39
36
|
const activeRef = useRef(null);
|
|
37
|
+
|
|
38
|
+
/** A return that arrived before there was a flow to give it to. */
|
|
39
|
+
const bufferedRedirect = useRef(null);
|
|
40
40
|
useEffect(() => {
|
|
41
41
|
activeRef.current = active;
|
|
42
42
|
}, [active]);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
void pendingSessionStore?.clear().catch(() => {
|
|
63
|
-
log.warning('close: pendingSessionStore.clear() failed — continuing');
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Serializes every write to the pending-session store.
|
|
46
|
+
*
|
|
47
|
+
* The store is pluggable, so it cannot be assumed to order its own writes: a
|
|
48
|
+
* `clear` overtaking a slow `save` would leave a record for a payment that has
|
|
49
|
+
* already resolved, and the next cold start would offer to recover it.
|
|
50
|
+
*/
|
|
51
|
+
const persistQueue = useRef(Promise.resolve());
|
|
52
|
+
const enqueuePersist = useCallback(op => {
|
|
53
|
+
const next = persistQueue.current.then(op, op);
|
|
54
|
+
// Kept un-rejected so one failure does not poison the queue behind it.
|
|
55
|
+
persistQueue.current = next.catch(() => undefined);
|
|
56
|
+
return next;
|
|
57
|
+
}, []);
|
|
58
|
+
const clearPending = useCallback(() => {
|
|
59
|
+
if (!pendingSessionStore) return;
|
|
60
|
+
void enqueuePersist(() => pendingSessionStore.clear()).catch(() => {
|
|
61
|
+
log.warning('could not clear the pending payment — continuing');
|
|
64
62
|
});
|
|
63
|
+
}, [pendingSessionStore, enqueuePersist]);
|
|
64
|
+
const close = useCallback((flow, result) => {
|
|
65
|
+
clearPending();
|
|
65
66
|
flow.resolve(result);
|
|
66
67
|
flow.controller.dispose();
|
|
67
68
|
if (activeRef.current === flow) {
|
|
68
69
|
activeRef.current = null;
|
|
69
70
|
setActive(null);
|
|
70
71
|
}
|
|
71
|
-
}, [
|
|
72
|
+
}, [clearPending]);
|
|
73
|
+
|
|
74
|
+
/** Maps a resolved flow onto the result the caller awaits. */
|
|
75
|
+
const resultFor = useCallback(flow => {
|
|
76
|
+
const s = flow.controller.state;
|
|
77
|
+
const base = {
|
|
78
|
+
reference: s.reference,
|
|
79
|
+
...reportedFields(s.report),
|
|
80
|
+
resolvedAtMs: Date.now()
|
|
81
|
+
};
|
|
82
|
+
switch (s.phase) {
|
|
83
|
+
case 'succeeded':
|
|
84
|
+
return paymentSuccess(base);
|
|
85
|
+
case 'cancelled':
|
|
86
|
+
return paymentCancelled(base);
|
|
87
|
+
case 'failed':
|
|
88
|
+
return paymentFailed({
|
|
89
|
+
...base,
|
|
90
|
+
errorCode: s.errorCode ?? 'internal_error'
|
|
91
|
+
});
|
|
92
|
+
default:
|
|
93
|
+
// Anything else resolving is the payer leaving mid-flow, which may still
|
|
94
|
+
// complete at the bank — so it is reported as unresolved, not as a failure.
|
|
95
|
+
return paymentAbandoned(base);
|
|
96
|
+
}
|
|
97
|
+
}, []);
|
|
98
|
+
const onResolved = useCallback(() => {
|
|
99
|
+
const current = activeRef.current;
|
|
100
|
+
if (!current) return;
|
|
101
|
+
close(current, resultFor(current));
|
|
102
|
+
}, [close, resultFor]);
|
|
72
103
|
const startFlow = useCallback(args => {
|
|
73
104
|
if (activeRef.current) {
|
|
74
|
-
log.warning('start: a payment
|
|
105
|
+
log.warning('start: a payment is already in progress — rejecting concurrent call');
|
|
75
106
|
args.resolve(paymentFailed({
|
|
76
|
-
|
|
107
|
+
reference: args.reference,
|
|
77
108
|
errorCode: 'concurrent_start',
|
|
78
|
-
message: 'A payment
|
|
109
|
+
message: 'A payment is already in progress.',
|
|
79
110
|
resolvedAtMs: Date.now()
|
|
80
111
|
}));
|
|
81
112
|
return;
|
|
82
113
|
}
|
|
83
114
|
log.info(`start: tenant=${spareLink.tenant}, environment=${spareLink.environment}`);
|
|
84
|
-
const controller = new
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
tenant: tenantCountryCode(spareLink.tenant),
|
|
90
|
-
...(spareLink.fetch ? {
|
|
91
|
-
fetch: spareLink.fetch
|
|
92
|
-
} : {}),
|
|
93
|
-
...(spareLink.requestTimeoutMs !== undefined ? {
|
|
94
|
-
requestTimeoutMs: spareLink.requestTimeoutMs
|
|
95
|
-
} : {})
|
|
96
|
-
}),
|
|
97
|
-
collectTelemetry,
|
|
98
|
-
...(pendingSessionStore ? {
|
|
99
|
-
pendingSessionStore
|
|
100
|
-
} : {}),
|
|
101
|
-
onEvent: event => {
|
|
102
|
-
emitMappedEvent(args.linkToken, event);
|
|
103
|
-
if (event === 'sessionLoaded') {
|
|
104
|
-
const linkSessionId = controller.state.linkSessionId;
|
|
105
|
-
if (linkSessionId) {
|
|
106
|
-
args.onSessionLoaded?.(linkSessionId);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
115
|
+
const controller = new HostedFlowController({
|
|
116
|
+
reference: args.reference,
|
|
117
|
+
...(launchBankRedirect ? {
|
|
118
|
+
bankLauncher: launchBankRedirect
|
|
119
|
+
} : {})
|
|
110
120
|
});
|
|
111
121
|
const flow = {
|
|
112
122
|
controller,
|
|
113
|
-
|
|
114
|
-
resolve: args.resolve
|
|
115
|
-
...(args.onSessionLoaded ? {
|
|
116
|
-
onSessionLoaded: args.onSessionLoaded
|
|
117
|
-
} : {})
|
|
123
|
+
reference: args.reference,
|
|
124
|
+
resolve: args.resolve
|
|
118
125
|
};
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
message: 'Unable to load payment session. Please try again.',
|
|
127
|
-
resolvedAtMs: Date.now()
|
|
128
|
-
}));
|
|
126
|
+
controller.subscribe(() => {
|
|
127
|
+
const phase = controller.state.phase;
|
|
128
|
+
if (phase === 'hosted') {
|
|
129
|
+
spareLink.emitEvent(SpareLinkEvents.pageReady(args.reference));
|
|
130
|
+
} else if (phase === 'redirecting') {
|
|
131
|
+
spareLink.emitEvent(SpareLinkEvents.redirectToBank(args.reference));
|
|
132
|
+
}
|
|
129
133
|
});
|
|
130
|
-
|
|
134
|
+
|
|
135
|
+
// Claimed synchronously so a second `start` in the same tick is rejected by
|
|
136
|
+
// the guard above rather than racing this one.
|
|
137
|
+
activeRef.current = flow;
|
|
138
|
+
|
|
139
|
+
// Recorded *before* the page is presented, so the payer cannot reach their
|
|
140
|
+
// bank on a payment a cold start would not know about. A store that cannot
|
|
141
|
+
// write is not a reason to refuse the payment.
|
|
142
|
+
const present = () => {
|
|
143
|
+
if (activeRef.current !== flow) return;
|
|
144
|
+
setActive(flow);
|
|
145
|
+
|
|
146
|
+
// A return can beat the page onto the screen when the app was resumed
|
|
147
|
+
// rather than launched, so replay one that arrived before there was a flow.
|
|
148
|
+
const buffered = bufferedRedirect.current;
|
|
149
|
+
if (buffered) {
|
|
150
|
+
bufferedRedirect.current = null;
|
|
151
|
+
controller.handleReturn(buffered);
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
if (!pendingSessionStore) {
|
|
155
|
+
present();
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
void enqueuePersist(() => pendingSessionStore.save({
|
|
159
|
+
reference: args.reference
|
|
160
|
+
})).catch(() => {
|
|
161
|
+
log.warning('could not record the pending payment — continuing');
|
|
162
|
+
}).finally(present);
|
|
163
|
+
}, [spareLink, pendingSessionStore, launchBankRedirect, enqueuePersist]);
|
|
131
164
|
const handleRedirect = useCallback(async uri => {
|
|
132
|
-
const current = activeRef.current;
|
|
133
165
|
const asString = typeof uri === 'string' ? uri : uri.toString();
|
|
166
|
+
log.info(`handleRedirect: ${redactPaymentReturnUri(asString)}`);
|
|
167
|
+
if (!isPaymentReturnCallbackUri(asString)) return false;
|
|
168
|
+
const current = activeRef.current;
|
|
134
169
|
if (!current) {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
return false;
|
|
138
|
-
}
|
|
139
|
-
setBufferedRedirect(asString);
|
|
140
|
-
log.info('handleRedirect: no active controller — buffering URI for recovery');
|
|
170
|
+
log.info('handleRedirect: no active payment — holding for recovery');
|
|
171
|
+
bufferedRedirect.current = asString;
|
|
141
172
|
return true;
|
|
142
173
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
log.info('handleRedirect: forwarding to controller');
|
|
148
|
-
try {
|
|
149
|
-
current.controller.handleCallback(uri);
|
|
150
|
-
spareLink.emitEvent(SpareLinkEvents.bankCallbackReceived(current.linkToken));
|
|
151
|
-
return true;
|
|
152
|
-
} catch {
|
|
153
|
-
return false;
|
|
154
|
-
}
|
|
155
|
-
}, [spareLink]);
|
|
156
|
-
const openRecoveryFlow = useCallback(args => {
|
|
157
|
-
if (activeRef.current) {
|
|
158
|
-
args.controller.dispose();
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
const flow = {
|
|
162
|
-
controller: args.controller,
|
|
163
|
-
linkToken: args.linkToken,
|
|
164
|
-
resolve: args.resolve ?? (() => {
|
|
165
|
-
/* recovery UI only */
|
|
166
|
-
})
|
|
167
|
-
};
|
|
168
|
-
activeRef.current = flow;
|
|
169
|
-
setActive(flow);
|
|
170
|
-
spareLink.emitEvent(SpareLinkEvents.initialized(args.linkToken));
|
|
174
|
+
spareLink.emitEvent(SpareLinkEvents.bankCallbackReceived(current.reference));
|
|
175
|
+
current.controller.handleReturn(asString);
|
|
176
|
+
return true;
|
|
171
177
|
}, [spareLink]);
|
|
172
178
|
const resumeIfNeeded = useCallback(async () => {
|
|
173
|
-
if (
|
|
179
|
+
if (activeRef.current) return noRecovery('flowAlreadyActive');
|
|
180
|
+
if (!pendingSessionStore) return noRecovery('persistenceUnavailable');
|
|
181
|
+
let record = null;
|
|
182
|
+
try {
|
|
183
|
+
record = await pendingSessionStore.load();
|
|
184
|
+
} catch {
|
|
185
|
+
log.warning('resumeIfNeeded: could not read the pending payment');
|
|
174
186
|
return noRecovery('persistenceUnavailable');
|
|
175
187
|
}
|
|
176
|
-
if (
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
} : {}),
|
|
191
|
-
...(spareLink.requestTimeoutMs !== undefined ? {
|
|
192
|
-
requestTimeoutMs: spareLink.requestTimeoutMs
|
|
193
|
-
} : {})
|
|
188
|
+
if (!record) return noRecovery('noPendingSession');
|
|
189
|
+
const buffered = bufferedRedirect.current;
|
|
190
|
+
if (buffered) {
|
|
191
|
+
const {
|
|
192
|
+
outcome,
|
|
193
|
+
report
|
|
194
|
+
} = readPaymentReturn(buffered);
|
|
195
|
+
|
|
196
|
+
// The buffered link is only this payment's if it says so. Pairing whatever
|
|
197
|
+
// arrived with whatever was persisted is how a callback for one payment
|
|
198
|
+
// resolves another.
|
|
199
|
+
if (report.reference !== undefined && report.reference !== record.reference) {
|
|
200
|
+
log.warning('resumeIfNeeded: the buffered return names a different payment — keeping it');
|
|
201
|
+
return noRecovery('outcomeUnknown', record.reference);
|
|
194
202
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
spareLink.emitTerminal(result);
|
|
209
|
-
}
|
|
210
|
-
});
|
|
203
|
+
bufferedRedirect.current = null;
|
|
204
|
+
clearPending();
|
|
205
|
+
const base = {
|
|
206
|
+
reference: record.reference,
|
|
207
|
+
...reportedFields(report),
|
|
208
|
+
resolvedAtMs: Date.now()
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
// A return that did not say what happened is not a failure — the backend
|
|
212
|
+
// holds the outcome, which is what `outcomeUnknown` tells the caller.
|
|
213
|
+
if (outcome === 'unknown') {
|
|
214
|
+
log.info('resumeIfNeeded: the buffered return did not say what happened');
|
|
215
|
+
return noRecovery('outcomeUnknown', record.reference);
|
|
211
216
|
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
217
|
+
const result = outcome === 'processed' ? paymentSuccess(base) : paymentFailed({
|
|
218
|
+
...base,
|
|
219
|
+
errorCode: report.errorCode ?? 'authorize_failed'
|
|
220
|
+
});
|
|
221
|
+
spareLink.emitTerminal(result);
|
|
215
222
|
return {
|
|
216
223
|
kind: 'recovered',
|
|
217
|
-
result
|
|
224
|
+
result
|
|
218
225
|
};
|
|
219
226
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
return noRecovery('noPendingSession');
|
|
227
|
-
}, [pendingSessionStore, spareLink, openRecoveryFlow]);
|
|
227
|
+
log.info('resumeIfNeeded: a payment was pending and no return arrived — the backend holds the outcome');
|
|
228
|
+
clearPending();
|
|
229
|
+
return noRecovery('outcomeUnknown', record.reference);
|
|
230
|
+
}, [pendingSessionStore, spareLink, clearPending]);
|
|
228
231
|
useEffect(() => {
|
|
229
232
|
const detach = spareLink._attachHost({
|
|
230
233
|
startFlow,
|
|
@@ -234,72 +237,34 @@ export function SpareLinkHost(props) {
|
|
|
234
237
|
});
|
|
235
238
|
return detach;
|
|
236
239
|
}, [spareLink, startFlow, handleRedirect, resumeIfNeeded]);
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
switch (s.phase) {
|
|
243
|
-
case 'succeeded':
|
|
244
|
-
result = paymentSuccess({
|
|
245
|
-
linkToken: current.linkToken,
|
|
246
|
-
...(s.exchangeCode ? {
|
|
247
|
-
exchangeCode: s.exchangeCode
|
|
248
|
-
} : {}),
|
|
249
|
-
...(s.linkSessionId ? {
|
|
250
|
-
linkSessionId: s.linkSessionId
|
|
251
|
-
} : {}),
|
|
252
|
-
...(s.merchantRef ? {
|
|
253
|
-
merchantRef: s.merchantRef
|
|
254
|
-
} : {}),
|
|
255
|
-
...(s.selectedProvider ? {
|
|
256
|
-
bankId: s.selectedProvider.id
|
|
257
|
-
} : {}),
|
|
258
|
-
...(s.session?.request?.type ? {
|
|
259
|
-
paymentType: s.session.request.type
|
|
260
|
-
} : {}),
|
|
261
|
-
resolvedAtMs: Date.now()
|
|
262
|
-
});
|
|
263
|
-
break;
|
|
264
|
-
case 'failed':
|
|
265
|
-
{
|
|
266
|
-
const errorCode = s.errorCode ?? 'unknown_error';
|
|
267
|
-
result = paymentFailed({
|
|
268
|
-
linkToken: current.linkToken,
|
|
269
|
-
errorCode,
|
|
270
|
-
message: userFriendlyMessageFor(errorCode),
|
|
271
|
-
resolvedAtMs: Date.now()
|
|
272
|
-
});
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
275
|
-
case 'cancelled':
|
|
276
|
-
result = paymentCancelled({
|
|
277
|
-
linkToken: current.linkToken,
|
|
278
|
-
resolvedAtMs: Date.now()
|
|
279
|
-
});
|
|
280
|
-
break;
|
|
281
|
-
default:
|
|
282
|
-
result = paymentAbandoned({
|
|
283
|
-
linkToken: current.linkToken,
|
|
284
|
-
resolvedAtMs: Date.now()
|
|
285
|
-
});
|
|
286
|
-
break;
|
|
287
|
-
}
|
|
288
|
-
close(current, result);
|
|
289
|
-
}, [close]);
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* A dismiss mid-flow means the payer left, which the caller must hear about — a
|
|
243
|
+
* silent close would strand whoever is awaiting the result.
|
|
244
|
+
*/
|
|
290
245
|
const onDismissPressed = useCallback(() => {
|
|
291
246
|
const current = activeRef.current;
|
|
292
|
-
if (!current)
|
|
293
|
-
|
|
294
|
-
|
|
247
|
+
if (!current) return;
|
|
248
|
+
current.controller.abandon();
|
|
249
|
+
close(current, resultFor(current));
|
|
250
|
+
}, [close, resultFor]);
|
|
251
|
+
const modalBody = useMemo(() => {
|
|
252
|
+
if (!active) return null;
|
|
253
|
+
if (!fontsLoaded) {
|
|
254
|
+
return /*#__PURE__*/_jsx(View, {
|
|
255
|
+
style: styles.fontLoading,
|
|
256
|
+
children: /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
257
|
+
size: "large",
|
|
258
|
+
color: Colors.spareBlue
|
|
259
|
+
})
|
|
260
|
+
});
|
|
295
261
|
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}, [
|
|
302
|
-
const launcher = useMemo(() => launchBankRedirect ?? defaultLaunchBankRedirect, [launchBankRedirect]);
|
|
262
|
+
return /*#__PURE__*/_jsx(HostedPaymentPage, {
|
|
263
|
+
controller: active.controller,
|
|
264
|
+
baseUrl: spareLink.resolvedBaseUrl,
|
|
265
|
+
onResolved: onResolved
|
|
266
|
+
});
|
|
267
|
+
}, [active, fontsLoaded, spareLink, onResolved]);
|
|
303
268
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
304
269
|
children: [props.children, /*#__PURE__*/_jsx(Modal, {
|
|
305
270
|
animationType: "slide",
|
|
@@ -317,17 +282,7 @@ export function SpareLinkHost(props) {
|
|
|
317
282
|
onPress: onDismissPressed
|
|
318
283
|
}), active ? /*#__PURE__*/_jsx(View, {
|
|
319
284
|
style: styles.flowWrap,
|
|
320
|
-
children:
|
|
321
|
-
controller: active.controller,
|
|
322
|
-
onResolved: onResolved,
|
|
323
|
-
launchBankRedirect: launcher
|
|
324
|
-
}) : /*#__PURE__*/_jsx(View, {
|
|
325
|
-
style: styles.fontLoading,
|
|
326
|
-
children: /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
327
|
-
size: "large",
|
|
328
|
-
color: Colors.spareBlue
|
|
329
|
-
})
|
|
330
|
-
})
|
|
285
|
+
children: modalBody
|
|
331
286
|
}) : null]
|
|
332
287
|
})
|
|
333
288
|
})]
|
|
@@ -347,4 +302,34 @@ const styles = StyleSheet.create({
|
|
|
347
302
|
justifyContent: 'center'
|
|
348
303
|
}
|
|
349
304
|
});
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Lifts what the return reported onto the result the caller awaits.
|
|
308
|
+
*
|
|
309
|
+
* `errorCode` is not among them: a failure's code has a fallback the report does
|
|
310
|
+
* not, so it is set where the failure is built.
|
|
311
|
+
*/
|
|
312
|
+
function reportedFields(report) {
|
|
313
|
+
if (!report) return {};
|
|
314
|
+
return {
|
|
315
|
+
...(report.merchantRef ? {
|
|
316
|
+
merchantRef: report.merchantRef
|
|
317
|
+
} : {}),
|
|
318
|
+
...(report.paymentId ? {
|
|
319
|
+
paymentId: report.paymentId
|
|
320
|
+
} : {}),
|
|
321
|
+
...(report.mandateId ? {
|
|
322
|
+
mandateId: report.mandateId
|
|
323
|
+
} : {}),
|
|
324
|
+
...(report.signature ? {
|
|
325
|
+
signature: report.signature
|
|
326
|
+
} : {}),
|
|
327
|
+
...(report.errorReason ? {
|
|
328
|
+
errorReason: report.errorReason
|
|
329
|
+
} : {}),
|
|
330
|
+
...(report.errorDescription ? {
|
|
331
|
+
message: report.errorDescription
|
|
332
|
+
} : {})
|
|
333
|
+
};
|
|
334
|
+
}
|
|
350
335
|
//# sourceMappingURL=spare-link-host.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useEffect","useMemo","useRef","useState","ActivityIndicator","Modal","SafeAreaView","StyleSheet","View","enableScreens","LinkApiClient","isPaymentReturnCallbackUri","executeResumeIfNeeded","PaymentFlowController","setBufferedRedirect","userFriendlyMessageFor","launchBankRedirect","defaultLaunchBankRedirect","createLogger","collectTelemetry","paymentAbandoned","paymentCancelled","paymentFailed","paymentSuccess","tenantCountryCode","SpareLinkEvents","mapHostRecovery","noRecovery","PaymentFlowPage","Colors","useLinkFonts","ModalDismissButton","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","log","SpareLinkHost","props","spareLink","showDismissButton","pendingSessionStore","fontsLoaded","active","setActive","activeRef","current","emitMappedEvent","linkToken","event","linkSessionId","emitEvent","sessionLoaded","consentStarted","redirectToBank","bankCallbackReceived","close","flow","result","clear","catch","warning","resolve","controller","dispose","startFlow","args","errorCode","message","resolvedAtMs","Date","now","info","tenant","environment","sessionToken","apiClient","baseUrl","resolvedBaseUrl","fetch","requestTimeoutMs","undefined","onEvent","state","onSessionLoaded","hydrate","err","severe","Error","String","handleRedirect","uri","asString","toString","fine","handleCallback","openRecoveryFlow","initialized","resumeIfNeeded","flowOpened","openedLinkToken","terminal","config","isFlowActive","emitTerminal","kind","detach","_attachHost","onResolved","s","phase","exchangeCode","merchantRef","selectedProvider","bankId","id","session","request","type","paymentType","onDismissPressed","abandoned","cancel","finally","launcher","children","animationType","visible","onRequestClose","presentationStyle","testID","accessibilityViewIsModal","accessibilityRole","style","styles","modalRoot","onPress","flowWrap","fontLoading","size","color","spareBlue","create","flex","backgroundColor","surfacePage","alignItems","justifyContent"],"sourceRoot":"../../../src","sources":["ui/spare-link-host.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACzE,SAASC,iBAAiB,EAAEC,KAAK,EAAEC,YAAY,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACvF,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,aAAa,QAAQ,mCAAgC;AAC9D,SAASC,0BAA0B,QAAQ,yCAAsC;AACjF,SAASC,qBAAqB,QAAQ,8CAA2C;AACjF,SAASC,qBAAqB,QAAQ,6CAA0C;AAEhF,SAASC,mBAAmB,QAAQ,qCAAkC;AACtE,SAASC,sBAAsB,QAAQ,4CAAyC;AAChF,SAASC,kBAAkB,IAAIC,yBAAyB,QAAQ,8BAA2B;AAC3F,SAASC,YAAY,QAAQ,uBAAoB;AACjD,SAASC,gBAAgB,QAAQ,oCAAiC;AAElE,SACEC,gBAAgB,EAChBC,gBAAgB,EAChBC,aAA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EQ,IAAI,EAAE,CAAC;IAAEC,eAAe,EAAErH,MAAM,CAACsH;EAAY,CAAC;EAC3DR,QAAQ,EAAE;IAAEM,IAAI,EAAE;EAAE,CAAC;EACrBL,WAAW,EAAE;IAAEK,IAAI,EAAE,CAAC;IAAEG,UAAU,EAAE,QAAQ;IAAEC,cAAc,EAAE;EAAS;AACzE,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["useCallback","useEffect","useMemo","useRef","useState","ActivityIndicator","Modal","StyleSheet","View","SafeAreaView","enableScreens","isPaymentReturnCallbackUri","readPaymentReturn","HostedFlowController","createLogger","redactPaymentReturnUri","paymentAbandoned","paymentCancelled","paymentFailed","paymentSuccess","SpareLinkEvents","noRecovery","HostedPaymentPage","Colors","useLinkFonts","ModalDismissButton","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","log","SpareLinkHost","props","spareLink","showDismissButton","launchBankRedirect","pendingSessionStore","fontsLoaded","active","setActive","activeRef","bufferedRedirect","current","persistQueue","Promise","resolve","enqueuePersist","op","next","then","catch","undefined","clearPending","clear","warning","close","flow","result","controller","dispose","resultFor","s","state","base","reference","reportedFields","report","resolvedAtMs","Date","now","phase","errorCode","onResolved","startFlow","args","message","info","tenant","environment","bankLauncher","subscribe","emitEvent","pageReady","redirectToBank","present","buffered","handleReturn","save","finally","handleRedirect","uri","asString","toString","bankCallbackReceived","resumeIfNeeded","record","load","outcome","emitTerminal","kind","detach","_attachHost","isFlowActive","onDismissPressed","abandon","modalBody","style","styles","fontLoading","children","size","color","spareBlue","baseUrl","resolvedBaseUrl","animationType","visible","onRequestClose","presentationStyle","testID","accessibilityViewIsModal","accessibilityRole","modalRoot","onPress","flowWrap","create","flex","backgroundColor","surfacePage","alignItems","justifyContent","merchantRef","paymentId","mandateId","signature","errorReason","errorDescription"],"sourceRoot":"../../../src","sources":["ui/spare-link-host.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM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AAE,CAAC;IAAEC,eAAe,EAAE1G,MAAM,CAAC2G;EAAY,CAAC;EAC3DJ,QAAQ,EAAE;IAAEE,IAAI,EAAE;EAAE,CAAC;EACrBlB,WAAW,EAAE;IAAEkB,IAAI,EAAE,CAAC;IAAEG,UAAU,EAAE,QAAQ;IAAEC,cAAc,EAAE;EAAS;AACzE,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,SAASjE,cAAcA,CAACC,MAAuC,EAAE;EAC/D,IAAI,CAACA,MAAM,EAAE,OAAO,CAAC,CAAC;EACtB,OAAO;IACL,IAAIA,MAAM,CAACiE,WAAW,GAAG;MAAEA,WAAW,EAAEjE,MAAM,CAACiE;IAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IAClE,IAAIjE,MAAM,CAACkE,SAAS,GAAG;MAAEA,SAAS,EAAElE,MAAM,CAACkE;IAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5D,IAAIlE,MAAM,CAACmE,SAAS,GAAG;MAAEA,SAAS,EAAEnE,MAAM,CAACmE;IAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5D,IAAInE,MAAM,CAACoE,SAAS,GAAG;MAAEA,SAAS,EAAEpE,MAAM,CAACoE;IAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5D,IAAIpE,MAAM,CAACqE,WAAW,GAAG;MAAEA,WAAW,EAAErE,MAAM,CAACqE;IAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IAClE,IAAIrE,MAAM,CAACsE,gBAAgB,GAAG;MAAE7D,OAAO,EAAET,MAAM,CAACsE;IAAiB,CAAC,GAAG,CAAC,CAAC;EACzE,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
export { CustomStepper } from "./stepper.js";
|
|
4
|
-
export { LayoutWHeader } from "./layout-w-header.js";
|
|
5
3
|
export { Footer } from "./footer.js";
|
|
6
4
|
export { GradientSpinner } from "./gradient-spinner.js";
|
|
7
5
|
export { HandoffScreenLayout } from "./handoff-screen-layout.js";
|
|
6
|
+
export { ModalDismissButton } from "./modal-dismiss-button.js";
|
|
8
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["Footer","GradientSpinner","HandoffScreenLayout","ModalDismissButton"],"sourceRoot":"../../../../src","sources":["ui/widgets/index.ts"],"mappings":";;AAAA,SAASA,MAAM,QAA0B,aAAU;AACnD,SAASC,eAAe,QAAmC,uBAAoB;AAC/E,SAASC,mBAAmB,QAAuC,4BAAyB;AAC5F,SAASC,kBAAkB,QAAsC,2BAAwB","ignoreList":[]}
|
package/lib/module/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SDK_VERSION"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,WAAW,GAAG,
|
|
1
|
+
{"version":3,"names":["SDK_VERSION"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,WAAW,GAAG,OAAgB","ignoreList":[]}
|