@justifi/webcomponents 6.0.0-rc.8 → 6.0.0
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/dist/cjs/{Api-y2G49jOh.js → Api-CwTLkFY4.js} +2 -2
- package/dist/cjs/{Refund-BVZHsa6Z.js → Refund-BPSBtjQC.js} +3 -1
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +3 -3
- package/dist/cjs/{badge-CcJ9H85-.js → badge-BmOSt4gS.js} +1 -1
- package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +9 -9
- package/dist/cjs/bank-account-form.cjs.entry.js +10 -15
- package/dist/cjs/business-details-core.cjs.entry.js +6 -21
- package/dist/cjs/{business.service-D5IhSyRJ.js → business.service-Dkhqyggm.js} +2 -2
- package/dist/cjs/{button-DsHDMHaa.js → button-7c2RN2yp.js} +2 -3
- package/dist/cjs/card-form.cjs.entry.js +10 -19
- package/dist/cjs/{check-pkg-version-BJaFyEGj.js → check-pkg-version-7FBAUhHw.js} +3 -3
- package/dist/cjs/{checkout.service-4aS641tN.js → checkout.service-LwZVVgP5.js} +2 -2
- package/dist/cjs/checkout.store-C3f3E24L.js +84 -0
- package/dist/cjs/checkouts-list-core.cjs.entry.js +11 -11
- package/dist/cjs/{payments-list-params-state-Cewmin_p.js → checkouts-list-params-state-C4c8UZtP.js} +1 -1
- package/dist/cjs/{checkouts-table-B_gpjGhs.js → checkouts-table-BQUhZZd_.js} +4 -6
- package/dist/cjs/{config-state-BBOZIS8x.js → config-state-B_gyIchD.js} +1 -1
- package/dist/cjs/custom-popper_2.cjs.entry.js +3 -3
- package/dist/cjs/{dispute.service-64ciJH0r.js → dispute.service-927Gzb0N.js} +2 -2
- package/dist/cjs/form-alert_5.cjs.entry.js +1 -1
- package/dist/cjs/form-control-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/form-control-date.cjs.entry.js +4 -4
- package/dist/cjs/{form-control-error-text-B-P5UDhm.js → form-control-error-text-DD0dHGu8.js} +1 -1
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +5 -5
- package/dist/cjs/{form-control-help-text-JoZjhb9m.js → form-control-help-text-2QwKi78M.js} +1 -1
- package/dist/cjs/form-control-help-text.cjs.entry.js +1 -1
- package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +3 -3
- package/dist/cjs/form-control-monetary.cjs.entry.js +6 -6
- package/dist/cjs/form-control-number-masked_2.cjs.entry.js +4 -4
- package/dist/cjs/form-control-number.cjs.entry.js +5 -5
- package/dist/cjs/form-control-radio.cjs.entry.js +3 -3
- package/dist/cjs/form-control-select_2.cjs.entry.js +6 -6
- package/dist/cjs/{get-payment-details-DE5xUUpt.js → get-payment-details-BSxp1HX0.js} +2 -2
- package/dist/cjs/{get-subaccounts-CH477rHs.js → get-subaccounts-B31f95PR.js} +3 -3
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +5 -5
- package/dist/cjs/{header-1-DRA3f4Jh.js → header-1-DMsp0XM7.js} +1 -1
- package/dist/cjs/{header-3-sOdOpfx3.js → header-3-BSvFq_IF.js} +1 -1
- package/dist/cjs/hidden-input_2.cjs.entry.js +8 -8
- package/dist/cjs/{checkout.store-MSwLBCby.js → index-C2ITzalN.js} +29 -41
- package/dist/cjs/{index-B32W0A3m.js → index-D1Ba20gi.js} +1 -1
- package/dist/cjs/{index-C9hBD-32.js → index-Dyzl8Hn6.js} +8 -2
- package/dist/cjs/index.cjs.js +8 -0
- package/dist/cjs/{insurance-state-d2thhXUX.js → insurance-state-uWOl6jJN.js} +2 -2
- package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +9 -24
- package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +8 -8
- package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +9 -9
- package/dist/cjs/justifi-apple-pay.cjs.entry.js +177 -86
- package/dist/cjs/justifi-bank-account-billing-form-simple_9.cjs.entry.js +24 -42
- package/dist/cjs/justifi-business-details.cjs.entry.js +10 -10
- package/dist/cjs/justifi-business-form.cjs.entry.js +15 -30
- package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +1 -1
- package/dist/cjs/justifi-checkout-summary_7.cjs.entry.js +196 -164
- package/dist/cjs/justifi-checkout.cjs.entry.js +19 -11
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +8 -8
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +14 -14
- package/dist/cjs/justifi-config-provider.cjs.entry.js +3 -3
- package/dist/cjs/justifi-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +10 -10
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +15 -15
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +9 -9
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +16 -44
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payment-details.cjs.entry.js +11 -11
- package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +14 -16
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payments-list.cjs.entry.js +14 -14
- package/dist/cjs/justifi-payout-details.cjs.entry.js +10 -10
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +16 -22
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +15 -15
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +15 -21
- package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +14 -25
- package/dist/cjs/justifi-skeleton.cjs.entry.js +4 -4
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +9 -9
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +12 -12
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +8 -8
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +14 -14
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-DqvfEWsE.js → package-BNN5fdIc.js} +1 -1
- package/dist/cjs/pagination-menu.cjs.entry.js +1 -1
- package/dist/cjs/payment-details-core.cjs.entry.js +16 -28
- package/dist/cjs/payment-method-option.cjs.entry.js +3 -3
- package/dist/cjs/{payment.service--kzMop3L.js → payment.service-DUq-W7tS.js} +2 -2
- package/dist/cjs/payments-list-core.cjs.entry.js +12 -12
- package/dist/cjs/{payouts-list-params-state-Cewmin_p.js → payments-list-params-state-C4c8UZtP.js} +1 -1
- package/dist/cjs/{payments-status-DXRh_ekP.js → payments-status-3iIQkoov.js} +2 -2
- package/dist/cjs/{payments-table-DFRtk-T9.js → payments-table-BSHUQhM-.js} +4 -6
- package/dist/cjs/payout-details-core.cjs.entry.js +12 -24
- package/dist/cjs/{payout.service-D3omzNG_.js → payout.service-DoKMr8Xw.js} +2 -2
- package/dist/cjs/payouts-list-core.cjs.entry.js +12 -12
- package/dist/cjs/{terminal-orders-list-params-state-Cewmin_p.js → payouts-list-params-state-C4c8UZtP.js} +1 -1
- package/dist/cjs/{payouts-status-DxTQZv3i.js → payouts-status-DoQbxIms.js} +2 -2
- package/dist/cjs/{payouts-table-DE3t0x93.js → payouts-table-BD_Fhz_j.js} +5 -7
- package/dist/cjs/{skeleton-C7DQRD6r.js → skeleton-CuIMC98G.js} +1 -1
- package/dist/cjs/spinner-CMZXdrPe.js +10 -0
- package/dist/cjs/{styled-host-BfVJlAsJ.js → styled-host-2KXbjOFw.js} +2 -4
- package/dist/cjs/{table-Ccdrt0v_.js → table-DlQCUVag.js} +5 -11
- package/dist/cjs/table-filters-menu.cjs.entry.js +3 -3
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +11 -11
- package/dist/cjs/{checkouts-list-params-state-Cewmin_p.js → terminal-orders-list-params-state-C4c8UZtP.js} +1 -1
- package/dist/cjs/{terminal-orders-table-B1LJitwE.js → terminal-orders-table-t6XxNy_K.js} +7 -11
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +2 -2
- package/dist/cjs/{terminal.service-BOvYfpQW.js → terminal.service-Iyje71vN.js} +2 -2
- package/dist/cjs/terminals-list-core.cjs.entry.js +11 -11
- package/dist/cjs/terminals-list-params-state-C4c8UZtP.js +22 -0
- package/dist/cjs/{terminals-table-DYt7exFQ.js → terminals-table-BTdKRiBN.js} +3 -3
- package/dist/cjs/{utils-BaGF9XIe.js → utils-ChCUZgUy.js} +6 -0
- package/dist/cjs/utils-FFP5ZHyE.js +18 -0
- package/dist/cjs/webcomponents.cjs.js +3 -3
- package/dist/collection/api/Payment.js +2 -0
- package/dist/collection/api/index.js +1 -2
- package/dist/collection/api/services/apple-pay.service.js +95 -8
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +6 -3
- package/dist/collection/components/checkout/card-form/card-form.js +6 -3
- package/dist/collection/components/checkout/checkout.js +16 -1
- package/dist/collection/components/checkout/save-new-payment-method.js +26 -1
- package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list-filters.js +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list.js +1 -1
- package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
- package/dist/collection/components/dispute-management/dispute-management.js +1 -1
- package/dist/collection/components/dispute-management/dispute-notification.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
- package/dist/collection/components/filters/table-filters-menu.js +1 -1
- package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
- package/dist/collection/components/modular-checkout/ModularCheckout.js +27 -0
- package/dist/collection/components/modular-checkout/modular-checkout.js +130 -66
- package/dist/collection/components/modular-checkout/sub-components/apple-pay-skeleton.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/apple-pay.js +72 -70
- package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/card-form.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/plaid-payment-method.js +57 -65
- package/dist/collection/components/modular-checkout/sub-components/plaid-payment-method.test.js +8 -6
- package/dist/collection/components/modular-checkout/sub-components/saved-payment-methods.js +8 -10
- package/dist/collection/components/modular-checkout/sub-components/sezzle-payment-method.js +22 -7
- package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
- package/dist/collection/components/order-terminals/order-terminals.js +1 -1
- package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
- package/dist/collection/components/payment-details/payment-details-core.js +8 -8
- package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +1 -1
- package/dist/collection/components/payments-list/payments-list-core.js +1 -1
- package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
- package/dist/collection/components/payments-list/payments-list.js +1 -1
- package/dist/collection/components/payout-details/payout-details-core.js +3 -3
- package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +1 -1
- package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
- package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
- package/dist/collection/components/payouts-list/payouts-list.js +1 -1
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
- package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list.js +1 -1
- package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +29 -10
- package/dist/collection/index.js +1 -0
- package/dist/collection/store/checkout.store.js +46 -3
- package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
- package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
- package/dist/collection/ui-components/form/form-control-date.js +2 -2
- package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
- package/dist/collection/ui-components/form/form-control-file.js +2 -2
- package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
- package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
- package/dist/collection/ui-components/form/form-control-number.js +2 -2
- package/dist/collection/ui-components/form/form-control-radio.js +5 -5
- package/dist/collection/ui-components/form/form-control-select.js +2 -2
- package/dist/collection/ui-components/form/form-control-text.js +2 -2
- package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
- package/dist/collection/ui-components/form/hidden-input.js +1 -1
- package/dist/collection/ui-components/form/iframe-input.js +3 -3
- package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-radio-list-item.js +4 -4
- package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
- package/dist/collection/utils/utils.js +5 -0
- package/dist/docs.json +186 -86
- package/dist/esm/{Api-C1I68Tfr.js → Api-D4tj-h4P.js} +2 -2
- package/dist/esm/{Refund-kKW8S1h6.js → Refund-Bc5By0lb.js} +3 -1
- package/dist/esm/additional-questions-details_5.entry.js +3 -3
- package/dist/esm/{badge-DSYSJcRy.js → badge-ChwzCNAF.js} +1 -1
- package/dist/esm/bank-account-document-form-inputs_4.entry.js +9 -9
- package/dist/esm/bank-account-form.entry.js +10 -15
- package/dist/esm/business-details-core.entry.js +6 -21
- package/dist/esm/{business.service-B3wlBl1x.js → business.service-CsbtEDNi.js} +2 -2
- package/dist/esm/{button-CpllL0At.js → button-SAIS_5os.js} +2 -3
- package/dist/esm/card-form.entry.js +10 -19
- package/dist/esm/{check-pkg-version-ucd96eu6.js → check-pkg-version-BUkwdVdm.js} +3 -3
- package/dist/esm/{checkout.service-KDp7tISm.js → checkout.service-BCkQ9pOA.js} +2 -2
- package/dist/esm/checkout.store-DBvS7cVB.js +79 -0
- package/dist/esm/checkouts-list-core.entry.js +11 -11
- package/dist/esm/{checkouts-list-params-state-D8tzsGR_.js → checkouts-list-params-state-C2_GlMKR.js} +1 -1
- package/dist/esm/{checkouts-table-QOdiLpak.js → checkouts-table-CItEo0DU.js} +4 -6
- package/dist/esm/{config-state-DZeVYerv.js → config-state-Blo0ywwc.js} +1 -1
- package/dist/esm/custom-popper_2.entry.js +3 -3
- package/dist/esm/{dispute.service-DEZEPwn-.js → dispute.service-CyLtJREK.js} +2 -2
- package/dist/esm/form-alert_5.entry.js +1 -1
- package/dist/esm/form-control-checkbox.entry.js +5 -5
- package/dist/esm/form-control-date.entry.js +4 -4
- package/dist/esm/{form-control-error-text-R7U07nTg.js → form-control-error-text-IXJJ4JpV.js} +1 -1
- package/dist/esm/form-control-file-v2_2.entry.js +5 -5
- package/dist/esm/{form-control-help-text-CRLH-2f7.js → form-control-help-text-CuhIsM3v.js} +1 -1
- package/dist/esm/form-control-help-text.entry.js +1 -1
- package/dist/esm/form-control-monetary-provisioning.entry.js +3 -3
- package/dist/esm/form-control-monetary.entry.js +6 -6
- package/dist/esm/form-control-number-masked_2.entry.js +4 -4
- package/dist/esm/form-control-number.entry.js +5 -5
- package/dist/esm/form-control-radio.entry.js +3 -3
- package/dist/esm/form-control-select_2.entry.js +6 -6
- package/dist/esm/{get-payment-details-CYASKLT7.js → get-payment-details-BuT0QNOo.js} +2 -2
- package/dist/esm/{get-subaccounts-E0PYy_pc.js → get-subaccounts-VjY6-x_9.js} +3 -3
- package/dist/esm/gross-payment-chart-core.entry.js +5 -5
- package/dist/esm/{header-1-3M9If0gM.js → header-1-zXsamUS3.js} +1 -1
- package/dist/esm/{header-3-CWa41YWq.js → header-3-DVtaUAlf.js} +1 -1
- package/dist/esm/hidden-input_2.entry.js +8 -8
- package/dist/esm/{checkout.store-UMe84fjY.js → index-DCIW8z1f.js} +27 -38
- package/dist/esm/{index-B_KxSZIF.js → index-ZfXl6Xrm.js} +1 -1
- package/dist/esm/{index-Bn7inNWG.js → index-qipqIMyC.js} +8 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/{insurance-state-CTalqbNa.js → insurance-state-Dh9f36Qh.js} +2 -2
- package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +9 -24
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +8 -8
- package/dist/esm/justifi-additional-statement_8.entry.js +9 -9
- package/dist/esm/justifi-apple-pay.entry.js +177 -86
- package/dist/esm/justifi-bank-account-billing-form-simple_9.entry.js +24 -42
- package/dist/esm/justifi-business-details.entry.js +10 -10
- package/dist/esm/justifi-business-form.entry.js +15 -30
- package/dist/esm/justifi-business-representative-form-inputs.entry.js +1 -1
- package/dist/esm/justifi-checkout-summary_7.entry.js +189 -157
- package/dist/esm/justifi-checkout.entry.js +19 -11
- package/dist/esm/justifi-checkouts-list-filters.entry.js +8 -8
- package/dist/esm/justifi-checkouts-list.entry.js +14 -14
- package/dist/esm/justifi-config-provider.entry.js +3 -3
- package/dist/esm/justifi-details.entry.js +2 -2
- package/dist/esm/justifi-dispute-management-core.entry.js +2 -2
- package/dist/esm/justifi-dispute-management.entry.js +10 -10
- package/dist/esm/justifi-dispute-notification_3.entry.js +15 -15
- package/dist/esm/justifi-gross-payment-chart.entry.js +9 -9
- package/dist/esm/justifi-order-terminals.entry.js +16 -44
- package/dist/esm/justifi-owner-form_3.entry.js +8 -8
- package/dist/esm/justifi-payment-details.entry.js +11 -11
- package/dist/esm/justifi-payment-provisioning-core.entry.js +3 -3
- package/dist/esm/justifi-payment-provisioning.entry.js +9 -9
- package/dist/esm/justifi-payment-transactions-list.entry.js +14 -16
- package/dist/esm/justifi-payments-list-filters.entry.js +7 -7
- package/dist/esm/justifi-payments-list.entry.js +14 -14
- package/dist/esm/justifi-payout-details.entry.js +10 -10
- package/dist/esm/justifi-payout-transactions-list.entry.js +16 -22
- package/dist/esm/justifi-payouts-list-filters.entry.js +7 -7
- package/dist/esm/justifi-payouts-list.entry.js +15 -15
- package/dist/esm/justifi-refund-payment.entry.js +15 -21
- package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +14 -25
- package/dist/esm/justifi-skeleton.entry.js +4 -4
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +9 -9
- package/dist/esm/justifi-terminal-orders-list.entry.js +12 -12
- package/dist/esm/justifi-terminals-list-filters.entry.js +8 -8
- package/dist/esm/justifi-terminals-list.entry.js +14 -14
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{package-D51QuD44.js → package-BBpkkt2-.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +1 -1
- package/dist/esm/payment-details-core.entry.js +16 -28
- package/dist/esm/payment-method-option.entry.js +3 -3
- package/dist/esm/{payment.service-uJpJaX2Z.js → payment.service-QJEmd6Nl.js} +2 -2
- package/dist/esm/payments-list-core.entry.js +12 -12
- package/dist/esm/{payments-list-params-state-D8tzsGR_.js → payments-list-params-state-C2_GlMKR.js} +1 -1
- package/dist/esm/{payments-status-5orNU2Rd.js → payments-status-DDafc8Yr.js} +2 -2
- package/dist/esm/{payments-table-B0uyodyJ.js → payments-table-De3Jb6rY.js} +4 -6
- package/dist/esm/payout-details-core.entry.js +12 -24
- package/dist/esm/{payout.service-ClUgtbbb.js → payout.service-XxyEr0rj.js} +2 -2
- package/dist/esm/payouts-list-core.entry.js +12 -12
- package/dist/esm/{payouts-list-params-state-D8tzsGR_.js → payouts-list-params-state-C2_GlMKR.js} +1 -1
- package/dist/esm/{payouts-status-CZPwa2AE.js → payouts-status-u1eSRz3Q.js} +2 -2
- package/dist/esm/{payouts-table-CaCSX_0q.js → payouts-table-BO-MCzXj.js} +5 -7
- package/dist/esm/{skeleton-qMb0_Cjy.js → skeleton-DtpkgjZ6.js} +1 -1
- package/dist/esm/spinner-CIXUVK4F.js +8 -0
- package/dist/esm/{styled-host-CTAGIN84.js → styled-host-CbizlfAU.js} +2 -4
- package/dist/esm/{table-Br3n9Xu-.js → table-DcRHK_sm.js} +5 -11
- package/dist/esm/table-filters-menu.entry.js +3 -3
- package/dist/esm/terminal-orders-list-core.entry.js +11 -11
- package/dist/esm/{terminal-orders-list-params-state-D8tzsGR_.js → terminal-orders-list-params-state-C2_GlMKR.js} +1 -1
- package/dist/esm/{terminal-orders-table-DPtof5Zb.js → terminal-orders-table-9nsnrAq8.js} +7 -11
- package/dist/esm/terminal-quantity-selector.entry.js +2 -2
- package/dist/esm/{terminal.service-ClNtE3e-.js → terminal.service-D2oETGnk.js} +2 -2
- package/dist/esm/terminals-list-core.entry.js +11 -11
- package/dist/esm/terminals-list-params-state-C2_GlMKR.js +16 -0
- package/dist/esm/{terminals-table-ClkR_jrC.js → terminals-table-C6NO2m-t.js} +3 -3
- package/dist/esm/{utils-lb8p1Exq.js → utils-BscIVFn8.js} +6 -1
- package/dist/esm/utils-_ckvHjSW.js +11 -0
- package/dist/esm/webcomponents.js +4 -4
- package/dist/module/ModularCheckout.js +57 -0
- package/dist/module/Refund.js +2 -0
- package/dist/module/additional-questions-details2.js +4 -2
- package/dist/module/additional-questions.js +4 -2
- package/dist/module/additional-statement.js +5 -3
- package/dist/module/bank-account-billing-form-simple.js +4 -2
- package/dist/module/bank-account-document-inputs.js +4 -2
- package/dist/module/bank-account-form-inputs2.js +4 -2
- package/dist/module/bank-account-form.js +10 -13
- package/dist/module/bank-account.js +7 -13
- package/dist/module/billing-form-full.js +4 -2
- package/dist/module/billing-form.js +4 -2
- package/dist/module/business-additional-questions-form-step-core.js +4 -2
- package/dist/module/business-additional-questions-form-step.js +4 -2
- package/dist/module/business-bank-account-form-step-core.js +4 -2
- package/dist/module/business-bank-account-form-step.js +4 -2
- package/dist/module/business-core-info-form-step-core.js +4 -2
- package/dist/module/business-core-info-form-step.js +4 -2
- package/dist/module/business-core-info.js +4 -2
- package/dist/module/business-details-core2.js +6 -19
- package/dist/module/business-documents-on-file2.js +4 -2
- package/dist/module/business-owners-form-step-core.js +4 -2
- package/dist/module/business-owners-form-step.js +4 -2
- package/dist/module/business-representative-form-inputs.js +4 -2
- package/dist/module/business-representative-form-step-core.js +4 -2
- package/dist/module/business-representative-form-step.js +4 -2
- package/dist/module/business-representative.js +4 -2
- package/dist/module/business-terms-conditions-form-step.js +4 -2
- package/dist/module/button.js +1 -2
- package/dist/module/cancellation-policy.js +5 -3
- package/dist/module/card-billing-form-simple.js +4 -2
- package/dist/module/card-form.js +10 -17
- package/dist/module/card-form2.js +7 -17
- package/dist/module/checkout.store.js +42 -31
- package/dist/module/checkouts-list-core2.js +6 -6
- package/dist/module/core-info-details2.js +4 -2
- package/dist/module/custom-popper2.js +6 -4
- package/dist/module/customer-details.js +5 -3
- package/dist/module/details.js +4 -2
- package/dist/module/dispute-management-core.js +5 -3
- package/dist/module/dispute-notification.js +5 -3
- package/dist/module/dispute-response-core.js +5 -3
- package/dist/module/dispute-response.js +5 -3
- package/dist/module/duplicate-charge.js +5 -3
- package/dist/module/electronic-evidence.js +5 -3
- package/dist/module/form-alert2.js +4 -2
- package/dist/module/form-control-checkbox2.js +6 -4
- package/dist/module/form-control-date2.js +6 -4
- package/dist/module/form-control-file-v22.js +5 -3
- package/dist/module/form-control-file2.js +6 -4
- package/dist/module/form-control-help-text2.js +4 -2
- package/dist/module/form-control-monetary-provisioning2.js +4 -2
- package/dist/module/form-control-monetary2.js +6 -4
- package/dist/module/form-control-number-masked2.js +6 -4
- package/dist/module/form-control-number.js +6 -4
- package/dist/module/form-control-radio2.js +7 -5
- package/dist/module/form-control-select2.js +6 -4
- package/dist/module/form-control-text2.js +6 -4
- package/dist/module/form-control-textarea2.js +6 -4
- package/dist/module/form-control-tooltip2.js +4 -2
- package/dist/module/gross-payment-chart-core2.js +6 -4
- package/dist/module/hidden-input2.js +5 -3
- package/dist/module/identity-address-form.js +4 -2
- package/dist/module/iframe-input2.js +7 -5
- package/dist/module/index.js +1 -0
- package/dist/module/justifi-apple-pay.js +174 -86
- package/dist/module/justifi-business-details.js +4 -2
- package/dist/module/justifi-business-form.js +6 -19
- package/dist/module/justifi-button2.js +5 -3
- package/dist/module/justifi-checkout.js +15 -4
- package/dist/module/justifi-checkouts-list-filters.js +5 -3
- package/dist/module/justifi-checkouts-list.js +5 -3
- package/dist/module/justifi-config-provider.js +4 -2
- package/dist/module/justifi-dispute-management.js +5 -3
- package/dist/module/justifi-gross-payment-chart.js +4 -2
- package/dist/module/justifi-header2.js +5 -3
- package/dist/module/justifi-order-terminals.js +9 -35
- package/dist/module/justifi-payment-details.js +4 -2
- package/dist/module/justifi-payment-provisioning.js +4 -2
- package/dist/module/justifi-payment-transactions-list.js +6 -6
- package/dist/module/justifi-payments-list-filters.js +6 -4
- package/dist/module/justifi-payments-list.js +5 -3
- package/dist/module/justifi-payout-details.js +4 -2
- package/dist/module/justifi-payout-transactions-list.js +8 -12
- package/dist/module/justifi-payouts-list-filters.js +6 -4
- package/dist/module/justifi-payouts-list.js +5 -3
- package/dist/module/justifi-radio-list-item2.js +6 -4
- package/dist/module/justifi-refund-payment.js +6 -10
- package/dist/module/justifi-saved-payment-method.js +4 -2
- package/dist/module/justifi-season-interruption-insurance.js +6 -16
- package/dist/module/justifi-skeleton.js +5 -3
- package/dist/module/justifi-terminal-orders-list-filters.js +6 -4
- package/dist/module/justifi-terminal-orders-list.js +5 -3
- package/dist/module/justifi-terminals-list-filters.js +5 -3
- package/dist/module/justifi-terminals-list.js +5 -3
- package/dist/module/legal-address-details2.js +4 -2
- package/dist/module/legal-address-form-step-core.js +4 -2
- package/dist/module/legal-address-form-step.js +4 -2
- package/dist/module/legal-address-form.js +4 -2
- package/dist/module/modular-checkout.js +99 -39
- package/dist/module/owner-details2.js +4 -2
- package/dist/module/owner-form-core2.js +4 -2
- package/dist/module/owner-form-inputs2.js +4 -2
- package/dist/module/owner-form.js +4 -2
- package/dist/module/package.js +1 -1
- package/dist/module/pagination-menu2.js +4 -2
- package/dist/module/payment-details-core2.js +13 -23
- package/dist/module/payment-method-option.js +5 -3
- package/dist/module/payment-provisioning-core.js +4 -2
- package/dist/module/payment-provisioning-form-buttons.js +4 -2
- package/dist/module/payment-provisioning-form-steps.js +4 -2
- package/dist/module/payment-provisioning-loading.js +2 -17
- package/dist/module/payments-list-core2.js +6 -6
- package/dist/module/payout-details-core2.js +8 -18
- package/dist/module/payouts-list-core2.js +7 -7
- package/dist/module/plaid-payment-method.js +49 -104
- package/dist/module/plaid.service.js +26 -0
- package/dist/module/product-or-service.js +5 -3
- package/dist/module/refund-policy.js +5 -3
- package/dist/module/representative-details2.js +4 -2
- package/dist/module/save-new-payment-method.js +7 -3
- package/dist/module/saved-payment-methods.js +13 -12
- package/dist/module/sezzle-payment-method.js +14 -24
- package/dist/module/shipping-details.js +5 -3
- package/dist/module/spinner.js +1 -3
- package/dist/module/styled-host.js +1 -3
- package/dist/module/summary.js +5 -3
- package/dist/module/table-filters-menu2.js +5 -3
- package/dist/module/table.js +3 -9
- package/dist/module/terminal-orders-list-core2.js +7 -9
- package/dist/module/terminal-quantity-selector2.js +5 -3
- package/dist/module/terminals-list-core2.js +6 -4
- package/dist/module/tokenize-payment-method.js +16 -12
- package/dist/module/utils.js +5 -16
- package/dist/module/utils2.js +6 -1
- package/dist/types/api/Checkout.d.ts +7 -15
- package/dist/types/api/Payment.d.ts +3 -1
- package/dist/types/api/index.d.ts +2 -2
- package/dist/types/api/services/apple-pay.service.d.ts +7 -0
- package/dist/types/components/checkout/bank-account-form/bank-account-form.d.ts +1 -0
- package/dist/types/components/checkout/card-form/card-form.d.ts +1 -0
- package/dist/types/components/checkout/checkout.d.ts +5 -0
- package/dist/types/components/checkout/save-new-payment-method.d.ts +1 -0
- package/dist/types/components/modular-checkout/ModularCheckout.d.ts +41 -0
- package/dist/types/components/modular-checkout/modular-checkout.d.ts +5 -3
- package/dist/types/components/modular-checkout/sub-components/apple-pay-skeleton.d.ts +1 -1
- package/dist/types/components/modular-checkout/sub-components/apple-pay.d.ts +9 -3
- package/dist/types/components/modular-checkout/sub-components/plaid-payment-method.d.ts +1 -2
- package/dist/types/components/modular-checkout/sub-components/saved-payment-methods.d.ts +3 -3
- package/dist/types/components/modular-checkout/sub-components/sezzle-payment-method.d.ts +1 -1
- package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +2 -1
- package/dist/types/components.d.ts +23 -16
- package/dist/types/index.d.ts +4 -0
- package/dist/types/stencil-public-runtime.d.ts +21 -0
- package/dist/types/store/checkout.store.d.ts +12 -5
- package/dist/types/ui-components/form/form-control-radio.d.ts +1 -1
- package/dist/types/ui-components/shadow-dom-components/justifi-radio-list-item.d.ts +1 -1
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/webcomponents/index.esm.js +1 -0
- package/dist/webcomponents/p-005efe51.entry.js +1 -0
- package/dist/webcomponents/p-0142114f.entry.js +1 -0
- package/dist/webcomponents/{p-54ca3070.entry.js → p-0801324e.entry.js} +1 -1
- package/dist/webcomponents/{p-ed7dfcf3.entry.js → p-0d8fe5f2.entry.js} +1 -1
- package/dist/webcomponents/{p-613421d4.entry.js → p-146de253.entry.js} +1 -1
- package/dist/webcomponents/p-17f7590c.entry.js +1 -0
- package/dist/webcomponents/{p-9846b23d.entry.js → p-1b7926f6.entry.js} +1 -1
- package/dist/webcomponents/{p-44450a94.entry.js → p-20f036cc.entry.js} +1 -1
- package/dist/webcomponents/{p-f13ae573.entry.js → p-2246aa69.entry.js} +1 -1
- package/dist/webcomponents/p-246ef4ff.entry.js +1 -0
- package/dist/webcomponents/{p-bcb1d661.entry.js → p-25484e99.entry.js} +1 -1
- package/dist/webcomponents/{p-053c183b.entry.js → p-265d0a1d.entry.js} +1 -1
- package/dist/webcomponents/{p-4213d10e.entry.js → p-27fc3ef0.entry.js} +3 -3
- package/dist/webcomponents/{p-9b0f0f53.entry.js → p-2a43e77f.entry.js} +1 -1
- package/dist/webcomponents/p-30c414b5.entry.js +1 -0
- package/dist/webcomponents/{p-8d891445.entry.js → p-3152c84f.entry.js} +1 -1
- package/dist/webcomponents/p-3546a5aa.entry.js +1 -0
- package/dist/webcomponents/p-3621a429.entry.js +1 -0
- package/dist/webcomponents/p-3906296f.entry.js +1 -0
- package/dist/webcomponents/{p-f1cba43c.entry.js → p-3d37045d.entry.js} +1 -1
- package/dist/webcomponents/p-3e320c0d.entry.js +1 -0
- package/dist/webcomponents/p-406ba650.entry.js +1 -0
- package/dist/webcomponents/p-44d1341c.entry.js +1 -0
- package/dist/webcomponents/{p-6255c685.entry.js → p-44e32f85.entry.js} +1 -1
- package/dist/webcomponents/p-4ea83bfd.entry.js +1 -0
- package/dist/webcomponents/p-558f7967.entry.js +1 -0
- package/dist/webcomponents/p-5c3d8de5.entry.js +1 -0
- package/dist/webcomponents/p-5c477f08.entry.js +1 -0
- package/dist/webcomponents/p-68329f16.entry.js +1 -0
- package/dist/webcomponents/p-6fdc03bc.entry.js +1 -0
- package/dist/webcomponents/p-6fe79f16.entry.js +1 -0
- package/dist/webcomponents/p-7aeb20d2.entry.js +1 -0
- package/dist/webcomponents/p-7b103dad.entry.js +1 -0
- package/dist/webcomponents/{p-28618e6f.entry.js → p-7c5cd118.entry.js} +1 -1
- package/dist/webcomponents/{p-17896a6d.entry.js → p-7cb6cc9f.entry.js} +1 -1
- package/dist/webcomponents/p-7e04d5af.entry.js +1 -0
- package/dist/webcomponents/p-82781411.entry.js +1 -0
- package/dist/webcomponents/p-84043580.entry.js +1 -0
- package/dist/webcomponents/p-8467851a.entry.js +1 -0
- package/dist/webcomponents/{p-95cbb655.entry.js → p-8d3f5638.entry.js} +1 -1
- package/dist/webcomponents/p-906fdf0c.entry.js +1 -0
- package/dist/webcomponents/{p-9a2c044f.entry.js → p-90e43440.entry.js} +1 -1
- package/dist/webcomponents/p-95348ff6.entry.js +1 -0
- package/dist/webcomponents/{p-15705e8a.entry.js → p-9c4079cc.entry.js} +1 -1
- package/dist/webcomponents/{p-f04c79f2.entry.js → p-9d7b5d07.entry.js} +1 -1
- package/dist/webcomponents/p-9fc464eb.entry.js +1 -0
- package/dist/webcomponents/{p-0mMX1Zv4.js → p-B4idKqyn.js} +1 -1
- package/dist/webcomponents/p-BBpkkt2-.js +1 -0
- package/dist/webcomponents/{p-zdIeCUeh.js → p-BHf9IqGw.js} +1 -1
- package/dist/webcomponents/{p-DNo0OPOP.js → p-BIPdn2VU.js} +1 -1
- package/dist/webcomponents/{p-BPtcGAzB.js → p-BUa0YOaw.js} +1 -1
- package/dist/webcomponents/{p-B8iBcmNu.js → p-BY2p6Sxk.js} +1 -1
- package/dist/webcomponents/{p-CB0mCq1M.js → p-BZ7C9duj.js} +1 -1
- package/dist/webcomponents/{p-DGmp4ErD.js → p-BdLLGV9t.js} +1 -1
- package/dist/webcomponents/p-BguBT6Hn.js +1 -0
- package/dist/webcomponents/{p-DhGNCW2f.js → p-Bp_QFeog.js} +1 -1
- package/dist/webcomponents/{p-B71k50jz.js → p-Bvp7uul3.js} +1 -1
- package/dist/webcomponents/{p-CvG-itHC.js → p-C1xGBPma.js} +1 -1
- package/dist/webcomponents/p-C3n7-tlg.js +1 -0
- package/dist/webcomponents/{p-DxqCFDtF.js → p-CLQx9p9q.js} +1 -1
- package/dist/webcomponents/{p-b21ncS7l.js → p-CPVN4dXS.js} +1 -1
- package/dist/webcomponents/p-CQeex56P.js +1 -0
- package/dist/webcomponents/p-CU4XQ3fO.js +1 -0
- package/dist/webcomponents/{p-Bb-6bNcq.js → p-C_3N7nqh.js} +1 -1
- package/dist/webcomponents/{p-BRLwUSZk.js → p-CaxjN6Uo.js} +1 -1
- package/dist/webcomponents/p-CpKvg1ok.js +1 -0
- package/dist/webcomponents/p-CrQgyTRz.js +1 -0
- package/dist/webcomponents/{p-Bu1jU017.js → p-CxzFvTgf.js} +1 -1
- package/dist/webcomponents/{p-DVBbk00Z.js → p-CzPUMw00.js} +1 -1
- package/dist/webcomponents/{p-DDUmOl3v.js → p-D--yCspA.js} +1 -1
- package/dist/webcomponents/{p-qWQmu-fb.js → p-D-JYHdJ7.js} +1 -1
- package/dist/webcomponents/p-D6XirF21.js +1 -0
- package/dist/webcomponents/p-DCIW8z1f.js +1 -0
- package/dist/webcomponents/{p-BfM6X7lF.js → p-DCMrHeJI.js} +1 -1
- package/dist/webcomponents/{p-tkZEz3MG.js → p-D_5McRD_.js} +1 -1
- package/dist/webcomponents/p-DbX0g1WF.js +1 -0
- package/dist/webcomponents/p-De8UloOS.js +1 -0
- package/dist/webcomponents/p-DsAwPf2y.js +1 -0
- package/dist/webcomponents/p-DvZcI6pC.js +1 -0
- package/dist/webcomponents/p-DyDHaG6n.js +1 -0
- package/dist/webcomponents/{p-D2_iJUrZ.js → p-DyOgQlh2.js} +1 -1
- package/dist/webcomponents/p-IG_KR8zP.js +1 -0
- package/dist/webcomponents/p-Xv8DuU3Y.js +1 -0
- package/dist/webcomponents/{p-d46dbb83.entry.js → p-a71a5e64.entry.js} +1 -1
- package/dist/webcomponents/{p-a0cc3d92.entry.js → p-a7e40e91.entry.js} +1 -1
- package/dist/webcomponents/{p-72dda22b.entry.js → p-a90b8b93.entry.js} +1 -1
- package/dist/webcomponents/{p-70f51444.entry.js → p-a928c6fb.entry.js} +1 -1
- package/dist/webcomponents/p-b90999af.entry.js +1 -0
- package/dist/webcomponents/{p-d277cc68.entry.js → p-bc3cdc7b.entry.js} +1 -1
- package/dist/webcomponents/p-c16c0cbc.entry.js +1 -0
- package/dist/webcomponents/p-c262d10f.entry.js +1 -0
- package/dist/webcomponents/p-c4Mh3ZZ_.js +1 -0
- package/dist/webcomponents/{p-2a3c59d4.entry.js → p-c70e1aac.entry.js} +1 -1
- package/dist/webcomponents/{p-f680e617.entry.js → p-cecb65c4.entry.js} +1 -1
- package/dist/webcomponents/p-d7555ff1.entry.js +1 -0
- package/dist/webcomponents/{p-8ff839a4.entry.js → p-df329742.entry.js} +1 -1
- package/dist/webcomponents/{p-3e667b07.entry.js → p-e2a38ad0.entry.js} +1 -1
- package/dist/webcomponents/p-e6516014.entry.js +1 -0
- package/dist/webcomponents/{p-97c0dde4.entry.js → p-e6e96be2.entry.js} +1 -1
- package/dist/webcomponents/p-e79338f9.entry.js +1 -0
- package/dist/webcomponents/p-ea2a9a81.entry.js +1 -0
- package/dist/webcomponents/p-f5c3f489.entry.js +1 -0
- package/dist/webcomponents/p-f6fbd43d.entry.js +1 -0
- package/dist/webcomponents/{p-00a845e5.entry.js → p-f7690165.entry.js} +1 -1
- package/dist/webcomponents/{p-7cf87637.entry.js → p-f8cbcbe9.entry.js} +1 -1
- package/dist/webcomponents/p-f99e4566.entry.js +1 -0
- package/dist/webcomponents/{p-C5id7s_l.js → p-fUtq2xDs.js} +1 -1
- package/dist/webcomponents/{p-Dgflaz6J.js → p-oGKW57R8.js} +1 -1
- package/dist/webcomponents/p-qipqIMyC.js +2 -0
- package/dist/webcomponents/p-xY5RkFuA.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/spinner-jmeA44Ee.js +0 -12
- package/dist/cjs/terminals-list-params-state-Cewmin_p.js +0 -22
- package/dist/cjs/utils-Bzyj4qWe.js +0 -29
- package/dist/esm/spinner-DUzyWLhj.js +0 -10
- package/dist/esm/terminals-list-params-state-D8tzsGR_.js +0 -16
- package/dist/esm/utils-Dg6gMUTv.js +0 -22
- package/dist/webcomponents/p-040e8524.entry.js +0 -1
- package/dist/webcomponents/p-0f42c89d.entry.js +0 -1
- package/dist/webcomponents/p-1288fda5.entry.js +0 -1
- package/dist/webcomponents/p-14ff3155.entry.js +0 -1
- package/dist/webcomponents/p-2b5da0dc.entry.js +0 -1
- package/dist/webcomponents/p-3aecd2cd.entry.js +0 -1
- package/dist/webcomponents/p-3bf63d1e.entry.js +0 -1
- package/dist/webcomponents/p-5580e6ca.entry.js +0 -1
- package/dist/webcomponents/p-57dde36e.entry.js +0 -1
- package/dist/webcomponents/p-5bc6f5ca.entry.js +0 -1
- package/dist/webcomponents/p-5f87add5.entry.js +0 -1
- package/dist/webcomponents/p-60206d9c.entry.js +0 -1
- package/dist/webcomponents/p-7089fb85.entry.js +0 -1
- package/dist/webcomponents/p-724e57e1.entry.js +0 -1
- package/dist/webcomponents/p-72f3bbfc.entry.js +0 -1
- package/dist/webcomponents/p-84d2025d.entry.js +0 -1
- package/dist/webcomponents/p-851a418e.entry.js +0 -1
- package/dist/webcomponents/p-87884ca5.entry.js +0 -1
- package/dist/webcomponents/p-88905a54.entry.js +0 -1
- package/dist/webcomponents/p-8990707a.entry.js +0 -1
- package/dist/webcomponents/p-8b7cbdbf.entry.js +0 -1
- package/dist/webcomponents/p-8cca8903.entry.js +0 -1
- package/dist/webcomponents/p-98cffba9.entry.js +0 -1
- package/dist/webcomponents/p-9f5c9e41.entry.js +0 -1
- package/dist/webcomponents/p-B5Rc83j1.js +0 -1
- package/dist/webcomponents/p-BEPUC3Po.js +0 -1
- package/dist/webcomponents/p-BP7op0vq.js +0 -1
- package/dist/webcomponents/p-BQ2TIFoY.js +0 -1
- package/dist/webcomponents/p-BSt6p1oq.js +0 -1
- package/dist/webcomponents/p-BY1mRAvj.js +0 -1
- package/dist/webcomponents/p-BbZwa5UI.js +0 -1
- package/dist/webcomponents/p-Bn7inNWG.js +0 -2
- package/dist/webcomponents/p-C6c6Q0E7.js +0 -1
- package/dist/webcomponents/p-CaAVuW6B.js +0 -1
- package/dist/webcomponents/p-CpaS1Lex.js +0 -1
- package/dist/webcomponents/p-D51QuD44.js +0 -1
- package/dist/webcomponents/p-DD0Mvpeu.js +0 -1
- package/dist/webcomponents/p-DIDloHpm.js +0 -1
- package/dist/webcomponents/p-Dc1CS9Mi.js +0 -1
- package/dist/webcomponents/p-DsZZxRXY.js +0 -1
- package/dist/webcomponents/p-a1d3bb81.entry.js +0 -1
- package/dist/webcomponents/p-a9957ca5.entry.js +0 -1
- package/dist/webcomponents/p-abbf14b5.entry.js +0 -1
- package/dist/webcomponents/p-c44325f8.entry.js +0 -1
- package/dist/webcomponents/p-c65bcc0c.entry.js +0 -1
- package/dist/webcomponents/p-c874ca2b.entry.js +0 -1
- package/dist/webcomponents/p-caac63bf.entry.js +0 -1
- package/dist/webcomponents/p-d17e2531.entry.js +0 -1
- package/dist/webcomponents/p-d72e8541.entry.js +0 -1
- package/dist/webcomponents/p-eP3fmhta.js +0 -1
- package/dist/webcomponents/p-ef353e3d.entry.js +0 -1
- package/dist/webcomponents/p-fa1aba4e.entry.js +0 -1
- package/dist/webcomponents/p-fb16d889.entry.js +0 -1
- package/dist/webcomponents/p-fd4ffaa2.entry.js +0 -1
- package/dist/webcomponents/p-sw5RO19U.js +0 -1
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { r as registerInstance, h, c as createEvent, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, c as createEvent, H as Host, g as getElement } from './index-qipqIMyC.js';
|
|
2
2
|
import { z as text, r as radioListItem } from './parts-RvUQ__Pq.js';
|
|
3
|
-
import { f as formatCurrency } from './utils-
|
|
4
|
-
import { c as checkoutStore,
|
|
5
|
-
import { S as StyledHost } from './styled-host-
|
|
3
|
+
import { f as formatCurrency } from './utils-BscIVFn8.js';
|
|
4
|
+
import { c as checkoutStore, o as onAnyChange, g as getAvailablePaymentMethodTypes, a as onChange } from './checkout.store-DBvS7cVB.js';
|
|
5
|
+
import { S as StyledHost } from './styled-host-CbizlfAU.js';
|
|
6
6
|
import './event-types-CZfYo5-1.js';
|
|
7
|
-
import { H as Header1 } from './header-1-
|
|
8
|
-
import { H as Header2, b as insuranceValuesOn, h as hasInsuranceValueChanged, i as insuranceValues } from './insurance-state-
|
|
9
|
-
import { H as Header3 } from './header-3-
|
|
10
|
-
import { J as JustifiAnalytics, c as checkPkgVersion } from './check-pkg-version-
|
|
11
|
-
import './config-state-
|
|
7
|
+
import { H as Header1 } from './header-1-zXsamUS3.js';
|
|
8
|
+
import { H as Header2, b as insuranceValuesOn, h as hasInsuranceValueChanged, i as insuranceValues } from './insurance-state-Dh9f36Qh.js';
|
|
9
|
+
import { H as Header3 } from './header-3-DVtaUAlf.js';
|
|
10
|
+
import { J as JustifiAnalytics, c as checkPkgVersion } from './check-pkg-version-BUkwdVdm.js';
|
|
11
|
+
import './config-state-Blo0ywwc.js';
|
|
12
12
|
import './dinero-HXpYMWUU.js';
|
|
13
13
|
import { C as ComponentErrorSeverity, a as ComponentErrorCodes, b as ComponentErrorMessages } from './ComponentError-Cjcsf8ku.js';
|
|
14
|
-
import { I as ICheckoutStatus } from './Refund-
|
|
14
|
+
import { I as ICheckoutStatus } from './Refund-Bc5By0lb.js';
|
|
15
15
|
import './Pagination-CLHwhyvu.js';
|
|
16
16
|
import './Business-BCoP0TAV.js';
|
|
17
17
|
import './Dispute-BH0Xfn-F.js';
|
|
18
18
|
import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
|
|
19
|
-
import { C as CheckoutService } from './checkout.service-
|
|
20
|
-
import { A as Api } from './Api-
|
|
19
|
+
import { C as CheckoutService } from './checkout.service-BCkQ9pOA.js';
|
|
20
|
+
import { A as Api } from './Api-D4tj-h4P.js';
|
|
21
|
+
import { P as PAYMENT_METHODS, a as PaymentMethod, b as PAYMENT_MODE } from './index-DCIW8z1f.js';
|
|
21
22
|
import { C as CardBrandLabels } from './payment-method-option-utils-lUHAQVFl.js';
|
|
22
|
-
import './index-
|
|
23
|
-
import './package-
|
|
23
|
+
import './index-ZfXl6Xrm.js';
|
|
24
|
+
import './package-BBpkkt2-.js';
|
|
24
25
|
import './helpers-Mu7LQT-w.js';
|
|
25
26
|
import './state-options-BX8GieXu.js';
|
|
26
27
|
|
|
@@ -29,7 +30,7 @@ const Summary = class {
|
|
|
29
30
|
registerInstance(this, hostRef);
|
|
30
31
|
}
|
|
31
32
|
render() {
|
|
32
|
-
return (h(StyledHost, { key: '
|
|
33
|
+
return (h(StyledHost, { key: '3161e6f6a196c79d684574cafbc90bcf741b2150' }, h("section", { key: '594b4485ed4fd9d7c1ee7f4556f071139f92ef0c' }, h("div", { key: '5c2d14677dda6fc7ddcb074d4887b839385dca3a' }, h("div", { key: 'fb850cd7e9c11741349710696dd4e6241c98e805', part: text }, checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.paymentDescription), h("div", { key: '959014d7fa2a9c97bae0c986313a604930c1e0f3' }, h("span", { key: '14ab0932a083568419b1c36c95f9072c73962b11', part: text }, "Total"), "\u00A0", h("span", { key: '08a9e00332253070ae984b77eb2a9bab88eb3472', part: text }, formatCurrency(+(checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.totalAmount))))))));
|
|
33
34
|
}
|
|
34
35
|
};
|
|
35
36
|
|
|
@@ -45,7 +46,7 @@ const Header = class {
|
|
|
45
46
|
}
|
|
46
47
|
render() {
|
|
47
48
|
const HeaderComponent = this.levels[this.level];
|
|
48
|
-
return (h(StyledHost, { key: '
|
|
49
|
+
return (h(StyledHost, { key: 'eb3651b698897193d34a6c6456cd57dd0bd0bc43' }, h(HeaderComponent, { key: '39caee687f93d3d4d90e62d9fbcae318eaa8022e', text: this.text, class: this.class })));
|
|
49
50
|
}
|
|
50
51
|
};
|
|
51
52
|
|
|
@@ -104,18 +105,38 @@ const makeCheckoutComplete = ({ authToken, checkoutId, service }) => async ({ pa
|
|
|
104
105
|
}
|
|
105
106
|
};
|
|
106
107
|
|
|
108
|
+
const api = Api();
|
|
109
|
+
class PlaidService {
|
|
110
|
+
async getLinkToken(authToken, accountId, checkoutId, signal) {
|
|
111
|
+
const endpoint = `plaid/${accountId}/link`;
|
|
112
|
+
const body = { checkout_id: checkoutId };
|
|
113
|
+
return api.post({ endpoint, body, authToken, signal });
|
|
114
|
+
}
|
|
115
|
+
async tokenizeBankAccount(authToken, accountId, publicToken, linkTokenId, paymentMethodGroupId, signal) {
|
|
116
|
+
const endpoint = `plaid/${accountId}/tokenize`;
|
|
117
|
+
const body = { public_token: publicToken };
|
|
118
|
+
if (linkTokenId) {
|
|
119
|
+
body.link_token_id = linkTokenId;
|
|
120
|
+
}
|
|
121
|
+
if (paymentMethodGroupId) {
|
|
122
|
+
body.payment_method_group_id = paymentMethodGroupId;
|
|
123
|
+
}
|
|
124
|
+
return api.post({ endpoint, body, authToken, signal });
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
107
128
|
const ModularCheckout = class {
|
|
108
129
|
constructor(hostRef) {
|
|
109
130
|
registerInstance(this, hostRef);
|
|
110
131
|
this.errorEvent = createEvent(this, "error-event");
|
|
111
132
|
this.submitEvent = createEvent(this, "submit-event");
|
|
112
|
-
this.
|
|
113
|
-
this.
|
|
133
|
+
this.checkoutChangedEvent = createEvent(this, "checkout-changed");
|
|
134
|
+
this.plaidService = new PlaidService();
|
|
114
135
|
this.handleApplePayCompleted = (event) => {
|
|
115
136
|
const { success, token, paymentMethodId, error } = event.detail;
|
|
116
137
|
if (success && token) {
|
|
117
138
|
checkoutStore.paymentToken = paymentMethodId;
|
|
118
|
-
checkoutStore.selectedPaymentMethod = PAYMENT_METHODS.APPLE_PAY;
|
|
139
|
+
checkoutStore.selectedPaymentMethod = { type: PAYMENT_METHODS.APPLE_PAY };
|
|
119
140
|
this.submitCheckout();
|
|
120
141
|
}
|
|
121
142
|
else {
|
|
@@ -128,11 +149,12 @@ const ModularCheckout = class {
|
|
|
128
149
|
}
|
|
129
150
|
};
|
|
130
151
|
this.handleApplePayError = (event) => {
|
|
131
|
-
const { error } = event.detail;
|
|
152
|
+
const { error, code } = event.detail;
|
|
132
153
|
console.error("Apple Pay error:", error);
|
|
133
154
|
this.errorEvent.emit({
|
|
134
155
|
message: error || "Apple Pay error occurred",
|
|
135
|
-
|
|
156
|
+
// prefix with APPLE_PAY_
|
|
157
|
+
errorCode: `APPLE_PAY_${code}`,
|
|
136
158
|
severity: ComponentErrorSeverity.ERROR,
|
|
137
159
|
});
|
|
138
160
|
};
|
|
@@ -141,9 +163,6 @@ const ModularCheckout = class {
|
|
|
141
163
|
checkoutStore.selectedPaymentMethod = undefined;
|
|
142
164
|
};
|
|
143
165
|
}
|
|
144
|
-
savePaymentMethodChanged(newValue) {
|
|
145
|
-
checkoutStore.savePaymentMethod = newValue;
|
|
146
|
-
}
|
|
147
166
|
connectedCallback() {
|
|
148
167
|
this.observer = new MutationObserver(() => {
|
|
149
168
|
this.queryFormRefs();
|
|
@@ -161,15 +180,15 @@ const ModularCheckout = class {
|
|
|
161
180
|
};
|
|
162
181
|
this.getCheckout = makeGetCheckout(config);
|
|
163
182
|
this.completeCheckout = makeCheckoutComplete(config);
|
|
164
|
-
|
|
165
|
-
|
|
183
|
+
// Emit checkout-changed whenever any store key changes
|
|
184
|
+
onAnyChange(() => {
|
|
185
|
+
this.emitCheckoutChanged();
|
|
166
186
|
});
|
|
167
187
|
}
|
|
168
188
|
componentWillLoad() {
|
|
169
189
|
this.analytics = new JustifiAnalytics(this);
|
|
170
190
|
checkPkgVersion();
|
|
171
191
|
checkoutStore.authToken = this.authToken;
|
|
172
|
-
checkoutStore.savePaymentMethod = this.savePaymentMethod;
|
|
173
192
|
this.fetchCheckout();
|
|
174
193
|
// Refresh the checkout data when insurance values actually change (not on initial load)
|
|
175
194
|
insuranceValuesOn("set", (key) => {
|
|
@@ -200,6 +219,7 @@ const ModularCheckout = class {
|
|
|
200
219
|
if (this.getCheckout) {
|
|
201
220
|
this.getCheckout({
|
|
202
221
|
onSuccess: ({ checkout }) => {
|
|
222
|
+
this.updateStore(checkout);
|
|
203
223
|
if (checkout.status === ICheckoutStatus.completed) {
|
|
204
224
|
this.errorEvent.emit({
|
|
205
225
|
message: ComponentErrorMessages.CHECKOUT_ALREADY_COMPLETED,
|
|
@@ -216,13 +236,12 @@ const ModularCheckout = class {
|
|
|
216
236
|
});
|
|
217
237
|
return;
|
|
218
238
|
}
|
|
219
|
-
this.updateStore(checkout);
|
|
220
239
|
},
|
|
221
240
|
onError: (error) => {
|
|
222
241
|
this.errorEvent.emit({
|
|
223
242
|
message: error.message,
|
|
224
|
-
errorCode:
|
|
225
|
-
severity:
|
|
243
|
+
errorCode: error.code,
|
|
244
|
+
severity: error.severity,
|
|
226
245
|
});
|
|
227
246
|
},
|
|
228
247
|
});
|
|
@@ -231,7 +250,8 @@ const ModularCheckout = class {
|
|
|
231
250
|
updateStore(checkout) {
|
|
232
251
|
var _a, _b, _c, _d, _e;
|
|
233
252
|
checkoutStore.accountId = checkout.account_id;
|
|
234
|
-
checkoutStore.
|
|
253
|
+
checkoutStore.checkoutLoaded = true;
|
|
254
|
+
checkoutStore.paymentMethods = checkout.payment_methods.map((paymentMethod) => new PaymentMethod(paymentMethod));
|
|
235
255
|
checkoutStore.paymentMethodGroupId = checkout.payment_method_group_id;
|
|
236
256
|
checkoutStore.paymentDescription = checkout.payment_description;
|
|
237
257
|
checkoutStore.totalAmount = checkout.total_amount;
|
|
@@ -245,6 +265,14 @@ const ModularCheckout = class {
|
|
|
245
265
|
checkoutStore.bnplProviderCheckoutUrl =
|
|
246
266
|
(_e = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _e === void 0 ? void 0 : _e.provider_checkout_url;
|
|
247
267
|
}
|
|
268
|
+
emitCheckoutChanged() {
|
|
269
|
+
const detail = {
|
|
270
|
+
availablePaymentMethodTypes: getAvailablePaymentMethodTypes(),
|
|
271
|
+
selectedPaymentMethod: checkoutStore.selectedPaymentMethod,
|
|
272
|
+
savedPaymentMethods: checkoutStore.paymentMethods,
|
|
273
|
+
};
|
|
274
|
+
this.checkoutChangedEvent.emit(detail);
|
|
275
|
+
}
|
|
248
276
|
queryFormRefs() {
|
|
249
277
|
this.billingFormRef = this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full");
|
|
250
278
|
this.applePayRef = this.hostEl.querySelector("justifi-apple-pay");
|
|
@@ -286,15 +314,22 @@ const ModularCheckout = class {
|
|
|
286
314
|
checkoutStore.paymentToken = tokenizeResult.id;
|
|
287
315
|
return tokenizeResult.id;
|
|
288
316
|
}
|
|
317
|
+
// set the selected payment method to the checkout store from outside the component
|
|
318
|
+
async setSelectedPaymentMethod(paymentMethod) {
|
|
319
|
+
checkoutStore.selectedPaymentMethod = paymentMethod;
|
|
320
|
+
checkoutStore.paymentToken = paymentMethod.id || undefined;
|
|
321
|
+
}
|
|
289
322
|
// if validation fails, the error will be emitted by the component
|
|
290
323
|
async validate() {
|
|
324
|
+
var _a, _b;
|
|
291
325
|
const promises = [];
|
|
292
326
|
if (checkoutStore.insuranceEnabled && this.insuranceFormRef) {
|
|
293
327
|
promises.push(this.insuranceFormRef.validate());
|
|
294
328
|
}
|
|
329
|
+
const isNewCard = ((_a = checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === PAYMENT_METHODS.NEW_CARD;
|
|
330
|
+
const isNewBankAccount = ((_b = checkoutStore.selectedPaymentMethod) === null || _b === void 0 ? void 0 : _b.type) === PAYMENT_METHODS.NEW_BANK_ACCOUNT;
|
|
295
331
|
// For new card/bank account, validate payment method + billing.
|
|
296
|
-
if (
|
|
297
|
-
checkoutStore.selectedPaymentMethod === PAYMENT_METHODS.NEW_BANK_ACCOUNT) {
|
|
332
|
+
if (isNewCard || isNewBankAccount) {
|
|
298
333
|
if (this.paymentMethodFormRef)
|
|
299
334
|
promises.push(this.paymentMethodFormRef.validate());
|
|
300
335
|
if (this.billingFormRef)
|
|
@@ -318,17 +353,21 @@ const ModularCheckout = class {
|
|
|
318
353
|
}
|
|
319
354
|
return true;
|
|
320
355
|
}
|
|
321
|
-
catch (
|
|
356
|
+
catch (_c) {
|
|
322
357
|
// If any validator throws/rejects, consider the whole validation failed.
|
|
323
358
|
return false;
|
|
324
359
|
}
|
|
325
360
|
}
|
|
326
361
|
async submitCheckout(submitCheckoutArgs) {
|
|
362
|
+
var _a, _b, _c, _d;
|
|
327
363
|
const isValid = await this.validate();
|
|
328
|
-
const
|
|
364
|
+
const isNewCard = ((_a = checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === PAYMENT_METHODS.NEW_CARD;
|
|
365
|
+
const isNewBankAccount = ((_b = checkoutStore.selectedPaymentMethod) === null || _b === void 0 ? void 0 : _b.type) === PAYMENT_METHODS.NEW_BANK_ACCOUNT;
|
|
366
|
+
const isPlaid = checkoutStore.selectedPaymentMethod.type === PAYMENT_METHODS.PLAID;
|
|
367
|
+
const shouldTokenize = isNewCard || isNewBankAccount;
|
|
329
368
|
if (shouldTokenize) {
|
|
330
369
|
const tokenizeResult = await this.tokenizePaymentMethod(submitCheckoutArgs);
|
|
331
|
-
if (tokenizeResult.error) {
|
|
370
|
+
if (tokenizeResult === null || tokenizeResult === void 0 ? void 0 : tokenizeResult.error) {
|
|
332
371
|
this.errorEvent.emit({
|
|
333
372
|
message: tokenizeResult.error.message,
|
|
334
373
|
errorCode: ComponentErrorCodes.TOKENIZE_ERROR,
|
|
@@ -337,6 +376,41 @@ const ModularCheckout = class {
|
|
|
337
376
|
return;
|
|
338
377
|
}
|
|
339
378
|
}
|
|
379
|
+
// For Plaid, perform exchange at submit time using stored public token and link token id
|
|
380
|
+
if (isPlaid && !checkoutStore.paymentToken) {
|
|
381
|
+
const publicToken = checkoutStore.plaidPublicToken;
|
|
382
|
+
const linkTokenId = checkoutStore.plaidLinkTokenId;
|
|
383
|
+
if (!publicToken) {
|
|
384
|
+
this.errorEvent.emit({
|
|
385
|
+
message: 'Missing Plaid public token. Please connect your bank.',
|
|
386
|
+
errorCode: ComponentErrorCodes.TOKENIZE_ERROR,
|
|
387
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
388
|
+
});
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
try {
|
|
392
|
+
const response = await this.plaidService.tokenizeBankAccount(checkoutStore.authToken, checkoutStore.accountId, publicToken, linkTokenId || undefined, checkoutStore.savePaymentMethod ? checkoutStore.paymentMethodGroupId : undefined);
|
|
393
|
+
if (response === null || response === void 0 ? void 0 : response.error) {
|
|
394
|
+
this.errorEvent.emit({
|
|
395
|
+
message: typeof response.error === 'string' ? response.error : response.error.message || 'Failed to tokenize bank account',
|
|
396
|
+
errorCode: ComponentErrorCodes.TOKENIZE_ERROR,
|
|
397
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
398
|
+
});
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
const paymentMethod = response === null || response === void 0 ? void 0 : response.data;
|
|
402
|
+
const token = ((_c = paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.bank_account) === null || _c === void 0 ? void 0 : _c.token) || (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.token) || (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id);
|
|
403
|
+
checkoutStore.paymentToken = token;
|
|
404
|
+
}
|
|
405
|
+
catch (err) {
|
|
406
|
+
this.errorEvent.emit({
|
|
407
|
+
message: (err === null || err === void 0 ? void 0 : err.message) || 'Plaid exchange error',
|
|
408
|
+
errorCode: ComponentErrorCodes.TOKENIZE_ERROR,
|
|
409
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
410
|
+
});
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
340
414
|
if (!isValid) {
|
|
341
415
|
this.errorEvent.emit({
|
|
342
416
|
message: "Please fill in all required fields.",
|
|
@@ -351,19 +425,27 @@ const ModularCheckout = class {
|
|
|
351
425
|
errorCode: ComponentErrorCodes.TOKENIZE_ERROR,
|
|
352
426
|
severity: ComponentErrorSeverity.ERROR,
|
|
353
427
|
});
|
|
428
|
+
return;
|
|
354
429
|
}
|
|
355
430
|
let payment;
|
|
356
|
-
const
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
431
|
+
const mapTypeToPaymentMode = (type) => {
|
|
432
|
+
switch (type) {
|
|
433
|
+
case PAYMENT_METHODS.NEW_CARD:
|
|
434
|
+
case PAYMENT_METHODS.SAVED_CARD:
|
|
435
|
+
case PAYMENT_METHODS.NEW_BANK_ACCOUNT:
|
|
436
|
+
case PAYMENT_METHODS.SAVED_BANK_ACCOUNT:
|
|
437
|
+
case PAYMENT_METHODS.PLAID:
|
|
438
|
+
return PAYMENT_MODE.ECOM;
|
|
439
|
+
case PAYMENT_METHODS.SEZZLE:
|
|
440
|
+
return PAYMENT_MODE.BNPL;
|
|
441
|
+
case PAYMENT_METHODS.APPLE_PAY:
|
|
442
|
+
return PAYMENT_MODE.APPLE_PAY;
|
|
443
|
+
default:
|
|
444
|
+
return undefined;
|
|
445
|
+
}
|
|
364
446
|
};
|
|
365
447
|
payment = {
|
|
366
|
-
payment_mode:
|
|
448
|
+
payment_mode: mapTypeToPaymentMode((_d = checkoutStore.selectedPaymentMethod) === null || _d === void 0 ? void 0 : _d.type),
|
|
367
449
|
payment_token: checkoutStore.paymentToken,
|
|
368
450
|
};
|
|
369
451
|
this.completeCheckout({
|
|
@@ -384,36 +466,13 @@ const ModularCheckout = class {
|
|
|
384
466
|
});
|
|
385
467
|
}
|
|
386
468
|
render() {
|
|
387
|
-
return h(Host, { key: '
|
|
469
|
+
return h(Host, { key: 'f13bda646a7cfcbe339baad474554b38fb0ebae5' });
|
|
388
470
|
}
|
|
389
471
|
get hostEl() { return getElement(this); }
|
|
390
|
-
static get watchers() { return {
|
|
391
|
-
"savePaymentMethod": ["savePaymentMethodChanged"]
|
|
392
|
-
}; }
|
|
393
472
|
};
|
|
394
473
|
|
|
395
474
|
const plaidIconSvg = 'data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4IiB2aWV3Qm94PSIwIDAgMjggMjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY2xhc3M9ImNzcy0xcmRhajhtIj48ZyBmaWxsPSIjMTExIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yNS43NjI5IDI2LjI2MjhMMjggMTcuNTMwOUwyNC45NjkxIDE0LjUwMDFMMjcuOTk5OSAxMS40NjkxTDI1Ljc2MjggMi43MzcwNkwxNy4wMzA5IDAuNUwxNC4wMDAxIDMuNTMxTDEwLjk2OSAwLjUwMDE0TDIuMjM3MDYgMi43MzczNEwwIDExLjQ2OTFMMy4wMzEyOCAxNC40OTk5TDAuMDAwMTQgMTcuNTMxTDIuMjM3MiAyNi4yNjI5TDEwLjk2OTEgMjguNUwxNC4wMDAxIDI1LjQ2OUwxNy4wMzEgMjguNDk5OUwyNS43NjI5IDI2LjI2MjhaTTE1LjczMjEgMjMuNzM3MUwxOC42MTg2IDIwLjg1MDVMMjIuMjkxMiAyNC41MjMzTDE3LjY5NTYgMjUuNzAwN0wxNS43MzIxIDIzLjczNzFaTTExLjExMzYgOS44ODE1NEwxNC4wMDAzIDYuOTk1MDJMMTYuODg2OCA5Ljg4MTRMMTQuMDAwMSAxMi43Njc5TDExLjExMzYgOS44ODE1NFpNMTIuMjY4MiAxNC41TDkuMzgxNTQgMTcuMzg2NUw2LjQ5NTAyIDE0LjVMOS4zODE1NCAxMS42MTM1TDEyLjI2ODIgMTQuNVpNMTguNjE4NyAxMS42MTMzTDIxLjUwNTMgMTQuNUwxOC42MTg2IDE3LjM4NjVMMTUuNzMyMSAxNC41TDE4LjYxODcgMTEuNjEzM1pNMTYuODg2NyAxOS4xMTg2TDE0LjAwMDEgMjIuMDA1MUwxMS4xMTM1IDE5LjExODVMMTQuMDAwMSAxNi4yMzE5TDE2Ljg4NjcgMTkuMTE4NlpNMTAuMzA0NCAyNS43MDA3TDUuNzA4NjQgMjQuNTIzM0w5LjM4MTU0IDIwLjg1MDRMMTIuMjY4MiAyMy43MzcxTDEwLjMwNDQgMjUuNzAwN1pNNC43NjMwOCAxNi4yMzE5TDcuNjQ5NiAxOS4xMTg1TDMuOTc2NyAyMi43OTE0TDIuNzk5MyAxOC4xOTU3TDQuNzYzMDggMTYuMjMxOVpNMy45NzY3IDYuMjA4MzZMNy42NDk3NCA5Ljg4MTRMNC43NjMwOCAxMi43NjgxTDIuNzk5MyAxMC44MDQxTDMuOTc2NyA2LjIwODM2Wk0xMi4yNjgzIDUuMjYyOTRMOS4zODE2OCA4LjE0OTZMNS43MDg5MiA0LjQ3NjdMMTAuMzA0NyAzLjI5OTNMMTIuMjY4MyA1LjI2Mjk0Wk0xNy42OTU5IDMuMjk5M0wyMi4yOTE1IDQuNDc2N0wxOC42MTg2IDguMTQ5NDZMMTUuNzMyMSA1LjI2Mjk0TDE3LjY5NTkgMy4yOTkzWk0yMy4yMzcyIDEyLjc2ODFMMjAuMzUwNSA5Ljg4MTRMMjQuMDIzMyA2LjIwODc4TDI1LjIwMDcgMTAuODA0NkwyMy4yMzcyIDEyLjc2ODFaTTI0LjAyMzMgMjIuNzkxNEwyMC4zNTA1IDE5LjExODZMMjMuMjM3MiAxNi4yMzIxTDI1LjIwMDcgMTguMTk1N0wyNC4wMjMzIDIyLjc5MTRaIj48L3BhdGg+PC9nPjwvc3ZnPgo=';
|
|
396
475
|
|
|
397
|
-
const api = Api();
|
|
398
|
-
class PlaidService {
|
|
399
|
-
async getLinkToken(authToken, accountId, checkoutId, signal) {
|
|
400
|
-
const endpoint = `plaid/${accountId}/link`;
|
|
401
|
-
const body = { checkout_id: checkoutId };
|
|
402
|
-
return api.post({ endpoint, body, authToken, signal });
|
|
403
|
-
}
|
|
404
|
-
async tokenizeBankAccount(authToken, accountId, publicToken, linkTokenId, paymentMethodGroupId, signal) {
|
|
405
|
-
const endpoint = `plaid/${accountId}/tokenize`;
|
|
406
|
-
const body = { public_token: publicToken };
|
|
407
|
-
if (linkTokenId) {
|
|
408
|
-
body.link_token_id = linkTokenId;
|
|
409
|
-
}
|
|
410
|
-
if (paymentMethodGroupId) {
|
|
411
|
-
body.payment_method_group_id = paymentMethodGroupId;
|
|
412
|
-
}
|
|
413
|
-
return api.post({ endpoint, body, authToken, signal });
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
|
|
417
476
|
// Plaid-specific error codes
|
|
418
477
|
var PlaidErrorCodes;
|
|
419
478
|
(function (PlaidErrorCodes) {
|
|
@@ -496,25 +555,6 @@ const PlaidPaymentMethod = class {
|
|
|
496
555
|
}, 100);
|
|
497
556
|
}
|
|
498
557
|
};
|
|
499
|
-
this.onPaymentMethodOptionClick = (e) => {
|
|
500
|
-
e.preventDefault();
|
|
501
|
-
// Update local selection state
|
|
502
|
-
this.isSelected = true;
|
|
503
|
-
// Update store selection
|
|
504
|
-
checkoutStore.selectedPaymentMethod = PAYMENT_METHODS.PLAID;
|
|
505
|
-
// Emit selection event
|
|
506
|
-
this.paymentMethodOptionSelected.emit(PAYMENT_METHODS.PLAID);
|
|
507
|
-
// If there's an error, clear it and try to initialize again
|
|
508
|
-
if (this.error) {
|
|
509
|
-
this.clearError();
|
|
510
|
-
this.waitForStoreAndInitialize();
|
|
511
|
-
return;
|
|
512
|
-
}
|
|
513
|
-
// If Plaid Link is ready and no public token exists, open Plaid Link
|
|
514
|
-
if (this.plaidLink && !this.publicToken && !this.isAuthenticating) {
|
|
515
|
-
this.openPlaidLink();
|
|
516
|
-
}
|
|
517
|
-
};
|
|
518
558
|
this.initializePlaidLink = async () => {
|
|
519
559
|
try {
|
|
520
560
|
// Check if Plaid is available globally
|
|
@@ -597,6 +637,9 @@ const PlaidPaymentMethod = class {
|
|
|
597
637
|
this.linkToken = response.data.link_token;
|
|
598
638
|
// Try to capture link token id if present in envelope
|
|
599
639
|
this.linkTokenId = (response === null || response === void 0 ? void 0 : response.id) || ((_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.id) || null;
|
|
640
|
+
if (this.linkTokenId) {
|
|
641
|
+
checkoutStore.plaidLinkTokenId = this.linkTokenId;
|
|
642
|
+
}
|
|
600
643
|
}
|
|
601
644
|
catch (error) {
|
|
602
645
|
// Clear timeout
|
|
@@ -668,7 +711,7 @@ const PlaidPaymentMethod = class {
|
|
|
668
711
|
// Ensure the component remains selected after successful authentication
|
|
669
712
|
if (!this.isSelected) {
|
|
670
713
|
this.isSelected = true;
|
|
671
|
-
checkoutStore.selectedPaymentMethod = PAYMENT_METHODS.PLAID;
|
|
714
|
+
checkoutStore.selectedPaymentMethod = { type: PAYMENT_METHODS.PLAID };
|
|
672
715
|
}
|
|
673
716
|
// Emit success event for parent components
|
|
674
717
|
this.plaidErrorRecovered.emit({
|
|
@@ -676,41 +719,10 @@ const PlaidPaymentMethod = class {
|
|
|
676
719
|
message: 'Bank account connected successfully',
|
|
677
720
|
severity: ComponentErrorSeverity.INFO
|
|
678
721
|
});
|
|
679
|
-
//
|
|
680
|
-
|
|
681
|
-
};
|
|
682
|
-
this.exchangePublicTokenForPaymentMethod = async () => {
|
|
683
|
-
var _a;
|
|
684
|
-
if (!this.publicToken) {
|
|
685
|
-
console.error('[PlaidPaymentMethod] exchange: missing publicToken');
|
|
686
|
-
return;
|
|
687
|
-
}
|
|
688
|
-
if (!checkoutStore.authToken || !checkoutStore.accountId) {
|
|
689
|
-
console.error('[PlaidPaymentMethod] exchange: missing auth/account context');
|
|
690
|
-
return;
|
|
691
|
-
}
|
|
692
|
-
try {
|
|
693
|
-
const response = await this.plaidService.tokenizeBankAccount(checkoutStore.authToken, checkoutStore.accountId, this.publicToken, this.linkTokenId || undefined, checkoutStore.savePaymentMethod ? checkoutStore.paymentMethodGroupId : undefined);
|
|
694
|
-
if (response === null || response === void 0 ? void 0 : response.error) {
|
|
695
|
-
console.error('[PlaidPaymentMethod] exchange: backend error', response.error);
|
|
696
|
-
return;
|
|
697
|
-
}
|
|
698
|
-
// Extract token from payment method response
|
|
699
|
-
const paymentMethod = response === null || response === void 0 ? void 0 : response.data;
|
|
700
|
-
const token = ((_a = paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.bank_account) === null || _a === void 0 ? void 0 : _a.token) || (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.token) || (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id);
|
|
701
|
-
if (!token) {
|
|
702
|
-
console.error('[PlaidPaymentMethod] exchange: no token in response');
|
|
703
|
-
return;
|
|
704
|
-
}
|
|
705
|
-
// Save for downstream submit flows
|
|
706
|
-
checkoutStore.paymentToken = token;
|
|
707
|
-
}
|
|
708
|
-
catch (err) {
|
|
709
|
-
console.error('[PlaidPaymentMethod] exchange: exception', {
|
|
710
|
-
message: (err === null || err === void 0 ? void 0 : err.message) || String(err),
|
|
711
|
-
});
|
|
712
|
-
}
|
|
722
|
+
// Store public token in checkout store; exchange will be handled on submit
|
|
723
|
+
checkoutStore.plaidPublicToken = publicToken;
|
|
713
724
|
};
|
|
725
|
+
// Exchange logic moved to Modular Checkout submit flow.
|
|
714
726
|
this.handlePlaidExit = (err, _metadata) => {
|
|
715
727
|
this.isAuthenticating = false;
|
|
716
728
|
if (err) {
|
|
@@ -849,16 +861,26 @@ const PlaidPaymentMethod = class {
|
|
|
849
861
|
};
|
|
850
862
|
// Watch for store changes to sync component state
|
|
851
863
|
this.syncWithStore = () => {
|
|
852
|
-
|
|
864
|
+
var _a;
|
|
865
|
+
const shouldBeSelected = ((_a = checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === PAYMENT_METHODS.PLAID;
|
|
853
866
|
if (this.isSelected !== shouldBeSelected) {
|
|
854
867
|
this.isSelected = shouldBeSelected;
|
|
855
868
|
}
|
|
856
869
|
};
|
|
857
870
|
}
|
|
858
871
|
onSelectionChange(newValue) {
|
|
872
|
+
var _a;
|
|
859
873
|
// Ensure store is updated when component selection changes
|
|
860
|
-
if (newValue && checkoutStore.selectedPaymentMethod !== PAYMENT_METHODS.PLAID) {
|
|
861
|
-
checkoutStore.selectedPaymentMethod = PAYMENT_METHODS.PLAID;
|
|
874
|
+
if (newValue && ((_a = checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) !== PAYMENT_METHODS.PLAID) {
|
|
875
|
+
checkoutStore.selectedPaymentMethod = { type: PAYMENT_METHODS.PLAID };
|
|
876
|
+
}
|
|
877
|
+
// Auto-start Plaid flow when selected and ready
|
|
878
|
+
if (newValue &&
|
|
879
|
+
this.plaidLink &&
|
|
880
|
+
!this.publicToken &&
|
|
881
|
+
!this.isAuthenticating &&
|
|
882
|
+
!this.error) {
|
|
883
|
+
this.openPlaidLink();
|
|
862
884
|
}
|
|
863
885
|
}
|
|
864
886
|
componentDidRender() {
|
|
@@ -880,8 +902,9 @@ const PlaidPaymentMethod = class {
|
|
|
880
902
|
};
|
|
881
903
|
}
|
|
882
904
|
componentWillLoad() {
|
|
905
|
+
var _a;
|
|
883
906
|
// Initialize selection state based on store
|
|
884
|
-
this.isSelected = checkoutStore.selectedPaymentMethod === PAYMENT_METHODS.PLAID;
|
|
907
|
+
this.isSelected = ((_a = checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === PAYMENT_METHODS.PLAID;
|
|
885
908
|
}
|
|
886
909
|
async resolvePaymentMethod() {
|
|
887
910
|
if (!this.publicToken) {
|
|
@@ -898,17 +921,29 @@ const PlaidPaymentMethod = class {
|
|
|
898
921
|
// Returns a usable payment method token for checkout completion.
|
|
899
922
|
// Will perform the backend exchange if the token is not yet present in the store.
|
|
900
923
|
async getPaymentToken() {
|
|
901
|
-
if (checkoutStore.paymentToken) {
|
|
902
|
-
return checkoutStore.paymentToken;
|
|
903
|
-
}
|
|
904
|
-
await this.exchangePublicTokenForPaymentMethod();
|
|
905
924
|
return checkoutStore.paymentToken;
|
|
906
925
|
}
|
|
926
|
+
async handleSelectionClick() {
|
|
927
|
+
// Update local selection state
|
|
928
|
+
this.isSelected = true;
|
|
929
|
+
// Update store selection
|
|
930
|
+
checkoutStore.selectedPaymentMethod = { type: PAYMENT_METHODS.PLAID };
|
|
931
|
+
// If there's an error, clear it and try to initialize again
|
|
932
|
+
if (this.error) {
|
|
933
|
+
this.clearError();
|
|
934
|
+
this.waitForStoreAndInitialize();
|
|
935
|
+
return;
|
|
936
|
+
}
|
|
937
|
+
// If Plaid Link is ready and no public token exists, open Plaid Link
|
|
938
|
+
if (this.plaidLink && !this.publicToken && !this.isAuthenticating) {
|
|
939
|
+
this.openPlaidLink();
|
|
940
|
+
}
|
|
941
|
+
}
|
|
907
942
|
// Method to handle external selection changes (e.g., from other payment methods)
|
|
908
943
|
async setSelected(selected) {
|
|
909
944
|
this.isSelected = selected;
|
|
910
945
|
if (selected) {
|
|
911
|
-
checkoutStore.selectedPaymentMethod = PAYMENT_METHODS.PLAID;
|
|
946
|
+
checkoutStore.selectedPaymentMethod = { type: PAYMENT_METHODS.PLAID };
|
|
912
947
|
}
|
|
913
948
|
}
|
|
914
949
|
// Method to check if component is currently selected
|
|
@@ -1015,7 +1050,7 @@ const PlaidPaymentMethod = class {
|
|
|
1015
1050
|
}
|
|
1016
1051
|
return null;
|
|
1017
1052
|
};
|
|
1018
|
-
return (h(StyledHost, { class: "payment-method" }, h("script", { src: "https://cdn.plaid.com/link/v2/stable/link-initialize.js", async: true, ref: (el) => (this.scriptRef = el) }), h("div", {
|
|
1053
|
+
return (h(StyledHost, { class: "payment-method" }, h("script", { src: "https://cdn.plaid.com/link/v2/stable/link-initialize.js", async: true, ref: (el) => (this.scriptRef = el) }), h("div", { title: "Pay with Plaid" }, h("div", { onClick: (event) => { event.preventDefault(); this.handleSelectionClick(); } }, "Pay with Bank Account ", plaidLogo, " "), renderErrorState(), renderStatusState())));
|
|
1019
1054
|
}
|
|
1020
1055
|
static get watchers() { return {
|
|
1021
1056
|
"isSelected": ["onSelectionChange"]
|
|
@@ -1027,18 +1062,16 @@ const SavedPaymentMethods = class {
|
|
|
1027
1062
|
registerInstance(this, hostRef);
|
|
1028
1063
|
this.onPaymentMethodOptionClick = (paymentMethod) => (e) => {
|
|
1029
1064
|
e.preventDefault();
|
|
1030
|
-
|
|
1031
|
-
[PAYMENT_METHOD_TYPES.CARD]: PAYMENT_METHODS.SAVED_CARD,
|
|
1032
|
-
[PAYMENT_METHOD_TYPES.BANK_ACCOUNT]: PAYMENT_METHODS.SAVED_BANK_ACCOUNT,
|
|
1033
|
-
};
|
|
1034
|
-
checkoutStore.selectedPaymentMethod = SELECTED_PAYMENT_METHODS[paymentMethod.type];
|
|
1065
|
+
checkoutStore.selectedPaymentMethod = { id: paymentMethod.id, type: paymentMethod.type };
|
|
1035
1066
|
checkoutStore.paymentToken = paymentMethod.id;
|
|
1036
1067
|
};
|
|
1037
|
-
this.isAllowedPaymentMethod = (
|
|
1038
|
-
|
|
1068
|
+
this.isAllowedPaymentMethod = (paymentMethodType) => {
|
|
1069
|
+
const isCard = paymentMethodType === PAYMENT_METHODS.SAVED_CARD;
|
|
1070
|
+
const isBankAccount = paymentMethodType === PAYMENT_METHODS.SAVED_BANK_ACCOUNT;
|
|
1071
|
+
if (isCard && checkoutStore.disableCreditCard) {
|
|
1039
1072
|
return false;
|
|
1040
1073
|
}
|
|
1041
|
-
if (
|
|
1074
|
+
if (isBankAccount && checkoutStore.disableBankAccount) {
|
|
1042
1075
|
return false;
|
|
1043
1076
|
}
|
|
1044
1077
|
return true;
|
|
@@ -1057,7 +1090,7 @@ const SavedPaymentMethods = class {
|
|
|
1057
1090
|
return null;
|
|
1058
1091
|
}
|
|
1059
1092
|
return (h(StyledHost, null, h("div", { class: "saved-payment-methods" }, checkoutStore.paymentMethods.length ? checkoutStore.paymentMethods
|
|
1060
|
-
.filter(this.isAllowedPaymentMethod)
|
|
1093
|
+
.filter((paymentMethod) => this.isAllowedPaymentMethod(paymentMethod.type))
|
|
1061
1094
|
.map((paymentMethod) => (h("div", { class: "radio-list-item p-3", part: radioListItem, onClick: this.onPaymentMethodOptionClick(paymentMethod) }, h("form-control-radio", { name: "paymentMethodType", value: paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id, checked: checkoutStore.paymentToken === (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id), label: `${CardBrandLabels[paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.brand] || ''} *${paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.acct_last_four}` })))) : null)));
|
|
1062
1095
|
}
|
|
1063
1096
|
};
|
|
@@ -1073,11 +1106,6 @@ const SezzlePaymentMethod = class {
|
|
|
1073
1106
|
registerInstance(this, hostRef);
|
|
1074
1107
|
this.paymentMethodOptionSelected = createEvent(this, "paymentMethodOptionSelected");
|
|
1075
1108
|
this.paymentMethodOptionId = PAYMENT_METHODS.SEZZLE;
|
|
1076
|
-
this.onPaymentMethodOptionClick = (e) => {
|
|
1077
|
-
e.preventDefault();
|
|
1078
|
-
checkoutStore.selectedPaymentMethod = this.paymentMethodOptionId;
|
|
1079
|
-
this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId);
|
|
1080
|
-
};
|
|
1081
1109
|
this.initializeSezzleCheckout = () => {
|
|
1082
1110
|
let resolveSezzlePromise;
|
|
1083
1111
|
this.sezzlePromise = new Promise((resolve) => { resolveSezzlePromise = resolve; });
|
|
@@ -1120,13 +1148,17 @@ const SezzlePaymentMethod = class {
|
|
|
1120
1148
|
this.sezzleButtonRef.click();
|
|
1121
1149
|
return this.sezzlePromise;
|
|
1122
1150
|
}
|
|
1151
|
+
async handleSelectionClick() {
|
|
1152
|
+
checkoutStore.selectedPaymentMethod = { type: PAYMENT_METHODS.SEZZLE };
|
|
1153
|
+
this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId);
|
|
1154
|
+
}
|
|
1123
1155
|
render() {
|
|
1124
1156
|
var _a, _b;
|
|
1125
1157
|
if (!checkoutStore.bnplEnabled || checkoutStore.disableBnpl) {
|
|
1126
1158
|
console.warn('justifi-sezzle-payment-method: BNPL is not enabled for this account.');
|
|
1127
1159
|
return null;
|
|
1128
1160
|
}
|
|
1129
|
-
return (h(StyledHost, { class: "payment-method" }, h("script", { src: "https://checkout-sdk.sezzle.com/checkout.min.js", async: true, ref: (el) => (this.scriptRef = el) }), h("div",
|
|
1161
|
+
return (h(StyledHost, { class: "payment-method" }, h("script", { src: "https://checkout-sdk.sezzle.com/checkout.min.js", async: true, ref: (el) => (this.scriptRef = el) }), h("div", null, h("div", null, "Buy now, pay later with ", sezzleLogo), this.installmentPlan && (h("small", null, h("span", null, (_a = this.installmentPlan) === null || _a === void 0 ? void 0 : _a.installments.length), "\u00A0", h("span", null, this.installmentPlan.schedule, " payments of"), "\u00A0", h("span", { class: "fw-bold" }, formatCurrency((_b = this.installmentPlan) === null || _b === void 0 ? void 0 : _b.installments[0].amountInCents)))))));
|
|
1130
1162
|
}
|
|
1131
1163
|
};
|
|
1132
1164
|
|
|
@@ -1170,7 +1202,7 @@ const TokenizePaymentMethod = class {
|
|
|
1170
1202
|
}
|
|
1171
1203
|
handleRadioClick(event) {
|
|
1172
1204
|
this.selectedPaymentMethod = event.detail;
|
|
1173
|
-
checkoutStore.selectedPaymentMethod = event.detail;
|
|
1205
|
+
checkoutStore.selectedPaymentMethod = { type: event.detail };
|
|
1174
1206
|
}
|
|
1175
1207
|
async fillBillingForm(fields) {
|
|
1176
1208
|
var _a;
|
|
@@ -1262,11 +1294,11 @@ const TokenizePaymentMethod = class {
|
|
|
1262
1294
|
}
|
|
1263
1295
|
if (!this.disableCreditCard) {
|
|
1264
1296
|
this.selectedPaymentMethod = PAYMENT_METHODS.NEW_CARD;
|
|
1265
|
-
checkoutStore.selectedPaymentMethod = PAYMENT_METHODS.NEW_CARD;
|
|
1297
|
+
checkoutStore.selectedPaymentMethod = { type: PAYMENT_METHODS.NEW_CARD };
|
|
1266
1298
|
}
|
|
1267
1299
|
else if (!this.disableBankAccount) {
|
|
1268
1300
|
this.selectedPaymentMethod = PAYMENT_METHODS.NEW_BANK_ACCOUNT;
|
|
1269
|
-
checkoutStore.selectedPaymentMethod = PAYMENT_METHODS.NEW_BANK_ACCOUNT;
|
|
1301
|
+
checkoutStore.selectedPaymentMethod = { type: PAYMENT_METHODS.NEW_BANK_ACCOUNT };
|
|
1270
1302
|
}
|
|
1271
1303
|
}
|
|
1272
1304
|
setComputedHideSubmitButton() {
|
|
@@ -1365,17 +1397,17 @@ const TokenizePaymentMethod = class {
|
|
|
1365
1397
|
return this.disableCreditCard || this.disableBankAccount;
|
|
1366
1398
|
}
|
|
1367
1399
|
renderPaymentMethodOption(paymentMethodType) {
|
|
1368
|
-
const isSelected = this.selectedPaymentMethod === paymentMethodType;
|
|
1400
|
+
const isSelected = this.selectedPaymentMethod === paymentMethodType && checkoutStore.selectedPaymentMethod.id === undefined;
|
|
1369
1401
|
return (h("div", { class: "payment-method" }, h("justifi-radio-list-item", { name: "paymentMethodType", value: paymentMethodType, checked: isSelected, label: PAYMENT_METHOD_TYPE_LABELS[paymentMethodType], hidden: this.shouldHideRadioInput }), isSelected && this.renderSelectedPaymentMethodForm(paymentMethodType)));
|
|
1370
1402
|
}
|
|
1371
|
-
renderSelectedPaymentMethodForm(
|
|
1372
|
-
return (h("div", { class: "mt-4 pb-4" }, this.renderPaymentMethodForm(
|
|
1403
|
+
renderSelectedPaymentMethodForm(paymentMethodType) {
|
|
1404
|
+
return (h("div", { class: "mt-4 pb-4" }, this.renderPaymentMethodForm(paymentMethodType), h("div", { class: "mt-4" }, h("justifi-billing-form", { ref: (el) => (this.billingFormRef = el), hideCardBillingForm: this.hideCardBillingForm, hideBankAccountBillingForm: this.hideBankAccountBillingForm, paymentMethodType: paymentMethodType })), h("div", { class: "mt-4" }, h("justifi-save-new-payment-method", { hidden: !this.paymentMethodGroupID, label: this.savePaymentMethodLabel }))));
|
|
1373
1405
|
}
|
|
1374
|
-
renderPaymentMethodForm(
|
|
1375
|
-
return
|
|
1406
|
+
renderPaymentMethodForm(paymentMethodType) {
|
|
1407
|
+
return paymentMethodType === PAYMENT_METHODS.NEW_CARD ? (h("justifi-card-form", { ref: (el) => (this.paymentMethodFormRef = el) })) : (h("justifi-bank-account-form", { ref: (el) => (this.paymentMethodFormRef = el) }));
|
|
1376
1408
|
}
|
|
1377
1409
|
render() {
|
|
1378
|
-
return (h(StyledHost, { key: '
|
|
1410
|
+
return (h(StyledHost, { key: '5fc5dad15215fe24b421f4d6c13355fb849b8a76' }, h("form", { key: '0e0330e5b11ee3ae0bef9e092fa2fb2a0a6af3e7' }, h("fieldset", { key: 'ee4c026ccda62a249e019a9e105e40ea465fc400' }, h("div", { key: '15a8a86fa5be8a545745260d76a8c3b2569d6a0e', class: "row gy-3" }, h("div", { key: 'bbbeed6ee96311394a876b4beb206e8e335184c2', class: "col-12" }, this.availablePaymentMethods.map((method) => this.renderPaymentMethodOption(method))), h("div", { key: 'da2a2009abe4348e25a5fc712557e81e9f6c4c1f', class: "col-12" }, h("justifi-button", { key: '050939c757999383226f281ee0eff1ec178be203', text: this.submitButtonText, variant: "primary", type: "submit", clickHandler: (e) => this.tokenizePaymentMethod(e), isLoading: this.isLoading, "data-testid": "submit-button", hidden: this.computedHideSubmitButton })))))));
|
|
1379
1411
|
}
|
|
1380
1412
|
get host() { return getElement(this); }
|
|
1381
1413
|
static get watchers() { return {
|