@justifi/webcomponents 6.7.3 → 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/{Business-uoeKyW_a.js → Business-CB8EVrhD.js} +1 -0
- package/dist/cjs/{GooglePay-CbKCUEfb.js → Plaid-DxPvVu0H.js} +53 -0
- package/dist/cjs/{bank-account-document-form-inputs_8.cjs.entry.js → bank-account-document-form-inputs_9.cjs.entry.js} +330 -8
- package/dist/cjs/{business-additional-questions-schema-BtOuMq_U.js → business-additional-questions-schema-Cnh6AXQU.js} +3 -3
- package/dist/cjs/{business-form-options-D1r-wJpo.js → business-form-options-B3CbEmdc.js} +1 -1
- package/dist/cjs/{business-identity-schema-CMvq6f8m.js → business-identity-schema-0jg2Thn9.js} +2 -2
- package/dist/cjs/{business.service-DR4Ce5XV.js → business.service-zGEitIbP.js} +2 -2
- package/dist/cjs/{check-pkg-version-Bs_9oZb4.js → check-pkg-version-DKH70uPq.js} +11 -10
- package/dist/cjs/{checkout.service-CQqd4X4y.js → checkout.service-DT13pWxH.js} +2 -2
- package/dist/cjs/checkouts-list-core.cjs.entry.js +2 -2
- package/dist/cjs/{country-config-DGi9t3Ma.js → country-config-ETD-7Wb7.js} +1 -1
- package/dist/cjs/custom-popper_2.cjs.entry.js +48 -17
- package/dist/cjs/{dispute.service-aok1_zRv.js → dispute.service-GDUl1Wjs.js} +2 -2
- package/dist/cjs/form-alert_5.cjs.entry.js +3 -3
- package/dist/cjs/form-control-number-masked_3.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number_3.cjs.entry.js +6 -6
- package/dist/cjs/{get-business-CtsxSYA6.js → get-business-CP0ALW9n.js} +1 -1
- package/dist/cjs/{get-payment-details-tCICJHBb.js → get-payment-details-IA5Toi7Z.js} +3 -3
- package/dist/cjs/{get-subaccounts-BcsCQAVN.js → get-subaccounts-DNMZjAyT.js} +3 -3
- package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
- package/dist/cjs/{input-handlers-DaRKFvGI.js → input-handlers-gV1LyFy3.js} +1 -1
- package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +15 -15
- package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +31 -18
- package/dist/cjs/justifi-apple-pay_8.cjs.entry.js +220 -290
- package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +4 -4
- package/dist/cjs/justifi-business-details.cjs.entry.js +6 -6
- package/dist/cjs/justifi-business-form.cjs.entry.js +10 -10
- package/dist/cjs/justifi-checkout.cjs.entry.js +12 -12
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +9 -9
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +5 -5
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +5 -5
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -4
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +10 -10
- package/dist/cjs/justifi-payment-details.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payments-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payout-details.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +10 -10
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +7 -7
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +10 -10
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +7 -7
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +7 -7
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-DcGEg97O.js → package-B4vs5j7c.js} +1 -1
- package/dist/cjs/payment-details-core.cjs.entry.js +3 -3
- package/dist/cjs/{payment.service-B4ACB8Q3.js → payment.service-QODfB293.js} +2 -2
- package/dist/cjs/payments-list-core.cjs.entry.js +2 -2
- package/dist/cjs/{payout.service-qVbNnemO.js → payout.service-k7GBuYzk.js} +2 -2
- package/dist/cjs/payouts-list-core.cjs.entry.js +2 -2
- package/dist/cjs/plaid-icon-DTpONc_Q.js +46 -0
- package/dist/cjs/{schema-validations-DYYDrVol.js → schema-validations-BakyfJpE.js} +3 -3
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +3 -3
- package/dist/cjs/{terminal-orders-table-C2jG4WQa.js → terminal-orders-table-C6j6Mx_r.js} +4 -4
- package/dist/cjs/{terminal.service-D1ohedi-.js → terminal.service-A90K3XNq.js} +2 -2
- package/dist/cjs/terminals-list-core.cjs.entry.js +2 -2
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/Analytics.js +8 -7
- package/dist/collection/api/Business.js +1 -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-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +20 -5
- package/dist/collection/components/business-forms/payment-provisioning/plaid-verification/plaid-verification.js +433 -0
- package/dist/collection/components/modular-checkout/sub-components/plaid-payment-method.js +4 -51
- package/dist/collection/ui-components/custom-popper/custom-popper.js +52 -18
- package/dist/docs.json +145 -4
- package/dist/esm/{Business-CHJTjG_5.js → Business-GgW1g7FQ.js} +1 -0
- package/dist/esm/{GooglePay-5EiPffHy.js → Plaid-CBrksnBN.js} +52 -1
- package/dist/esm/{bank-account-document-form-inputs_8.entry.js → bank-account-document-form-inputs_9.entry.js} +329 -8
- package/dist/esm/{business-additional-questions-schema-DQb10ehS.js → business-additional-questions-schema-CQ8CuEfQ.js} +3 -3
- package/dist/esm/{business-form-options-Bm89rMmk.js → business-form-options-DamBLV7N.js} +1 -1
- package/dist/esm/{business-identity-schema-CaMnpPqx.js → business-identity-schema-BTyJz7M9.js} +2 -2
- package/dist/esm/{business.service-C7smiL6_.js → business.service-BWm7Kqs4.js} +2 -2
- package/dist/esm/{check-pkg-version-DIZ2yD72.js → check-pkg-version-CioeuqLV.js} +11 -10
- package/dist/esm/{checkout.service-CYq6KXZv.js → checkout.service-D4Mljqjr.js} +2 -2
- package/dist/esm/checkouts-list-core.entry.js +2 -2
- package/dist/esm/{country-config-CQxaTFuP.js → country-config-D-9YmU94.js} +1 -1
- package/dist/esm/custom-popper_2.entry.js +48 -17
- package/dist/esm/{dispute.service-D7Dv8LTn.js → dispute.service-ZpqfPDC0.js} +2 -2
- package/dist/esm/form-alert_5.entry.js +3 -3
- package/dist/esm/form-control-number-masked_3.entry.js +2 -2
- package/dist/esm/form-control-number_3.entry.js +6 -6
- package/dist/esm/{get-business-BAmwId14.js → get-business-BMB2IxN_.js} +1 -1
- package/dist/esm/{get-payment-details-CPJZp31y.js → get-payment-details-B71Qi6mF.js} +2 -2
- package/dist/esm/{get-subaccounts-CqMFocN0.js → get-subaccounts-DXJdRbWg.js} +2 -2
- package/dist/esm/hidden-input_2.entry.js +1 -1
- package/dist/esm/{input-handlers-AgwQ-yKX.js → input-handlers-CzWCJ849.js} +1 -1
- package/dist/esm/internal-tokenize-payment-method_7.entry.js +4 -4
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +25 -12
- package/dist/esm/justifi-apple-pay_8.entry.js +6 -76
- package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +4 -4
- package/dist/esm/justifi-business-details.entry.js +6 -6
- package/dist/esm/justifi-business-form.entry.js +10 -10
- package/dist/esm/justifi-checkout.entry.js +4 -4
- package/dist/esm/justifi-checkouts-list-filters.entry.js +2 -2
- package/dist/esm/justifi-checkouts-list.entry.js +6 -6
- package/dist/esm/justifi-dispute-management.entry.js +5 -5
- package/dist/esm/justifi-dispute-notification_3.entry.js +5 -5
- package/dist/esm/justifi-gross-payment-chart.entry.js +4 -4
- package/dist/esm/justifi-order-terminals.entry.js +7 -7
- package/dist/esm/justifi-payment-details.entry.js +6 -6
- package/dist/esm/justifi-payment-provisioning-core.entry.js +1 -1
- package/dist/esm/justifi-payment-provisioning.entry.js +5 -5
- package/dist/esm/justifi-payment-transactions-list.entry.js +5 -5
- package/dist/esm/justifi-payments-list.entry.js +5 -5
- package/dist/esm/justifi-payout-details.entry.js +5 -5
- package/dist/esm/justifi-payout-transactions-list.entry.js +5 -5
- package/dist/esm/justifi-payouts-list.entry.js +6 -6
- package/dist/esm/justifi-refund-payment.entry.js +6 -6
- package/dist/esm/justifi-season-interruption-insurance.entry.js +4 -4
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +2 -2
- package/dist/esm/justifi-terminal-orders-list.entry.js +5 -5
- package/dist/esm/justifi-terminals-list-filters.entry.js +2 -2
- package/dist/esm/justifi-terminals-list.entry.js +6 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-ZkBwsSuI.js → package-CekpA_KC.js} +1 -1
- package/dist/esm/payment-details-core.entry.js +2 -2
- package/dist/esm/{payment.service-BGf8F56_.js → payment.service-C2lFq1yV.js} +2 -2
- package/dist/esm/payments-list-core.entry.js +2 -2
- package/dist/esm/{payout.service-Co3xg-7j.js → payout.service-ChupMPKT.js} +2 -2
- package/dist/esm/payouts-list-core.entry.js +2 -2
- package/dist/esm/plaid-icon-wJLd-2NX.js +43 -0
- package/dist/esm/{schema-validations-jBrJ0mYI.js → schema-validations-CfHWzMvr.js} +3 -3
- package/dist/esm/terminal-orders-list-core.entry.js +3 -3
- package/dist/esm/{terminal-orders-table-uNYLd8i5.js → terminal-orders-table-B4_RAxxx.js} +2 -2
- package/dist/esm/{terminal.service-Cxs-IO0Z.js → terminal.service-DqibXFHt.js} +2 -2
- package/dist/esm/terminals-list-core.entry.js +2 -2
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Analytics.js +9 -8
- package/dist/module/Business.js +1 -0
- package/dist/module/{Refund.js → Plaid.js} +51 -1
- package/dist/module/bank-account-document-inputs.js +1 -1
- package/dist/module/business-additional-questions-form-step.js +1 -1
- package/dist/module/business-bank-account-form-step.js +46 -25
- package/dist/module/business-core-info-form-step.js +1 -1
- package/dist/module/business-owners-form-step.js +1 -1
- package/dist/module/business-representative-form-step.js +1 -1
- package/dist/module/business-terms-conditions-form-step.js +1 -1
- package/dist/module/business.service.js +1 -1
- package/dist/module/checkout.service.js +1 -1
- package/dist/module/checkout.store.js +1 -1
- package/dist/module/checkouts-list-core2.js +1 -1
- package/dist/module/custom-popper2.js +50 -17
- package/dist/module/dispute-management-core.js +1 -1
- package/dist/module/dispute-response-actions.js +1 -1
- package/dist/module/dispute-response.js +1 -1
- 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 +1 -1
- package/dist/module/internal-tokenize-payment-method2.js +1 -1
- package/dist/module/justifi-business-details.js +1 -1
- package/dist/module/justifi-business-form.js +1 -1
- package/dist/module/justifi-checkouts-list-filters.js +1 -1
- package/dist/module/justifi-checkouts-list.js +1 -1
- package/dist/module/justifi-dispute-management.js +1 -1
- package/dist/module/justifi-gross-payment-chart.js +1 -1
- package/dist/module/justifi-order-terminals.js +1 -1
- package/dist/module/justifi-payment-details.js +1 -1
- package/dist/module/justifi-payment-provisioning.js +69 -63
- package/dist/module/justifi-payment-transactions-list.js +1 -1
- package/dist/module/justifi-payments-list.js +1 -1
- package/dist/module/justifi-payout-details.js +1 -1
- package/dist/module/justifi-payout-transactions-list.js +1 -1
- package/dist/module/justifi-payouts-list.js +1 -1
- package/dist/module/justifi-refund-payment.js +1 -1
- package/dist/module/justifi-season-interruption-insurance.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +1 -1
- package/dist/module/justifi-terminal-orders-list.js +1 -1
- package/dist/module/justifi-terminals-list-filters.js +1 -1
- package/dist/module/justifi-terminals-list.js +1 -1
- package/dist/module/legal-address-form-step.js +1 -1
- package/dist/module/modular-checkout.js +2 -2
- package/dist/module/package.js +1 -1
- package/dist/module/payment-details-core2.js +1 -1
- package/dist/module/payment-provisioning-actions.js +1 -1
- package/dist/module/payment-provisioning-core.js +67 -61
- package/dist/module/payment-provisioning-form-steps.js +62 -56
- package/dist/module/payment.service.js +1 -1
- package/dist/module/payments-list-core2.js +1 -1
- package/dist/module/payout.service.js +1 -1
- package/dist/module/payouts-list-core2.js +1 -1
- 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/terminal-orders-list-core2.js +1 -1
- package/dist/module/terminal.service.js +1 -1
- package/dist/module/terminals-list-core2.js +1 -1
- 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 +2 -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/payment-provisioning/bank-account/business-bank-account-form-step.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/plaid-verification/plaid-verification.d.ts +36 -0
- package/dist/types/components/modular-checkout/sub-components/plaid-payment-method.d.ts +1 -25
- package/dist/types/components.d.ts +40 -1
- package/dist/types/ui-components/custom-popper/custom-popper.d.ts +4 -0
- package/dist/webcomponents/{p-BXdZKjdB.js → p--cI8fPJx.js} +1 -1
- package/dist/webcomponents/{p-66e8b443.entry.js → p-02f360c5.entry.js} +1 -1
- package/dist/webcomponents/{p-d0d6d1cc.entry.js → p-073ca03f.entry.js} +1 -1
- package/dist/webcomponents/{p-e9daf75f.entry.js → p-0eb97b54.entry.js} +1 -1
- package/dist/webcomponents/p-0fcb7ebb.entry.js +1 -0
- package/dist/webcomponents/{p-b2371f43.entry.js → p-110bec2e.entry.js} +1 -1
- package/dist/webcomponents/{p-931ea171.entry.js → p-1ec3d1e7.entry.js} +1 -1
- package/dist/webcomponents/{p-86db9040.entry.js → p-20cab5fe.entry.js} +1 -1
- package/dist/webcomponents/{p-a9b493c1.entry.js → p-238ba771.entry.js} +1 -1
- package/dist/webcomponents/{p-e11c7df0.entry.js → p-2454c140.entry.js} +1 -1
- package/dist/webcomponents/{p-5af4bb01.entry.js → p-25666afe.entry.js} +1 -1
- package/dist/webcomponents/{p-f5f46f2d.entry.js → p-26430bfe.entry.js} +1 -1
- package/dist/webcomponents/p-33ab9174.entry.js +1 -0
- package/dist/webcomponents/{p-f13c4a88.entry.js → p-3a254390.entry.js} +1 -1
- package/dist/webcomponents/p-4a802f82.entry.js +1 -0
- package/dist/webcomponents/p-4b928d2e.entry.js +1 -0
- package/dist/webcomponents/{p-252bd81d.entry.js → p-4d3e4e56.entry.js} +1 -1
- package/dist/webcomponents/{p-7184c2f8.entry.js → p-5ae3401d.entry.js} +1 -1
- package/dist/webcomponents/{p-4165281d.entry.js → p-7068c2ad.entry.js} +1 -1
- package/dist/webcomponents/{p-4786d1ea.entry.js → p-785e8ef7.entry.js} +1 -1
- package/dist/webcomponents/{p-50f16cca.entry.js → p-81bbd944.entry.js} +1 -1
- package/dist/webcomponents/{p-3d2495df.entry.js → p-8ac883e4.entry.js} +1 -1
- package/dist/webcomponents/{p-6ed0be7f.entry.js → p-8e6f2dc8.entry.js} +1 -1
- package/dist/webcomponents/{p-53be30e9.entry.js → p-8ed4f485.entry.js} +1 -1
- package/dist/webcomponents/p-922ddfb4.entry.js +1 -0
- package/dist/webcomponents/p-9643fe36.entry.js +1 -0
- package/dist/webcomponents/{p-Ce785aMx.js → p-B1AMrMly.js} +1 -1
- package/dist/webcomponents/{p-DDjKoqh6.js → p-BRPbLfCN.js} +1 -1
- package/dist/webcomponents/{p-BAu40WfT.js → p-BZbvHgMz.js} +1 -1
- package/dist/webcomponents/{p-APob2Eta.js → p-Bj9n56jK.js} +1 -1
- package/dist/webcomponents/p-By-Mu1IX.js +1 -0
- package/dist/webcomponents/p-C0dMwnDO.js +1 -0
- package/dist/webcomponents/p-C3RQHKL5.js +1 -0
- package/dist/webcomponents/{p-DBOsYeYk.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-D-07jgNC.js +1 -0
- package/dist/webcomponents/{p-C-LV3hNf.js → p-DCwnBXF7.js} +1 -1
- package/dist/webcomponents/p-DKemQxaE.js +1 -0
- package/dist/webcomponents/{p-CHJTjG_5.js → p-GgW1g7FQ.js} +1 -1
- package/dist/webcomponents/{p-NO0z-S2W.js → p-MVBgKFOv.js} +1 -1
- package/dist/webcomponents/{p-mhEMV8M-.js → p-Y-EhaLdV.js} +1 -1
- package/dist/webcomponents/{p-e5651bb1.entry.js → p-aa02e3d7.entry.js} +1 -1
- package/dist/webcomponents/p-adbe280f.entry.js +1 -0
- package/dist/webcomponents/{p-ea0cd47d.entry.js → p-af11ac6a.entry.js} +1 -1
- package/dist/webcomponents/{p-73b9cc29.entry.js → p-bbffb17f.entry.js} +1 -1
- package/dist/webcomponents/{p-782ccafb.entry.js → p-c0829d61.entry.js} +1 -1
- package/dist/webcomponents/{p-001ce9f8.entry.js → p-c2db5db6.entry.js} +1 -1
- package/dist/webcomponents/{p-79d1d6b3.entry.js → p-d4535236.entry.js} +1 -1
- package/dist/webcomponents/{p-e1a8785d.entry.js → p-d5827cb2.entry.js} +1 -1
- package/dist/webcomponents/{p-1eefdd41.entry.js → p-ed9db5b2.entry.js} +1 -1
- package/dist/webcomponents/{p-c11512e7.entry.js → p-f1e012f6.entry.js} +1 -1
- package/dist/webcomponents/{p-1dbf3473.entry.js → p-f1f0f100.entry.js} +1 -1
- package/dist/webcomponents/{p-7c4fa66f.entry.js → p-f5b7c322.entry.js} +1 -1
- package/dist/webcomponents/{p-bc56446a.entry.js → p-f9475bb0.entry.js} +1 -1
- package/dist/webcomponents/{p-4d7a2565.entry.js → p-ff1cff1d.entry.js} +1 -1
- package/dist/webcomponents/{p-D81X4BBI.js → p-g0kDRH6Z.js} +1 -1
- package/dist/webcomponents/{p-Bz97Ujvk.js → p-m_Ly-YPk.js} +1 -1
- package/dist/webcomponents/p-wSi5d4-j.js +1 -0
- package/dist/webcomponents/{p-BhvkOTYA.js → p-ygekUw3Q.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +2 -1
- package/dist/webcomponents/p-0fb3fd77.entry.js +0 -1
- package/dist/webcomponents/p-198d2941.entry.js +0 -1
- package/dist/webcomponents/p-52203b01.entry.js +0 -1
- package/dist/webcomponents/p-639e5ce9.entry.js +0 -1
- package/dist/webcomponents/p-7ec771bc.entry.js +0 -1
- package/dist/webcomponents/p-D0PhRMmy.js +0 -1
- package/dist/webcomponents/p-DLLFAj4z.js +0 -1
- package/dist/webcomponents/p-DpkIbI5R.js +0 -1
- package/dist/webcomponents/p-MBH9QO2m.js +0 -1
- package/dist/webcomponents/p-ZkBwsSuI.js +0 -1
- package/dist/webcomponents/p-_LSWCi-4.js +0 -1
- package/dist/webcomponents/p-c5afb831.entry.js +0 -1
- package/dist/webcomponents/p-d55c348b.entry.js +0 -1
- package/dist/webcomponents/p-y-FoILTI.js +0 -1
|
@@ -498,6 +498,7 @@ class Business {
|
|
|
498
498
|
this.website_url = business.website_url;
|
|
499
499
|
this.date_of_incorporation = business.date_of_incorporation;
|
|
500
500
|
this.country_of_establishment = normalizeCountry(business.country_of_establishment);
|
|
501
|
+
this.bank_account_verification = business.bank_account_verification;
|
|
501
502
|
}
|
|
502
503
|
get payload() {
|
|
503
504
|
return {
|
|
@@ -4,6 +4,7 @@ var utils = require('./utils-D4WPxuzW.js');
|
|
|
4
4
|
var Dispute = require('./Dispute-CruQTF6_.js');
|
|
5
5
|
var index = require('./index-W-zoNiyM.js');
|
|
6
6
|
var index$1 = require('./index-CajjbB9t.js');
|
|
7
|
+
var ComponentError = require('./ComponentError-D4OLnOkg.js');
|
|
7
8
|
|
|
8
9
|
class Completion {
|
|
9
10
|
constructor(data) {
|
|
@@ -993,6 +994,56 @@ class GooglePayHelpers {
|
|
|
993
994
|
}
|
|
994
995
|
}
|
|
995
996
|
|
|
997
|
+
// Plaid-specific error codes
|
|
998
|
+
exports.PlaidErrorCodes = void 0;
|
|
999
|
+
(function (PlaidErrorCodes) {
|
|
1000
|
+
PlaidErrorCodes["PLAID_SDK_LOAD_FAILED"] = "plaid-sdk-load-failed";
|
|
1001
|
+
PlaidErrorCodes["PLAID_LINK_INIT_FAILED"] = "plaid-link-init-failed";
|
|
1002
|
+
PlaidErrorCodes["PLAID_LINK_TOKEN_FAILED"] = "plaid-link-token-failed";
|
|
1003
|
+
PlaidErrorCodes["PLAID_AUTHENTICATION_FAILED"] = "plaid-authentication-failed";
|
|
1004
|
+
PlaidErrorCodes["PLAID_BANK_NOT_SUPPORTED"] = "plaid-bank-not-supported";
|
|
1005
|
+
PlaidErrorCodes["PLAID_TOKEN_EXPIRED"] = "plaid-token-expired";
|
|
1006
|
+
PlaidErrorCodes["PLAID_NETWORK_ERROR"] = "plaid-network-error";
|
|
1007
|
+
PlaidErrorCodes["PLAID_USER_CANCELLED"] = "plaid-user-cancelled";
|
|
1008
|
+
PlaidErrorCodes["PLAID_TIMEOUT"] = "plaid-timeout";
|
|
1009
|
+
PlaidErrorCodes["PLAID_INVALID_CREDENTIALS"] = "plaid-invalid-credentials";
|
|
1010
|
+
PlaidErrorCodes["PLAID_ACCOUNT_LOCKED"] = "plaid-account-locked";
|
|
1011
|
+
PlaidErrorCodes["PLAID_MAINTENANCE"] = "plaid-maintenance";
|
|
1012
|
+
PlaidErrorCodes["PLAID_RATE_LIMITED"] = "plaid-rate-limited";
|
|
1013
|
+
})(exports.PlaidErrorCodes || (exports.PlaidErrorCodes = {}));
|
|
1014
|
+
// Plaid error message mapping
|
|
1015
|
+
const PLAID_ERROR_MESSAGES = {
|
|
1016
|
+
[exports.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED]: 'Unable to load Plaid. Please refresh the page and try again.',
|
|
1017
|
+
[exports.PlaidErrorCodes.PLAID_LINK_INIT_FAILED]: 'Unable to initialize bank connection. Please try again.',
|
|
1018
|
+
[exports.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED]: 'Unable to connect to bank service. Please try again.',
|
|
1019
|
+
[exports.PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED]: 'Bank authentication failed. Please try again.',
|
|
1020
|
+
[exports.PlaidErrorCodes.PLAID_BANK_NOT_SUPPORTED]: 'Your bank is not currently supported. Please try a different payment method.',
|
|
1021
|
+
[exports.PlaidErrorCodes.PLAID_TOKEN_EXPIRED]: 'Your bank session has expired. Please reconnect your account.',
|
|
1022
|
+
[exports.PlaidErrorCodes.PLAID_NETWORK_ERROR]: 'Network connection issue. Please check your internet connection and try again.',
|
|
1023
|
+
[exports.PlaidErrorCodes.PLAID_USER_CANCELLED]: 'Bank connection was cancelled. Click to try again.',
|
|
1024
|
+
[exports.PlaidErrorCodes.PLAID_TIMEOUT]: 'Bank connection timed out. Please try again.',
|
|
1025
|
+
[exports.PlaidErrorCodes.PLAID_INVALID_CREDENTIALS]: 'Invalid bank credentials. Please check your username and password.',
|
|
1026
|
+
[exports.PlaidErrorCodes.PLAID_ACCOUNT_LOCKED]: 'Your bank account is temporarily locked. Please contact your bank.',
|
|
1027
|
+
[exports.PlaidErrorCodes.PLAID_MAINTENANCE]: 'Bank service is temporarily unavailable. Please try again later.',
|
|
1028
|
+
[exports.PlaidErrorCodes.PLAID_RATE_LIMITED]: 'Too many connection attempts. Please wait a moment and try again.',
|
|
1029
|
+
};
|
|
1030
|
+
// Plaid error severity mapping
|
|
1031
|
+
const PLAID_ERROR_SEVERITY = {
|
|
1032
|
+
[exports.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED]: ComponentError.ComponentErrorSeverity.ERROR,
|
|
1033
|
+
[exports.PlaidErrorCodes.PLAID_LINK_INIT_FAILED]: ComponentError.ComponentErrorSeverity.ERROR,
|
|
1034
|
+
[exports.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED]: ComponentError.ComponentErrorSeverity.ERROR,
|
|
1035
|
+
[exports.PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED]: ComponentError.ComponentErrorSeverity.ERROR,
|
|
1036
|
+
[exports.PlaidErrorCodes.PLAID_BANK_NOT_SUPPORTED]: ComponentError.ComponentErrorSeverity.WARNING,
|
|
1037
|
+
[exports.PlaidErrorCodes.PLAID_TOKEN_EXPIRED]: ComponentError.ComponentErrorSeverity.WARNING,
|
|
1038
|
+
[exports.PlaidErrorCodes.PLAID_NETWORK_ERROR]: ComponentError.ComponentErrorSeverity.WARNING,
|
|
1039
|
+
[exports.PlaidErrorCodes.PLAID_USER_CANCELLED]: ComponentError.ComponentErrorSeverity.INFO,
|
|
1040
|
+
[exports.PlaidErrorCodes.PLAID_TIMEOUT]: ComponentError.ComponentErrorSeverity.WARNING,
|
|
1041
|
+
[exports.PlaidErrorCodes.PLAID_INVALID_CREDENTIALS]: ComponentError.ComponentErrorSeverity.ERROR,
|
|
1042
|
+
[exports.PlaidErrorCodes.PLAID_ACCOUNT_LOCKED]: ComponentError.ComponentErrorSeverity.ERROR,
|
|
1043
|
+
[exports.PlaidErrorCodes.PLAID_MAINTENANCE]: ComponentError.ComponentErrorSeverity.WARNING,
|
|
1044
|
+
[exports.PlaidErrorCodes.PLAID_RATE_LIMITED]: ComponentError.ComponentErrorSeverity.WARNING,
|
|
1045
|
+
};
|
|
1046
|
+
|
|
996
1047
|
exports.ApplePayConfig = ApplePayConfig;
|
|
997
1048
|
exports.ApplePayHelpers = ApplePayHelpers;
|
|
998
1049
|
exports.ApplePayPaymentRequest = ApplePayPaymentRequest;
|
|
@@ -1002,6 +1053,8 @@ exports.EntityDocumentStorage = EntityDocumentStorage;
|
|
|
1002
1053
|
exports.GooglePayConfig = GooglePayConfig;
|
|
1003
1054
|
exports.GooglePayHelpers = GooglePayHelpers;
|
|
1004
1055
|
exports.GooglePayPaymentDataRequest = GooglePayPaymentDataRequest;
|
|
1056
|
+
exports.PLAID_ERROR_MESSAGES = PLAID_ERROR_MESSAGES;
|
|
1057
|
+
exports.PLAID_ERROR_SEVERITY = PLAID_ERROR_SEVERITY;
|
|
1005
1058
|
exports.Payment = Payment;
|
|
1006
1059
|
exports.PaymentBalanceTransaction = PaymentBalanceTransaction;
|
|
1007
1060
|
exports.Payout = Payout;
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
var index = require('./index-p7cvUYAE.js');
|
|
4
4
|
require('./config-state-BIgGhhe9.js');
|
|
5
5
|
require('./dinero-BwNN_k7x.js');
|
|
6
|
-
require('./ComponentError-D4OLnOkg.js');
|
|
7
|
-
var
|
|
6
|
+
var ComponentError = require('./ComponentError-D4OLnOkg.js');
|
|
7
|
+
var Plaid = require('./Plaid-DxPvVu0H.js');
|
|
8
8
|
require('./Pagination-Dediz133.js');
|
|
9
|
-
require('./Business-
|
|
9
|
+
require('./Business-CB8EVrhD.js');
|
|
10
10
|
require('./Dispute-CruQTF6_.js');
|
|
11
|
-
var businessFormOptions = require('./business-form-options-
|
|
11
|
+
var businessFormOptions = require('./business-form-options-B3CbEmdc.js');
|
|
12
12
|
require('./event-types-DNOUef41.js');
|
|
13
13
|
var utils = require('./utils-DAyWinG2.js');
|
|
14
14
|
var parts = require('./parts-BsBVknuf.js');
|
|
@@ -16,11 +16,14 @@ var utils$1 = require('./utils-D4WPxuzW.js');
|
|
|
16
16
|
var skeleton = require('./skeleton-BGGMhPJj.js');
|
|
17
17
|
require('./event-types-YOY5TKUN.js');
|
|
18
18
|
var formControlErrorText = require('./form-control-error-text-BC5aRpfl.js');
|
|
19
|
-
var inputHandlers = require('./input-handlers-
|
|
19
|
+
var inputHandlers = require('./input-handlers-gV1LyFy3.js');
|
|
20
20
|
var formInputMasks = require('./form-input-masks-BnNFJ3IJ.js');
|
|
21
|
-
var countryConfig = require('./country-config-
|
|
21
|
+
var countryConfig = require('./country-config-ETD-7Wb7.js');
|
|
22
22
|
var paymentProvisioningActions = require('./payment-provisioning-actions-CZVlnRA0.js');
|
|
23
|
-
var business_service = require('./business.service-
|
|
23
|
+
var business_service = require('./business.service-zGEitIbP.js');
|
|
24
|
+
var button = require('./button-C2p1BMP-.js');
|
|
25
|
+
var styledHost = require('./styled-host-DAi5SuFa.js');
|
|
26
|
+
var plaidIcon = require('./plaid-icon-DTpONc_Q.js');
|
|
24
27
|
require('./index-W-zoNiyM.js');
|
|
25
28
|
require('./index-CajjbB9t.js');
|
|
26
29
|
require('./utils-DvUQQLmR.js');
|
|
@@ -31,7 +34,7 @@ const BankAccountDocumentFormInputs = class {
|
|
|
31
34
|
index.registerInstance(this, hostRef);
|
|
32
35
|
}
|
|
33
36
|
render() {
|
|
34
|
-
return (index.h("div", { key: '7f9ea576aad16f3c2ea45c987a38878ea65f2df2', class: "row gy-3" }, index.h("div", { key: '316fe3f20df7c7dce2b8903e6073e0fe7920e5e8', class: "col-12" }, index.h("form-control-file", { key: '320d6b7f3de2cfeeb30eb1e08ca4122123854ffd', name: "voided_check", label: "Voided Check", documentType:
|
|
37
|
+
return (index.h("div", { key: '7f9ea576aad16f3c2ea45c987a38878ea65f2df2', class: "row gy-3" }, index.h("div", { key: '316fe3f20df7c7dce2b8903e6073e0fe7920e5e8', class: "col-12" }, index.h("form-control-file", { key: '320d6b7f3de2cfeeb30eb1e08ca4122123854ffd', name: "voided_check", label: "Voided Check", documentType: Plaid.EntityDocumentType.voidedCheck, inputHandler: this.inputHandler, onFileSelected: this.storeFiles, errorText: this.errors["voided_check"], multiple: true })), index.h("div", { key: 'f33a936c61c14c701e40d375e4dfc4c554b8293c', class: "col-12" }, index.h("form-control-file", { key: '1e160d8211a71175d6a45b10590fb2c8774f61e1', name: "bank_statement", label: "Bank Statement", documentType: Plaid.EntityDocumentType.bankStatement, inputHandler: this.inputHandler, onFileSelected: this.storeFiles, errorText: this.errors["bank_statement"], multiple: true }))));
|
|
35
38
|
}
|
|
36
39
|
};
|
|
37
40
|
|
|
@@ -200,6 +203,324 @@ const BusinessOwnerForm = class {
|
|
|
200
203
|
}
|
|
201
204
|
};
|
|
202
205
|
|
|
206
|
+
const PlaidVerification = class {
|
|
207
|
+
constructor(hostRef) {
|
|
208
|
+
index.registerInstance(this, hostRef);
|
|
209
|
+
this.plaidVerificationSuccess = index.createEvent(this, "plaidVerificationSuccess", 7);
|
|
210
|
+
this.plaidVerificationError = index.createEvent(this, "plaidVerificationError", 7);
|
|
211
|
+
this.linkToken = null;
|
|
212
|
+
this.linkTokenId = null;
|
|
213
|
+
this.plaidLink = null;
|
|
214
|
+
this.isAuthenticating = false;
|
|
215
|
+
this.isSuccess = false;
|
|
216
|
+
this.error = null;
|
|
217
|
+
this.isLoading = false;
|
|
218
|
+
this.plaidService = new plaidIcon.PlaidService();
|
|
219
|
+
this.abortController = null;
|
|
220
|
+
this.timeoutId = null;
|
|
221
|
+
this.initializePlaidLink = async () => {
|
|
222
|
+
try {
|
|
223
|
+
// Check if Plaid is available globally
|
|
224
|
+
if (typeof window.Plaid === 'undefined') {
|
|
225
|
+
this.handleError({
|
|
226
|
+
code: Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED,
|
|
227
|
+
message: Plaid.PLAID_ERROR_MESSAGES[Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
|
|
228
|
+
severity: Plaid.PLAID_ERROR_SEVERITY[Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
|
|
229
|
+
retryable: true,
|
|
230
|
+
userAction: 'Refresh the page and try again',
|
|
231
|
+
});
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
// Get link token from backend
|
|
235
|
+
await this.getLinkToken();
|
|
236
|
+
if (!this.linkToken) {
|
|
237
|
+
this.handleError({
|
|
238
|
+
code: Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED,
|
|
239
|
+
message: Plaid.PLAID_ERROR_MESSAGES[Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED],
|
|
240
|
+
severity: Plaid.PLAID_ERROR_SEVERITY[Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED],
|
|
241
|
+
retryable: true,
|
|
242
|
+
userAction: 'Click to try again',
|
|
243
|
+
});
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
// Initialize Plaid Link
|
|
247
|
+
const Plaid$1 = window.Plaid;
|
|
248
|
+
this.plaidLink = Plaid$1.create({
|
|
249
|
+
token: this.linkToken,
|
|
250
|
+
onSuccess: this.handlePlaidSuccess,
|
|
251
|
+
onExit: this.handlePlaidExit,
|
|
252
|
+
onEvent: this.handlePlaidEvent,
|
|
253
|
+
onLoad: this.handlePlaidLoad,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
catch (error) {
|
|
257
|
+
this.handleError({
|
|
258
|
+
code: Plaid.PlaidErrorCodes.PLAID_LINK_INIT_FAILED,
|
|
259
|
+
message: Plaid.PLAID_ERROR_MESSAGES[Plaid.PlaidErrorCodes.PLAID_LINK_INIT_FAILED],
|
|
260
|
+
severity: Plaid.PLAID_ERROR_SEVERITY[Plaid.PlaidErrorCodes.PLAID_LINK_INIT_FAILED],
|
|
261
|
+
originalError: error,
|
|
262
|
+
retryable: true,
|
|
263
|
+
userAction: 'Click to try again',
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
this.getLinkToken = async () => {
|
|
268
|
+
var _a, _b, _c, _d;
|
|
269
|
+
try {
|
|
270
|
+
if (!this.authToken || !this.accountId) {
|
|
271
|
+
this.handleError({
|
|
272
|
+
code: Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED,
|
|
273
|
+
message: 'Missing authentication. Please provide authToken and accountId.',
|
|
274
|
+
severity: ComponentError.ComponentErrorSeverity.ERROR,
|
|
275
|
+
retryable: false,
|
|
276
|
+
userAction: 'Provide required props',
|
|
277
|
+
});
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
// Create abort controller for timeout handling
|
|
281
|
+
this.abortController = new AbortController();
|
|
282
|
+
// Set timeout for the request
|
|
283
|
+
this.timeoutId = setTimeout(() => {
|
|
284
|
+
var _a;
|
|
285
|
+
(_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
286
|
+
}, 30000); // 30 second timeout
|
|
287
|
+
const response = await this.plaidService.getLinkTokenForVerification(this.authToken, this.businessId, this.abortController.signal);
|
|
288
|
+
// Clear timeout
|
|
289
|
+
if (this.timeoutId) {
|
|
290
|
+
clearTimeout(this.timeoutId);
|
|
291
|
+
this.timeoutId = null;
|
|
292
|
+
}
|
|
293
|
+
if (response.error) {
|
|
294
|
+
const errorMessage = typeof response.error === 'string'
|
|
295
|
+
? response.error
|
|
296
|
+
: response.error.message || 'Failed to get link token';
|
|
297
|
+
throw new Error(errorMessage);
|
|
298
|
+
}
|
|
299
|
+
this.linkToken = response.data.link_token;
|
|
300
|
+
this.linkTokenId = response.data.id;
|
|
301
|
+
}
|
|
302
|
+
catch (error) {
|
|
303
|
+
// Clear timeout
|
|
304
|
+
if (this.timeoutId) {
|
|
305
|
+
clearTimeout(this.timeoutId);
|
|
306
|
+
this.timeoutId = null;
|
|
307
|
+
}
|
|
308
|
+
let errorCode = Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED;
|
|
309
|
+
let message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
310
|
+
let retryable = true;
|
|
311
|
+
// Handle specific error types
|
|
312
|
+
if (error.name === 'AbortError') {
|
|
313
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_TIMEOUT;
|
|
314
|
+
message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
315
|
+
retryable = true;
|
|
316
|
+
}
|
|
317
|
+
else if (((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('network')) || ((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('fetch'))) {
|
|
318
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_NETWORK_ERROR;
|
|
319
|
+
message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
320
|
+
retryable = true;
|
|
321
|
+
}
|
|
322
|
+
else if (((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('401')) || ((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unauthorized'))) {
|
|
323
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
|
|
324
|
+
message = 'Authentication failed. Please check your credentials.';
|
|
325
|
+
retryable = false;
|
|
326
|
+
}
|
|
327
|
+
this.handleError({
|
|
328
|
+
code: errorCode,
|
|
329
|
+
message: message,
|
|
330
|
+
severity: Plaid.PLAID_ERROR_SEVERITY[errorCode],
|
|
331
|
+
originalError: error,
|
|
332
|
+
retryable,
|
|
333
|
+
userAction: retryable ? 'Click to try again' : 'Check your credentials',
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
this.openPlaidLink = () => {
|
|
338
|
+
if (this.plaidLink && this.linkToken) {
|
|
339
|
+
this.isAuthenticating = true;
|
|
340
|
+
this.clearError();
|
|
341
|
+
this.plaidLink.open();
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
this.handlePlaidSuccess = async (publicToken, _metadata) => {
|
|
345
|
+
var _a;
|
|
346
|
+
this.isAuthenticating = false;
|
|
347
|
+
this.isLoading = true;
|
|
348
|
+
this.clearError();
|
|
349
|
+
try {
|
|
350
|
+
// Send publicToken to backend
|
|
351
|
+
const response = await this.plaidService.postPlaidVerifiedBankAccountData(this.authToken, this.businessId, { public_token: publicToken, link_token_id: this.linkTokenId }, (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.signal);
|
|
352
|
+
if (response.error) {
|
|
353
|
+
const errorMessage = typeof response.error === 'string'
|
|
354
|
+
? response.error
|
|
355
|
+
: response.error.message || 'Failed to verify bank account';
|
|
356
|
+
throw new Error(errorMessage);
|
|
357
|
+
}
|
|
358
|
+
// Success - display success message
|
|
359
|
+
this.isSuccess = true;
|
|
360
|
+
this.isLoading = false;
|
|
361
|
+
// Emit success event
|
|
362
|
+
this.plaidVerificationSuccess.emit({ publicToken, bankAccount: response.data });
|
|
363
|
+
}
|
|
364
|
+
catch (error) {
|
|
365
|
+
this.isLoading = false;
|
|
366
|
+
this.handleError({
|
|
367
|
+
code: Plaid.PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED,
|
|
368
|
+
message: (error === null || error === void 0 ? void 0 : error.message) || 'Failed to verify bank account',
|
|
369
|
+
severity: Plaid.PLAID_ERROR_SEVERITY[Plaid.PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED],
|
|
370
|
+
originalError: error,
|
|
371
|
+
retryable: true,
|
|
372
|
+
userAction: 'Click to try again',
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
this.handlePlaidExit = (err, _metadata) => {
|
|
377
|
+
this.isAuthenticating = false;
|
|
378
|
+
if (err) {
|
|
379
|
+
this.handlePlaidError(err);
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
this.handlePlaidEvent = (eventName, metadata) => {
|
|
383
|
+
// Handle specific events if needed
|
|
384
|
+
switch (eventName) {
|
|
385
|
+
case 'OPEN':
|
|
386
|
+
this.isAuthenticating = true;
|
|
387
|
+
break;
|
|
388
|
+
case 'CLOSE':
|
|
389
|
+
this.isAuthenticating = false;
|
|
390
|
+
break;
|
|
391
|
+
case 'ERROR':
|
|
392
|
+
this.handlePlaidError(metadata);
|
|
393
|
+
break;
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
this.handlePlaidLoad = () => {
|
|
397
|
+
// Plaid Link loaded successfully
|
|
398
|
+
};
|
|
399
|
+
this.handlePlaidError = (error) => {
|
|
400
|
+
let errorCode = Plaid.PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED;
|
|
401
|
+
let message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
402
|
+
let retryable = true;
|
|
403
|
+
let userAction = 'Click to try again';
|
|
404
|
+
// Map Plaid error codes to our error codes
|
|
405
|
+
if (error.error_code) {
|
|
406
|
+
switch (error.error_code) {
|
|
407
|
+
case 'INVALID_CREDENTIALS':
|
|
408
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
|
|
409
|
+
message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
410
|
+
retryable = true;
|
|
411
|
+
break;
|
|
412
|
+
case 'ITEM_LOGIN_REQUIRED':
|
|
413
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
|
|
414
|
+
message = 'Your bank requires re-authentication. Please try again.';
|
|
415
|
+
retryable = true;
|
|
416
|
+
break;
|
|
417
|
+
case 'ITEM_LOCKED':
|
|
418
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_ACCOUNT_LOCKED;
|
|
419
|
+
message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
420
|
+
retryable = false;
|
|
421
|
+
userAction = 'Contact your bank';
|
|
422
|
+
break;
|
|
423
|
+
case 'INSTITUTION_NOT_RESPONDING':
|
|
424
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_MAINTENANCE;
|
|
425
|
+
message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
426
|
+
retryable = true;
|
|
427
|
+
break;
|
|
428
|
+
case 'RATE_LIMIT_EXCEEDED':
|
|
429
|
+
errorCode = Plaid.PlaidErrorCodes.PLAID_RATE_LIMITED;
|
|
430
|
+
message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
|
|
431
|
+
retryable = true;
|
|
432
|
+
break;
|
|
433
|
+
default:
|
|
434
|
+
if (error.error_message) {
|
|
435
|
+
message = error.error_message;
|
|
436
|
+
}
|
|
437
|
+
break;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
this.handleError({
|
|
441
|
+
code: errorCode,
|
|
442
|
+
message,
|
|
443
|
+
severity: Plaid.PLAID_ERROR_SEVERITY[errorCode],
|
|
444
|
+
originalError: error,
|
|
445
|
+
retryable,
|
|
446
|
+
userAction,
|
|
447
|
+
});
|
|
448
|
+
this.isAuthenticating = false;
|
|
449
|
+
};
|
|
450
|
+
this.handleError = (plaidError) => {
|
|
451
|
+
this.error = plaidError;
|
|
452
|
+
this.isLoading = false;
|
|
453
|
+
// Emit error event for parent components
|
|
454
|
+
this.plaidVerificationError.emit(plaidError);
|
|
455
|
+
console.error('Plaid verification error:', plaidError);
|
|
456
|
+
};
|
|
457
|
+
this.clearError = () => {
|
|
458
|
+
if (this.error) {
|
|
459
|
+
this.error = null;
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
componentDidRender() {
|
|
464
|
+
if (!this.scriptRef)
|
|
465
|
+
return;
|
|
466
|
+
this.scriptRef.onload = () => {
|
|
467
|
+
this.initializePlaidLink();
|
|
468
|
+
};
|
|
469
|
+
this.scriptRef.onerror = () => {
|
|
470
|
+
this.handleError({
|
|
471
|
+
code: Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED,
|
|
472
|
+
message: Plaid.PLAID_ERROR_MESSAGES[Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
|
|
473
|
+
severity: Plaid.PLAID_ERROR_SEVERITY[Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
|
|
474
|
+
retryable: true,
|
|
475
|
+
userAction: 'Refresh the page and try again',
|
|
476
|
+
});
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
disconnectedCallback() {
|
|
480
|
+
// Clean up timeouts and abort controllers
|
|
481
|
+
if (this.timeoutId) {
|
|
482
|
+
clearTimeout(this.timeoutId);
|
|
483
|
+
}
|
|
484
|
+
if (this.abortController) {
|
|
485
|
+
this.abortController.abort();
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
render() {
|
|
489
|
+
const renderErrorState = () => {
|
|
490
|
+
if (!this.error)
|
|
491
|
+
return null;
|
|
492
|
+
const errorClass = this.error.severity === ComponentError.ComponentErrorSeverity.ERROR
|
|
493
|
+
? 'text-danger'
|
|
494
|
+
: this.error.severity === ComponentError.ComponentErrorSeverity.WARNING
|
|
495
|
+
? 'text-warning'
|
|
496
|
+
: 'text-info';
|
|
497
|
+
return (index.h("div", { class: `${errorClass} mt-2` }, index.h("small", null, this.error.message), index.h("br", null), this.error.userAction && (index.h("small", { class: "text-muted" }, this.error.userAction))));
|
|
498
|
+
};
|
|
499
|
+
const renderStatusState = () => {
|
|
500
|
+
if (this.error)
|
|
501
|
+
return null;
|
|
502
|
+
if (this.isLoading) {
|
|
503
|
+
return (index.h("div", { class: "text-info mt-2" }, index.h("small", null, "Verifying bank account...")));
|
|
504
|
+
}
|
|
505
|
+
if (this.isSuccess) {
|
|
506
|
+
return (index.h("div", { class: "text-success mt-2" }, index.h("small", null, "\u2713 Bank account verified successfully")));
|
|
507
|
+
}
|
|
508
|
+
if (this.isAuthenticating) {
|
|
509
|
+
return (index.h("div", { class: "text-info mt-2" }, index.h("small", null, "Connecting to your bank...")));
|
|
510
|
+
}
|
|
511
|
+
return null;
|
|
512
|
+
};
|
|
513
|
+
const plaidLogo = (index.h("img", { class: "plaid-logo-img", src: plaidIcon.plaidIconSvg, alt: "Plaid", title: "Plaid", style: {
|
|
514
|
+
display: 'inline',
|
|
515
|
+
width: '20px',
|
|
516
|
+
height: '20px',
|
|
517
|
+
marginLeft: '5px',
|
|
518
|
+
marginTop: '-2px',
|
|
519
|
+
} }));
|
|
520
|
+
return (index.h(styledHost.StyledHost, null, index.h("script", { src: "https://cdn.plaid.com/link/v2/stable/link-initialize.js", async: true, ref: (el) => (this.scriptRef = el) }), index.h("div", null, index.h("div", { class: "mb-3" }, index.h(button.Button, { variant: "secondary", type: "button", onClick: (event) => { event.preventDefault(); this.openPlaidLink(); }, disabled: this.isLoading, part: parts.buttonSecondary }, "Link Bank Account with ", plaidLogo)), renderErrorState(), renderStatusState())));
|
|
521
|
+
}
|
|
522
|
+
};
|
|
523
|
+
|
|
203
524
|
exports.bank_account_document_form_inputs = BankAccountDocumentFormInputs;
|
|
204
525
|
exports.bank_account_form_inputs = BankAccountFormInputs;
|
|
205
526
|
exports.bank_account_form_inputs_canada = BankAccountFormInputsCanada;
|
|
@@ -208,3 +529,4 @@ exports.business_documents_on_file = BusinessDocumentsOnFile;
|
|
|
208
529
|
exports.form_control_file = FileInput;
|
|
209
530
|
exports.justifi_business_representative_form_inputs = RepresentativeFormInputs;
|
|
210
531
|
exports.justifi_owner_form = BusinessOwnerForm;
|
|
532
|
+
exports.plaid_verification = PlaidVerification;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index_esm = require('./index.esm-ByC0D4sJ.js');
|
|
4
|
-
var schemaValidations = require('./schema-validations-
|
|
5
|
-
var Business = require('./Business-
|
|
6
|
-
var countryConfig = require('./country-config-
|
|
4
|
+
var schemaValidations = require('./schema-validations-BakyfJpE.js');
|
|
5
|
+
var Business = require('./Business-CB8EVrhD.js');
|
|
6
|
+
var countryConfig = require('./country-config-ETD-7Wb7.js');
|
|
7
7
|
|
|
8
8
|
// Base schema (no country-specific rules for classification/tax id)
|
|
9
9
|
const baseBusinessCoreInfoSchema = (allowOptionalFields) => {
|
package/dist/cjs/{business-identity-schema-CMvq6f8m.js → business-identity-schema-0jg2Thn9.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index_esm = require('./index.esm-ByC0D4sJ.js');
|
|
4
|
-
var schemaValidations = require('./schema-validations-
|
|
5
|
-
var Business = require('./Business-
|
|
4
|
+
var schemaValidations = require('./schema-validations-BakyfJpE.js');
|
|
5
|
+
var Business = require('./Business-CB8EVrhD.js');
|
|
6
6
|
|
|
7
7
|
// Internal USA schemas
|
|
8
8
|
const schemaUSA$1 = () => index_esm.create$3({
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var Api = require('./Api-CVbEWBG6.js');
|
|
4
4
|
require('./ComponentError-D4OLnOkg.js');
|
|
5
|
-
require('./
|
|
5
|
+
require('./Plaid-DxPvVu0H.js');
|
|
6
6
|
require('./Pagination-Dediz133.js');
|
|
7
|
-
require('./Business-
|
|
7
|
+
require('./Business-CB8EVrhD.js');
|
|
8
8
|
require('./Dispute-CruQTF6_.js');
|
|
9
9
|
|
|
10
10
|
const api = Api.Api();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _package = require('./package-
|
|
3
|
+
var _package = require('./package-B4vs5j7c.js');
|
|
4
4
|
var Api = require('./Api-CVbEWBG6.js');
|
|
5
5
|
require('./ComponentError-D4OLnOkg.js');
|
|
6
|
-
require('./
|
|
6
|
+
require('./Plaid-DxPvVu0H.js');
|
|
7
7
|
require('./Pagination-Dediz133.js');
|
|
8
|
-
require('./Business-
|
|
8
|
+
require('./Business-CB8EVrhD.js');
|
|
9
9
|
require('./Dispute-CruQTF6_.js');
|
|
10
10
|
|
|
11
11
|
const api = Api.Api();
|
|
@@ -24,6 +24,7 @@ class AnalyticsService {
|
|
|
24
24
|
*/
|
|
25
25
|
class JustifiAnalytics {
|
|
26
26
|
constructor(component) {
|
|
27
|
+
this.eventListeners = new Map();
|
|
27
28
|
this.handleCustomEvent = async (data) => {
|
|
28
29
|
// Track the event
|
|
29
30
|
await this.service.record(data);
|
|
@@ -63,10 +64,12 @@ class JustifiAnalytics {
|
|
|
63
64
|
this.eventEmitters.forEach((eventName) => {
|
|
64
65
|
// if this.componentInstance.addEventListener is a function add the event listener
|
|
65
66
|
if (typeof this.componentInstance.addEventListener === 'function') {
|
|
66
|
-
|
|
67
|
+
const boundHandler = (event) => this.handleCustomEvent({
|
|
67
68
|
event_type: eventName,
|
|
68
69
|
data: Object.assign(Object.assign({}, this.basicData), { error: event.detail }),
|
|
69
|
-
})
|
|
70
|
+
});
|
|
71
|
+
this.eventListeners.set(eventName, boundHandler);
|
|
72
|
+
this.componentInstance.addEventListener(eventName, boundHandler);
|
|
70
73
|
}
|
|
71
74
|
});
|
|
72
75
|
}
|
|
@@ -81,12 +84,10 @@ class JustifiAnalytics {
|
|
|
81
84
|
}
|
|
82
85
|
cleanup() {
|
|
83
86
|
// Remove event listeners
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
this.eventEmitters.forEach((event) => {
|
|
88
|
-
this.componentInstance.removeEventListener(event, this.handleCustomEvent);
|
|
87
|
+
this.eventListeners.forEach((handler, eventName) => {
|
|
88
|
+
this.componentInstance.removeEventListener(eventName, handler);
|
|
89
89
|
});
|
|
90
|
+
this.eventListeners.clear();
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var Api = require('./Api-CVbEWBG6.js');
|
|
4
4
|
require('./ComponentError-D4OLnOkg.js');
|
|
5
|
-
require('./
|
|
5
|
+
require('./Plaid-DxPvVu0H.js');
|
|
6
6
|
require('./Pagination-Dediz133.js');
|
|
7
|
-
require('./Business-
|
|
7
|
+
require('./Business-CB8EVrhD.js');
|
|
8
8
|
require('./Dispute-CruQTF6_.js');
|
|
9
9
|
|
|
10
10
|
const api = Api.Api();
|
|
@@ -4,9 +4,9 @@ var index = require('./index-p7cvUYAE.js');
|
|
|
4
4
|
require('./config-state-BIgGhhe9.js');
|
|
5
5
|
require('./dinero-BwNN_k7x.js');
|
|
6
6
|
require('./ComponentError-D4OLnOkg.js');
|
|
7
|
-
require('./
|
|
7
|
+
require('./Plaid-DxPvVu0H.js');
|
|
8
8
|
var Pagination = require('./Pagination-Dediz133.js');
|
|
9
|
-
require('./Business-
|
|
9
|
+
require('./Business-CB8EVrhD.js');
|
|
10
10
|
require('./Dispute-CruQTF6_.js');
|
|
11
11
|
var table = require('./table-eTN_pRIP.js');
|
|
12
12
|
var eventTypes = require('./event-types-YOY5TKUN.js');
|