@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
|
|
2
2
|
import './config-state.js';
|
|
3
3
|
import './dinero.js';
|
|
4
|
-
import { a as ComponentErrorSeverity, C as ComponentErrorCodes } from './
|
|
4
|
+
import { a as ComponentErrorSeverity, C as ComponentErrorCodes } from './Plaid.js';
|
|
5
5
|
import { p as pagingDefaults } from './Pagination.js';
|
|
6
6
|
import './Business.js';
|
|
7
7
|
import './ApplePay.js';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const plaidIconSvg = 'data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4IiB2aWV3Qm94PSIwIDAgMjggMjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY2xhc3M9ImNzcy0xcmRhajhtIj48ZyBmaWxsPSIjMTExIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yNS43NjI5IDI2LjI2MjhMMjggMTcuNTMwOUwyNC45NjkxIDE0LjUwMDFMMjcuOTk5OSAxMS40NjkxTDI1Ljc2MjggMi43MzcwNkwxNy4wMzA5IDAuNUwxNC4wMDAxIDMuNTMxTDEwLjk2OSAwLjUwMDE0TDIuMjM3MDYgMi43MzczNEwwIDExLjQ2OTFMMy4wMzEyOCAxNC40OTk5TDAuMDAwMTQgMTcuNTMxTDIuMjM3MiAyNi4yNjI5TDEwLjk2OTEgMjguNUwxNC4wMDAxIDI1LjQ2OUwxNy4wMzEgMjguNDk5OUwyNS43NjI5IDI2LjI2MjhaTTE1LjczMjEgMjMuNzM3MUwxOC42MTg2IDIwLjg1MDVMMjIuMjkxMiAyNC41MjMzTDE3LjY5NTYgMjUuNzAwN0wxNS43MzIxIDIzLjczNzFaTTExLjExMzYgOS44ODE1NEwxNC4wMDAzIDYuOTk1MDJMMTYuODg2OCA5Ljg4MTRMMTQuMDAwMSAxMi43Njc5TDExLjExMzYgOS44ODE1NFpNMTIuMjY4MiAxNC41TDkuMzgxNTQgMTcuMzg2NUw2LjQ5NTAyIDE0LjVMOS4zODE1NCAxMS42MTM1TDEyLjI2ODIgMTQuNVpNMTguNjE4NyAxMS42MTMzTDIxLjUwNTMgMTQuNUwxOC42MTg2IDE3LjM4NjVMMTUuNzMyMSAxNC41TDE4LjYxODcgMTEuNjEzM1pNMTYuODg2NyAxOS4xMTg2TDE0LjAwMDEgMjIuMDA1MUwxMS4xMTM1IDE5LjExODVMMTQuMDAwMSAxNi4yMzE5TDE2Ljg4NjcgMTkuMTE4NlpNMTAuMzA0NCAyNS43MDA3TDUuNzA4NjQgMjQuNTIzM0w5LjM4MTU0IDIwLjg1MDRMMTIuMjY4MiAyMy43MzcxTDEwLjMwNDQgMjUuNzAwN1pNNC43NjMwOCAxNi4yMzE5TDcuNjQ5NiAxOS4xMTg1TDMuOTc2NyAyMi43OTE0TDIuNzk5MyAxOC4xOTU3TDQuNzYzMDggMTYuMjMxOVpNMy45NzY3IDYuMjA4MzZMNy42NDk3NCA5Ljg4MTRMNC43NjMwOCAxMi43NjgxTDIuNzk5MyAxMC44MDQxTDMuOTc2NyA2LjIwODM2Wk0xMi4yNjgzIDUuMjYyOTRMOS4zODE2OCA4LjE0OTZMNS43MDg5MiA0LjQ3NjdMMTAuMzA0NyAzLjI5OTNMMTIuMjY4MyA1LjI2Mjk0Wk0xNy42OTU5IDMuMjk5M0wyMi4yOTE1IDQuNDc2N0wxOC42MTg2IDguMTQ5NDZMMTUuNzMyMSA1LjI2Mjk0TDE3LjY5NTkgMy4yOTkzWk0yMy4yMzcyIDEyLjc2ODFMMjAuMzUwNSA5Ljg4MTRMMjQuMDIzMyA2LjIwODc4TDI1LjIwMDcgMTAuODA0NkwyMy4yMzcyIDEyLjc2ODFaTTI0LjAyMzMgMjIuNzkxNEwyMC4zNTA1IDE5LjExODZMMjMuMjM3MiAxNi4yMzIxTDI1LjIwMDcgMTguMTk1N0wyNC4wMjMzIDIyLjc5MTRaIj48L3BhdGg+PC9nPjwvc3ZnPgo=';
|
|
2
|
+
|
|
3
|
+
export { plaidIconSvg as p };
|
|
@@ -1,64 +1,14 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as checkoutStore,
|
|
2
|
+
import { c as checkoutStore, o as onChange } from './checkout.store.js';
|
|
3
3
|
import { S as StyledHost } from './styled-host.js';
|
|
4
4
|
import './details.js';
|
|
5
5
|
import './event-types.js';
|
|
6
6
|
import './justifi-radio-list-item2.js';
|
|
7
|
+
import { p as plaidIconSvg } from './plaid-icon.js';
|
|
7
8
|
import { P as PlaidService } from './plaid.service.js';
|
|
8
|
-
import { a as ComponentErrorSeverity } from './
|
|
9
|
+
import { P as PLAID_ERROR_SEVERITY, b as PLAID_ERROR_MESSAGES, c as PlaidErrorCodes, a as ComponentErrorSeverity } from './Plaid.js';
|
|
9
10
|
import { P as PAYMENT_METHODS } from './ModularCheckout.js';
|
|
10
11
|
|
|
11
|
-
const plaidIconSvg = 'data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4IiB2aWV3Qm94PSIwIDAgMjggMjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY2xhc3M9ImNzcy0xcmRhajhtIj48ZyBmaWxsPSIjMTExIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yNS43NjI5IDI2LjI2MjhMMjggMTcuNTMwOUwyNC45NjkxIDE0LjUwMDFMMjcuOTk5OSAxMS40NjkxTDI1Ljc2MjggMi43MzcwNkwxNy4wMzA5IDAuNUwxNC4wMDAxIDMuNTMxTDEwLjk2OSAwLjUwMDE0TDIuMjM3MDYgMi43MzczNEwwIDExLjQ2OTFMMy4wMzEyOCAxNC40OTk5TDAuMDAwMTQgMTcuNTMxTDIuMjM3MiAyNi4yNjI5TDEwLjk2OTEgMjguNUwxNC4wMDAxIDI1LjQ2OUwxNy4wMzEgMjguNDk5OUwyNS43NjI5IDI2LjI2MjhaTTE1LjczMjEgMjMuNzM3MUwxOC42MTg2IDIwLjg1MDVMMjIuMjkxMiAyNC41MjMzTDE3LjY5NTYgMjUuNzAwN0wxNS43MzIxIDIzLjczNzFaTTExLjExMzYgOS44ODE1NEwxNC4wMDAzIDYuOTk1MDJMMTYuODg2OCA5Ljg4MTRMMTQuMDAwMSAxMi43Njc5TDExLjExMzYgOS44ODE1NFpNMTIuMjY4MiAxNC41TDkuMzgxNTQgMTcuMzg2NUw2LjQ5NTAyIDE0LjVMOS4zODE1NCAxMS42MTM1TDEyLjI2ODIgMTQuNVpNMTguNjE4NyAxMS42MTMzTDIxLjUwNTMgMTQuNUwxOC42MTg2IDE3LjM4NjVMMTUuNzMyMSAxNC41TDE4LjYxODcgMTEuNjEzM1pNMTYuODg2NyAxOS4xMTg2TDE0LjAwMDEgMjIuMDA1MUwxMS4xMTM1IDE5LjExODVMMTQuMDAwMSAxNi4yMzE5TDE2Ljg4NjcgMTkuMTE4NlpNMTAuMzA0NCAyNS43MDA3TDUuNzA4NjQgMjQuNTIzM0w5LjM4MTU0IDIwLjg1MDRMMTIuMjY4MiAyMy43MzcxTDEwLjMwNDQgMjUuNzAwN1pNNC43NjMwOCAxNi4yMzE5TDcuNjQ5NiAxOS4xMTg1TDMuOTc2NyAyMi43OTE0TDIuNzk5MyAxOC4xOTU3TDQuNzYzMDggMTYuMjMxOVpNMy45NzY3IDYuMjA4MzZMNy42NDk3NCA5Ljg4MTRMNC43NjMwOCAxMi43NjgxTDIuNzk5MyAxMC44MDQxTDMuOTc2NyA2LjIwODM2Wk0xMi4yNjgzIDUuMjYyOTRMOS4zODE2OCA4LjE0OTZMNS43MDg5MiA0LjQ3NjdMMTAuMzA0NyAzLjI5OTNMMTIuMjY4MyA1LjI2Mjk0Wk0xNy42OTU5IDMuMjk5M0wyMi4yOTE1IDQuNDc2N0wxOC42MTg2IDguMTQ5NDZMMTUuNzMyMSA1LjI2Mjk0TDE3LjY5NTkgMy4yOTkzWk0yMy4yMzcyIDEyLjc2ODFMMjAuMzUwNSA5Ljg4MTRMMjQuMDIzMyA2LjIwODc4TDI1LjIwMDcgMTAuODA0NkwyMy4yMzcyIDEyLjc2ODFaTTI0LjAyMzMgMjIuNzkxNEwyMC4zNTA1IDE5LjExODZMMjMuMjM3MiAxNi4yMzIxTDI1LjIwMDcgMTguMTk1N0wyNC4wMjMzIDIyLjc5MTRaIj48L3BhdGg+PC9nPjwvc3ZnPgo=';
|
|
12
|
-
|
|
13
|
-
// Plaid-specific error codes
|
|
14
|
-
var PlaidErrorCodes;
|
|
15
|
-
(function (PlaidErrorCodes) {
|
|
16
|
-
PlaidErrorCodes["PLAID_SDK_LOAD_FAILED"] = "plaid-sdk-load-failed";
|
|
17
|
-
PlaidErrorCodes["PLAID_LINK_INIT_FAILED"] = "plaid-link-init-failed";
|
|
18
|
-
PlaidErrorCodes["PLAID_LINK_TOKEN_FAILED"] = "plaid-link-token-failed";
|
|
19
|
-
PlaidErrorCodes["PLAID_AUTHENTICATION_FAILED"] = "plaid-authentication-failed";
|
|
20
|
-
PlaidErrorCodes["PLAID_BANK_NOT_SUPPORTED"] = "plaid-bank-not-supported";
|
|
21
|
-
PlaidErrorCodes["PLAID_TOKEN_EXPIRED"] = "plaid-token-expired";
|
|
22
|
-
PlaidErrorCodes["PLAID_NETWORK_ERROR"] = "plaid-network-error";
|
|
23
|
-
PlaidErrorCodes["PLAID_USER_CANCELLED"] = "plaid-user-cancelled";
|
|
24
|
-
PlaidErrorCodes["PLAID_TIMEOUT"] = "plaid-timeout";
|
|
25
|
-
PlaidErrorCodes["PLAID_INVALID_CREDENTIALS"] = "plaid-invalid-credentials";
|
|
26
|
-
PlaidErrorCodes["PLAID_ACCOUNT_LOCKED"] = "plaid-account-locked";
|
|
27
|
-
PlaidErrorCodes["PLAID_MAINTENANCE"] = "plaid-maintenance";
|
|
28
|
-
PlaidErrorCodes["PLAID_RATE_LIMITED"] = "plaid-rate-limited";
|
|
29
|
-
})(PlaidErrorCodes || (PlaidErrorCodes = {}));
|
|
30
|
-
// Plaid error message mapping
|
|
31
|
-
const PLAID_ERROR_MESSAGES = {
|
|
32
|
-
[PlaidErrorCodes.PLAID_SDK_LOAD_FAILED]: 'Unable to load Plaid. Please refresh the page and try again.',
|
|
33
|
-
[PlaidErrorCodes.PLAID_LINK_INIT_FAILED]: 'Unable to initialize bank connection. Please try again.',
|
|
34
|
-
[PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED]: 'Unable to connect to bank service. Please try again.',
|
|
35
|
-
[PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED]: 'Bank authentication failed. Please try again.',
|
|
36
|
-
[PlaidErrorCodes.PLAID_BANK_NOT_SUPPORTED]: 'Your bank is not currently supported. Please try a different payment method.',
|
|
37
|
-
[PlaidErrorCodes.PLAID_TOKEN_EXPIRED]: 'Your bank session has expired. Please reconnect your account.',
|
|
38
|
-
[PlaidErrorCodes.PLAID_NETWORK_ERROR]: 'Network connection issue. Please check your internet connection and try again.',
|
|
39
|
-
[PlaidErrorCodes.PLAID_USER_CANCELLED]: 'Bank connection was cancelled. Click to try again.',
|
|
40
|
-
[PlaidErrorCodes.PLAID_TIMEOUT]: 'Bank connection timed out. Please try again.',
|
|
41
|
-
[PlaidErrorCodes.PLAID_INVALID_CREDENTIALS]: 'Invalid bank credentials. Please check your username and password.',
|
|
42
|
-
[PlaidErrorCodes.PLAID_ACCOUNT_LOCKED]: 'Your bank account is temporarily locked. Please contact your bank.',
|
|
43
|
-
[PlaidErrorCodes.PLAID_MAINTENANCE]: 'Bank service is temporarily unavailable. Please try again later.',
|
|
44
|
-
[PlaidErrorCodes.PLAID_RATE_LIMITED]: 'Too many connection attempts. Please wait a moment and try again.',
|
|
45
|
-
};
|
|
46
|
-
// Plaid error severity mapping
|
|
47
|
-
const PLAID_ERROR_SEVERITY = {
|
|
48
|
-
[PlaidErrorCodes.PLAID_SDK_LOAD_FAILED]: ComponentErrorSeverity.ERROR,
|
|
49
|
-
[PlaidErrorCodes.PLAID_LINK_INIT_FAILED]: ComponentErrorSeverity.ERROR,
|
|
50
|
-
[PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED]: ComponentErrorSeverity.ERROR,
|
|
51
|
-
[PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED]: ComponentErrorSeverity.ERROR,
|
|
52
|
-
[PlaidErrorCodes.PLAID_BANK_NOT_SUPPORTED]: ComponentErrorSeverity.WARNING,
|
|
53
|
-
[PlaidErrorCodes.PLAID_TOKEN_EXPIRED]: ComponentErrorSeverity.WARNING,
|
|
54
|
-
[PlaidErrorCodes.PLAID_NETWORK_ERROR]: ComponentErrorSeverity.WARNING,
|
|
55
|
-
[PlaidErrorCodes.PLAID_USER_CANCELLED]: ComponentErrorSeverity.INFO,
|
|
56
|
-
[PlaidErrorCodes.PLAID_TIMEOUT]: ComponentErrorSeverity.WARNING,
|
|
57
|
-
[PlaidErrorCodes.PLAID_INVALID_CREDENTIALS]: ComponentErrorSeverity.ERROR,
|
|
58
|
-
[PlaidErrorCodes.PLAID_ACCOUNT_LOCKED]: ComponentErrorSeverity.ERROR,
|
|
59
|
-
[PlaidErrorCodes.PLAID_MAINTENANCE]: ComponentErrorSeverity.WARNING,
|
|
60
|
-
[PlaidErrorCodes.PLAID_RATE_LIMITED]: ComponentErrorSeverity.WARNING,
|
|
61
|
-
};
|
|
62
12
|
const PlaidPaymentMethod = /*@__PURE__*/ proxyCustomElement(class PlaidPaymentMethod extends HTMLElement {
|
|
63
13
|
constructor(registerHost) {
|
|
64
14
|
super();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface PlaidVerification extends Components.PlaidVerification, HTMLElement {}
|
|
4
|
+
export const PlaidVerification: {
|
|
5
|
+
prototype: PlaidVerification;
|
|
6
|
+
new (): PlaidVerification;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { B as Button } from './button.js';
|
|
3
|
+
import { S as StyledHost } from './styled-host.js';
|
|
4
|
+
import { Y as buttonSecondary } from './parts.js';
|
|
5
|
+
import './details.js';
|
|
6
|
+
import './event-types.js';
|
|
7
|
+
import './justifi-radio-list-item2.js';
|
|
8
|
+
import { P as PlaidService } from './plaid.service.js';
|
|
9
|
+
import { P as PLAID_ERROR_SEVERITY, b as PLAID_ERROR_MESSAGES, c as PlaidErrorCodes, a as ComponentErrorSeverity } from './Plaid.js';
|
|
10
|
+
import { p as plaidIconSvg } from './plaid-icon.js';
|
|
11
|
+
|
|
12
|
+
const PlaidVerification = /*@__PURE__*/ proxyCustomElement(class PlaidVerification extends HTMLElement {
|
|
13
|
+
constructor(registerHost) {
|
|
14
|
+
super();
|
|
15
|
+
if (registerHost !== false) {
|
|
16
|
+
this.__registerHost();
|
|
17
|
+
}
|
|
18
|
+
this.plaidVerificationSuccess = createEvent(this, "plaidVerificationSuccess", 7);
|
|
19
|
+
this.plaidVerificationError = createEvent(this, "plaidVerificationError", 7);
|
|
20
|
+
this.linkToken = null;
|
|
21
|
+
this.linkTokenId = null;
|
|
22
|
+
this.plaidLink = null;
|
|
23
|
+
this.isAuthenticating = false;
|
|
24
|
+
this.isSuccess = false;
|
|
25
|
+
this.error = null;
|
|
26
|
+
this.isLoading = false;
|
|
27
|
+
this.plaidService = new PlaidService();
|
|
28
|
+
this.abortController = null;
|
|
29
|
+
this.timeoutId = null;
|
|
30
|
+
this.initializePlaidLink = async () => {
|
|
31
|
+
try {
|
|
32
|
+
// Check if Plaid is available globally
|
|
33
|
+
if (typeof window.Plaid === 'undefined') {
|
|
34
|
+
this.handleError({
|
|
35
|
+
code: PlaidErrorCodes.PLAID_SDK_LOAD_FAILED,
|
|
36
|
+
message: PLAID_ERROR_MESSAGES[PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
|
|
37
|
+
severity: PLAID_ERROR_SEVERITY[PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
|
|
38
|
+
retryable: true,
|
|
39
|
+
userAction: 'Refresh the page and try again',
|
|
40
|
+
});
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
// Get link token from backend
|
|
44
|
+
await this.getLinkToken();
|
|
45
|
+
if (!this.linkToken) {
|
|
46
|
+
this.handleError({
|
|
47
|
+
code: PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED,
|
|
48
|
+
message: PLAID_ERROR_MESSAGES[PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED],
|
|
49
|
+
severity: PLAID_ERROR_SEVERITY[PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED],
|
|
50
|
+
retryable: true,
|
|
51
|
+
userAction: 'Click to try again',
|
|
52
|
+
});
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
// Initialize Plaid Link
|
|
56
|
+
const Plaid = window.Plaid;
|
|
57
|
+
this.plaidLink = Plaid.create({
|
|
58
|
+
token: this.linkToken,
|
|
59
|
+
onSuccess: this.handlePlaidSuccess,
|
|
60
|
+
onExit: this.handlePlaidExit,
|
|
61
|
+
onEvent: this.handlePlaidEvent,
|
|
62
|
+
onLoad: this.handlePlaidLoad,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
this.handleError({
|
|
67
|
+
code: PlaidErrorCodes.PLAID_LINK_INIT_FAILED,
|
|
68
|
+
message: PLAID_ERROR_MESSAGES[PlaidErrorCodes.PLAID_LINK_INIT_FAILED],
|
|
69
|
+
severity: PLAID_ERROR_SEVERITY[PlaidErrorCodes.PLAID_LINK_INIT_FAILED],
|
|
70
|
+
originalError: error,
|
|
71
|
+
retryable: true,
|
|
72
|
+
userAction: 'Click to try again',
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
this.getLinkToken = async () => {
|
|
77
|
+
var _a, _b, _c, _d;
|
|
78
|
+
try {
|
|
79
|
+
if (!this.authToken || !this.accountId) {
|
|
80
|
+
this.handleError({
|
|
81
|
+
code: PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED,
|
|
82
|
+
message: 'Missing authentication. Please provide authToken and accountId.',
|
|
83
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
84
|
+
retryable: false,
|
|
85
|
+
userAction: 'Provide required props',
|
|
86
|
+
});
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
// Create abort controller for timeout handling
|
|
90
|
+
this.abortController = new AbortController();
|
|
91
|
+
// Set timeout for the request
|
|
92
|
+
this.timeoutId = setTimeout(() => {
|
|
93
|
+
var _a;
|
|
94
|
+
(_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
95
|
+
}, 30000); // 30 second timeout
|
|
96
|
+
const response = await this.plaidService.getLinkTokenForVerification(this.authToken, this.businessId, this.abortController.signal);
|
|
97
|
+
// Clear timeout
|
|
98
|
+
if (this.timeoutId) {
|
|
99
|
+
clearTimeout(this.timeoutId);
|
|
100
|
+
this.timeoutId = null;
|
|
101
|
+
}
|
|
102
|
+
if (response.error) {
|
|
103
|
+
const errorMessage = typeof response.error === 'string'
|
|
104
|
+
? response.error
|
|
105
|
+
: response.error.message || 'Failed to get link token';
|
|
106
|
+
throw new Error(errorMessage);
|
|
107
|
+
}
|
|
108
|
+
this.linkToken = response.data.link_token;
|
|
109
|
+
this.linkTokenId = response.data.id;
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
// Clear timeout
|
|
113
|
+
if (this.timeoutId) {
|
|
114
|
+
clearTimeout(this.timeoutId);
|
|
115
|
+
this.timeoutId = null;
|
|
116
|
+
}
|
|
117
|
+
let errorCode = PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED;
|
|
118
|
+
let message = PLAID_ERROR_MESSAGES[errorCode];
|
|
119
|
+
let retryable = true;
|
|
120
|
+
// Handle specific error types
|
|
121
|
+
if (error.name === 'AbortError') {
|
|
122
|
+
errorCode = PlaidErrorCodes.PLAID_TIMEOUT;
|
|
123
|
+
message = PLAID_ERROR_MESSAGES[errorCode];
|
|
124
|
+
retryable = true;
|
|
125
|
+
}
|
|
126
|
+
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'))) {
|
|
127
|
+
errorCode = PlaidErrorCodes.PLAID_NETWORK_ERROR;
|
|
128
|
+
message = PLAID_ERROR_MESSAGES[errorCode];
|
|
129
|
+
retryable = true;
|
|
130
|
+
}
|
|
131
|
+
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'))) {
|
|
132
|
+
errorCode = PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
|
|
133
|
+
message = 'Authentication failed. Please check your credentials.';
|
|
134
|
+
retryable = false;
|
|
135
|
+
}
|
|
136
|
+
this.handleError({
|
|
137
|
+
code: errorCode,
|
|
138
|
+
message: message,
|
|
139
|
+
severity: PLAID_ERROR_SEVERITY[errorCode],
|
|
140
|
+
originalError: error,
|
|
141
|
+
retryable,
|
|
142
|
+
userAction: retryable ? 'Click to try again' : 'Check your credentials',
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
this.openPlaidLink = () => {
|
|
147
|
+
if (this.plaidLink && this.linkToken) {
|
|
148
|
+
this.isAuthenticating = true;
|
|
149
|
+
this.clearError();
|
|
150
|
+
this.plaidLink.open();
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
this.handlePlaidSuccess = async (publicToken, _metadata) => {
|
|
154
|
+
var _a;
|
|
155
|
+
this.isAuthenticating = false;
|
|
156
|
+
this.isLoading = true;
|
|
157
|
+
this.clearError();
|
|
158
|
+
try {
|
|
159
|
+
// Send publicToken to backend
|
|
160
|
+
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);
|
|
161
|
+
if (response.error) {
|
|
162
|
+
const errorMessage = typeof response.error === 'string'
|
|
163
|
+
? response.error
|
|
164
|
+
: response.error.message || 'Failed to verify bank account';
|
|
165
|
+
throw new Error(errorMessage);
|
|
166
|
+
}
|
|
167
|
+
// Success - display success message
|
|
168
|
+
this.isSuccess = true;
|
|
169
|
+
this.isLoading = false;
|
|
170
|
+
// Emit success event
|
|
171
|
+
this.plaidVerificationSuccess.emit({ publicToken, bankAccount: response.data });
|
|
172
|
+
}
|
|
173
|
+
catch (error) {
|
|
174
|
+
this.isLoading = false;
|
|
175
|
+
this.handleError({
|
|
176
|
+
code: PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED,
|
|
177
|
+
message: (error === null || error === void 0 ? void 0 : error.message) || 'Failed to verify bank account',
|
|
178
|
+
severity: PLAID_ERROR_SEVERITY[PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED],
|
|
179
|
+
originalError: error,
|
|
180
|
+
retryable: true,
|
|
181
|
+
userAction: 'Click to try again',
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
this.handlePlaidExit = (err, _metadata) => {
|
|
186
|
+
this.isAuthenticating = false;
|
|
187
|
+
if (err) {
|
|
188
|
+
this.handlePlaidError(err);
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
this.handlePlaidEvent = (eventName, metadata) => {
|
|
192
|
+
// Handle specific events if needed
|
|
193
|
+
switch (eventName) {
|
|
194
|
+
case 'OPEN':
|
|
195
|
+
this.isAuthenticating = true;
|
|
196
|
+
break;
|
|
197
|
+
case 'CLOSE':
|
|
198
|
+
this.isAuthenticating = false;
|
|
199
|
+
break;
|
|
200
|
+
case 'ERROR':
|
|
201
|
+
this.handlePlaidError(metadata);
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
this.handlePlaidLoad = () => {
|
|
206
|
+
// Plaid Link loaded successfully
|
|
207
|
+
};
|
|
208
|
+
this.handlePlaidError = (error) => {
|
|
209
|
+
let errorCode = PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED;
|
|
210
|
+
let message = PLAID_ERROR_MESSAGES[errorCode];
|
|
211
|
+
let retryable = true;
|
|
212
|
+
let userAction = 'Click to try again';
|
|
213
|
+
// Map Plaid error codes to our error codes
|
|
214
|
+
if (error.error_code) {
|
|
215
|
+
switch (error.error_code) {
|
|
216
|
+
case 'INVALID_CREDENTIALS':
|
|
217
|
+
errorCode = PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
|
|
218
|
+
message = PLAID_ERROR_MESSAGES[errorCode];
|
|
219
|
+
retryable = true;
|
|
220
|
+
break;
|
|
221
|
+
case 'ITEM_LOGIN_REQUIRED':
|
|
222
|
+
errorCode = PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
|
|
223
|
+
message = 'Your bank requires re-authentication. Please try again.';
|
|
224
|
+
retryable = true;
|
|
225
|
+
break;
|
|
226
|
+
case 'ITEM_LOCKED':
|
|
227
|
+
errorCode = PlaidErrorCodes.PLAID_ACCOUNT_LOCKED;
|
|
228
|
+
message = PLAID_ERROR_MESSAGES[errorCode];
|
|
229
|
+
retryable = false;
|
|
230
|
+
userAction = 'Contact your bank';
|
|
231
|
+
break;
|
|
232
|
+
case 'INSTITUTION_NOT_RESPONDING':
|
|
233
|
+
errorCode = PlaidErrorCodes.PLAID_MAINTENANCE;
|
|
234
|
+
message = PLAID_ERROR_MESSAGES[errorCode];
|
|
235
|
+
retryable = true;
|
|
236
|
+
break;
|
|
237
|
+
case 'RATE_LIMIT_EXCEEDED':
|
|
238
|
+
errorCode = PlaidErrorCodes.PLAID_RATE_LIMITED;
|
|
239
|
+
message = PLAID_ERROR_MESSAGES[errorCode];
|
|
240
|
+
retryable = true;
|
|
241
|
+
break;
|
|
242
|
+
default:
|
|
243
|
+
if (error.error_message) {
|
|
244
|
+
message = error.error_message;
|
|
245
|
+
}
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
this.handleError({
|
|
250
|
+
code: errorCode,
|
|
251
|
+
message,
|
|
252
|
+
severity: PLAID_ERROR_SEVERITY[errorCode],
|
|
253
|
+
originalError: error,
|
|
254
|
+
retryable,
|
|
255
|
+
userAction,
|
|
256
|
+
});
|
|
257
|
+
this.isAuthenticating = false;
|
|
258
|
+
};
|
|
259
|
+
this.handleError = (plaidError) => {
|
|
260
|
+
this.error = plaidError;
|
|
261
|
+
this.isLoading = false;
|
|
262
|
+
// Emit error event for parent components
|
|
263
|
+
this.plaidVerificationError.emit(plaidError);
|
|
264
|
+
console.error('Plaid verification error:', plaidError);
|
|
265
|
+
};
|
|
266
|
+
this.clearError = () => {
|
|
267
|
+
if (this.error) {
|
|
268
|
+
this.error = null;
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
componentDidRender() {
|
|
273
|
+
if (!this.scriptRef)
|
|
274
|
+
return;
|
|
275
|
+
this.scriptRef.onload = () => {
|
|
276
|
+
this.initializePlaidLink();
|
|
277
|
+
};
|
|
278
|
+
this.scriptRef.onerror = () => {
|
|
279
|
+
this.handleError({
|
|
280
|
+
code: PlaidErrorCodes.PLAID_SDK_LOAD_FAILED,
|
|
281
|
+
message: PLAID_ERROR_MESSAGES[PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
|
|
282
|
+
severity: PLAID_ERROR_SEVERITY[PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
|
|
283
|
+
retryable: true,
|
|
284
|
+
userAction: 'Refresh the page and try again',
|
|
285
|
+
});
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
disconnectedCallback() {
|
|
289
|
+
// Clean up timeouts and abort controllers
|
|
290
|
+
if (this.timeoutId) {
|
|
291
|
+
clearTimeout(this.timeoutId);
|
|
292
|
+
}
|
|
293
|
+
if (this.abortController) {
|
|
294
|
+
this.abortController.abort();
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
render() {
|
|
298
|
+
const renderErrorState = () => {
|
|
299
|
+
if (!this.error)
|
|
300
|
+
return null;
|
|
301
|
+
const errorClass = this.error.severity === ComponentErrorSeverity.ERROR
|
|
302
|
+
? 'text-danger'
|
|
303
|
+
: this.error.severity === ComponentErrorSeverity.WARNING
|
|
304
|
+
? 'text-warning'
|
|
305
|
+
: 'text-info';
|
|
306
|
+
return (h("div", { class: `${errorClass} mt-2` }, h("small", null, this.error.message), h("br", null), this.error.userAction && (h("small", { class: "text-muted" }, this.error.userAction))));
|
|
307
|
+
};
|
|
308
|
+
const renderStatusState = () => {
|
|
309
|
+
if (this.error)
|
|
310
|
+
return null;
|
|
311
|
+
if (this.isLoading) {
|
|
312
|
+
return (h("div", { class: "text-info mt-2" }, h("small", null, "Verifying bank account...")));
|
|
313
|
+
}
|
|
314
|
+
if (this.isSuccess) {
|
|
315
|
+
return (h("div", { class: "text-success mt-2" }, h("small", null, "\u2713 Bank account verified successfully")));
|
|
316
|
+
}
|
|
317
|
+
if (this.isAuthenticating) {
|
|
318
|
+
return (h("div", { class: "text-info mt-2" }, h("small", null, "Connecting to your bank...")));
|
|
319
|
+
}
|
|
320
|
+
return null;
|
|
321
|
+
};
|
|
322
|
+
const plaidLogo = (h("img", { class: "plaid-logo-img", src: plaidIconSvg, alt: "Plaid", title: "Plaid", style: {
|
|
323
|
+
display: 'inline',
|
|
324
|
+
width: '20px',
|
|
325
|
+
height: '20px',
|
|
326
|
+
marginLeft: '5px',
|
|
327
|
+
marginTop: '-2px',
|
|
328
|
+
} }));
|
|
329
|
+
return (h(StyledHost, null, h("script", { src: "https://cdn.plaid.com/link/v2/stable/link-initialize.js", async: true, ref: (el) => (this.scriptRef = el) }), h("div", null, h("div", { class: "mb-3" }, h(Button, { variant: "secondary", type: "button", onClick: (event) => { event.preventDefault(); this.openPlaidLink(); }, disabled: this.isLoading, part: buttonSecondary }, "Link Bank Account with ", plaidLogo)), renderErrorState(), renderStatusState())));
|
|
330
|
+
}
|
|
331
|
+
}, [256, "plaid-verification", {
|
|
332
|
+
"authToken": [1, "auth-token"],
|
|
333
|
+
"accountId": [1, "account-id"],
|
|
334
|
+
"businessId": [1, "business-id"],
|
|
335
|
+
"linkToken": [32],
|
|
336
|
+
"linkTokenId": [32],
|
|
337
|
+
"plaidLink": [32],
|
|
338
|
+
"isAuthenticating": [32],
|
|
339
|
+
"isSuccess": [32],
|
|
340
|
+
"error": [32],
|
|
341
|
+
"isLoading": [32]
|
|
342
|
+
}]);
|
|
343
|
+
function defineCustomElement() {
|
|
344
|
+
if (typeof customElements === "undefined") {
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
const components = ["plaid-verification"];
|
|
348
|
+
components.forEach(tagName => { switch (tagName) {
|
|
349
|
+
case "plaid-verification":
|
|
350
|
+
if (!customElements.get(tagName)) {
|
|
351
|
+
customElements.define(tagName, PlaidVerification);
|
|
352
|
+
}
|
|
353
|
+
break;
|
|
354
|
+
} });
|
|
355
|
+
}
|
|
356
|
+
defineCustomElement();
|
|
357
|
+
|
|
358
|
+
export { PlaidVerification as P, defineCustomElement as d };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as Api } from './Api.js';
|
|
2
|
-
import './
|
|
2
|
+
import './Plaid.js';
|
|
3
3
|
import './Pagination.js';
|
|
4
4
|
import './Business.js';
|
|
5
5
|
import './ApplePay.js';
|
|
@@ -12,6 +12,19 @@ class PlaidService {
|
|
|
12
12
|
const body = { checkout_id: checkoutId };
|
|
13
13
|
return api.post({ endpoint, body, authToken, signal });
|
|
14
14
|
}
|
|
15
|
+
async getLinkTokenForVerification(authToken, businessId, signal) {
|
|
16
|
+
const endpoint = `entities/plaid/${businessId}/link_token`;
|
|
17
|
+
const body = {};
|
|
18
|
+
return api.post({ endpoint, body, authToken, signal });
|
|
19
|
+
}
|
|
20
|
+
async getBankAccountData(authToken, businessId, signal) {
|
|
21
|
+
const endpoint = `entities/plaid/${businessId}/bank_account`;
|
|
22
|
+
return api.get({ endpoint, authToken, signal });
|
|
23
|
+
}
|
|
24
|
+
async postPlaidVerifiedBankAccountData(authToken, businessId, payload, signal) {
|
|
25
|
+
const endpoint = `entities/plaid/${businessId}/bank_account`;
|
|
26
|
+
return api.post({ endpoint, body: payload, authToken, signal });
|
|
27
|
+
}
|
|
15
28
|
async tokenizeBankAccount(authToken, accountId, publicToken, linkTokenId, paymentMethodGroupId, signal) {
|
|
16
29
|
const endpoint = `plaid/${accountId}/tokenize`;
|
|
17
30
|
const body = { public_token: publicToken };
|
|
@@ -5,7 +5,7 @@ import { T as TableClickActions } from './event-types.js';
|
|
|
5
5
|
import './justifi-radio-list-item2.js';
|
|
6
6
|
import './config-state.js';
|
|
7
7
|
import './dinero.js';
|
|
8
|
-
import {
|
|
8
|
+
import { i as TerminalOrderType } from './Plaid.js';
|
|
9
9
|
import { p as pagingDefaults } from './Pagination.js';
|
|
10
10
|
import './Business.js';
|
|
11
11
|
import './ApplePay.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
|
|
2
2
|
import './config-state.js';
|
|
3
3
|
import './dinero.js';
|
|
4
|
-
import './
|
|
4
|
+
import './Plaid.js';
|
|
5
5
|
import { p as pagingDefaults } from './Pagination.js';
|
|
6
6
|
import './Business.js';
|
|
7
7
|
import './ApplePay.js';
|
package/dist/module/utils4.js
CHANGED
|
@@ -149,6 +149,7 @@ export interface IBusiness {
|
|
|
149
149
|
website_url: string;
|
|
150
150
|
date_of_incorporation?: string;
|
|
151
151
|
country_of_establishment?: CountryCode;
|
|
152
|
+
bank_account_verification?: boolean;
|
|
152
153
|
}
|
|
153
154
|
export declare class Business implements IBusiness {
|
|
154
155
|
additional_questions: IAdditionalQuestions;
|
|
@@ -176,6 +177,7 @@ export declare class Business implements IBusiness {
|
|
|
176
177
|
date_of_incorporation?: string;
|
|
177
178
|
product_categories: ProductCategories;
|
|
178
179
|
country_of_establishment?: CountryCode;
|
|
180
|
+
bank_account_verification?: boolean;
|
|
179
181
|
constructor(business: IBusiness);
|
|
180
182
|
get payload(): {
|
|
181
183
|
additional_questions: {
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ComponentErrorSeverity } from './ComponentError';
|
|
2
|
+
export declare enum PlaidErrorCodes {
|
|
3
|
+
PLAID_SDK_LOAD_FAILED = "plaid-sdk-load-failed",
|
|
4
|
+
PLAID_LINK_INIT_FAILED = "plaid-link-init-failed",
|
|
5
|
+
PLAID_LINK_TOKEN_FAILED = "plaid-link-token-failed",
|
|
6
|
+
PLAID_AUTHENTICATION_FAILED = "plaid-authentication-failed",
|
|
7
|
+
PLAID_BANK_NOT_SUPPORTED = "plaid-bank-not-supported",
|
|
8
|
+
PLAID_TOKEN_EXPIRED = "plaid-token-expired",
|
|
9
|
+
PLAID_NETWORK_ERROR = "plaid-network-error",
|
|
10
|
+
PLAID_USER_CANCELLED = "plaid-user-cancelled",
|
|
11
|
+
PLAID_TIMEOUT = "plaid-timeout",
|
|
12
|
+
PLAID_INVALID_CREDENTIALS = "plaid-invalid-credentials",
|
|
13
|
+
PLAID_ACCOUNT_LOCKED = "plaid-account-locked",
|
|
14
|
+
PLAID_MAINTENANCE = "plaid-maintenance",
|
|
15
|
+
PLAID_RATE_LIMITED = "plaid-rate-limited"
|
|
16
|
+
}
|
|
17
|
+
export declare const PLAID_ERROR_MESSAGES: {
|
|
18
|
+
"plaid-sdk-load-failed": string;
|
|
19
|
+
"plaid-link-init-failed": string;
|
|
20
|
+
"plaid-link-token-failed": string;
|
|
21
|
+
"plaid-authentication-failed": string;
|
|
22
|
+
"plaid-bank-not-supported": string;
|
|
23
|
+
"plaid-token-expired": string;
|
|
24
|
+
"plaid-network-error": string;
|
|
25
|
+
"plaid-user-cancelled": string;
|
|
26
|
+
"plaid-timeout": string;
|
|
27
|
+
"plaid-invalid-credentials": string;
|
|
28
|
+
"plaid-account-locked": string;
|
|
29
|
+
"plaid-maintenance": string;
|
|
30
|
+
"plaid-rate-limited": string;
|
|
31
|
+
};
|
|
32
|
+
export declare const PLAID_ERROR_SEVERITY: {
|
|
33
|
+
"plaid-sdk-load-failed": ComponentErrorSeverity;
|
|
34
|
+
"plaid-link-init-failed": ComponentErrorSeverity;
|
|
35
|
+
"plaid-link-token-failed": ComponentErrorSeverity;
|
|
36
|
+
"plaid-authentication-failed": ComponentErrorSeverity;
|
|
37
|
+
"plaid-bank-not-supported": ComponentErrorSeverity;
|
|
38
|
+
"plaid-token-expired": ComponentErrorSeverity;
|
|
39
|
+
"plaid-network-error": ComponentErrorSeverity;
|
|
40
|
+
"plaid-user-cancelled": ComponentErrorSeverity;
|
|
41
|
+
"plaid-timeout": ComponentErrorSeverity;
|
|
42
|
+
"plaid-invalid-credentials": ComponentErrorSeverity;
|
|
43
|
+
"plaid-account-locked": ComponentErrorSeverity;
|
|
44
|
+
"plaid-maintenance": ComponentErrorSeverity;
|
|
45
|
+
"plaid-rate-limited": ComponentErrorSeverity;
|
|
46
|
+
};
|
|
47
|
+
export interface PlaidError {
|
|
48
|
+
code: PlaidErrorCodes;
|
|
49
|
+
message: string;
|
|
50
|
+
severity: ComponentErrorSeverity;
|
|
51
|
+
originalError?: any;
|
|
52
|
+
retryable: boolean;
|
|
53
|
+
userAction?: string;
|
|
54
|
+
}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { IApiResponse } from '..';
|
|
2
2
|
export interface ILinkTokenResponse {
|
|
3
|
+
id: string;
|
|
3
4
|
link_token: string;
|
|
4
5
|
}
|
|
5
6
|
export interface IPlaidService {
|
|
6
7
|
getLinkToken(authToken: string, accountId: string, checkoutId: string, signal?: AbortSignal): Promise<IApiResponse<ILinkTokenResponse>>;
|
|
8
|
+
getLinkTokenForVerification(authToken: string, businessId: string, signal?: AbortSignal): Promise<IApiResponse<ILinkTokenResponse>>;
|
|
7
9
|
tokenizeBankAccount(authToken: string, accountId: string, publicToken: string, linkTokenId?: string, paymentMethodGroupId?: string, signal?: AbortSignal): Promise<IApiResponse<any>>;
|
|
8
10
|
}
|
|
9
11
|
export declare class PlaidService implements IPlaidService {
|
|
10
12
|
getLinkToken(authToken: string, accountId: string, checkoutId: string, signal?: AbortSignal): Promise<IApiResponse<ILinkTokenResponse>>;
|
|
13
|
+
getLinkTokenForVerification(authToken: string, businessId: string, signal?: AbortSignal): Promise<IApiResponse<ILinkTokenResponse>>;
|
|
14
|
+
getBankAccountData(authToken: string, businessId: string, signal?: AbortSignal): Promise<IApiResponse<any>>;
|
|
15
|
+
postPlaidVerifiedBankAccountData(authToken: string, businessId: string, payload: {
|
|
16
|
+
public_token: string;
|
|
17
|
+
link_token_id: string;
|
|
18
|
+
}, signal?: AbortSignal): Promise<IApiResponse<any>>;
|
|
11
19
|
tokenizeBankAccount(authToken: string, accountId: string, publicToken: string, linkTokenId?: string, paymentMethodGroupId?: string, signal?: AbortSignal): Promise<IApiResponse<any>>;
|
|
12
20
|
}
|
|
@@ -14,6 +14,8 @@ export declare class BusinessBankAccountFormStep {
|
|
|
14
14
|
postBankAccount: Function;
|
|
15
15
|
postDocumentRecord: Function;
|
|
16
16
|
postDocument: Function;
|
|
17
|
+
bankAccountVerification: boolean;
|
|
18
|
+
platformAccountId: string | null;
|
|
17
19
|
authToken: string;
|
|
18
20
|
businessId: string;
|
|
19
21
|
allowOptionalFields?: boolean;
|