@justifi/webcomponents 6.7.2 → 6.8.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-QUTWjGTy.js → Api-CVbEWBG6.js} +1 -1
- package/dist/cjs/{Business-DWHy_-z9.js → Business-CB8EVrhD.js} +6 -0
- package/dist/cjs/{GooglePay-BwiJ_80p.js → Plaid-DxPvVu0H.js} +54 -1
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +3 -3
- package/dist/cjs/{badge-Cc87HAsf.js → badge-DkOPisAV.js} +2 -2
- package/dist/cjs/bank-account-document-form-inputs_9.cjs.entry.js +532 -0
- package/dist/cjs/bank-account-form.cjs.entry.js +7 -7
- package/dist/cjs/{business-additional-questions-schema-Y1mXnwUT.js → business-additional-questions-schema-Cnh6AXQU.js} +5 -3
- package/dist/cjs/business-details-core.cjs.entry.js +7 -7
- package/dist/cjs/{business-form-options-e9UFw4P-.js → business-form-options-B3CbEmdc.js} +1 -1
- package/dist/cjs/{business-identity-schema-D_OO0Suf.js → business-identity-schema-0jg2Thn9.js} +6 -2
- package/dist/cjs/{business.service-q93NsTG_.js → business.service-zGEitIbP.js} +3 -3
- package/dist/cjs/{button-fUPGXjU_.js → button-C2p1BMP-.js} +2 -2
- package/dist/cjs/card-form.cjs.entry.js +7 -7
- package/dist/cjs/{check-pkg-version-BG-Rfkh5.js → check-pkg-version-DKH70uPq.js} +12 -11
- package/dist/cjs/{checkout.service-CwelwhrT.js → checkout.service-DT13pWxH.js} +3 -3
- package/dist/cjs/checkouts-list-core.cjs.entry.js +14 -14
- package/dist/cjs/{payments-list-params-state-DfZySwaC.js → checkouts-list-params-state-vGJZ6Oe2.js} +1 -1
- package/dist/cjs/{checkouts-table-BBtqxG2F.js → checkouts-table-DftTbgXr.js} +3 -3
- package/dist/cjs/{config-state-CYoBVAca.js → config-state-BIgGhhe9.js} +1 -1
- package/dist/cjs/{country-config-MCOhn8o3.js → country-config-ETD-7Wb7.js} +1 -1
- package/dist/cjs/custom-popper_2.cjs.entry.js +52 -21
- package/dist/cjs/{dispute.service-q5ha39uN.js → dispute.service-GDUl1Wjs.js} +3 -3
- package/dist/cjs/form-alert_5.cjs.entry.js +11 -11
- package/dist/cjs/form-control-checkbox.cjs.entry.js +11 -8
- package/dist/cjs/form-control-date.cjs.entry.js +7 -7
- package/dist/cjs/{form-control-error-text-Dg_65HGK.js → form-control-error-text-BC5aRpfl.js} +2 -2
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +17 -10
- package/dist/cjs/{form-control-help-text-tB5u1-5M.js → form-control-help-text-B2yMic8i.js} +2 -2
- package/dist/cjs/form-control-help-text.cjs.entry.js +1 -1
- package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +12 -8
- package/dist/cjs/form-control-monetary.cjs.entry.js +8 -8
- package/dist/cjs/form-control-number-masked_3.cjs.entry.js +13 -11
- package/dist/cjs/{owner-form-core_2.cjs.entry.js → form-control-number_3.cjs.entry.js} +71 -18
- package/dist/cjs/form-control-radio.cjs.entry.js +9 -6
- package/dist/cjs/form-control-select_2.cjs.entry.js +11 -11
- package/dist/cjs/{get-business-D9ZHyPem.js → get-business-CP0ALW9n.js} +1 -1
- package/dist/cjs/{get-payment-details-DidIAK2i.js → get-payment-details-IA5Toi7Z.js} +4 -4
- package/dist/cjs/{get-subaccounts-BE_wcfM7.js → get-subaccounts-DNMZjAyT.js} +5 -5
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +6 -6
- package/dist/cjs/{header-1-Bqejh9no.js → header-1-B-nd_U7n.js} +2 -2
- package/dist/cjs/{header-3-DQ649Me2.js → header-3--BEJGMFA.js} +2 -2
- package/dist/cjs/hidden-input_2.cjs.entry.js +10 -10
- package/dist/cjs/{index-mmd0OhmD.js → index-W-zoNiyM.js} +90 -21
- package/dist/cjs/index-p7cvUYAE.js +4450 -0
- package/dist/cjs/{input-handlers-D6QMwPTB.js → input-handlers-gV1LyFy3.js} +1 -1
- package/dist/cjs/{insurance-state-DsGnIHMM.js → insurance-state-CiVJ5e26.js} +3 -3
- package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +34 -34
- package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +101 -67
- package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +10 -10
- package/dist/cjs/justifi-apple-pay_8.cjs.entry.js +247 -317
- package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +10 -10
- package/dist/cjs/justifi-business-details.cjs.entry.js +13 -13
- package/dist/cjs/justifi-business-form.cjs.entry.js +22 -22
- package/dist/cjs/justifi-checkout.cjs.entry.js +22 -22
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +17 -17
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +17 -17
- package/dist/cjs/justifi-config-provider.cjs.entry.js +3 -3
- package/dist/cjs/justifi-details.cjs.entry.js +4 -4
- package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +3 -3
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +11 -11
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +25 -25
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +11 -11
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +20 -20
- package/dist/cjs/justifi-payment-details.cjs.entry.js +14 -14
- package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +23 -11
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +11 -11
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +17 -17
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payments-list.cjs.entry.js +17 -17
- package/dist/cjs/justifi-payout-details.cjs.entry.js +13 -13
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +17 -17
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +18 -18
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +20 -20
- package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +4 -4
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +17 -17
- package/dist/cjs/justifi-skeleton.cjs.entry.js +5 -5
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +18 -18
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +15 -15
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +14 -14
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +17 -17
- package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-Df5lTFe6.js → package-B4vs5j7c.js} +1 -1
- package/dist/cjs/pagination-menu.cjs.entry.js +2 -2
- package/dist/cjs/{parts-BVbaniVM.js → parts-BsBVknuf.js} +1 -0
- package/dist/cjs/payment-details-core.cjs.entry.js +21 -21
- package/dist/cjs/payment-method-option.cjs.entry.js +4 -4
- package/dist/cjs/payment-provisioning-loading-B3hvtd9o.js +12 -0
- package/dist/cjs/{payment.service-CyHFdJ7n.js → payment.service-QODfB293.js} +3 -3
- package/dist/cjs/payments-list-core.cjs.entry.js +15 -15
- package/dist/cjs/{payouts-list-params-state-DfZySwaC.js → payments-list-params-state-vGJZ6Oe2.js} +1 -1
- package/dist/cjs/{payments-status-BP4u31jU.js → payments-status-BAR25wA6.js} +2 -2
- package/dist/cjs/{payments-table-CWXVhECV.js → payments-table-BLJ54fGU.js} +3 -3
- package/dist/cjs/payout-details-core.cjs.entry.js +13 -13
- package/dist/cjs/{payout.service-Half-hdB.js → payout.service-k7GBuYzk.js} +3 -3
- package/dist/cjs/payouts-list-core.cjs.entry.js +15 -15
- package/dist/cjs/{checkouts-list-params-state-DfZySwaC.js → payouts-list-params-state-vGJZ6Oe2.js} +1 -1
- package/dist/cjs/{payouts-status-CM5Zy-0J.js → payouts-status-uZAaS1RP.js} +2 -2
- package/dist/cjs/{payouts-table-ZLTcfkUm.js → payouts-table-C4jZJ8rq.js} +3 -3
- package/dist/cjs/plaid-icon-DTpONc_Q.js +46 -0
- package/dist/cjs/{schema-validations-Bf2mk2xU.js → schema-validations-BakyfJpE.js} +19 -3
- package/dist/cjs/{skeleton-B8dzxFFr.js → skeleton-BGGMhPJj.js} +2 -2
- package/dist/cjs/{spinner-jHyLNCGO.js → spinner-CV2CNXOQ.js} +2 -2
- package/dist/cjs/{styled-host-D5g7INLE.js → styled-host-DAi5SuFa.js} +1 -1
- package/dist/cjs/{table-CrtpRwGN.js → table-eTN_pRIP.js} +3 -3
- package/dist/cjs/table-filters-menu.cjs.entry.js +4 -4
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +14 -14
- package/dist/cjs/{terminal-orders-list-params-state-DfZySwaC.js → terminal-orders-list-params-state-vGJZ6Oe2.js} +1 -1
- package/dist/cjs/{terminal-orders-table-DT53anT3.js → terminal-orders-table-C6j6Mx_r.js} +8 -8
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +4 -4
- package/dist/cjs/{terminal.service-CFt55QNO.js → terminal.service-A90K3XNq.js} +3 -3
- package/dist/cjs/terminals-list-core.cjs.entry.js +14 -14
- package/dist/cjs/terminals-list-params-state-vGJZ6Oe2.js +22 -0
- package/dist/cjs/{terminals-table-DahpSz98.js → terminals-table-DZz8k4tP.js} +3 -3
- package/dist/cjs/{utils-CMiA4X7s.js → utils-T6hRmGuY.js} +2 -2
- package/dist/cjs/webcomponents.cjs.js +30 -3
- package/dist/collection/api/Analytics.js +8 -7
- package/dist/collection/api/Business.js +3 -0
- package/dist/collection/api/Identity.js +3 -0
- package/dist/collection/api/Plaid.js +50 -0
- package/dist/collection/api/index.js +1 -0
- package/dist/collection/api/services/plaid.service.js +13 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +1 -1
- package/dist/collection/components/business-details/business-details-core.js +2 -2
- package/dist/collection/components/business-details/business-details.js +2 -2
- package/dist/collection/components/business-details/core-info-details/core-info-details.js +1 -1
- package/dist/collection/components/business-details/legal-address-details/legal-address-details.js +1 -1
- package/dist/collection/components/business-details/owner-details/owner-details.js +1 -1
- package/dist/collection/components/business-details/representative-details/representative-details.js +1 -1
- package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +2 -2
- package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +4 -4
- package/dist/collection/components/business-forms/business-form/business-form.js +2 -2
- package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +4 -4
- package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +3 -3
- package/dist/collection/components/business-forms/owner-form/identity-address/identity-address-form.js +5 -5
- package/dist/collection/components/business-forms/owner-form/owner-form-core.js +6 -6
- package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +7 -7
- package/dist/collection/components/business-forms/owner-form/owner-form.js +4 -4
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +4 -4
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-document-inputs.js +4 -4
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs-canada.js +5 -5
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.js +5 -5
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-read-only-value.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +23 -8
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +3 -3
- package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +35 -7
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +6 -6
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/form-address-fields/form-address-fields.js +4 -4
- package/dist/collection/components/business-forms/payment-provisioning/form-control-monetary-provisioning.js +19 -11
- package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +20 -8
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-buttons.js +7 -7
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +6 -6
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +3 -3
- package/dist/collection/components/business-forms/payment-provisioning/plaid-verification/plaid-verification.js +433 -0
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +3 -3
- package/dist/collection/components/business-forms/schemas/business-additional-questions-schema.js +2 -0
- package/dist/collection/components/business-forms/schemas/business-identity-schema.js +5 -1
- package/dist/collection/components/business-forms/schemas/schema-validations.js +15 -0
- package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +2 -2
- package/dist/collection/components/checkout/card-form/card-form.js +2 -2
- package/dist/collection/components/checkout/checkout.js +23 -4
- package/dist/collection/components/checkout/save-new-payment-method.js +1 -1
- package/dist/collection/components/checkout/saved-payment-method.js +3 -3
- package/dist/collection/components/checkouts-list/checkouts-list-core.js +4 -4
- package/dist/collection/components/checkouts-list/checkouts-list-filters.js +2 -2
- package/dist/collection/components/checkouts-list/checkouts-list.js +3 -3
- package/dist/collection/components/dispute-management/dispute-management-core.js +4 -4
- package/dist/collection/components/dispute-management/dispute-management.js +3 -3
- package/dist/collection/components/dispute-management/dispute-notification.js +5 -5
- package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +2 -2
- package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +2 -2
- package/dist/collection/components/dispute-management/dispute-response/customer-details.js +2 -2
- 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 +4 -4
- package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +2 -2
- package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +2 -2
- package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +2 -2
- package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +2 -2
- package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +2 -2
- package/dist/collection/components/filters/table-filters-menu.js +3 -3
- package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +2 -2
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +2 -2
- package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +7 -7
- package/dist/collection/components/modular-checkout/modular-checkout.js +3 -3
- package/dist/collection/components/modular-checkout/sub-components/apple-pay.js +3 -0
- package/dist/collection/components/modular-checkout/sub-components/bank-account-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/card-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/card-form.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/google-pay.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +6 -6
- package/dist/collection/components/modular-checkout/sub-components/plaid-payment-method.js +4 -51
- package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
- package/dist/collection/components/order-terminals/order-terminals.js +4 -4
- package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +5 -5
- package/dist/collection/components/payment-details/payment-details-core.js +9 -9
- package/dist/collection/components/payment-details/payment-details.js +2 -2
- package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +3 -3
- package/dist/collection/components/payments-list/payments-list-core.js +3 -3
- package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
- package/dist/collection/components/payments-list/payments-list.js +3 -3
- package/dist/collection/components/payout-details/payout-details-core.js +5 -5
- package/dist/collection/components/payout-details/payout-details.js +2 -2
- package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +3 -3
- package/dist/collection/components/payouts-list/payouts-list-core.js +5 -5
- package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
- package/dist/collection/components/payouts-list/payouts-list.js +3 -3
- package/dist/collection/components/refund-payment/refund-payment.js +3 -3
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +3 -3
- 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 +3 -3
- package/dist/collection/components/terminals-list/terminals-list-core.js +4 -4
- package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list.js +3 -3
- package/dist/collection/components/tokenize-payment-method/internal-tokenize-payment-method.js +1 -1
- package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +1 -1
- package/dist/collection/ui-components/custom-popper/custom-popper.js +51 -17
- package/dist/collection/ui-components/details/details.js +2 -2
- package/dist/collection/ui-components/form/form-control-checkbox.js +16 -10
- package/dist/collection/ui-components/form/form-control-date.js +5 -5
- package/dist/collection/ui-components/form/form-control-file-v2.js +16 -8
- package/dist/collection/ui-components/form/form-control-file.js +16 -10
- package/dist/collection/ui-components/form/form-control-monetary.js +5 -5
- package/dist/collection/ui-components/form/form-control-number-masked.js +14 -10
- package/dist/collection/ui-components/form/form-control-number.js +10 -8
- package/dist/collection/ui-components/form/form-control-radio.js +18 -12
- package/dist/collection/ui-components/form/form-control-select.js +6 -6
- package/dist/collection/ui-components/form/form-control-text.js +5 -5
- package/dist/collection/ui-components/form/form-control-textarea.js +19 -11
- package/dist/collection/ui-components/form/form-helpers/form-alert/form-alert.js +2 -2
- package/dist/collection/ui-components/form/form-helpers/form-control-help-text/form-control-help-text.js +2 -2
- package/dist/collection/ui-components/form/form-helpers/form-control-tooltip/form-control-tooltip.js +1 -1
- package/dist/collection/ui-components/form/hidden-input.js +1 -1
- package/dist/collection/ui-components/form/iframe-input.js +6 -6
- package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +2 -2
- package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
- package/dist/docs.json +714 -273
- package/dist/esm/{Api-Dln8a6No.js → Api-ohkSjyhl.js} +1 -1
- package/dist/esm/{Business-B5rtFhtR.js → Business-GgW1g7FQ.js} +6 -0
- package/dist/esm/{GooglePay-NNHE-OLJ.js → Plaid-CBrksnBN.js} +53 -2
- package/dist/esm/additional-questions-details_5.entry.js +3 -3
- package/dist/esm/{badge-DtrH25ss.js → badge-BW9VFFkp.js} +2 -2
- package/dist/esm/bank-account-document-form-inputs_9.entry.js +522 -0
- package/dist/esm/bank-account-form.entry.js +7 -7
- package/dist/esm/{business-additional-questions-schema-woG5-pgK.js → business-additional-questions-schema-CQ8CuEfQ.js} +5 -3
- package/dist/esm/business-details-core.entry.js +7 -7
- package/dist/esm/{business-form-options-D6s5H4RI.js → business-form-options-DamBLV7N.js} +1 -1
- package/dist/esm/{business-identity-schema-B7VTDF4j.js → business-identity-schema-BTyJz7M9.js} +7 -3
- package/dist/esm/{business.service-BrUSam2T.js → business.service-BWm7Kqs4.js} +3 -3
- package/dist/esm/{button-Bpf3VX8Q.js → button-DMeChykB.js} +2 -2
- package/dist/esm/card-form.entry.js +7 -7
- package/dist/esm/{check-pkg-version-c_8fDHCB.js → check-pkg-version-CioeuqLV.js} +12 -11
- package/dist/esm/{checkout.service-Bxt1qPaY.js → checkout.service-D4Mljqjr.js} +3 -3
- package/dist/esm/checkouts-list-core.entry.js +14 -14
- package/dist/esm/{checkouts-list-params-state-gllzDQAb.js → checkouts-list-params-state-CiGfmyWW.js} +1 -1
- package/dist/esm/{checkouts-table-CB4GdlcZ.js → checkouts-table-B9YTe5fJ.js} +3 -3
- package/dist/esm/{config-state-C2NXATwF.js → config-state-kKn89dp1.js} +1 -1
- package/dist/esm/{country-config-BQ4D46Lb.js → country-config-D-9YmU94.js} +1 -1
- package/dist/esm/custom-popper_2.entry.js +52 -21
- package/dist/esm/{dispute.service-DYRYxxaT.js → dispute.service-ZpqfPDC0.js} +3 -3
- package/dist/esm/form-alert_5.entry.js +11 -11
- package/dist/esm/form-control-checkbox.entry.js +11 -8
- package/dist/esm/form-control-date.entry.js +7 -7
- package/dist/esm/{form-control-error-text-BZYykCDp.js → form-control-error-text-CTQxgr7_.js} +2 -2
- package/dist/esm/form-control-file-v2_2.entry.js +17 -10
- package/dist/esm/{form-control-help-text-D-p66Yxr.js → form-control-help-text-B-aaeX6n.js} +2 -2
- package/dist/esm/form-control-help-text.entry.js +1 -1
- package/dist/esm/form-control-monetary-provisioning.entry.js +12 -8
- package/dist/esm/form-control-monetary.entry.js +8 -8
- package/dist/esm/form-control-number-masked_3.entry.js +13 -11
- package/dist/esm/{owner-form-core_2.entry.js → form-control-number_3.entry.js} +71 -19
- package/dist/esm/form-control-radio.entry.js +9 -6
- package/dist/esm/form-control-select_2.entry.js +11 -11
- package/dist/esm/{get-business-Xt7B5dSo.js → get-business-BMB2IxN_.js} +1 -1
- package/dist/esm/{get-payment-details-BJ1PLhJZ.js → get-payment-details-B71Qi6mF.js} +3 -3
- package/dist/esm/{get-subaccounts-CzGHjlUF.js → get-subaccounts-DXJdRbWg.js} +4 -4
- package/dist/esm/gross-payment-chart-core.entry.js +6 -6
- package/dist/esm/{header-1-WwkF5F9y.js → header-1-DFMANSXo.js} +2 -2
- package/dist/esm/{header-3-C5jS39cE.js → header-3-Ck64YtdM.js} +2 -2
- package/dist/esm/hidden-input_2.entry.js +10 -10
- package/dist/esm/index-CV0Pyo1O.js +4434 -0
- package/dist/esm/{index-B-fWxE5e.js → index-cDVGjRkU.js} +90 -21
- package/dist/esm/{input-handlers-D3y0TzH9.js → input-handlers-CzWCJ849.js} +1 -1
- package/dist/esm/{insurance-state-C11WKZU6.js → insurance-state-DQ3xzFpR.js} +3 -3
- package/dist/esm/internal-tokenize-payment-method_7.entry.js +23 -23
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +89 -55
- package/dist/esm/justifi-additional-statement_8.entry.js +10 -10
- package/dist/esm/justifi-apple-pay_8.entry.js +35 -105
- package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +10 -10
- package/dist/esm/justifi-business-details.entry.js +13 -13
- package/dist/esm/justifi-business-form.entry.js +22 -22
- package/dist/esm/justifi-checkout.entry.js +15 -15
- package/dist/esm/justifi-checkouts-list-filters.entry.js +10 -10
- package/dist/esm/justifi-checkouts-list.entry.js +16 -16
- package/dist/esm/justifi-config-provider.entry.js +3 -3
- package/dist/esm/justifi-details.entry.js +4 -4
- package/dist/esm/justifi-dispute-management-core.entry.js +3 -3
- package/dist/esm/justifi-dispute-management.entry.js +11 -11
- package/dist/esm/justifi-dispute-notification_3.entry.js +25 -25
- package/dist/esm/justifi-gross-payment-chart.entry.js +11 -11
- package/dist/esm/justifi-order-terminals.entry.js +17 -17
- package/dist/esm/justifi-payment-details.entry.js +14 -14
- package/dist/esm/justifi-payment-provisioning-core.entry.js +23 -11
- package/dist/esm/justifi-payment-provisioning.entry.js +11 -11
- package/dist/esm/justifi-payment-transactions-list.entry.js +16 -16
- package/dist/esm/justifi-payments-list-filters.entry.js +7 -7
- package/dist/esm/justifi-payments-list.entry.js +16 -16
- package/dist/esm/justifi-payout-details.entry.js +12 -12
- package/dist/esm/justifi-payout-transactions-list.entry.js +16 -16
- package/dist/esm/justifi-payouts-list-filters.entry.js +7 -7
- package/dist/esm/justifi-payouts-list.entry.js +17 -17
- package/dist/esm/justifi-refund-payment.entry.js +16 -16
- package/dist/esm/justifi-saved-payment-method.entry.js +4 -4
- package/dist/esm/justifi-season-interruption-insurance.entry.js +14 -14
- package/dist/esm/justifi-skeleton.entry.js +5 -5
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +10 -10
- package/dist/esm/justifi-terminal-orders-list.entry.js +14 -14
- package/dist/esm/justifi-terminals-list-filters.entry.js +9 -9
- package/dist/esm/justifi-terminals-list.entry.js +16 -16
- package/dist/esm/justifi-tokenize-payment-method.entry.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{package-BzT9OxlN.js → package-CekpA_KC.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +2 -2
- package/dist/esm/{parts-sA8HBfkI.js → parts-DrquDBSk.js} +1 -1
- package/dist/esm/payment-details-core.entry.js +20 -20
- package/dist/esm/payment-method-option.entry.js +4 -4
- package/dist/esm/payment-provisioning-loading-DU0pNyqx.js +10 -0
- package/dist/esm/{payment.service-BoGemgMw.js → payment.service-C2lFq1yV.js} +3 -3
- package/dist/esm/payments-list-core.entry.js +15 -15
- package/dist/esm/{payments-list-params-state-gllzDQAb.js → payments-list-params-state-CiGfmyWW.js} +1 -1
- package/dist/esm/{payments-status-CADg1cD0.js → payments-status-Bn-MvMcF.js} +2 -2
- package/dist/esm/{payments-table-C6zHWwGO.js → payments-table-CF3_zGnh.js} +3 -3
- package/dist/esm/payout-details-core.entry.js +13 -13
- package/dist/esm/{payout.service-BSG50wqN.js → payout.service-ChupMPKT.js} +3 -3
- package/dist/esm/payouts-list-core.entry.js +15 -15
- package/dist/esm/{payouts-list-params-state-gllzDQAb.js → payouts-list-params-state-CiGfmyWW.js} +1 -1
- package/dist/esm/{payouts-status-4VDQvaYV.js → payouts-status-ehZrz-Xx.js} +2 -2
- package/dist/esm/{payouts-table-BU5XbzB9.js → payouts-table-CGZJfsje.js} +3 -3
- package/dist/esm/plaid-icon-wJLd-2NX.js +43 -0
- package/dist/esm/{schema-validations-iamDi5JD.js → schema-validations-CfHWzMvr.js} +19 -4
- package/dist/esm/{skeleton-Dtt56Fl3.js → skeleton-D9UXuoik.js} +2 -2
- package/dist/esm/{spinner-DikooWuI.js → spinner-ACMfJh3a.js} +2 -2
- package/dist/esm/{styled-host-DhOcKWqZ.js → styled-host-D6byRazK.js} +1 -1
- package/dist/esm/{table-1hqe6s5m.js → table-BbMG2jg9.js} +3 -3
- package/dist/esm/table-filters-menu.entry.js +4 -4
- package/dist/esm/terminal-orders-list-core.entry.js +14 -14
- package/dist/esm/{terminal-orders-list-params-state-gllzDQAb.js → terminal-orders-list-params-state-CiGfmyWW.js} +1 -1
- package/dist/esm/{terminal-orders-table-BsVBelxB.js → terminal-orders-table-B4_RAxxx.js} +6 -6
- package/dist/esm/terminal-quantity-selector.entry.js +4 -4
- package/dist/esm/{terminal.service-YKfi6Mr9.js → terminal.service-DqibXFHt.js} +3 -3
- package/dist/esm/terminals-list-core.entry.js +14 -14
- package/dist/esm/terminals-list-params-state-CiGfmyWW.js +16 -0
- package/dist/esm/{terminals-table-CXJTn-0I.js → terminals-table-B-7FR4ug.js} +3 -3
- package/dist/esm/{utils-CgFsPVsv.js → utils-DhCv62Pi.js} +2 -2
- package/dist/esm/webcomponents.js +31 -4
- package/dist/module/Analytics.js +9 -8
- package/dist/module/Business.js +6 -0
- package/dist/module/{Refund.js → Plaid.js} +51 -1
- package/dist/module/additional-questions.js +1 -1
- package/dist/module/additional-statement.js +2 -2
- package/dist/module/bank-account-billing-form-simple.js +1 -1
- package/dist/module/bank-account-document-inputs.js +2 -2
- package/dist/module/bank-account-form-inputs-canada2.js +1 -1
- package/dist/module/bank-account-form-inputs2.js +1 -1
- package/dist/module/bank-account-form.js +2 -2
- package/dist/module/bank-account-read-only-value2.js +1 -1
- package/dist/module/bank-account.js +2 -2
- package/dist/module/business-additional-questions-form-step.js +3 -3
- package/dist/module/business-additional-questions-schema.js +3 -1
- package/dist/module/business-address-schema.js +1 -1
- package/dist/module/business-bank-account-form-step.js +47 -26
- package/dist/module/business-core-info-form-step.js +1 -1
- package/dist/module/business-core-info.js +2 -2
- package/dist/module/business-details-core2.js +1 -1
- package/dist/module/business-identity-schema.js +5 -1
- package/dist/module/business-owners-form-step.js +42 -8
- package/dist/module/business-representative-form-inputs.js +2 -2
- package/dist/module/business-representative-form-step.js +1 -1
- package/dist/module/business-representative.js +2 -2
- package/dist/module/business-terms-conditions-form-step.js +2 -2
- package/dist/module/business.service.js +1 -1
- package/dist/module/button.js +1 -1
- package/dist/module/cancellation-policy.js +2 -2
- package/dist/module/card-billing-form-simple.js +1 -1
- package/dist/module/card-form.js +2 -2
- package/dist/module/card-form2.js +2 -2
- package/dist/module/checkout.service.js +1 -1
- package/dist/module/checkout.store.js +1 -1
- package/dist/module/checkouts-list-core2.js +3 -3
- package/dist/module/custom-popper2.js +50 -17
- package/dist/module/customer-details.js +2 -2
- package/dist/module/details.js +1 -1
- package/dist/module/dispute-management-core.js +2 -2
- package/dist/module/dispute-notification.js +3 -3
- package/dist/module/dispute-response-actions.js +1 -1
- package/dist/module/dispute-response-core.js +2 -2
- package/dist/module/dispute-response.js +2 -2
- package/dist/module/duplicate-charge.js +2 -2
- package/dist/module/electronic-evidence.js +2 -2
- package/dist/module/form-address-fields.js +1 -1
- package/dist/module/form-control-checkbox2.js +5 -2
- package/dist/module/form-control-date2.js +2 -2
- package/dist/module/form-control-file-v22.js +4 -1
- package/dist/module/form-control-file2.js +5 -2
- package/dist/module/form-control-monetary-provisioning2.js +6 -2
- package/dist/module/form-control-monetary2.js +2 -2
- package/dist/module/form-control-number-masked2.js +4 -2
- package/dist/module/form-control-number.js +1 -84
- package/dist/module/form-control-number2.js +87 -0
- package/dist/module/form-control-radio2.js +5 -2
- package/dist/module/form-control-select2.js +2 -2
- package/dist/module/form-control-text2.js +2 -2
- package/dist/module/form-control-textarea2.js +6 -2
- package/dist/module/get-business.js +1 -1
- package/dist/module/get-payment-details.js +1 -1
- package/dist/module/get-payout-csv.js +1 -1
- package/dist/module/get-subaccounts.js +1 -1
- package/dist/module/google-pay.js +3 -3
- package/dist/module/gross-payment-chart-core2.js +1 -1
- package/dist/module/hidden-input2.js +1 -1
- package/dist/module/identity-address-form.js +1 -1
- package/dist/module/iframe-input2.js +3 -3
- package/dist/module/index2.js +90 -21
- package/dist/module/internal-tokenize-payment-method2.js +2 -2
- package/dist/module/justifi-business-details.js +1 -1
- package/dist/module/justifi-business-form.js +1 -1
- package/dist/module/justifi-button2.js +1 -1
- package/dist/module/justifi-checkout.js +3 -3
- package/dist/module/justifi-checkouts-list-filters.js +4 -4
- package/dist/module/justifi-checkouts-list.js +2 -2
- package/dist/module/justifi-dispute-management.js +2 -2
- package/dist/module/justifi-gross-payment-chart.js +1 -1
- package/dist/module/justifi-header2.js +1 -1
- package/dist/module/justifi-order-terminals.js +3 -3
- package/dist/module/justifi-payment-details.js +1 -1
- package/dist/module/justifi-payment-provisioning.js +74 -62
- package/dist/module/justifi-payment-transactions-list.js +3 -3
- package/dist/module/justifi-payments-list-filters.js +3 -3
- package/dist/module/justifi-payments-list.js +2 -2
- package/dist/module/justifi-payout-details.js +1 -1
- package/dist/module/justifi-payout-transactions-list.js +3 -3
- package/dist/module/justifi-payouts-list-filters.js +3 -3
- package/dist/module/justifi-payouts-list.js +2 -2
- package/dist/module/justifi-refund-payment.js +1 -1
- package/dist/module/justifi-saved-payment-method.js +1 -1
- package/dist/module/justifi-season-interruption-insurance.js +1 -1
- package/dist/module/justifi-skeleton.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +4 -4
- package/dist/module/justifi-terminal-orders-list.js +2 -2
- package/dist/module/justifi-terminals-list-filters.js +3 -3
- package/dist/module/justifi-terminals-list.js +2 -2
- package/dist/module/justifi-tokenize-payment-method.js +1 -1
- package/dist/module/legal-address-form-step.js +1 -1
- package/dist/module/legal-address-form.js +1 -1
- package/dist/module/modular-checkout.js +3 -3
- package/dist/module/owner-form-core2.js +11 -5
- package/dist/module/owner-form-inputs2.js +13 -7
- package/dist/module/owner-form.js +11 -5
- package/dist/module/package.js +1 -1
- package/dist/module/parts.js +1 -1
- package/dist/module/payment-details-core2.js +9 -9
- package/dist/module/payment-method-option.js +1 -1
- package/dist/module/payment-provisioning-actions.js +1 -1
- package/dist/module/payment-provisioning-core.js +86 -62
- package/dist/module/payment-provisioning-form-buttons.js +1 -1
- package/dist/module/payment-provisioning-form-steps.js +67 -55
- package/dist/module/payment.service.js +1 -1
- package/dist/module/payments-list-core2.js +3 -3
- package/dist/module/payout-details-core2.js +3 -3
- package/dist/module/payout.service.js +1 -1
- package/dist/module/payouts-list-core2.js +3 -3
- package/dist/module/plaid-icon.js +3 -0
- package/dist/module/plaid-payment-method.js +3 -53
- package/dist/module/plaid-verification.d.ts +11 -0
- package/dist/module/plaid-verification.js +6 -0
- package/dist/module/plaid-verification2.js +358 -0
- package/dist/module/plaid.service.js +14 -1
- package/dist/module/product-or-service.js +2 -2
- package/dist/module/refund-policy.js +2 -2
- package/dist/module/save-new-payment-method.js +1 -1
- package/dist/module/schema-validations.js +16 -1
- package/dist/module/shipping-details.js +2 -2
- package/dist/module/summary.js +1 -1
- package/dist/module/table-filters-menu2.js +2 -2
- package/dist/module/table.js +1 -1
- package/dist/module/terminal-orders-list-core2.js +3 -3
- package/dist/module/terminal-quantity-selector2.js +2 -2
- package/dist/module/terminal.service.js +1 -1
- package/dist/module/terminals-list-core2.js +3 -3
- package/dist/module/utils4.js +1 -1
- package/dist/types/api/Analytics.d.ts +1 -0
- package/dist/types/api/BankAccount.d.ts +1 -0
- package/dist/types/api/Business.d.ts +6 -0
- package/dist/types/api/Identity.d.ts +4 -0
- package/dist/types/api/Plaid.d.ts +54 -0
- package/dist/types/api/index.d.ts +1 -0
- package/dist/types/api/services/plaid.service.d.ts +8 -0
- package/dist/types/components/business-forms/owner-form/owner-form-core.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.d.ts +1 -0
- package/dist/types/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.d.ts +4 -0
- package/dist/types/components/business-forms/payment-provisioning/form-control-monetary-provisioning.d.ts +3 -3
- package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-core.d.ts +1 -0
- package/dist/types/components/business-forms/payment-provisioning/plaid-verification/plaid-verification.d.ts +36 -0
- package/dist/types/components/business-forms/schemas/business-additional-questions-schema.d.ts +2 -0
- package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +12 -0
- package/dist/types/components/business-forms/schemas/business-identity-schema.d.ts +10 -0
- package/dist/types/components/business-forms/schemas/schema-validations.d.ts +1 -0
- package/dist/types/components/checkout/checkout.d.ts +19 -0
- package/dist/types/components/modular-checkout/sub-components/apple-pay.d.ts +3 -0
- package/dist/types/components/modular-checkout/sub-components/plaid-payment-method.d.ts +1 -25
- package/dist/types/components.d.ts +416 -239
- package/dist/types/ui-components/custom-popper/custom-popper.d.ts +4 -0
- package/dist/types/ui-components/form/form-control-checkbox.d.ts +2 -2
- package/dist/types/ui-components/form/form-control-file-v2.d.ts +2 -2
- package/dist/types/ui-components/form/form-control-file.d.ts +2 -2
- package/dist/types/ui-components/form/form-control-number-masked.d.ts +2 -2
- package/dist/types/ui-components/form/form-control-number.d.ts +1 -1
- package/dist/types/ui-components/form/form-control-radio.d.ts +3 -3
- package/dist/types/ui-components/form/form-control-textarea.d.ts +2 -2
- package/dist/webcomponents/{p-Dit3fZpU.js → p--cI8fPJx.js} +1 -1
- package/dist/webcomponents/p-02f360c5.entry.js +1 -0
- package/dist/webcomponents/{p-36a0af30.entry.js → p-0467df5d.entry.js} +1 -1
- package/dist/webcomponents/p-073ca03f.entry.js +1 -0
- package/dist/webcomponents/p-0eb97b54.entry.js +1 -0
- package/dist/webcomponents/p-0f6fa1c0.entry.js +1 -0
- package/dist/webcomponents/p-0fcb7ebb.entry.js +1 -0
- package/dist/webcomponents/p-110bec2e.entry.js +1 -0
- package/dist/webcomponents/{p-d0c4b0ea.entry.js → p-172b0c96.entry.js} +1 -1
- package/dist/webcomponents/{p-725319f3.entry.js → p-1ec3d1e7.entry.js} +1 -1
- package/dist/webcomponents/p-20cab5fe.entry.js +1 -0
- package/dist/webcomponents/p-238ba771.entry.js +1 -0
- package/dist/webcomponents/p-2454c140.entry.js +1 -0
- package/dist/webcomponents/p-25666afe.entry.js +1 -0
- package/dist/webcomponents/p-26430bfe.entry.js +1 -0
- package/dist/webcomponents/p-265a7cb3.entry.js +1 -0
- package/dist/webcomponents/p-2e7143b8.entry.js +1 -0
- package/dist/webcomponents/p-32fac30b.entry.js +1 -0
- package/dist/webcomponents/p-33ab9174.entry.js +1 -0
- package/dist/webcomponents/p-393c9065.entry.js +1 -0
- package/dist/webcomponents/p-3a254390.entry.js +1 -0
- package/dist/webcomponents/p-493e73a9.entry.js +1 -0
- package/dist/webcomponents/p-4a802f82.entry.js +1 -0
- package/dist/webcomponents/p-4b928d2e.entry.js +1 -0
- package/dist/webcomponents/p-4d3e4e56.entry.js +1 -0
- package/dist/webcomponents/p-50cc771a.entry.js +1 -0
- package/dist/webcomponents/p-55e63bdd.entry.js +1 -0
- package/dist/webcomponents/p-5ae3401d.entry.js +1 -0
- package/dist/webcomponents/p-65f4681c.entry.js +1 -0
- package/dist/webcomponents/p-7068c2ad.entry.js +1 -0
- package/dist/webcomponents/p-785e8ef7.entry.js +1 -0
- package/dist/webcomponents/{p-897b794b.entry.js → p-7b4e9ae8.entry.js} +2 -2
- package/dist/webcomponents/{p-1a327b0e.entry.js → p-7fdfc2c8.entry.js} +1 -1
- package/dist/webcomponents/p-81bbd944.entry.js +1 -0
- package/dist/webcomponents/p-8ac883e4.entry.js +1 -0
- package/dist/webcomponents/p-8e6f2dc8.entry.js +1 -0
- package/dist/webcomponents/p-8ed4f485.entry.js +1 -0
- package/dist/webcomponents/p-922ddfb4.entry.js +1 -0
- package/dist/webcomponents/p-9643fe36.entry.js +1 -0
- package/dist/webcomponents/{p-20af8597.entry.js → p-99065f37.entry.js} +1 -1
- package/dist/webcomponents/p-9ce5fcb6.entry.js +1 -0
- package/dist/webcomponents/p-9d844936.entry.js +1 -0
- package/dist/webcomponents/p-AMVhBsGv.js +1 -0
- package/dist/webcomponents/{p-DfKxeSrC.js → p-B1AMrMly.js} +1 -1
- package/dist/webcomponents/p-B8CPGGs6.js +1 -0
- package/dist/webcomponents/p-BPTtWj7E.js +1 -0
- package/dist/webcomponents/p-BRPbLfCN.js +1 -0
- package/dist/webcomponents/p-BZ4YUsyP.js +1 -0
- package/dist/webcomponents/{p-CPpUGsw5.js → p-BZbvHgMz.js} +1 -1
- package/dist/webcomponents/{p-CV8xqdt6.js → p-Bhk8tHxs.js} +1 -1
- package/dist/webcomponents/{p-B4xdk4mG.js → p-Bj9n56jK.js} +1 -1
- package/dist/webcomponents/p-BqL4QuAa.js +1 -0
- package/dist/webcomponents/{p-BP2sTIQV.js → p-BqNNwq6C.js} +1 -1
- package/dist/webcomponents/p-By-Mu1IX.js +1 -0
- package/dist/webcomponents/p-C0dMwnDO.js +1 -0
- package/dist/webcomponents/p-C3E-JbVM.js +1 -0
- package/dist/webcomponents/p-C3RQHKL5.js +1 -0
- package/dist/webcomponents/{p-BMJe4lzg.js → p-CAZzU98o.js} +1 -1
- package/dist/webcomponents/p-CGKWIBVk.js +1 -0
- package/dist/webcomponents/{p-DUmUUj9r.js → p-COcg4_A3.js} +1 -1
- package/dist/webcomponents/{p-C2Senazf.js → p-CQ36pja3.js} +1 -1
- package/dist/webcomponents/p-CV0Pyo1O.js +2 -0
- package/dist/webcomponents/{p-Dlrq1iZf.js → p-CWyW004b.js} +1 -1
- package/dist/webcomponents/p-CekpA_KC.js +1 -0
- package/dist/webcomponents/p-CkYB1zGe.js +1 -0
- package/dist/webcomponents/p-CpGEMRkH.js +1 -0
- package/dist/webcomponents/{p-CBbwdoSa.js → p-CruQSM5j.js} +1 -1
- package/dist/webcomponents/p-D-07jgNC.js +1 -0
- package/dist/webcomponents/p-D4EBPNuU.js +1 -0
- package/dist/webcomponents/p-D8GTwl9v.js +1 -0
- package/dist/webcomponents/{p-C77ElQ41.js → p-DCwnBXF7.js} +1 -1
- package/dist/webcomponents/p-DKemQxaE.js +1 -0
- package/dist/webcomponents/p-DOnVHzNq.js +1 -0
- package/dist/webcomponents/{p-tGDdRx0W.js → p-DVJaoI_m.js} +1 -1
- package/dist/webcomponents/p-DaZF_q9T.js +1 -0
- package/dist/webcomponents/p-Dm07nLGs.js +1 -0
- package/dist/webcomponents/p-DrquDBSk.js +1 -0
- package/dist/webcomponents/p-Dw63wyhO.js +1 -0
- package/dist/webcomponents/p-GgW1g7FQ.js +1 -0
- package/dist/webcomponents/{p-D6bKoyRc.js → p-JO-3z7ao.js} +1 -1
- package/dist/webcomponents/p-MVBgKFOv.js +1 -0
- package/dist/webcomponents/p-Y-EhaLdV.js +1 -0
- package/dist/webcomponents/{p-W9WWoLzT.js → p-YYXsr-bI.js} +1 -1
- package/dist/webcomponents/p-a20bddd2.entry.js +1 -0
- package/dist/webcomponents/p-a3510078.entry.js +1 -0
- package/dist/webcomponents/p-a4834220.entry.js +1 -0
- package/dist/webcomponents/p-a9ecaf0f.entry.js +1 -0
- package/dist/webcomponents/p-aa02e3d7.entry.js +1 -0
- package/dist/webcomponents/p-adbe280f.entry.js +1 -0
- package/dist/webcomponents/p-af11ac6a.entry.js +1 -0
- package/dist/webcomponents/p-bbffb17f.entry.js +1 -0
- package/dist/webcomponents/p-c0829d61.entry.js +1 -0
- package/dist/webcomponents/p-c2db5db6.entry.js +1 -0
- package/dist/webcomponents/{p-f37f3e94.entry.js → p-c7c79332.entry.js} +1 -1
- package/dist/webcomponents/p-c90f7ed6.entry.js +1 -0
- package/dist/webcomponents/p-ca8d78af.entry.js +1 -0
- package/dist/webcomponents/p-d4535236.entry.js +1 -0
- package/dist/webcomponents/p-d5827cb2.entry.js +1 -0
- package/dist/webcomponents/p-d7fa8461.entry.js +1 -0
- package/dist/webcomponents/p-dff12534.entry.js +1 -0
- package/dist/webcomponents/p-e54cdb00.entry.js +1 -0
- package/dist/webcomponents/p-e926be0d.entry.js +1 -0
- package/dist/webcomponents/p-ed9db5b2.entry.js +1 -0
- package/dist/webcomponents/p-f1e012f6.entry.js +1 -0
- package/dist/webcomponents/p-f1f0f100.entry.js +1 -0
- package/dist/webcomponents/p-f5b7c322.entry.js +1 -0
- package/dist/webcomponents/p-f9475bb0.entry.js +1 -0
- package/dist/webcomponents/p-ff1cff1d.entry.js +1 -0
- package/dist/webcomponents/{p-sCHf--Vc.js → p-g0kDRH6Z.js} +1 -1
- package/dist/webcomponents/p-m_Ly-YPk.js +1 -0
- package/dist/webcomponents/p-sPEyLX4E.js +1 -0
- package/dist/webcomponents/p-wSi5d4-j.js +1 -0
- package/dist/webcomponents/p-wqq-X93m.js +1 -0
- package/dist/webcomponents/{p-yyedWKWX.js → p-y8av3w9x.js} +1 -1
- package/dist/webcomponents/p-ygekUw3Q.js +1 -0
- package/dist/webcomponents/p-ztF3Y786.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +9 -12
- package/dist/cjs/bank-account-document-form-inputs_8.cjs.entry.js +0 -207
- package/dist/cjs/form-control-number.cjs.entry.js +0 -58
- package/dist/cjs/index-BhI7cJcE.js +0 -1891
- package/dist/cjs/terminals-list-params-state-DfZySwaC.js +0 -22
- package/dist/esm/bank-account-document-form-inputs_8.entry.js +0 -198
- package/dist/esm/form-control-number.entry.js +0 -56
- package/dist/esm/index-DwYM91AU.js +0 -1879
- package/dist/esm/terminals-list-params-state-gllzDQAb.js +0 -16
- package/dist/webcomponents/p-016b3e4c.entry.js +0 -1
- package/dist/webcomponents/p-035a4adc.entry.js +0 -1
- package/dist/webcomponents/p-06cae9e2.entry.js +0 -1
- package/dist/webcomponents/p-06f81525.entry.js +0 -1
- package/dist/webcomponents/p-0935600b.entry.js +0 -1
- package/dist/webcomponents/p-0ab9a3ae.entry.js +0 -1
- package/dist/webcomponents/p-0b7c4ed5.entry.js +0 -1
- package/dist/webcomponents/p-0bb616fc.entry.js +0 -1
- package/dist/webcomponents/p-11wdbrqX.js +0 -1
- package/dist/webcomponents/p-138ada4a.entry.js +0 -1
- package/dist/webcomponents/p-148d3327.entry.js +0 -1
- package/dist/webcomponents/p-1575ca68.entry.js +0 -1
- package/dist/webcomponents/p-1e761d96.entry.js +0 -1
- package/dist/webcomponents/p-20e85114.entry.js +0 -1
- package/dist/webcomponents/p-2cb9edad.entry.js +0 -1
- package/dist/webcomponents/p-2d4a2d26.entry.js +0 -1
- package/dist/webcomponents/p-368b37ad.entry.js +0 -1
- package/dist/webcomponents/p-3a3935a3.entry.js +0 -1
- package/dist/webcomponents/p-3f14d0c4.entry.js +0 -1
- package/dist/webcomponents/p-4d2589b2.entry.js +0 -1
- package/dist/webcomponents/p-511e80a4.entry.js +0 -1
- package/dist/webcomponents/p-5996879d.entry.js +0 -1
- package/dist/webcomponents/p-5a748e49.entry.js +0 -1
- package/dist/webcomponents/p-5c6727ae.entry.js +0 -1
- package/dist/webcomponents/p-622af881.entry.js +0 -1
- package/dist/webcomponents/p-6454626a.entry.js +0 -1
- package/dist/webcomponents/p-64ebff16.entry.js +0 -1
- package/dist/webcomponents/p-66713269.entry.js +0 -1
- package/dist/webcomponents/p-679b36b5.entry.js +0 -1
- package/dist/webcomponents/p-71577fa1.entry.js +0 -1
- package/dist/webcomponents/p-77754a65.entry.js +0 -1
- package/dist/webcomponents/p-7ec4838f.entry.js +0 -1
- package/dist/webcomponents/p-88a8741b.entry.js +0 -1
- package/dist/webcomponents/p-899b981b.entry.js +0 -1
- package/dist/webcomponents/p-8c4b502d.entry.js +0 -1
- package/dist/webcomponents/p-8df30672.entry.js +0 -1
- package/dist/webcomponents/p-911b3d63.entry.js +0 -1
- package/dist/webcomponents/p-97b8bf5c.entry.js +0 -1
- package/dist/webcomponents/p-9b74a642.entry.js +0 -1
- package/dist/webcomponents/p-9b8aee30.entry.js +0 -1
- package/dist/webcomponents/p-9e94c9ef.entry.js +0 -1
- package/dist/webcomponents/p-B5rtFhtR.js +0 -1
- package/dist/webcomponents/p-BOqOio4U.js +0 -1
- package/dist/webcomponents/p-BUsqF4-J.js +0 -1
- package/dist/webcomponents/p-BYsgavgS.js +0 -1
- package/dist/webcomponents/p-BhqSAzpT.js +0 -1
- package/dist/webcomponents/p-BrRsgB8S.js +0 -1
- package/dist/webcomponents/p-BzT9OxlN.js +0 -1
- package/dist/webcomponents/p-C9VmfRis.js +0 -1
- package/dist/webcomponents/p-CCxsFwC4.js +0 -1
- package/dist/webcomponents/p-CK_XkZku.js +0 -1
- package/dist/webcomponents/p-CQGIjIgZ.js +0 -1
- package/dist/webcomponents/p-CZ3F1ZAT.js +0 -1
- package/dist/webcomponents/p-CgiDds_u.js +0 -1
- package/dist/webcomponents/p-CsgUIrv8.js +0 -1
- package/dist/webcomponents/p-D032AB34.js +0 -1
- package/dist/webcomponents/p-DATDsXcA.js +0 -1
- package/dist/webcomponents/p-DGGjRqDa.js +0 -1
- package/dist/webcomponents/p-DKGn-ILd.js +0 -1
- package/dist/webcomponents/p-DOcRWTul.js +0 -1
- package/dist/webcomponents/p-DY_3dcgR.js +0 -1
- package/dist/webcomponents/p-DdJYXOQX.js +0 -1
- package/dist/webcomponents/p-DmdEjScI.js +0 -1
- package/dist/webcomponents/p-DwYM91AU.js +0 -2
- package/dist/webcomponents/p-RTAZ4tdd.js +0 -1
- package/dist/webcomponents/p-Ty7R7tsw.js +0 -1
- package/dist/webcomponents/p-U3nU15el.js +0 -1
- package/dist/webcomponents/p-Uqevvbqm.js +0 -1
- package/dist/webcomponents/p-VRubcA-q.js +0 -1
- package/dist/webcomponents/p-a0b4c42b.entry.js +0 -1
- package/dist/webcomponents/p-af7c219d.entry.js +0 -1
- package/dist/webcomponents/p-b0f0d53c.entry.js +0 -1
- package/dist/webcomponents/p-b752c5bc.entry.js +0 -1
- package/dist/webcomponents/p-bbff6196.entry.js +0 -1
- package/dist/webcomponents/p-c0c36187.entry.js +0 -1
- package/dist/webcomponents/p-c920dc54.entry.js +0 -1
- package/dist/webcomponents/p-cdf1e61c.entry.js +0 -1
- package/dist/webcomponents/p-d077569e.entry.js +0 -1
- package/dist/webcomponents/p-d7b1b7b5.entry.js +0 -1
- package/dist/webcomponents/p-dc6c9c79.entry.js +0 -1
- package/dist/webcomponents/p-e4335938.entry.js +0 -1
- package/dist/webcomponents/p-e805b011.entry.js +0 -1
- package/dist/webcomponents/p-ecbc83bf.entry.js +0 -1
- package/dist/webcomponents/p-f30c939f.entry.js +0 -1
- package/dist/webcomponents/p-f56d7b4c.entry.js +0 -1
- package/dist/webcomponents/p-f99403d8.entry.js +0 -1
- package/dist/webcomponents/p-fb644da6.entry.js +0 -1
- package/dist/webcomponents/p-fc4b27ec.entry.js +0 -1
- package/dist/webcomponents/p-fe43449c.entry.js +0 -1
- package/dist/webcomponents/p-giyZ3C4E.js +0 -1
- package/dist/webcomponents/p-sA8HBfkI.js +0 -1
- package/docs/.eslintrc.cjs +0 -17
- package/docs/changelog/index.mdx +0 -17
- package/docs/entities/businessdetails/index.mdx +0 -143
- package/docs/entities/businessform/index.mdx +0 -241
- package/docs/entities/index.mdx +0 -19
- package/docs/entities/payment-provisioning/index.mdx +0 -128
- package/docs/frameworks/angular/index.mdx +0 -112
- package/docs/frameworks/index.mdx +0 -18
- package/docs/frameworks/react/index.mdx +0 -125
- package/docs/frameworks/vue/index.mdx +0 -102
- package/docs/helpers/PartsTable.js +0 -50
- package/docs/helpers/PropsTable.js +0 -56
- package/docs/helpers/index.ts +0 -3
- package/docs/helpers/version.js +0 -32
- package/docs/introduction/index.mdx +0 -125
- package/docs/merchant-tools/checkouts-list/index.mdx +0 -97
- package/docs/merchant-tools/gross-payments-chart/index.mdx +0 -83
- package/docs/merchant-tools/index.mdx +0 -25
- package/docs/merchant-tools/order-terminals/index.mdx +0 -84
- package/docs/merchant-tools/payment-details/index.mdx +0 -132
- package/docs/merchant-tools/payment-transactions-list/index.mdx +0 -85
- package/docs/merchant-tools/payments-list/index.mdx +0 -109
- package/docs/merchant-tools/payout-details/index.mdx +0 -84
- package/docs/merchant-tools/payout-transactions-list/index.mdx +0 -84
- package/docs/merchant-tools/payouts-list/index.mdx +0 -92
- package/docs/merchant-tools/terminal-orders-list/index.mdx +0 -85
- package/docs/merchant-tools/terminals-list/index.mdx +0 -93
- package/docs/modular-checkout/complete-examples/index.mdx +0 -20
- package/docs/modular-checkout/index.mdx +0 -20
- package/docs/modular-checkout/introduction/index.mdx +0 -102
- package/docs/modular-checkout/sub-components/apple-pay.mdx +0 -106
- package/docs/modular-checkout/sub-components/bank-account-form.mdx +0 -167
- package/docs/modular-checkout/sub-components/card-form.mdx +0 -178
- package/docs/modular-checkout/sub-components/index.mdx +0 -23
- package/docs/modular-checkout/sub-components/payment-method-options.mdx +0 -87
- package/docs/modular-checkout/sub-components/plaid-payment-method.mdx +0 -158
- package/docs/modular-checkout/sub-components/saved-payment-methods.mdx +0 -183
- package/docs/modular-checkout/sub-components/season-interruption-insurance.mdx +0 -221
- package/docs/modular-checkout/sub-components/sezzle-payment-method.mdx +0 -183
- package/docs/modular-checkout/sub-components/summary.mdx +0 -111
- package/docs/payment-facilitation/dispute-management/index.mdx +0 -99
- package/docs/payment-facilitation/index.mdx +0 -21
- package/docs/payment-facilitation/refund-payment/index.mdx +0 -241
- package/docs/payment-facilitation/tokenize-payment-method/index.mdx +0 -350
- package/docs/payment-facilitation/unified-fintech-checkout/342/204/242/index.mdx +0 -150
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var Api = require('./Api-
|
|
5
|
-
var
|
|
6
|
-
var styledHost = require('./styled-host-
|
|
3
|
+
var index = require('./index-p7cvUYAE.js');
|
|
4
|
+
var Api = require('./Api-CVbEWBG6.js');
|
|
5
|
+
var Plaid = require('./Plaid-DxPvVu0H.js');
|
|
6
|
+
var styledHost = require('./styled-host-DAi5SuFa.js');
|
|
7
7
|
require('./event-types-YOY5TKUN.js');
|
|
8
|
-
var skeleton = require('./skeleton-
|
|
9
|
-
var parts = require('./parts-
|
|
8
|
+
var skeleton = require('./skeleton-BGGMhPJj.js');
|
|
9
|
+
var parts = require('./parts-BsBVknuf.js');
|
|
10
10
|
var utils = require('./utils-D4WPxuzW.js');
|
|
11
11
|
var index$1 = require('./index-CajjbB9t.js');
|
|
12
|
-
var header1 = require('./header-1-
|
|
13
|
-
var insuranceState = require('./insurance-state-
|
|
14
|
-
var header3 = require('./header-3
|
|
15
|
-
var checkPkgVersion = require('./check-pkg-version-
|
|
16
|
-
require('./config-state-
|
|
12
|
+
var header1 = require('./header-1-B-nd_U7n.js');
|
|
13
|
+
var insuranceState = require('./insurance-state-CiVJ5e26.js');
|
|
14
|
+
var header3 = require('./header-3--BEJGMFA.js');
|
|
15
|
+
var checkPkgVersion = require('./check-pkg-version-DKH70uPq.js');
|
|
16
|
+
require('./config-state-BIgGhhe9.js');
|
|
17
17
|
require('./dinero-BwNN_k7x.js');
|
|
18
18
|
var ComponentError = require('./ComponentError-D4OLnOkg.js');
|
|
19
19
|
require('./Pagination-Dediz133.js');
|
|
20
|
-
require('./Business-
|
|
20
|
+
require('./Business-CB8EVrhD.js');
|
|
21
21
|
require('./Dispute-CruQTF6_.js');
|
|
22
22
|
var utils$1 = require('./utils-DvUQQLmR.js');
|
|
23
|
-
var checkout_service = require('./checkout.service-
|
|
23
|
+
var checkout_service = require('./checkout.service-DT13pWxH.js');
|
|
24
|
+
var plaidIcon = require('./plaid-icon-DTpONc_Q.js');
|
|
24
25
|
var paymentMethodOptionUtils = require('./payment-method-option-utils-WYHIHy-l.js');
|
|
25
|
-
require('./index-
|
|
26
|
-
require('./package-
|
|
26
|
+
require('./index-W-zoNiyM.js');
|
|
27
|
+
require('./package-B4vs5j7c.js');
|
|
27
28
|
|
|
28
29
|
// Centralized error codes for Apple Pay service
|
|
29
30
|
var ApplePayServiceErrorCode;
|
|
@@ -42,7 +43,7 @@ class ApplePayService {
|
|
|
42
43
|
* Initialize Apple Pay configuration
|
|
43
44
|
*/
|
|
44
45
|
initialize(applePayConfig) {
|
|
45
|
-
this.applePayConfig = new
|
|
46
|
+
this.applePayConfig = new Plaid.ApplePayConfig(applePayConfig);
|
|
46
47
|
if (!this.applePayConfig.isValid) {
|
|
47
48
|
throw new Error('Invalid Apple Pay configuration provided');
|
|
48
49
|
}
|
|
@@ -93,7 +94,7 @@ class ApplePayService {
|
|
|
93
94
|
* Check if Apple Pay is available on this device/browser
|
|
94
95
|
*/
|
|
95
96
|
isAvailable() {
|
|
96
|
-
return (
|
|
97
|
+
return (Plaid.ApplePayHelpers.isApplePaySupported() && Plaid.ApplePayHelpers.canMakePayments());
|
|
97
98
|
}
|
|
98
99
|
/**
|
|
99
100
|
* Check if the user has an active card for the merchant
|
|
@@ -102,7 +103,7 @@ class ApplePayService {
|
|
|
102
103
|
if (!this.applePayConfig) {
|
|
103
104
|
throw new Error('Apple Pay not initialized. Call initialize() first.');
|
|
104
105
|
}
|
|
105
|
-
return await
|
|
106
|
+
return await Plaid.ApplePayHelpers.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier);
|
|
106
107
|
}
|
|
107
108
|
/**
|
|
108
109
|
* Start Apple Pay session
|
|
@@ -116,7 +117,7 @@ class ApplePayService {
|
|
|
116
117
|
// if (!this.isAvailable()) {
|
|
117
118
|
// throw new Error('Apple Pay is not available on this device/browser');
|
|
118
119
|
// }
|
|
119
|
-
const request = new
|
|
120
|
+
const request = new Plaid.ApplePayPaymentRequest(paymentRequest);
|
|
120
121
|
if (!request.isValid) {
|
|
121
122
|
const missingFields = [];
|
|
122
123
|
if (!request.countryCode)
|
|
@@ -227,13 +228,13 @@ class ApplePayService {
|
|
|
227
228
|
const payment = event.payment;
|
|
228
229
|
const paymentPayload = Object.assign(Object.assign({}, payment.token), { product_details: {
|
|
229
230
|
name: this.currentPaymentRequest.total.label,
|
|
230
|
-
price:
|
|
231
|
+
price: Plaid.ApplePayHelpers.parseAmount(this.currentPaymentRequest.total.amount),
|
|
231
232
|
description: this.currentPaymentRequest.total.label,
|
|
232
233
|
} });
|
|
233
234
|
const paymentResult = await this.processPayment(authToken, accountId, paymentPayload);
|
|
234
235
|
if (paymentResult.success) {
|
|
235
236
|
this.currentSession.completePayment({
|
|
236
|
-
status:
|
|
237
|
+
status: Plaid.ApplePaySessionStatus.STATUS_SUCCESS,
|
|
237
238
|
});
|
|
238
239
|
resolve({
|
|
239
240
|
success: true,
|
|
@@ -244,7 +245,7 @@ class ApplePayService {
|
|
|
244
245
|
else {
|
|
245
246
|
console.error('PSP reported payment failure:', paymentResult.data);
|
|
246
247
|
this.currentSession.completePayment({
|
|
247
|
-
status:
|
|
248
|
+
status: Plaid.ApplePaySessionStatus.STATUS_FAILURE,
|
|
248
249
|
});
|
|
249
250
|
reject({
|
|
250
251
|
success: false,
|
|
@@ -262,7 +263,7 @@ class ApplePayService {
|
|
|
262
263
|
console.error('Error stack:', error.stack);
|
|
263
264
|
}
|
|
264
265
|
this.currentSession.completePayment({
|
|
265
|
-
status:
|
|
266
|
+
status: Plaid.ApplePaySessionStatus.STATUS_FAILURE,
|
|
266
267
|
});
|
|
267
268
|
reject({
|
|
268
269
|
success: false,
|
|
@@ -294,7 +295,7 @@ class ApplePayService {
|
|
|
294
295
|
};
|
|
295
296
|
this.currentSession.onshippingmethodselected = () => {
|
|
296
297
|
this.currentSession.completeShippingMethodSelection({
|
|
297
|
-
status:
|
|
298
|
+
status: Plaid.ApplePaySessionStatus.STATUS_SUCCESS,
|
|
298
299
|
newTotal: this.currentPaymentRequest.total,
|
|
299
300
|
newLineItems: this.currentPaymentRequest.lineItems || [],
|
|
300
301
|
});
|
|
@@ -354,9 +355,9 @@ class ApplePayService {
|
|
|
354
355
|
return {
|
|
355
356
|
countryCode,
|
|
356
357
|
currencyCode,
|
|
357
|
-
merchantCapabilities:
|
|
358
|
-
supportedNetworks:
|
|
359
|
-
total:
|
|
358
|
+
merchantCapabilities: Plaid.ApplePayHelpers.getDefaultMerchantCapabilities(),
|
|
359
|
+
supportedNetworks: Plaid.ApplePayHelpers.getDefaultSupportedNetworks(),
|
|
360
|
+
total: Plaid.ApplePayHelpers.createLineItem(label, amount),
|
|
360
361
|
};
|
|
361
362
|
}
|
|
362
363
|
/**
|
|
@@ -380,25 +381,25 @@ const ApplePayButton = (props) => {
|
|
|
380
381
|
const getApplePayButtonClass = () => {
|
|
381
382
|
let classes = "apple-pay-button";
|
|
382
383
|
switch (props.buttonStyle) {
|
|
383
|
-
case
|
|
384
|
+
case Plaid.ApplePayButtonStyle.WHITE:
|
|
384
385
|
classes += " apple-pay-button-white";
|
|
385
386
|
break;
|
|
386
|
-
case
|
|
387
|
+
case Plaid.ApplePayButtonStyle.WHITE_OUTLINE:
|
|
387
388
|
classes += " apple-pay-button-white-outline";
|
|
388
389
|
break;
|
|
389
|
-
case
|
|
390
|
+
case Plaid.ApplePayButtonStyle.BLACK:
|
|
390
391
|
default:
|
|
391
392
|
classes += " apple-pay-button-black";
|
|
392
393
|
break;
|
|
393
394
|
}
|
|
394
395
|
switch (props.buttonType) {
|
|
395
|
-
case
|
|
396
|
+
case Plaid.ApplePayButtonType.BUY:
|
|
396
397
|
classes += " apple-pay-button-type-buy";
|
|
397
398
|
break;
|
|
398
|
-
case
|
|
399
|
+
case Plaid.ApplePayButtonType.DONATE:
|
|
399
400
|
classes += " apple-pay-button-type-donate";
|
|
400
401
|
break;
|
|
401
|
-
case
|
|
402
|
+
case Plaid.ApplePayButtonType.PLAIN:
|
|
402
403
|
default:
|
|
403
404
|
classes += " apple-pay-button-type-plain";
|
|
404
405
|
break;
|
|
@@ -521,16 +522,16 @@ const ApplePayButton = (props) => {
|
|
|
521
522
|
const ApplePay = class {
|
|
522
523
|
constructor(hostRef) {
|
|
523
524
|
index.registerInstance(this, hostRef);
|
|
524
|
-
this.applePayStarted = index.createEvent(this, "applePayStarted");
|
|
525
|
-
this.applePayCompleted = index.createEvent(this, "applePayCompleted");
|
|
526
|
-
this.applePayCancelled = index.createEvent(this, "applePayCancelled");
|
|
527
|
-
this.applePayError = index.createEvent(this, "applePayError");
|
|
525
|
+
this.applePayStarted = index.createEvent(this, "applePayStarted", 7);
|
|
526
|
+
this.applePayCompleted = index.createEvent(this, "applePayCompleted", 7);
|
|
527
|
+
this.applePayCancelled = index.createEvent(this, "applePayCancelled", 7);
|
|
528
|
+
this.applePayError = index.createEvent(this, "applePayError", 7);
|
|
528
529
|
this.countryCode = "US";
|
|
529
530
|
this.merchantIdentifier = "merchant.com.staging-justifi.checkout-dev";
|
|
530
531
|
this.merchantDisplayName = "JustiFi Checkout";
|
|
531
532
|
this.initiativeContext = "dev-checkout.justifi-staging.com";
|
|
532
|
-
this.buttonType =
|
|
533
|
-
this.buttonStyle =
|
|
533
|
+
this.buttonType = Plaid.ApplePayButtonType.PLAIN;
|
|
534
|
+
this.buttonStyle = Plaid.ApplePayButtonStyle.BLACK;
|
|
534
535
|
this.disabled = false;
|
|
535
536
|
this.showSkeleton = true;
|
|
536
537
|
this.width = "100%";
|
|
@@ -552,16 +553,16 @@ const ApplePay = class {
|
|
|
552
553
|
this.applePayStarted.emit();
|
|
553
554
|
const paymentRequest = {
|
|
554
555
|
countryCode: this.countryCode,
|
|
555
|
-
currencyCode:
|
|
556
|
+
currencyCode: Plaid.checkoutStore.paymentCurrency,
|
|
556
557
|
merchantCapabilities: [
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
558
|
+
Plaid.ApplePayMerchantCapability.SUPPORTS_3DS,
|
|
559
|
+
Plaid.ApplePayMerchantCapability.SUPPORTS_CREDIT,
|
|
560
|
+
Plaid.ApplePayMerchantCapability.SUPPORTS_DEBIT,
|
|
560
561
|
],
|
|
561
|
-
supportedNetworks:
|
|
562
|
-
total:
|
|
562
|
+
supportedNetworks: Plaid.ApplePayHelpers.getDefaultSupportedNetworks(),
|
|
563
|
+
total: Plaid.ApplePayHelpers.createLineItem(Plaid.checkoutStore.paymentDescription, Plaid.checkoutStore.paymentAmount),
|
|
563
564
|
};
|
|
564
|
-
const result = await this.applePayService.startPaymentSession(paymentRequest,
|
|
565
|
+
const result = await this.applePayService.startPaymentSession(paymentRequest, Plaid.checkoutStore.authToken, Plaid.checkoutStore.accountId);
|
|
565
566
|
if (result.success) {
|
|
566
567
|
this.applePayCompleted.emit({
|
|
567
568
|
success: true,
|
|
@@ -599,24 +600,24 @@ const ApplePay = class {
|
|
|
599
600
|
this.isLoading = true;
|
|
600
601
|
this.error = null;
|
|
601
602
|
this.isConfigValid = true;
|
|
602
|
-
const hasRequiredConfig = Boolean(
|
|
603
|
-
Boolean(
|
|
604
|
-
Boolean(
|
|
603
|
+
const hasRequiredConfig = Boolean(Plaid.checkoutStore.paymentAmount) &&
|
|
604
|
+
Boolean(Plaid.checkoutStore.paymentCurrency) &&
|
|
605
|
+
Boolean(Plaid.checkoutStore.authToken);
|
|
605
606
|
if (!hasRequiredConfig) {
|
|
606
607
|
this.error = "Missing required Apple Pay configuration";
|
|
607
608
|
this.isConfigValid = false;
|
|
608
609
|
console.error("Apple Pay config error: missing required values", {
|
|
609
|
-
paymentAmount:
|
|
610
|
-
paymentCurrency:
|
|
611
|
-
hasAuthToken: Boolean(
|
|
612
|
-
accountId:
|
|
610
|
+
paymentAmount: Plaid.checkoutStore.paymentAmount,
|
|
611
|
+
paymentCurrency: Plaid.checkoutStore.paymentCurrency,
|
|
612
|
+
hasAuthToken: Boolean(Plaid.checkoutStore.authToken),
|
|
613
|
+
accountId: Plaid.checkoutStore.accountId,
|
|
613
614
|
});
|
|
614
615
|
this.applePayError.emit({ error: this.error, code: ApplePay.ErrorCode.CONFIG_ERROR });
|
|
615
616
|
this.isLoading = false;
|
|
616
617
|
return;
|
|
617
618
|
}
|
|
618
|
-
this.isAvailable =
|
|
619
|
-
this.canMakePayments =
|
|
619
|
+
this.isAvailable = Plaid.ApplePayHelpers.isApplePaySupported();
|
|
620
|
+
this.canMakePayments = Plaid.ApplePayHelpers.canMakePayments();
|
|
620
621
|
if (!this.isAvailable) {
|
|
621
622
|
this.error = "Apple Pay is not supported on this device";
|
|
622
623
|
console.error(this.error);
|
|
@@ -665,7 +666,7 @@ const ApplePay = class {
|
|
|
665
666
|
if (!this.isAvailable) {
|
|
666
667
|
return [];
|
|
667
668
|
}
|
|
668
|
-
return
|
|
669
|
+
return Plaid.ApplePayHelpers.getDefaultSupportedNetworks();
|
|
669
670
|
}
|
|
670
671
|
async abort() {
|
|
671
672
|
this.applePayService.abortPaymentSession();
|
|
@@ -673,7 +674,7 @@ const ApplePay = class {
|
|
|
673
674
|
this.applePayCancelled.emit();
|
|
674
675
|
}
|
|
675
676
|
render() {
|
|
676
|
-
if (!
|
|
677
|
+
if (!Plaid.checkoutStore.applePayEnabled) {
|
|
677
678
|
// Render nothing when Apple Pay is disabled at the checkout settings level
|
|
678
679
|
return null;
|
|
679
680
|
}
|
|
@@ -681,7 +682,7 @@ const ApplePay = class {
|
|
|
681
682
|
this.isAvailable &&
|
|
682
683
|
this.canMakePayments &&
|
|
683
684
|
this.isConfigValid;
|
|
684
|
-
return (index.h(styledHost.StyledHost, null,
|
|
685
|
+
return (index.h(styledHost.StyledHost, null, Plaid.checkoutStore.checkoutLoaded && (index.h("script", { async: true, src: 'https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js', onLoad: () => {
|
|
685
686
|
this.initializeApplePay();
|
|
686
687
|
} })), index.h("div", { class: 'apple-pay-container' }, index.h(ApplePaySkeleton, { isLoading: this.isLoading }), isReady && (index.h(ApplePayButton, { buttonType: this.buttonType, buttonStyle: this.buttonStyle, disabled: this.disabled, isProcessing: this.isProcessing, isAvailable: this.isAvailable, clickHandler: this.handleApplePayClick, width: this.width, height: this.height }))), index.h("style", null, `
|
|
687
688
|
.apple-pay-container {
|
|
@@ -704,7 +705,7 @@ const Summary = class {
|
|
|
704
705
|
index.registerInstance(this, hostRef);
|
|
705
706
|
}
|
|
706
707
|
render() {
|
|
707
|
-
return (index.h(styledHost.StyledHost, { key: '
|
|
708
|
+
return (index.h(styledHost.StyledHost, { key: '28a1a324b8cdf2dea0aafe91fbdd3679482e76f8' }, index.h("section", { key: 'e8ffe2fdd1592a0b762647fdab94ee5e21436a93' }, index.h("div", { key: '099fbfb449066290cdcd113b0de5f87334777a0e' }, index.h("div", { key: 'c78325957b4e00299366b8e9efe6fd6e86da3b97', part: parts.text }, Plaid.checkoutStore === null || Plaid.checkoutStore === void 0 ? void 0 : Plaid.checkoutStore.paymentDescription), index.h("div", { key: 'd077da888b03a34e540f66ebaa57502fe22be7c4' }, index.h("span", { key: 'd4f7ddd24e10302222679a9f73c3b5ed305267a7', part: parts.text }, "Total"), "\u00A0", index.h("span", { key: '1f5d7b6b0cce64eea04879e7767ff87ce5a64069', part: parts.text }, utils.formatCurrency(+(Plaid.checkoutStore === null || Plaid.checkoutStore === void 0 ? void 0 : Plaid.checkoutStore.totalAmount))))))));
|
|
708
709
|
}
|
|
709
710
|
};
|
|
710
711
|
|
|
@@ -717,12 +718,12 @@ class GooglePayService {
|
|
|
717
718
|
* Initialize Google Pay configuration
|
|
718
719
|
*/
|
|
719
720
|
initialize(googlePayConfig) {
|
|
720
|
-
this.googlePayConfig = new
|
|
721
|
+
this.googlePayConfig = new Plaid.GooglePayConfig(googlePayConfig);
|
|
721
722
|
if (!this.googlePayConfig.isValid) {
|
|
722
723
|
throw new Error('Invalid Google Pay configuration provided');
|
|
723
724
|
}
|
|
724
725
|
// Create Google Pay client
|
|
725
|
-
this.googlePayClient =
|
|
726
|
+
this.googlePayClient = Plaid.GooglePayHelpers.createGooglePayClient(this.googlePayConfig.environment);
|
|
726
727
|
if (!this.googlePayClient) {
|
|
727
728
|
throw new Error('Failed to create Google Pay client');
|
|
728
729
|
}
|
|
@@ -755,7 +756,7 @@ class GooglePayService {
|
|
|
755
756
|
* Check if Google Pay is available on this device/browser
|
|
756
757
|
*/
|
|
757
758
|
isAvailable() {
|
|
758
|
-
return
|
|
759
|
+
return Plaid.GooglePayHelpers.isGooglePaySupported() && !!this.googlePayClient;
|
|
759
760
|
}
|
|
760
761
|
/**
|
|
761
762
|
* Check if the user can make payments with Google Pay
|
|
@@ -765,7 +766,7 @@ class GooglePayService {
|
|
|
765
766
|
return false;
|
|
766
767
|
}
|
|
767
768
|
try {
|
|
768
|
-
const baseRequest =
|
|
769
|
+
const baseRequest = Plaid.GooglePayHelpers.createBasePaymentDataRequest();
|
|
769
770
|
const response = await this.googlePayClient.isReadyToPay(baseRequest);
|
|
770
771
|
return response.result;
|
|
771
772
|
}
|
|
@@ -784,7 +785,7 @@ class GooglePayService {
|
|
|
784
785
|
if (!this.isAvailable()) {
|
|
785
786
|
throw new Error('Google Pay is not available on this device/browser');
|
|
786
787
|
}
|
|
787
|
-
const request = new
|
|
788
|
+
const request = new Plaid.GooglePayPaymentDataRequest(paymentDataRequest);
|
|
788
789
|
if (!request.isValid) {
|
|
789
790
|
throw new Error('Invalid payment data request provided');
|
|
790
791
|
}
|
|
@@ -902,7 +903,7 @@ class GooglePayService {
|
|
|
902
903
|
if (!this.googlePayClient) {
|
|
903
904
|
return;
|
|
904
905
|
}
|
|
905
|
-
const request = new
|
|
906
|
+
const request = new Plaid.GooglePayPaymentDataRequest(paymentDataRequest);
|
|
906
907
|
if (!request.isValid) {
|
|
907
908
|
return;
|
|
908
909
|
}
|
|
@@ -918,12 +919,12 @@ class GooglePayService {
|
|
|
918
919
|
const request = {
|
|
919
920
|
apiVersion: 2,
|
|
920
921
|
apiVersionMinor: 0,
|
|
921
|
-
allowedPaymentMethods: [
|
|
922
|
+
allowedPaymentMethods: [Plaid.GooglePayHelpers.createPaymentMethodData()],
|
|
922
923
|
transactionInfo: {
|
|
923
924
|
countryCode,
|
|
924
925
|
currencyCode,
|
|
925
926
|
totalPriceStatus: 'FINAL',
|
|
926
|
-
totalPrice:
|
|
927
|
+
totalPrice: Plaid.GooglePayHelpers.formatAmount(amount),
|
|
927
928
|
totalPriceLabel: label,
|
|
928
929
|
},
|
|
929
930
|
merchantInfo: {
|
|
@@ -962,48 +963,48 @@ const GooglePayButton = (props) => {
|
|
|
962
963
|
let classes = "google-pay-button";
|
|
963
964
|
// Button style
|
|
964
965
|
switch (props.buttonStyle) {
|
|
965
|
-
case
|
|
966
|
+
case Plaid.GooglePayButtonStyle.WHITE:
|
|
966
967
|
classes += " google-pay-button-white";
|
|
967
968
|
break;
|
|
968
|
-
case
|
|
969
|
+
case Plaid.GooglePayButtonStyle.BLACK:
|
|
969
970
|
default:
|
|
970
971
|
classes += " google-pay-button-black";
|
|
971
972
|
break;
|
|
972
973
|
}
|
|
973
974
|
// Button type
|
|
974
975
|
switch (props.buttonType) {
|
|
975
|
-
case
|
|
976
|
+
case Plaid.GooglePayButtonType.BUY:
|
|
976
977
|
classes += " google-pay-button-type-buy";
|
|
977
978
|
break;
|
|
978
|
-
case
|
|
979
|
+
case Plaid.GooglePayButtonType.BOOK:
|
|
979
980
|
classes += " google-pay-button-type-book";
|
|
980
981
|
break;
|
|
981
|
-
case
|
|
982
|
+
case Plaid.GooglePayButtonType.CHECKOUT:
|
|
982
983
|
classes += " google-pay-button-type-checkout";
|
|
983
984
|
break;
|
|
984
|
-
case
|
|
985
|
+
case Plaid.GooglePayButtonType.DONATE:
|
|
985
986
|
classes += " google-pay-button-type-donate";
|
|
986
987
|
break;
|
|
987
|
-
case
|
|
988
|
+
case Plaid.GooglePayButtonType.ORDER:
|
|
988
989
|
classes += " google-pay-button-type-order";
|
|
989
990
|
break;
|
|
990
|
-
case
|
|
991
|
+
case Plaid.GooglePayButtonType.PAY:
|
|
991
992
|
classes += " google-pay-button-type-pay";
|
|
992
993
|
break;
|
|
993
|
-
case
|
|
994
|
+
case Plaid.GooglePayButtonType.SUBSCRIBE:
|
|
994
995
|
classes += " google-pay-button-type-subscribe";
|
|
995
996
|
break;
|
|
996
|
-
case
|
|
997
|
+
case Plaid.GooglePayButtonType.PLAIN:
|
|
997
998
|
default:
|
|
998
999
|
classes += " google-pay-button-type-plain";
|
|
999
1000
|
break;
|
|
1000
1001
|
}
|
|
1001
1002
|
// Size mode
|
|
1002
1003
|
switch (props.buttonSizeMode) {
|
|
1003
|
-
case
|
|
1004
|
+
case Plaid.GooglePayButtonSizeMode.FILL:
|
|
1004
1005
|
classes += " google-pay-button-fill";
|
|
1005
1006
|
break;
|
|
1006
|
-
case
|
|
1007
|
+
case Plaid.GooglePayButtonSizeMode.STATIC:
|
|
1007
1008
|
default:
|
|
1008
1009
|
classes += " google-pay-button-static";
|
|
1009
1010
|
break;
|
|
@@ -1015,7 +1016,7 @@ const GooglePayButton = (props) => {
|
|
|
1015
1016
|
};
|
|
1016
1017
|
const getButtonStyles = () => {
|
|
1017
1018
|
const styles = {};
|
|
1018
|
-
if (props.buttonSizeMode ===
|
|
1019
|
+
if (props.buttonSizeMode === Plaid.GooglePayButtonSizeMode.FILL) {
|
|
1019
1020
|
styles.width = '100%';
|
|
1020
1021
|
styles.minWidth = '200px';
|
|
1021
1022
|
}
|
|
@@ -1209,21 +1210,21 @@ const GooglePayButton = (props) => {
|
|
|
1209
1210
|
const GooglePay = class {
|
|
1210
1211
|
constructor(hostRef) {
|
|
1211
1212
|
index.registerInstance(this, hostRef);
|
|
1212
|
-
this.googlePayCancelled = index.createEvent(this, "googlePayCancelled");
|
|
1213
|
-
this.googlePayCompleted = index.createEvent(this, "googlePayCompleted");
|
|
1214
|
-
this.googlePayStarted = index.createEvent(this, "googlePayStarted");
|
|
1213
|
+
this.googlePayCancelled = index.createEvent(this, "googlePayCancelled", 7);
|
|
1214
|
+
this.googlePayCompleted = index.createEvent(this, "googlePayCompleted", 7);
|
|
1215
|
+
this.googlePayStarted = index.createEvent(this, "googlePayStarted", 7);
|
|
1215
1216
|
this.unsubscribes = [];
|
|
1216
1217
|
this.canMakePayments = false;
|
|
1217
1218
|
this.error = null;
|
|
1218
1219
|
this.isAvailable = false;
|
|
1219
1220
|
this.isLoading = true;
|
|
1220
1221
|
this.isProcessing = false;
|
|
1221
|
-
this.buttonSizeMode =
|
|
1222
|
-
this.buttonStyle =
|
|
1223
|
-
this.buttonType =
|
|
1222
|
+
this.buttonSizeMode = Plaid.GooglePayButtonSizeMode.FILL;
|
|
1223
|
+
this.buttonStyle = Plaid.GooglePayButtonStyle.BLACK;
|
|
1224
|
+
this.buttonType = Plaid.GooglePayButtonType.PLAIN;
|
|
1224
1225
|
this.countryCode = "US";
|
|
1225
1226
|
this.disabled = false;
|
|
1226
|
-
this.environment =
|
|
1227
|
+
this.environment = Plaid.GooglePayEnvironment.PRODUCTION;
|
|
1227
1228
|
this.merchantId = "gateway:justifi";
|
|
1228
1229
|
this.merchantName = "justifi";
|
|
1229
1230
|
this.showSkeleton = true;
|
|
@@ -1240,7 +1241,7 @@ const GooglePay = class {
|
|
|
1240
1241
|
this.error = null;
|
|
1241
1242
|
this.googlePayStarted.emit();
|
|
1242
1243
|
const paymentDataRequest = this.createPaymentDataRequest();
|
|
1243
|
-
const result = await this.googlePayService.startPaymentSession(paymentDataRequest,
|
|
1244
|
+
const result = await this.googlePayService.startPaymentSession(paymentDataRequest, Plaid.checkoutStore.authToken, Plaid.checkoutStore.accountId);
|
|
1244
1245
|
if (result.success) {
|
|
1245
1246
|
this.googlePayCompleted.emit({
|
|
1246
1247
|
success: true,
|
|
@@ -1278,17 +1279,17 @@ const GooglePay = class {
|
|
|
1278
1279
|
this.googlePayService = new GooglePayService();
|
|
1279
1280
|
}
|
|
1280
1281
|
componentDidLoad() {
|
|
1281
|
-
const unsub =
|
|
1282
|
+
const unsub = Plaid.onChange("paymentAmount", () => {
|
|
1282
1283
|
this.prefetchPaymentData();
|
|
1283
1284
|
});
|
|
1284
1285
|
if (typeof unsub === 'function')
|
|
1285
1286
|
this.unsubscribes.push(unsub);
|
|
1286
|
-
const unsubCurrency =
|
|
1287
|
+
const unsubCurrency = Plaid.onChange("paymentCurrency", () => {
|
|
1287
1288
|
this.prefetchPaymentData();
|
|
1288
1289
|
});
|
|
1289
1290
|
if (typeof unsubCurrency === 'function')
|
|
1290
1291
|
this.unsubscribes.push(unsubCurrency);
|
|
1291
|
-
const unsubDesc =
|
|
1292
|
+
const unsubDesc = Plaid.onChange("paymentDescription", () => {
|
|
1292
1293
|
this.prefetchPaymentData();
|
|
1293
1294
|
});
|
|
1294
1295
|
if (typeof unsubDesc === 'function')
|
|
@@ -1310,7 +1311,7 @@ const GooglePay = class {
|
|
|
1310
1311
|
if (!this.isAvailable) {
|
|
1311
1312
|
return [];
|
|
1312
1313
|
}
|
|
1313
|
-
return
|
|
1314
|
+
return Plaid.GooglePayHelpers.getDefaultAuthMethods();
|
|
1314
1315
|
}
|
|
1315
1316
|
/**
|
|
1316
1317
|
* Returns supported card networks when Google Pay is available.
|
|
@@ -1319,13 +1320,13 @@ const GooglePay = class {
|
|
|
1319
1320
|
if (!this.isAvailable) {
|
|
1320
1321
|
return [];
|
|
1321
1322
|
}
|
|
1322
|
-
return
|
|
1323
|
+
return Plaid.GooglePayHelpers.getDefaultSupportedNetworks();
|
|
1323
1324
|
}
|
|
1324
1325
|
/**
|
|
1325
1326
|
* Select Google Pay in the modular checkout parent.
|
|
1326
1327
|
*/
|
|
1327
1328
|
async handleSelectionClick() {
|
|
1328
|
-
|
|
1329
|
+
Plaid.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.GOOGLE_PAY };
|
|
1329
1330
|
}
|
|
1330
1331
|
/**
|
|
1331
1332
|
* Returns whether Google Pay is both available and can make payments.
|
|
@@ -1347,7 +1348,7 @@ const GooglePay = class {
|
|
|
1347
1348
|
try {
|
|
1348
1349
|
this.isLoading = true;
|
|
1349
1350
|
this.error = null;
|
|
1350
|
-
if (!
|
|
1351
|
+
if (!Plaid.checkoutStore.paymentAmount) {
|
|
1351
1352
|
this.error = "Missing required Google Pay configuration";
|
|
1352
1353
|
this.isLoading = false;
|
|
1353
1354
|
return;
|
|
@@ -1387,16 +1388,16 @@ const GooglePay = class {
|
|
|
1387
1388
|
}
|
|
1388
1389
|
}
|
|
1389
1390
|
createPaymentDataRequest() {
|
|
1390
|
-
return GooglePayService.createPaymentDataRequest(
|
|
1391
|
+
return GooglePayService.createPaymentDataRequest(Plaid.checkoutStore.paymentAmount, Plaid.checkoutStore.paymentDescription, this.countryCode, Plaid.checkoutStore.paymentCurrency, this.merchantName, this.merchantId);
|
|
1391
1392
|
}
|
|
1392
1393
|
render() {
|
|
1393
1394
|
const showError = !this.isLoading && !!this.error;
|
|
1394
1395
|
const showDeviceUnavailable = !this.isLoading && !this.error && !this.isAvailable;
|
|
1395
1396
|
const showPaymentsUnavailable = !this.isLoading && !this.error && this.isAvailable && !this.canMakePayments;
|
|
1396
1397
|
const showButton = !this.isLoading && !this.error && this.isAvailable && this.canMakePayments;
|
|
1397
|
-
return (index.h(styledHost.StyledHost, { key: '
|
|
1398
|
+
return (index.h(styledHost.StyledHost, { key: '03db34814fb208f95cb962dac7bbf39a7f866009' }, Plaid.checkoutStore.checkoutLoaded && (index.h("script", { key: '1e3f05585ba986de8fe31561e889395a263ef78d', async: true, src: 'https://pay.google.com/gp/p/js/pay.js', onLoad: () => {
|
|
1398
1399
|
this.initializeGooglePay();
|
|
1399
|
-
} })), index.h("div", { key: '
|
|
1400
|
+
} })), index.h("div", { key: 'dbc0bef2cc8ecc090a2e47c07857721777f2a4d0', class: 'google-pay-container' }, index.h(GooglePaySkeleton, { key: 'c8424c307933e7dff09f91789e5f360107ad9455', isLoading: this.isLoading }), showError && (index.h("div", { key: 'dc6809b02f90607f14c178adbdb55b146eb7c40d', class: 'google-pay-error', role: 'alert', "data-testid": 'gp-error' }, index.h("span", { key: '5cbc697930caa6306d0a60dcbe47eb402f53787d', class: 'error-icon' }, "\u26A0\uFE0F"), index.h("span", { key: '893a51db871fbb32a06c6bea5b58c46b48a1ab68', class: 'error-message' }, this.error))), showDeviceUnavailable && (index.h("div", { key: 'db1f743883ac3137172a298fdc8f5e0ed6b1c0be', class: 'google-pay-unavailable', "data-testid": 'gp-device-unavailable' }, index.h("span", { key: '5037803646e5a493cf7676a7d07918c265eabf4a', class: 'unavailable-message' }, "Google Pay is not available on this device"))), showPaymentsUnavailable && (index.h("div", { key: 'c7d519a57bf52b788b5e55ebb9ae229756f72316', class: 'google-pay-unavailable', "data-testid": 'gp-payments-unavailable' }, index.h("span", { key: 'bfd35ea4231cef3d06191fccd0e42ed5d6779261', class: 'unavailable-message' }, "Google Pay is not available for payments"))), showButton && (index.h(GooglePayButton, { key: 'f4888ea57c3ac49199ffb8e0b6d4c1ba6ba84ec3', "data-testid": 'gp-button', buttonType: this.buttonType, buttonStyle: this.buttonStyle, buttonSizeMode: this.buttonSizeMode, disabled: this.disabled, isProcessing: this.isProcessing, isAvailable: this.isAvailable, clickHandler: this.handleGooglePayClick }))), index.h("style", { key: '620c1c8a982f52d7b7793ef5ce92587eb3ec3284' }, `
|
|
1400
1401
|
.google-pay-container {
|
|
1401
1402
|
width: 100%;
|
|
1402
1403
|
}
|
|
@@ -1449,7 +1450,7 @@ const Header = class {
|
|
|
1449
1450
|
}
|
|
1450
1451
|
render() {
|
|
1451
1452
|
const HeaderComponent = this.levels[this.level];
|
|
1452
|
-
return (index.h(styledHost.StyledHost, { key: '
|
|
1453
|
+
return (index.h(styledHost.StyledHost, { key: 'b9dfbfab147a15030ec8b2cb39ccd1c476e7c0be' }, index.h(HeaderComponent, { key: '9ee20ed2fb2916a433cb158ce082505fbc367c4f', text: this.text, class: this.class })));
|
|
1453
1454
|
}
|
|
1454
1455
|
};
|
|
1455
1456
|
|
|
@@ -1508,38 +1509,18 @@ const makeCheckoutComplete = ({ authToken, checkoutId, service }) => async ({ pa
|
|
|
1508
1509
|
}
|
|
1509
1510
|
};
|
|
1510
1511
|
|
|
1511
|
-
const api = Api.Api();
|
|
1512
|
-
class PlaidService {
|
|
1513
|
-
async getLinkToken(authToken, accountId, checkoutId, signal) {
|
|
1514
|
-
const endpoint = `plaid/${accountId}/link`;
|
|
1515
|
-
const body = { checkout_id: checkoutId };
|
|
1516
|
-
return api.post({ endpoint, body, authToken, signal });
|
|
1517
|
-
}
|
|
1518
|
-
async tokenizeBankAccount(authToken, accountId, publicToken, linkTokenId, paymentMethodGroupId, signal) {
|
|
1519
|
-
const endpoint = `plaid/${accountId}/tokenize`;
|
|
1520
|
-
const body = { public_token: publicToken };
|
|
1521
|
-
if (linkTokenId) {
|
|
1522
|
-
body.link_token_id = linkTokenId;
|
|
1523
|
-
}
|
|
1524
|
-
if (paymentMethodGroupId) {
|
|
1525
|
-
body.payment_method_group_id = paymentMethodGroupId;
|
|
1526
|
-
}
|
|
1527
|
-
return api.post({ endpoint, body, authToken, signal });
|
|
1528
|
-
}
|
|
1529
|
-
}
|
|
1530
|
-
|
|
1531
1512
|
const ModularCheckout = class {
|
|
1532
1513
|
constructor(hostRef) {
|
|
1533
1514
|
index.registerInstance(this, hostRef);
|
|
1534
|
-
this.errorEvent = index.createEvent(this, "error-event");
|
|
1535
|
-
this.submitEvent = index.createEvent(this, "submit-event");
|
|
1536
|
-
this.checkoutChangedEvent = index.createEvent(this, "checkout-changed");
|
|
1537
|
-
this.plaidService = new PlaidService();
|
|
1515
|
+
this.errorEvent = index.createEvent(this, "error-event", 7);
|
|
1516
|
+
this.submitEvent = index.createEvent(this, "submit-event", 7);
|
|
1517
|
+
this.checkoutChangedEvent = index.createEvent(this, "checkout-changed", 7);
|
|
1518
|
+
this.plaidService = new plaidIcon.PlaidService();
|
|
1538
1519
|
this.handleGooglePayCompleted = (event) => {
|
|
1539
1520
|
const { success, paymentMethodId, error } = event.detail || {};
|
|
1540
1521
|
if (success && paymentMethodId) {
|
|
1541
|
-
|
|
1542
|
-
|
|
1522
|
+
Plaid.checkoutStore.paymentToken = paymentMethodId;
|
|
1523
|
+
Plaid.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.GOOGLE_PAY };
|
|
1543
1524
|
this.submitCheckout();
|
|
1544
1525
|
}
|
|
1545
1526
|
else {
|
|
@@ -1551,14 +1532,14 @@ const ModularCheckout = class {
|
|
|
1551
1532
|
}
|
|
1552
1533
|
};
|
|
1553
1534
|
this.handleGooglePayCancelled = () => {
|
|
1554
|
-
|
|
1555
|
-
|
|
1535
|
+
Plaid.checkoutStore.paymentToken = undefined;
|
|
1536
|
+
Plaid.checkoutStore.selectedPaymentMethod = undefined;
|
|
1556
1537
|
};
|
|
1557
1538
|
this.handleApplePayCompleted = (event) => {
|
|
1558
1539
|
const { success, token, paymentMethodId, error } = event.detail;
|
|
1559
1540
|
if (success && token) {
|
|
1560
|
-
|
|
1561
|
-
|
|
1541
|
+
Plaid.checkoutStore.paymentToken = paymentMethodId;
|
|
1542
|
+
Plaid.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.APPLE_PAY };
|
|
1562
1543
|
this.submitCheckout();
|
|
1563
1544
|
}
|
|
1564
1545
|
else {
|
|
@@ -1581,8 +1562,8 @@ const ModularCheckout = class {
|
|
|
1581
1562
|
});
|
|
1582
1563
|
};
|
|
1583
1564
|
this.handleApplePayCancelled = () => {
|
|
1584
|
-
|
|
1585
|
-
|
|
1565
|
+
Plaid.checkoutStore.paymentToken = undefined;
|
|
1566
|
+
Plaid.checkoutStore.selectedPaymentMethod = undefined;
|
|
1586
1567
|
};
|
|
1587
1568
|
}
|
|
1588
1569
|
connectedCallback() {
|
|
@@ -1595,7 +1576,7 @@ const ModularCheckout = class {
|
|
|
1595
1576
|
childList: true,
|
|
1596
1577
|
subtree: true,
|
|
1597
1578
|
});
|
|
1598
|
-
|
|
1579
|
+
Plaid.checkoutStore.checkoutId = this.checkoutId;
|
|
1599
1580
|
const config = {
|
|
1600
1581
|
authToken: this.authToken,
|
|
1601
1582
|
checkoutId: this.checkoutId,
|
|
@@ -1604,14 +1585,14 @@ const ModularCheckout = class {
|
|
|
1604
1585
|
this.getCheckout = makeGetCheckout(config);
|
|
1605
1586
|
this.completeCheckout = makeCheckoutComplete(config);
|
|
1606
1587
|
// Emit checkout-changed whenever any store key changes
|
|
1607
|
-
|
|
1588
|
+
Plaid.onAnyChange(() => {
|
|
1608
1589
|
this.emitCheckoutChanged();
|
|
1609
1590
|
});
|
|
1610
1591
|
}
|
|
1611
1592
|
componentWillLoad() {
|
|
1612
1593
|
this.analytics = new checkPkgVersion.JustifiAnalytics(this);
|
|
1613
1594
|
checkPkgVersion.checkPkgVersion();
|
|
1614
|
-
|
|
1595
|
+
Plaid.checkoutStore.authToken = this.authToken;
|
|
1615
1596
|
this.fetchCheckout();
|
|
1616
1597
|
// Refresh the checkout data when insurance values actually change (not on initial load)
|
|
1617
1598
|
insuranceState.insuranceValuesOn("set", (key) => {
|
|
@@ -1645,7 +1626,7 @@ const ModularCheckout = class {
|
|
|
1645
1626
|
this.getCheckout({
|
|
1646
1627
|
onSuccess: ({ checkout }) => {
|
|
1647
1628
|
this.updateStore(checkout);
|
|
1648
|
-
if (checkout.status ===
|
|
1629
|
+
if (checkout.status === Plaid.ICheckoutStatus.completed) {
|
|
1649
1630
|
this.errorEvent.emit({
|
|
1650
1631
|
message: ComponentError.ComponentErrorMessages.CHECKOUT_ALREADY_COMPLETED,
|
|
1651
1632
|
errorCode: ComponentError.ComponentErrorCodes.CHECKOUT_ALREADY_COMPLETED,
|
|
@@ -1653,7 +1634,7 @@ const ModularCheckout = class {
|
|
|
1653
1634
|
});
|
|
1654
1635
|
return;
|
|
1655
1636
|
}
|
|
1656
|
-
else if (checkout.status ===
|
|
1637
|
+
else if (checkout.status === Plaid.ICheckoutStatus.expired) {
|
|
1657
1638
|
this.errorEvent.emit({
|
|
1658
1639
|
message: ComponentError.ComponentErrorMessages.CHECKOUT_EXPIRED,
|
|
1659
1640
|
errorCode: ComponentError.ComponentErrorCodes.CHECKOUT_EXPIRED,
|
|
@@ -1674,29 +1655,29 @@ const ModularCheckout = class {
|
|
|
1674
1655
|
}
|
|
1675
1656
|
updateStore(checkout) {
|
|
1676
1657
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1658
|
+
Plaid.checkoutStore.accountId = checkout.account_id;
|
|
1659
|
+
Plaid.checkoutStore.checkoutLoaded = true;
|
|
1660
|
+
Plaid.checkoutStore.paymentMethods = checkout.payment_methods.map((paymentMethod) => new index$1.PaymentMethod(paymentMethod));
|
|
1661
|
+
Plaid.checkoutStore.paymentMethodGroupId = checkout.payment_method_group_id;
|
|
1662
|
+
Plaid.checkoutStore.paymentDescription = checkout.payment_description;
|
|
1663
|
+
Plaid.checkoutStore.totalAmount = checkout.total_amount;
|
|
1664
|
+
Plaid.checkoutStore.paymentAmount = checkout.payment_amount;
|
|
1665
|
+
Plaid.checkoutStore.bnplEnabled = checkout.payment_settings.bnpl_payments;
|
|
1666
|
+
Plaid.checkoutStore.insuranceEnabled = checkout.payment_settings.insurance_payments;
|
|
1667
|
+
Plaid.checkoutStore.bankAccountVerification = (_a = checkout.payment_settings) === null || _a === void 0 ? void 0 : _a.bank_account_verification;
|
|
1668
|
+
Plaid.checkoutStore.applePayEnabled = (_b = checkout.payment_settings) === null || _b === void 0 ? void 0 : _b.apple_payments;
|
|
1669
|
+
Plaid.checkoutStore.googlePayEnabled = (_c = checkout.payment_settings) === null || _c === void 0 ? void 0 : _c.google_payments;
|
|
1670
|
+
Plaid.checkoutStore.bnplProviderClientId = (_d = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _d === void 0 ? void 0 : _d.provider_client_id;
|
|
1671
|
+
Plaid.checkoutStore.bnplProviderMode = (_e = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _e === void 0 ? void 0 : _e.provider_mode;
|
|
1672
|
+
Plaid.checkoutStore.bnplProviderApiVersion = (_f = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _f === void 0 ? void 0 : _f.provider_api_version;
|
|
1673
|
+
Plaid.checkoutStore.bnplProviderCheckoutUrl =
|
|
1693
1674
|
(_g = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _g === void 0 ? void 0 : _g.provider_checkout_url;
|
|
1694
1675
|
}
|
|
1695
1676
|
emitCheckoutChanged() {
|
|
1696
1677
|
const detail = {
|
|
1697
|
-
availablePaymentMethodTypes:
|
|
1698
|
-
selectedPaymentMethod:
|
|
1699
|
-
savedPaymentMethods:
|
|
1678
|
+
availablePaymentMethodTypes: Plaid.getAvailablePaymentMethodTypes(),
|
|
1679
|
+
selectedPaymentMethod: Plaid.checkoutStore.selectedPaymentMethod,
|
|
1680
|
+
savedPaymentMethods: Plaid.checkoutStore.paymentMethods,
|
|
1700
1681
|
};
|
|
1701
1682
|
this.checkoutChangedEvent.emit(detail);
|
|
1702
1683
|
}
|
|
@@ -1738,36 +1719,36 @@ const ModularCheckout = class {
|
|
|
1738
1719
|
var _a, _b, _c;
|
|
1739
1720
|
const billingInfoValues = (_b = (await ((_a = this.billingFormRef) === null || _a === void 0 ? void 0 : _a.getValues()))) !== null && _b !== void 0 ? _b : {};
|
|
1740
1721
|
const combinedBillingInfo = Object.assign(Object.assign({}, tokenizeArgs), billingInfoValues);
|
|
1741
|
-
const paymentMethodMetadata = Object.assign({ accountId:
|
|
1742
|
-
if (
|
|
1722
|
+
const paymentMethodMetadata = Object.assign({ accountId: Plaid.checkoutStore.accountId, payment_method_group_id: undefined }, combinedBillingInfo);
|
|
1723
|
+
if (Plaid.checkoutStore.savePaymentMethod) {
|
|
1743
1724
|
paymentMethodMetadata.payment_method_group_id =
|
|
1744
|
-
|
|
1725
|
+
Plaid.checkoutStore.paymentMethodGroupId;
|
|
1745
1726
|
}
|
|
1746
1727
|
const tokenizeResult = await ((_c = this.paymentMethodFormRef) === null || _c === void 0 ? void 0 : _c.tokenize({
|
|
1747
1728
|
clientId: this.authToken,
|
|
1748
1729
|
paymentMethodMetadata,
|
|
1749
|
-
account:
|
|
1730
|
+
account: Plaid.checkoutStore.accountId,
|
|
1750
1731
|
}));
|
|
1751
1732
|
if (tokenizeResult.error) {
|
|
1752
1733
|
return tokenizeResult;
|
|
1753
1734
|
}
|
|
1754
|
-
|
|
1735
|
+
Plaid.checkoutStore.paymentToken = tokenizeResult.id;
|
|
1755
1736
|
return tokenizeResult.id;
|
|
1756
1737
|
}
|
|
1757
1738
|
// set the selected payment method to the checkout store from outside the component
|
|
1758
1739
|
async setSelectedPaymentMethod(paymentMethod) {
|
|
1759
|
-
|
|
1760
|
-
|
|
1740
|
+
Plaid.checkoutStore.selectedPaymentMethod = paymentMethod;
|
|
1741
|
+
Plaid.checkoutStore.paymentToken = paymentMethod.id || undefined;
|
|
1761
1742
|
}
|
|
1762
1743
|
// if validation fails, the error will be emitted by the component
|
|
1763
1744
|
async validate() {
|
|
1764
1745
|
var _a, _b;
|
|
1765
1746
|
const promises = [];
|
|
1766
|
-
if (
|
|
1747
|
+
if (Plaid.checkoutStore.insuranceEnabled && this.insuranceFormRef) {
|
|
1767
1748
|
promises.push(this.insuranceFormRef.validate());
|
|
1768
1749
|
}
|
|
1769
|
-
const isNewCard = ((_a =
|
|
1770
|
-
const isNewBankAccount = ((_b =
|
|
1750
|
+
const isNewCard = ((_a = Plaid.checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === index$1.PAYMENT_METHODS.NEW_CARD;
|
|
1751
|
+
const isNewBankAccount = ((_b = Plaid.checkoutStore.selectedPaymentMethod) === null || _b === void 0 ? void 0 : _b.type) === index$1.PAYMENT_METHODS.NEW_BANK_ACCOUNT;
|
|
1771
1752
|
// For new card/bank account, validate payment method + billing.
|
|
1772
1753
|
if (isNewCard || isNewBankAccount) {
|
|
1773
1754
|
if (this.paymentMethodFormRef)
|
|
@@ -1801,7 +1782,7 @@ const ModularCheckout = class {
|
|
|
1801
1782
|
async submitCheckout(submitCheckoutArgs) {
|
|
1802
1783
|
var _a, _b, _c, _d, _e;
|
|
1803
1784
|
const isValid = await this.validate();
|
|
1804
|
-
if (!
|
|
1785
|
+
if (!Plaid.checkoutStore.selectedPaymentMethod) {
|
|
1805
1786
|
this.errorEvent.emit({
|
|
1806
1787
|
message: 'No payment method selected.',
|
|
1807
1788
|
errorCode: ComponentError.ComponentErrorCodes.VALIDATION_ERROR,
|
|
@@ -1809,9 +1790,9 @@ const ModularCheckout = class {
|
|
|
1809
1790
|
});
|
|
1810
1791
|
return;
|
|
1811
1792
|
}
|
|
1812
|
-
const isNewCard = ((_a =
|
|
1813
|
-
const isNewBankAccount = ((_b =
|
|
1814
|
-
const isPlaid = ((_c =
|
|
1793
|
+
const isNewCard = ((_a = Plaid.checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === index$1.PAYMENT_METHODS.NEW_CARD;
|
|
1794
|
+
const isNewBankAccount = ((_b = Plaid.checkoutStore.selectedPaymentMethod) === null || _b === void 0 ? void 0 : _b.type) === index$1.PAYMENT_METHODS.NEW_BANK_ACCOUNT;
|
|
1795
|
+
const isPlaid = ((_c = Plaid.checkoutStore.selectedPaymentMethod) === null || _c === void 0 ? void 0 : _c.type) === index$1.PAYMENT_METHODS.PLAID;
|
|
1815
1796
|
const shouldTokenize = isNewCard || isNewBankAccount;
|
|
1816
1797
|
if (shouldTokenize) {
|
|
1817
1798
|
const tokenizeResult = await this.tokenizePaymentMethod(submitCheckoutArgs);
|
|
@@ -1825,9 +1806,9 @@ const ModularCheckout = class {
|
|
|
1825
1806
|
}
|
|
1826
1807
|
}
|
|
1827
1808
|
// For Plaid, perform exchange at submit time using stored public token and link token id
|
|
1828
|
-
if (isPlaid && !
|
|
1829
|
-
const publicToken =
|
|
1830
|
-
const linkTokenId =
|
|
1809
|
+
if (isPlaid && !Plaid.checkoutStore.paymentToken) {
|
|
1810
|
+
const publicToken = Plaid.checkoutStore.plaidPublicToken;
|
|
1811
|
+
const linkTokenId = Plaid.checkoutStore.plaidLinkTokenId;
|
|
1831
1812
|
if (!publicToken) {
|
|
1832
1813
|
this.errorEvent.emit({
|
|
1833
1814
|
message: 'Missing Plaid public token. Please connect your bank.',
|
|
@@ -1837,7 +1818,7 @@ const ModularCheckout = class {
|
|
|
1837
1818
|
return;
|
|
1838
1819
|
}
|
|
1839
1820
|
try {
|
|
1840
|
-
const response = await this.plaidService.tokenizeBankAccount(
|
|
1821
|
+
const response = await this.plaidService.tokenizeBankAccount(Plaid.checkoutStore.authToken, Plaid.checkoutStore.accountId, publicToken, linkTokenId || undefined, Plaid.checkoutStore.savePaymentMethod ? Plaid.checkoutStore.paymentMethodGroupId : undefined);
|
|
1841
1822
|
if (response === null || response === void 0 ? void 0 : response.error) {
|
|
1842
1823
|
this.errorEvent.emit({
|
|
1843
1824
|
message: typeof response.error === 'string' ? response.error : response.error.message || 'Failed to tokenize bank account',
|
|
@@ -1848,7 +1829,7 @@ const ModularCheckout = class {
|
|
|
1848
1829
|
}
|
|
1849
1830
|
const paymentMethod = response === null || response === void 0 ? void 0 : response.data;
|
|
1850
1831
|
const token = ((_d = paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.bank_account) === null || _d === void 0 ? void 0 : _d.token) || (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.token) || (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id);
|
|
1851
|
-
|
|
1832
|
+
Plaid.checkoutStore.paymentToken = token;
|
|
1852
1833
|
}
|
|
1853
1834
|
catch (err) {
|
|
1854
1835
|
this.errorEvent.emit({
|
|
@@ -1867,7 +1848,7 @@ const ModularCheckout = class {
|
|
|
1867
1848
|
});
|
|
1868
1849
|
return;
|
|
1869
1850
|
}
|
|
1870
|
-
if (!
|
|
1851
|
+
if (!Plaid.checkoutStore.paymentToken) {
|
|
1871
1852
|
this.errorEvent.emit({
|
|
1872
1853
|
message: 'Payment token not found.',
|
|
1873
1854
|
errorCode: ComponentError.ComponentErrorCodes.TOKENIZE_ERROR,
|
|
@@ -1895,11 +1876,11 @@ const ModularCheckout = class {
|
|
|
1895
1876
|
}
|
|
1896
1877
|
};
|
|
1897
1878
|
payment = {
|
|
1898
|
-
payment_mode: mapTypeToPaymentMode((_e =
|
|
1899
|
-
payment_token:
|
|
1879
|
+
payment_mode: mapTypeToPaymentMode((_e = Plaid.checkoutStore.selectedPaymentMethod) === null || _e === void 0 ? void 0 : _e.type),
|
|
1880
|
+
payment_token: Plaid.checkoutStore.paymentToken,
|
|
1900
1881
|
};
|
|
1901
1882
|
if (this.preCompleteHook) {
|
|
1902
|
-
const state =
|
|
1883
|
+
const state = Plaid.getCheckoutState();
|
|
1903
1884
|
try {
|
|
1904
1885
|
await new Promise((resolve, reject) => {
|
|
1905
1886
|
this.preCompleteHook(state, () => resolve(), () => reject());
|
|
@@ -1928,68 +1909,17 @@ const ModularCheckout = class {
|
|
|
1928
1909
|
});
|
|
1929
1910
|
}
|
|
1930
1911
|
render() {
|
|
1931
|
-
return index.h(index.Host, { key: '
|
|
1912
|
+
return index.h(index.Host, { key: 'ee341d8d78767a80e2627ea5244ba46ca63cd8df' });
|
|
1932
1913
|
}
|
|
1933
1914
|
get hostEl() { return index.getElement(this); }
|
|
1934
1915
|
};
|
|
1935
1916
|
|
|
1936
|
-
const plaidIconSvg = 'data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4IiB2aWV3Qm94PSIwIDAgMjggMjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY2xhc3M9ImNzcy0xcmRhajhtIj48ZyBmaWxsPSIjMTExIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yNS43NjI5IDI2LjI2MjhMMjggMTcuNTMwOUwyNC45NjkxIDE0LjUwMDFMMjcuOTk5OSAxMS40NjkxTDI1Ljc2MjggMi43MzcwNkwxNy4wMzA5IDAuNUwxNC4wMDAxIDMuNTMxTDEwLjk2OSAwLjUwMDE0TDIuMjM3MDYgMi43MzczNEwwIDExLjQ2OTFMMy4wMzEyOCAxNC40OTk5TDAuMDAwMTQgMTcuNTMxTDIuMjM3MiAyNi4yNjI5TDEwLjk2OTEgMjguNUwxNC4wMDAxIDI1LjQ2OUwxNy4wMzEgMjguNDk5OUwyNS43NjI5IDI2LjI2MjhaTTE1LjczMjEgMjMuNzM3MUwxOC42MTg2IDIwLjg1MDVMMjIuMjkxMiAyNC41MjMzTDE3LjY5NTYgMjUuNzAwN0wxNS43MzIxIDIzLjczNzFaTTExLjExMzYgOS44ODE1NEwxNC4wMDAzIDYuOTk1MDJMMTYuODg2OCA5Ljg4MTRMMTQuMDAwMSAxMi43Njc5TDExLjExMzYgOS44ODE1NFpNMTIuMjY4MiAxNC41TDkuMzgxNTQgMTcuMzg2NUw2LjQ5NTAyIDE0LjVMOS4zODE1NCAxMS42MTM1TDEyLjI2ODIgMTQuNVpNMTguNjE4NyAxMS42MTMzTDIxLjUwNTMgMTQuNUwxOC42MTg2IDE3LjM4NjVMMTUuNzMyMSAxNC41TDE4LjYxODcgMTEuNjEzM1pNMTYuODg2NyAxOS4xMTg2TDE0LjAwMDEgMjIuMDA1MUwxMS4xMTM1IDE5LjExODVMMTQuMDAwMSAxNi4yMzE5TDE2Ljg4NjcgMTkuMTE4NlpNMTAuMzA0NCAyNS43MDA3TDUuNzA4NjQgMjQuNTIzM0w5LjM4MTU0IDIwLjg1MDRMMTIuMjY4MiAyMy43MzcxTDEwLjMwNDQgMjUuNzAwN1pNNC43NjMwOCAxNi4yMzE5TDcuNjQ5NiAxOS4xMTg1TDMuOTc2NyAyMi43OTE0TDIuNzk5MyAxOC4xOTU3TDQuNzYzMDggMTYuMjMxOVpNMy45NzY3IDYuMjA4MzZMNy42NDk3NCA5Ljg4MTRMNC43NjMwOCAxMi43NjgxTDIuNzk5MyAxMC44MDQxTDMuOTc2NyA2LjIwODM2Wk0xMi4yNjgzIDUuMjYyOTRMOS4zODE2OCA4LjE0OTZMNS43MDg5MiA0LjQ3NjdMMTAuMzA0NyAzLjI5OTNMMTIuMjY4MyA1LjI2Mjk0Wk0xNy42OTU5IDMuMjk5M0wyMi4yOTE1IDQuNDc2N0wxOC42MTg2IDguMTQ5NDZMMTUuNzMyMSA1LjI2Mjk0TDE3LjY5NTkgMy4yOTkzWk0yMy4yMzcyIDEyLjc2ODFMMjAuMzUwNSA5Ljg4MTRMMjQuMDIzMyA2LjIwODc4TDI1LjIwMDcgMTAuODA0NkwyMy4yMzcyIDEyLjc2ODFaTTI0LjAyMzMgMjIuNzkxNEwyMC4zNTA1IDE5LjExODZMMjMuMjM3MiAxNi4yMzIxTDI1LjIwMDcgMTguMTk1N0wyNC4wMjMzIDIyLjc5MTRaIj48L3BhdGg+PC9nPjwvc3ZnPgo=';
|
|
1937
|
-
|
|
1938
|
-
// Plaid-specific error codes
|
|
1939
|
-
var PlaidErrorCodes;
|
|
1940
|
-
(function (PlaidErrorCodes) {
|
|
1941
|
-
PlaidErrorCodes["PLAID_SDK_LOAD_FAILED"] = "plaid-sdk-load-failed";
|
|
1942
|
-
PlaidErrorCodes["PLAID_LINK_INIT_FAILED"] = "plaid-link-init-failed";
|
|
1943
|
-
PlaidErrorCodes["PLAID_LINK_TOKEN_FAILED"] = "plaid-link-token-failed";
|
|
1944
|
-
PlaidErrorCodes["PLAID_AUTHENTICATION_FAILED"] = "plaid-authentication-failed";
|
|
1945
|
-
PlaidErrorCodes["PLAID_BANK_NOT_SUPPORTED"] = "plaid-bank-not-supported";
|
|
1946
|
-
PlaidErrorCodes["PLAID_TOKEN_EXPIRED"] = "plaid-token-expired";
|
|
1947
|
-
PlaidErrorCodes["PLAID_NETWORK_ERROR"] = "plaid-network-error";
|
|
1948
|
-
PlaidErrorCodes["PLAID_USER_CANCELLED"] = "plaid-user-cancelled";
|
|
1949
|
-
PlaidErrorCodes["PLAID_TIMEOUT"] = "plaid-timeout";
|
|
1950
|
-
PlaidErrorCodes["PLAID_INVALID_CREDENTIALS"] = "plaid-invalid-credentials";
|
|
1951
|
-
PlaidErrorCodes["PLAID_ACCOUNT_LOCKED"] = "plaid-account-locked";
|
|
1952
|
-
PlaidErrorCodes["PLAID_MAINTENANCE"] = "plaid-maintenance";
|
|
1953
|
-
PlaidErrorCodes["PLAID_RATE_LIMITED"] = "plaid-rate-limited";
|
|
1954
|
-
})(PlaidErrorCodes || (PlaidErrorCodes = {}));
|
|
1955
|
-
// Plaid error message mapping
|
|
1956
|
-
const PLAID_ERROR_MESSAGES = {
|
|
1957
|
-
[PlaidErrorCodes.PLAID_SDK_LOAD_FAILED]: 'Unable to load Plaid. Please refresh the page and try again.',
|
|
1958
|
-
[PlaidErrorCodes.PLAID_LINK_INIT_FAILED]: 'Unable to initialize bank connection. Please try again.',
|
|
1959
|
-
[PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED]: 'Unable to connect to bank service. Please try again.',
|
|
1960
|
-
[PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED]: 'Bank authentication failed. Please try again.',
|
|
1961
|
-
[PlaidErrorCodes.PLAID_BANK_NOT_SUPPORTED]: 'Your bank is not currently supported. Please try a different payment method.',
|
|
1962
|
-
[PlaidErrorCodes.PLAID_TOKEN_EXPIRED]: 'Your bank session has expired. Please reconnect your account.',
|
|
1963
|
-
[PlaidErrorCodes.PLAID_NETWORK_ERROR]: 'Network connection issue. Please check your internet connection and try again.',
|
|
1964
|
-
[PlaidErrorCodes.PLAID_USER_CANCELLED]: 'Bank connection was cancelled. Click to try again.',
|
|
1965
|
-
[PlaidErrorCodes.PLAID_TIMEOUT]: 'Bank connection timed out. Please try again.',
|
|
1966
|
-
[PlaidErrorCodes.PLAID_INVALID_CREDENTIALS]: 'Invalid bank credentials. Please check your username and password.',
|
|
1967
|
-
[PlaidErrorCodes.PLAID_ACCOUNT_LOCKED]: 'Your bank account is temporarily locked. Please contact your bank.',
|
|
1968
|
-
[PlaidErrorCodes.PLAID_MAINTENANCE]: 'Bank service is temporarily unavailable. Please try again later.',
|
|
1969
|
-
[PlaidErrorCodes.PLAID_RATE_LIMITED]: 'Too many connection attempts. Please wait a moment and try again.',
|
|
1970
|
-
};
|
|
1971
|
-
// Plaid error severity mapping
|
|
1972
|
-
const PLAID_ERROR_SEVERITY = {
|
|
1973
|
-
[PlaidErrorCodes.PLAID_SDK_LOAD_FAILED]: ComponentError.ComponentErrorSeverity.ERROR,
|
|
1974
|
-
[PlaidErrorCodes.PLAID_LINK_INIT_FAILED]: ComponentError.ComponentErrorSeverity.ERROR,
|
|
1975
|
-
[PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED]: ComponentError.ComponentErrorSeverity.ERROR,
|
|
1976
|
-
[PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED]: ComponentError.ComponentErrorSeverity.ERROR,
|
|
1977
|
-
[PlaidErrorCodes.PLAID_BANK_NOT_SUPPORTED]: ComponentError.ComponentErrorSeverity.WARNING,
|
|
1978
|
-
[PlaidErrorCodes.PLAID_TOKEN_EXPIRED]: ComponentError.ComponentErrorSeverity.WARNING,
|
|
1979
|
-
[PlaidErrorCodes.PLAID_NETWORK_ERROR]: ComponentError.ComponentErrorSeverity.WARNING,
|
|
1980
|
-
[PlaidErrorCodes.PLAID_USER_CANCELLED]: ComponentError.ComponentErrorSeverity.INFO,
|
|
1981
|
-
[PlaidErrorCodes.PLAID_TIMEOUT]: ComponentError.ComponentErrorSeverity.WARNING,
|
|
1982
|
-
[PlaidErrorCodes.PLAID_INVALID_CREDENTIALS]: ComponentError.ComponentErrorSeverity.ERROR,
|
|
1983
|
-
[PlaidErrorCodes.PLAID_ACCOUNT_LOCKED]: ComponentError.ComponentErrorSeverity.ERROR,
|
|
1984
|
-
[PlaidErrorCodes.PLAID_MAINTENANCE]: ComponentError.ComponentErrorSeverity.WARNING,
|
|
1985
|
-
[PlaidErrorCodes.PLAID_RATE_LIMITED]: ComponentError.ComponentErrorSeverity.WARNING,
|
|
1986
|
-
};
|
|
1987
1917
|
const PlaidPaymentMethod = class {
|
|
1988
1918
|
constructor(hostRef) {
|
|
1989
1919
|
index.registerInstance(this, hostRef);
|
|
1990
|
-
this.paymentMethodOptionSelected = index.createEvent(this, "paymentMethodOptionSelected");
|
|
1991
|
-
this.plaidError = index.createEvent(this, "plaidError");
|
|
1992
|
-
this.plaidErrorRecovered = index.createEvent(this, "plaidErrorRecovered");
|
|
1920
|
+
this.paymentMethodOptionSelected = index.createEvent(this, "paymentMethodOptionSelected", 7);
|
|
1921
|
+
this.plaidError = index.createEvent(this, "plaidError", 7);
|
|
1922
|
+
this.plaidErrorRecovered = index.createEvent(this, "plaidErrorRecovered", 7);
|
|
1993
1923
|
this.isAuthenticating = false;
|
|
1994
1924
|
this.publicToken = null;
|
|
1995
1925
|
this.linkToken = null;
|
|
@@ -1999,7 +1929,7 @@ const PlaidPaymentMethod = class {
|
|
|
1999
1929
|
this.isSelected = false;
|
|
2000
1930
|
this.retryCount = 0;
|
|
2001
1931
|
this.isRetrying = false;
|
|
2002
|
-
this.plaidService = new PlaidService();
|
|
1932
|
+
this.plaidService = new plaidIcon.PlaidService();
|
|
2003
1933
|
this.maxRetries = 3;
|
|
2004
1934
|
this.retryDelay = 2000; // 2 seconds
|
|
2005
1935
|
this.timeoutId = null;
|
|
@@ -2007,7 +1937,7 @@ const PlaidPaymentMethod = class {
|
|
|
2007
1937
|
this.hasLoggedDisabledWarning = false;
|
|
2008
1938
|
this.waitForStoreAndInitialize = () => {
|
|
2009
1939
|
// Check if store has necessary data
|
|
2010
|
-
if (
|
|
1940
|
+
if (Plaid.checkoutStore.authToken && Plaid.checkoutStore.accountId && Plaid.checkoutStore.checkoutId) {
|
|
2011
1941
|
this.initializePlaidLink();
|
|
2012
1942
|
}
|
|
2013
1943
|
else {
|
|
@@ -2022,9 +1952,9 @@ const PlaidPaymentMethod = class {
|
|
|
2022
1952
|
// Check if Plaid is available globally
|
|
2023
1953
|
if (typeof window.Plaid === 'undefined') {
|
|
2024
1954
|
this.handleError({
|
|
2025
|
-
code: PlaidErrorCodes.PLAID_SDK_LOAD_FAILED,
|
|
2026
|
-
message: PLAID_ERROR_MESSAGES[PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
|
|
2027
|
-
severity: PLAID_ERROR_SEVERITY[PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
|
|
1955
|
+
code: Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED,
|
|
1956
|
+
message: Plaid.PLAID_ERROR_MESSAGES[Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
|
|
1957
|
+
severity: Plaid.PLAID_ERROR_SEVERITY[Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
|
|
2028
1958
|
retryable: true,
|
|
2029
1959
|
userAction: 'Refresh the page and try again'
|
|
2030
1960
|
});
|
|
@@ -2034,17 +1964,17 @@ const PlaidPaymentMethod = class {
|
|
|
2034
1964
|
await this.getLinkToken();
|
|
2035
1965
|
if (!this.linkToken) {
|
|
2036
1966
|
this.handleError({
|
|
2037
|
-
code: PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED,
|
|
2038
|
-
message: PLAID_ERROR_MESSAGES[PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED],
|
|
2039
|
-
severity: PLAID_ERROR_SEVERITY[PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED],
|
|
1967
|
+
code: Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED,
|
|
1968
|
+
message: Plaid.PLAID_ERROR_MESSAGES[Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED],
|
|
1969
|
+
severity: Plaid.PLAID_ERROR_SEVERITY[Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED],
|
|
2040
1970
|
retryable: true,
|
|
2041
1971
|
userAction: 'Click to try again'
|
|
2042
1972
|
});
|
|
2043
1973
|
return;
|
|
2044
1974
|
}
|
|
2045
1975
|
// Initialize Plaid Link
|
|
2046
|
-
const Plaid = window.Plaid;
|
|
2047
|
-
this.plaidLink = Plaid.create({
|
|
1976
|
+
const Plaid$1 = window.Plaid;
|
|
1977
|
+
this.plaidLink = Plaid$1.create({
|
|
2048
1978
|
token: this.linkToken,
|
|
2049
1979
|
onSuccess: this.handlePlaidSuccess,
|
|
2050
1980
|
onExit: this.handlePlaidExit,
|
|
@@ -2054,9 +1984,9 @@ const PlaidPaymentMethod = class {
|
|
|
2054
1984
|
}
|
|
2055
1985
|
catch (error) {
|
|
2056
1986
|
this.handleError({
|
|
2057
|
-
code: PlaidErrorCodes.PLAID_LINK_INIT_FAILED,
|
|
2058
|
-
message: PLAID_ERROR_MESSAGES[PlaidErrorCodes.PLAID_LINK_INIT_FAILED],
|
|
2059
|
-
severity: PLAID_ERROR_SEVERITY[PlaidErrorCodes.PLAID_LINK_INIT_FAILED],
|
|
1987
|
+
code: Plaid.PlaidErrorCodes.PLAID_LINK_INIT_FAILED,
|
|
1988
|
+
message: Plaid.PLAID_ERROR_MESSAGES[Plaid.PlaidErrorCodes.PLAID_LINK_INIT_FAILED],
|
|
1989
|
+
severity: Plaid.PLAID_ERROR_SEVERITY[Plaid.PlaidErrorCodes.PLAID_LINK_INIT_FAILED],
|
|
2060
1990
|
originalError: error,
|
|
2061
1991
|
retryable: true,
|
|
2062
1992
|
userAction: 'Click to try again'
|
|
@@ -2066,9 +1996,9 @@ const PlaidPaymentMethod = class {
|
|
|
2066
1996
|
this.getLinkToken = async () => {
|
|
2067
1997
|
var _a, _b, _c, _d, _e;
|
|
2068
1998
|
try {
|
|
2069
|
-
if (!
|
|
1999
|
+
if (!Plaid.checkoutStore.authToken || !Plaid.checkoutStore.accountId) {
|
|
2070
2000
|
this.handleError({
|
|
2071
|
-
code: PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED,
|
|
2001
|
+
code: Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED,
|
|
2072
2002
|
message: 'Missing authentication. Please refresh the page and try again.',
|
|
2073
2003
|
severity: ComponentError.ComponentErrorSeverity.ERROR,
|
|
2074
2004
|
retryable: false,
|
|
@@ -2083,7 +2013,7 @@ const PlaidPaymentMethod = class {
|
|
|
2083
2013
|
var _a;
|
|
2084
2014
|
(_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
2085
2015
|
}, 30000); // 30 second timeout
|
|
2086
|
-
const response = await this.plaidService.getLinkToken(
|
|
2016
|
+
const response = await this.plaidService.getLinkToken(Plaid.checkoutStore.authToken, Plaid.checkoutStore.accountId, Plaid.checkoutStore.checkoutId, this.abortController.signal);
|
|
2087
2017
|
// Clear timeout
|
|
2088
2018
|
if (this.timeoutId) {
|
|
2089
2019
|
clearTimeout(this.timeoutId);
|
|
@@ -2100,7 +2030,7 @@ const PlaidPaymentMethod = class {
|
|
|
2100
2030
|
// Try to capture link token id if present in envelope
|
|
2101
2031
|
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;
|
|
2102
2032
|
if (this.linkTokenId) {
|
|
2103
|
-
|
|
2033
|
+
Plaid.checkoutStore.plaidLinkTokenId = this.linkTokenId;
|
|
2104
2034
|
}
|
|
2105
2035
|
}
|
|
2106
2036
|
catch (error) {
|
|
@@ -2109,29 +2039,29 @@ const PlaidPaymentMethod = class {
|
|
|
2109
2039
|
clearTimeout(this.timeoutId);
|
|
2110
2040
|
this.timeoutId = null;
|
|
2111
2041
|
}
|
|
2112
|
-
let errorCode = PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED;
|
|
2113
|
-
let message = PLAID_ERROR_MESSAGES[errorCode];
|
|
2042
|
+
let errorCode = Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED;
|
|
2043
|
+
let message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
2114
2044
|
let retryable = true;
|
|
2115
2045
|
// Handle specific error types
|
|
2116
2046
|
if (error.name === 'AbortError') {
|
|
2117
|
-
errorCode = PlaidErrorCodes.PLAID_TIMEOUT;
|
|
2118
|
-
message = PLAID_ERROR_MESSAGES[errorCode];
|
|
2047
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_TIMEOUT;
|
|
2048
|
+
message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
2119
2049
|
retryable = true;
|
|
2120
2050
|
}
|
|
2121
2051
|
else if (((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('network')) || ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('fetch'))) {
|
|
2122
|
-
errorCode = PlaidErrorCodes.PLAID_NETWORK_ERROR;
|
|
2123
|
-
message = PLAID_ERROR_MESSAGES[errorCode];
|
|
2052
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_NETWORK_ERROR;
|
|
2053
|
+
message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
2124
2054
|
retryable = true;
|
|
2125
2055
|
}
|
|
2126
2056
|
else if (((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('401')) || ((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('unauthorized'))) {
|
|
2127
|
-
errorCode = PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
|
|
2057
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
|
|
2128
2058
|
message = 'Authentication failed. Please refresh the page and try again.';
|
|
2129
2059
|
retryable = false;
|
|
2130
2060
|
}
|
|
2131
2061
|
this.handleError({
|
|
2132
2062
|
code: errorCode,
|
|
2133
2063
|
message: message,
|
|
2134
|
-
severity: PLAID_ERROR_SEVERITY[errorCode],
|
|
2064
|
+
severity: Plaid.PLAID_ERROR_SEVERITY[errorCode],
|
|
2135
2065
|
originalError: error,
|
|
2136
2066
|
retryable,
|
|
2137
2067
|
userAction: retryable ? 'Click to try again' : 'Refresh the page'
|
|
@@ -2141,22 +2071,22 @@ const PlaidPaymentMethod = class {
|
|
|
2141
2071
|
this.mapApiErrorToPlaidError = (apiError) => {
|
|
2142
2072
|
if (typeof apiError === 'string') {
|
|
2143
2073
|
if (apiError.includes('rate_limit'))
|
|
2144
|
-
return PlaidErrorCodes.PLAID_RATE_LIMITED;
|
|
2074
|
+
return Plaid.PlaidErrorCodes.PLAID_RATE_LIMITED;
|
|
2145
2075
|
if (apiError.includes('maintenance'))
|
|
2146
|
-
return PlaidErrorCodes.PLAID_MAINTENANCE;
|
|
2076
|
+
return Plaid.PlaidErrorCodes.PLAID_MAINTENANCE;
|
|
2147
2077
|
if (apiError.includes('not_authenticated'))
|
|
2148
|
-
return PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
|
|
2078
|
+
return Plaid.PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
|
|
2149
2079
|
}
|
|
2150
2080
|
if (apiError === null || apiError === void 0 ? void 0 : apiError.code) {
|
|
2151
2081
|
switch (apiError.code) {
|
|
2152
|
-
case 'rate_limited': return PlaidErrorCodes.PLAID_RATE_LIMITED;
|
|
2153
|
-
case 'maintenance': return PlaidErrorCodes.PLAID_MAINTENANCE;
|
|
2154
|
-
case 'not_authenticated': return PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
|
|
2155
|
-
case 'invalid_parameter': return PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED;
|
|
2156
|
-
default: return PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED;
|
|
2082
|
+
case 'rate_limited': return Plaid.PlaidErrorCodes.PLAID_RATE_LIMITED;
|
|
2083
|
+
case 'maintenance': return Plaid.PlaidErrorCodes.PLAID_MAINTENANCE;
|
|
2084
|
+
case 'not_authenticated': return Plaid.PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
|
|
2085
|
+
case 'invalid_parameter': return Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED;
|
|
2086
|
+
default: return Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED;
|
|
2157
2087
|
}
|
|
2158
2088
|
}
|
|
2159
|
-
return PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED;
|
|
2089
|
+
return Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED;
|
|
2160
2090
|
};
|
|
2161
2091
|
this.openPlaidLink = () => {
|
|
2162
2092
|
if (this.plaidLink && this.linkToken) {
|
|
@@ -2173,7 +2103,7 @@ const PlaidPaymentMethod = class {
|
|
|
2173
2103
|
// Ensure the component remains selected after successful authentication
|
|
2174
2104
|
if (!this.isSelected) {
|
|
2175
2105
|
this.isSelected = true;
|
|
2176
|
-
|
|
2106
|
+
Plaid.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.PLAID };
|
|
2177
2107
|
}
|
|
2178
2108
|
// Emit success event for parent components
|
|
2179
2109
|
this.plaidErrorRecovered.emit({
|
|
@@ -2182,7 +2112,7 @@ const PlaidPaymentMethod = class {
|
|
|
2182
2112
|
severity: ComponentError.ComponentErrorSeverity.INFO
|
|
2183
2113
|
});
|
|
2184
2114
|
// Store public token in checkout store; exchange will be handled on submit
|
|
2185
|
-
|
|
2115
|
+
Plaid.checkoutStore.plaidPublicToken = publicToken;
|
|
2186
2116
|
};
|
|
2187
2117
|
// Exchange logic moved to Modular Checkout submit flow.
|
|
2188
2118
|
this.handlePlaidExit = (err, _metadata) => {
|
|
@@ -2208,46 +2138,46 @@ const PlaidPaymentMethod = class {
|
|
|
2208
2138
|
this.handlePlaidLoad = () => {
|
|
2209
2139
|
};
|
|
2210
2140
|
this.handlePlaidError = (error) => {
|
|
2211
|
-
let errorCode = PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED;
|
|
2212
|
-
let message = PLAID_ERROR_MESSAGES[errorCode];
|
|
2141
|
+
let errorCode = Plaid.PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED;
|
|
2142
|
+
let message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
2213
2143
|
let retryable = true;
|
|
2214
2144
|
let userAction = 'Click to try again';
|
|
2215
2145
|
// Map Plaid error codes to our error codes
|
|
2216
2146
|
if (error.error_code) {
|
|
2217
2147
|
switch (error.error_code) {
|
|
2218
2148
|
case 'INVALID_CREDENTIALS':
|
|
2219
|
-
errorCode = PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
|
|
2220
|
-
message = PLAID_ERROR_MESSAGES[errorCode];
|
|
2149
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
|
|
2150
|
+
message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
2221
2151
|
retryable = true;
|
|
2222
2152
|
break;
|
|
2223
2153
|
case 'ITEM_LOGIN_REQUIRED':
|
|
2224
|
-
errorCode = PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
|
|
2154
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
|
|
2225
2155
|
message = 'Your bank requires re-authentication. Please try again.';
|
|
2226
2156
|
retryable = true;
|
|
2227
2157
|
break;
|
|
2228
2158
|
case 'ITEM_LOCKED':
|
|
2229
|
-
errorCode = PlaidErrorCodes.PLAID_ACCOUNT_LOCKED;
|
|
2230
|
-
message = PLAID_ERROR_MESSAGES[errorCode];
|
|
2159
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_ACCOUNT_LOCKED;
|
|
2160
|
+
message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
2231
2161
|
retryable = false;
|
|
2232
2162
|
userAction = 'Contact your bank';
|
|
2233
2163
|
break;
|
|
2234
2164
|
case 'INSTITUTION_NOT_RESPONDING':
|
|
2235
|
-
errorCode = PlaidErrorCodes.PLAID_MAINTENANCE;
|
|
2236
|
-
message = PLAID_ERROR_MESSAGES[errorCode];
|
|
2165
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_MAINTENANCE;
|
|
2166
|
+
message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
2237
2167
|
retryable = true;
|
|
2238
2168
|
break;
|
|
2239
2169
|
case 'RATE_LIMIT_EXCEEDED':
|
|
2240
|
-
errorCode = PlaidErrorCodes.PLAID_RATE_LIMITED;
|
|
2241
|
-
message = PLAID_ERROR_MESSAGES[errorCode];
|
|
2170
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_RATE_LIMITED;
|
|
2171
|
+
message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
2242
2172
|
retryable = true;
|
|
2243
2173
|
break;
|
|
2244
2174
|
case 'INVALID_REQUEST':
|
|
2245
|
-
errorCode = PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED;
|
|
2175
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED;
|
|
2246
2176
|
message = 'Invalid request. Please try again.';
|
|
2247
2177
|
retryable = true;
|
|
2248
2178
|
break;
|
|
2249
2179
|
case 'PLAID_ERROR':
|
|
2250
|
-
errorCode = PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED;
|
|
2180
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED;
|
|
2251
2181
|
message = error.error_message || 'Bank authentication failed. Please try again.';
|
|
2252
2182
|
retryable = true;
|
|
2253
2183
|
break;
|
|
@@ -2263,21 +2193,21 @@ const PlaidPaymentMethod = class {
|
|
|
2263
2193
|
if (error.error_message) {
|
|
2264
2194
|
const lowerMessage = error.error_message.toLowerCase();
|
|
2265
2195
|
if (lowerMessage.includes('not supported') || lowerMessage.includes('unsupported')) {
|
|
2266
|
-
errorCode = PlaidErrorCodes.PLAID_BANK_NOT_SUPPORTED;
|
|
2267
|
-
message = PLAID_ERROR_MESSAGES[errorCode];
|
|
2196
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_BANK_NOT_SUPPORTED;
|
|
2197
|
+
message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
2268
2198
|
retryable = false;
|
|
2269
2199
|
userAction = 'Try a different payment method';
|
|
2270
2200
|
}
|
|
2271
2201
|
else if (lowerMessage.includes('expired') || lowerMessage.includes('timeout')) {
|
|
2272
|
-
errorCode = PlaidErrorCodes.PLAID_TOKEN_EXPIRED;
|
|
2273
|
-
message = PLAID_ERROR_MESSAGES[errorCode];
|
|
2202
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_TOKEN_EXPIRED;
|
|
2203
|
+
message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
2274
2204
|
retryable = true;
|
|
2275
2205
|
}
|
|
2276
2206
|
}
|
|
2277
2207
|
this.handleError({
|
|
2278
2208
|
code: errorCode,
|
|
2279
2209
|
message,
|
|
2280
|
-
severity: PLAID_ERROR_SEVERITY[errorCode],
|
|
2210
|
+
severity: Plaid.PLAID_ERROR_SEVERITY[errorCode],
|
|
2281
2211
|
originalError: error,
|
|
2282
2212
|
retryable,
|
|
2283
2213
|
userAction
|
|
@@ -2324,7 +2254,7 @@ const PlaidPaymentMethod = class {
|
|
|
2324
2254
|
// Watch for store changes to sync component state
|
|
2325
2255
|
this.syncWithStore = () => {
|
|
2326
2256
|
var _a;
|
|
2327
|
-
const shouldBeSelected = ((_a =
|
|
2257
|
+
const shouldBeSelected = ((_a = Plaid.checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === index$1.PAYMENT_METHODS.PLAID;
|
|
2328
2258
|
if (this.isSelected !== shouldBeSelected) {
|
|
2329
2259
|
this.isSelected = shouldBeSelected;
|
|
2330
2260
|
}
|
|
@@ -2333,8 +2263,8 @@ const PlaidPaymentMethod = class {
|
|
|
2333
2263
|
onSelectionChange(newValue) {
|
|
2334
2264
|
var _a;
|
|
2335
2265
|
// Ensure store is updated when component selection changes
|
|
2336
|
-
if (newValue && ((_a =
|
|
2337
|
-
|
|
2266
|
+
if (newValue && ((_a = Plaid.checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) !== index$1.PAYMENT_METHODS.PLAID) {
|
|
2267
|
+
Plaid.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.PLAID };
|
|
2338
2268
|
}
|
|
2339
2269
|
// Auto-start Plaid flow when selected and ready
|
|
2340
2270
|
if (newValue &&
|
|
@@ -2355,9 +2285,9 @@ const PlaidPaymentMethod = class {
|
|
|
2355
2285
|
// Add error handler for script loading failures
|
|
2356
2286
|
this.scriptRef.onerror = () => {
|
|
2357
2287
|
this.handleError({
|
|
2358
|
-
code: PlaidErrorCodes.PLAID_SDK_LOAD_FAILED,
|
|
2359
|
-
message: PLAID_ERROR_MESSAGES[PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
|
|
2360
|
-
severity: PLAID_ERROR_SEVERITY[PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
|
|
2288
|
+
code: Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED,
|
|
2289
|
+
message: Plaid.PLAID_ERROR_MESSAGES[Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
|
|
2290
|
+
severity: Plaid.PLAID_ERROR_SEVERITY[Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
|
|
2361
2291
|
retryable: true,
|
|
2362
2292
|
userAction: 'Refresh the page and try again'
|
|
2363
2293
|
});
|
|
@@ -2366,7 +2296,7 @@ const PlaidPaymentMethod = class {
|
|
|
2366
2296
|
componentWillLoad() {
|
|
2367
2297
|
var _a;
|
|
2368
2298
|
// Initialize selection state based on store
|
|
2369
|
-
this.isSelected = ((_a =
|
|
2299
|
+
this.isSelected = ((_a = Plaid.checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === index$1.PAYMENT_METHODS.PLAID;
|
|
2370
2300
|
}
|
|
2371
2301
|
async resolvePaymentMethod() {
|
|
2372
2302
|
if (!this.publicToken) {
|
|
@@ -2383,13 +2313,13 @@ const PlaidPaymentMethod = class {
|
|
|
2383
2313
|
// Returns a usable payment method token for checkout completion.
|
|
2384
2314
|
// Will perform the backend exchange if the token is not yet present in the store.
|
|
2385
2315
|
async getPaymentToken() {
|
|
2386
|
-
return
|
|
2316
|
+
return Plaid.checkoutStore.paymentToken;
|
|
2387
2317
|
}
|
|
2388
2318
|
async handleSelectionClick() {
|
|
2389
2319
|
// Update local selection state
|
|
2390
2320
|
this.isSelected = true;
|
|
2391
2321
|
// Update store selection
|
|
2392
|
-
|
|
2322
|
+
Plaid.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.PLAID };
|
|
2393
2323
|
// If there's an error, clear it and try to initialize again
|
|
2394
2324
|
if (this.error) {
|
|
2395
2325
|
this.clearError();
|
|
@@ -2405,7 +2335,7 @@ const PlaidPaymentMethod = class {
|
|
|
2405
2335
|
async setSelected(selected) {
|
|
2406
2336
|
this.isSelected = selected;
|
|
2407
2337
|
if (selected) {
|
|
2408
|
-
|
|
2338
|
+
Plaid.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.PLAID };
|
|
2409
2339
|
}
|
|
2410
2340
|
}
|
|
2411
2341
|
// Method to check if component is currently selected
|
|
@@ -2454,7 +2384,7 @@ const PlaidPaymentMethod = class {
|
|
|
2454
2384
|
}
|
|
2455
2385
|
componentDidLoad() {
|
|
2456
2386
|
// Set up store change listener to keep component in sync
|
|
2457
|
-
const unsubscribe =
|
|
2387
|
+
const unsubscribe = Plaid.onChange('selectedPaymentMethod', this.syncWithStore);
|
|
2458
2388
|
// Store unsubscribe function for cleanup
|
|
2459
2389
|
this.unsubscribeFromStore = unsubscribe;
|
|
2460
2390
|
}
|
|
@@ -2473,7 +2403,7 @@ const PlaidPaymentMethod = class {
|
|
|
2473
2403
|
}
|
|
2474
2404
|
render() {
|
|
2475
2405
|
// Only allow use if enabled in checkout settings
|
|
2476
|
-
if (
|
|
2406
|
+
if (Plaid.checkoutStore.bankAccountVerification !== true) {
|
|
2477
2407
|
if (!this.hasLoggedDisabledWarning) {
|
|
2478
2408
|
// Log once per component lifecycle
|
|
2479
2409
|
console.warn('[PlaidPaymentMethod] bank_account_verification is disabled. Component will not render.');
|
|
@@ -2481,7 +2411,7 @@ const PlaidPaymentMethod = class {
|
|
|
2481
2411
|
}
|
|
2482
2412
|
return null;
|
|
2483
2413
|
}
|
|
2484
|
-
const plaidLogo = (index.h("img", { class: "plaid-logo-img", src: plaidIconSvg, alt: "Plaid", title: "Plaid", style: {
|
|
2414
|
+
const plaidLogo = (index.h("img", { class: "plaid-logo-img", src: plaidIcon.plaidIconSvg, alt: "Plaid", title: "Plaid", style: {
|
|
2485
2415
|
display: 'inline',
|
|
2486
2416
|
width: '20px',
|
|
2487
2417
|
height: '20px',
|
|
@@ -2524,36 +2454,36 @@ const SavedPaymentMethods = class {
|
|
|
2524
2454
|
index.registerInstance(this, hostRef);
|
|
2525
2455
|
this.onPaymentMethodOptionClick = (paymentMethod) => (e) => {
|
|
2526
2456
|
e.preventDefault();
|
|
2527
|
-
|
|
2528
|
-
|
|
2457
|
+
Plaid.checkoutStore.selectedPaymentMethod = { id: paymentMethod.id, type: paymentMethod.type };
|
|
2458
|
+
Plaid.checkoutStore.paymentToken = paymentMethod.id;
|
|
2529
2459
|
};
|
|
2530
2460
|
this.isAllowedPaymentMethod = (paymentMethodType) => {
|
|
2531
2461
|
const isCard = paymentMethodType === index$1.PAYMENT_METHODS.SAVED_CARD;
|
|
2532
2462
|
const isBankAccount = paymentMethodType === index$1.PAYMENT_METHODS.SAVED_BANK_ACCOUNT;
|
|
2533
|
-
if (isCard &&
|
|
2463
|
+
if (isCard && Plaid.checkoutStore.disableCreditCard) {
|
|
2534
2464
|
return false;
|
|
2535
2465
|
}
|
|
2536
|
-
if (isBankAccount &&
|
|
2466
|
+
if (isBankAccount && Plaid.checkoutStore.disableBankAccount) {
|
|
2537
2467
|
return false;
|
|
2538
2468
|
}
|
|
2539
2469
|
return true;
|
|
2540
2470
|
};
|
|
2541
2471
|
}
|
|
2542
2472
|
componentWillLoad() {
|
|
2543
|
-
if (!
|
|
2473
|
+
if (!Plaid.checkoutStore.paymentMethods.length) {
|
|
2544
2474
|
console.warn('No saved payment methods available.');
|
|
2545
2475
|
}
|
|
2546
|
-
if (
|
|
2476
|
+
if (Plaid.checkoutStore.disablePaymentMethodGroup) {
|
|
2547
2477
|
console.warn('Payment method group is disabled.');
|
|
2548
2478
|
}
|
|
2549
2479
|
}
|
|
2550
2480
|
render() {
|
|
2551
|
-
if (
|
|
2481
|
+
if (Plaid.checkoutStore.disablePaymentMethodGroup) {
|
|
2552
2482
|
return null;
|
|
2553
2483
|
}
|
|
2554
|
-
return (index.h(styledHost.StyledHost, null, index.h("div", { class: "saved-payment-methods" },
|
|
2484
|
+
return (index.h(styledHost.StyledHost, null, index.h("div", { class: "saved-payment-methods" }, Plaid.checkoutStore.paymentMethods.length ? Plaid.checkoutStore.paymentMethods
|
|
2555
2485
|
.filter((paymentMethod) => this.isAllowedPaymentMethod(paymentMethod.type))
|
|
2556
|
-
.map((paymentMethod) => (index.h("div", { class: "radio-list-item p-3", part: parts.radioListItem, onClick: this.onPaymentMethodOptionClick(paymentMethod) }, index.h("form-control-radio", { name: "paymentMethodType", value: paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id, checked:
|
|
2486
|
+
.map((paymentMethod) => (index.h("div", { class: "radio-list-item p-3", part: parts.radioListItem, onClick: this.onPaymentMethodOptionClick(paymentMethod) }, index.h("form-control-radio", { name: "paymentMethodType", value: paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id, checked: Plaid.checkoutStore.paymentToken === (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id), label: `${paymentMethodOptionUtils.CardBrandLabels[paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.brand] || ''} *${paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.acct_last_four}` })))) : null)));
|
|
2557
2487
|
}
|
|
2558
2488
|
};
|
|
2559
2489
|
|
|
@@ -2566,25 +2496,25 @@ const sezzleLogo = (index.h("img", { class: "sezzle-smart-button-logo-img", src:
|
|
|
2566
2496
|
const SezzlePaymentMethod = class {
|
|
2567
2497
|
constructor(hostRef) {
|
|
2568
2498
|
index.registerInstance(this, hostRef);
|
|
2569
|
-
this.paymentMethodOptionSelected = index.createEvent(this, "paymentMethodOptionSelected");
|
|
2499
|
+
this.paymentMethodOptionSelected = index.createEvent(this, "paymentMethodOptionSelected", 7);
|
|
2570
2500
|
this.paymentMethodOptionId = index$1.PAYMENT_METHODS.SEZZLE;
|
|
2571
2501
|
this.initializeSezzleCheckout = () => {
|
|
2572
2502
|
let resolveSezzlePromise;
|
|
2573
2503
|
this.sezzlePromise = new Promise((resolve) => { resolveSezzlePromise = resolve; });
|
|
2574
|
-
const amount = Number(
|
|
2504
|
+
const amount = Number(Plaid.checkoutStore.paymentAmount);
|
|
2575
2505
|
const Checkout = window.Checkout;
|
|
2576
2506
|
const checkout = new Checkout({
|
|
2577
2507
|
mode: 'popup',
|
|
2578
|
-
publicKey:
|
|
2579
|
-
apiMode:
|
|
2580
|
-
apiVersion:
|
|
2508
|
+
publicKey: Plaid.checkoutStore.bnplProviderClientId,
|
|
2509
|
+
apiMode: Plaid.checkoutStore.bnplProviderMode,
|
|
2510
|
+
apiVersion: Plaid.checkoutStore.bnplProviderApiVersion,
|
|
2581
2511
|
});
|
|
2582
2512
|
checkout.sezzleButtonElement = this.sezzleButtonRef;
|
|
2583
2513
|
checkout.init({
|
|
2584
2514
|
onClick: function (event) {
|
|
2585
2515
|
event.preventDefault();
|
|
2586
2516
|
checkout.startCheckout({
|
|
2587
|
-
checkout_url:
|
|
2517
|
+
checkout_url: Plaid.checkoutStore.bnplProviderCheckoutUrl,
|
|
2588
2518
|
});
|
|
2589
2519
|
},
|
|
2590
2520
|
onComplete: (event) => resolveSezzlePromise({ bnpl: event.data }),
|
|
@@ -2611,12 +2541,12 @@ const SezzlePaymentMethod = class {
|
|
|
2611
2541
|
return this.sezzlePromise;
|
|
2612
2542
|
}
|
|
2613
2543
|
async handleSelectionClick() {
|
|
2614
|
-
|
|
2544
|
+
Plaid.checkoutStore.selectedPaymentMethod = { type: index$1.PAYMENT_METHODS.SEZZLE };
|
|
2615
2545
|
this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId);
|
|
2616
2546
|
}
|
|
2617
2547
|
render() {
|
|
2618
2548
|
var _a, _b;
|
|
2619
|
-
if (!
|
|
2549
|
+
if (!Plaid.checkoutStore.bnplEnabled) {
|
|
2620
2550
|
console.warn('justifi-sezzle-payment-method: BNPL is not enabled for this account.');
|
|
2621
2551
|
return null;
|
|
2622
2552
|
}
|