@justifi/webcomponents 6.12.7-rc.3 → 6.13.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/LICENSE +21 -0
- package/dist/cjs/{Analytics-GYqUuEeO.js → Analytics-DaegoP5G.js} +3 -3
- package/dist/cjs/{Api-Bukk55YZ.js → Api-BioDE5he.js} +1 -1
- package/dist/cjs/{Plaid-6FYKaSTI.js → Plaid-QLOFOTeC.js} +3 -3
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +1 -1
- package/dist/cjs/additional-questions-form-step_15.cjs.entry.js +37 -27
- package/dist/cjs/additional-questions_5.cjs.entry.js +1 -1
- package/dist/cjs/additional-statement_8.cjs.entry.js +8 -8
- package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +5 -5
- package/dist/cjs/bank-account-document-form-inputs.cjs.entry.js +2 -2
- package/dist/cjs/bank-account-form.cjs.entry.js +34 -5
- package/dist/cjs/{business-identity-schema-CC1wOwXd.js → business-identity-schema-BA385xf-.js} +3 -3
- package/dist/cjs/{business.service-t-p3-gP-.js → business.service-DOGeb2O6.js} +2 -2
- package/dist/cjs/card-form.cjs.entry.js +5 -5
- package/dist/cjs/{check-pkg-version-wcoV7eK1.js → check-pkg-version-BNGOOokA.js} +1 -1
- package/dist/cjs/checkout-actions-CjR16i7o.js +62 -0
- package/dist/cjs/{checkout.service-BiLHhmjP.js → checkout.service-Bdr5qUHj.js} +2 -2
- package/dist/cjs/{checkout.store-CztwuCnG.js → checkout.store-CZHrIuaP.js} +9 -3
- package/dist/cjs/{country-config-Ck-eEeZZ.js → country-config-C1bWmF8P.js} +9 -4
- package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
- package/dist/cjs/dispute-notification_2.cjs.entry.js +15 -15
- package/dist/cjs/{event-types-DcN23uI_.js → event-types-DWDQKDv4.js} +2 -2
- package/dist/cjs/form-address-fields_3.cjs.entry.js +3 -3
- package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/form-control-date.cjs.entry.js +2 -2
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
- package/dist/cjs/form-control-file.cjs.entry.js +2 -2
- package/dist/cjs/form-control-monetary.cjs.entry.js +3 -3
- package/dist/cjs/form-control-number_2.cjs.entry.js +3 -3
- package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
- package/dist/cjs/form-control-select_2.cjs.entry.js +4 -4
- package/dist/cjs/{get-business-BqO_Sa6H.js → get-business-CrxvWZh6.js} +2 -2
- package/dist/cjs/{get-payment-details-Cs-P5xoW.js → get-payment-details-iCEkGDy4.js} +2 -2
- package/dist/cjs/{get-subaccounts-BbiIbUED.js → get-subaccounts-Dgl7ECtg.js} +3 -3
- package/dist/cjs/hidden-input_2.cjs.entry.js +6 -6
- package/dist/cjs/{insurance-state-Xe2auE-N.js → insurance-state-B-XQRmMs.js} +1 -1
- package/dist/cjs/internal-button.cjs.entry.js +1 -1
- package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +62 -92
- package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +7 -7
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +17 -7
- package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
- package/dist/cjs/justifi-billing-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-business-details.cjs.entry.js +9 -9
- package/dist/cjs/justifi-business-form.cjs.entry.js +12 -12
- package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
- package/dist/cjs/justifi-card-form.cjs.entry.js +7 -7
- package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +3141 -0
- package/dist/cjs/justifi-checkout.cjs.entry.js +9 -9
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +4 -4
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +11 -11
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +9 -9
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +10 -10
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +11 -11
- package/dist/cjs/justifi-payment-details.cjs.entry.js +17 -17
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payments-list.cjs.entry.js +10 -10
- package/dist/cjs/justifi-payout-details.cjs.entry.js +12 -12
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +14 -14
- package/dist/cjs/justifi-qr-terminal.cjs.entry.js +208 -0
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +11 -11
- package/dist/cjs/justifi-save-new-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +9 -9
- package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +5 -5
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +10 -10
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +13 -13
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-BJUD_YSJ.js → package-BKwTzSig.js} +1 -1
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/{payment-provisioning-actions-Dnvqbh2N.js → payment-provisioning-actions-B4x7lnyF.js} +9 -9
- package/dist/cjs/{payment.service-DWK3fO_g.js → payment.service-a5EL3s2d.js} +2 -2
- package/dist/cjs/{payout.service-Cjc3PPfP.js → payout.service-BJtGBHsQ.js} +2 -2
- package/dist/cjs/{payouts-status-DluZkb6X.js → payouts-status-viYMBknO.js} +2 -2
- package/dist/cjs/{plaid.service-BaHuE_zZ.js → plaid.service-DpiLY-5D.js} +2 -2
- package/dist/cjs/radio-list-item.cjs.entry.js +1 -1
- package/dist/cjs/save-new-payment-method.cjs.entry.js +2 -2
- package/dist/cjs/{schema-validations-DackMxv7.js → schema-validations-C2XsZnqK.js} +2 -2
- package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/{terminal.service-DmlAGx7U.js → terminal.service-DN2A-bNx.js} +2 -2
- package/dist/cjs/{utils-dnVbB8d6.js → utils-BVM6JCW0.js} +1 -1
- package/dist/cjs/{utils-BHi4j5rB.js → utils-D1CWnhex.js} +4 -4
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/actions/payment/get-payments.js +1 -1
- package/dist/collection/actions/refund/refund-actions.js +1 -1
- package/dist/collection/actions/terminal/get-terminal-orders.js +1 -1
- package/dist/collection/actions/void/void-actions.js +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/additional-questions-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-options.js +23 -13
- package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-actions.js +7 -7
- package/dist/collection/components/business-forms/schemas/business-address-schema.js +1 -1
- package/dist/collection/components/business-forms/schemas/schema-helpers.js +1 -1
- package/dist/collection/components/business-forms/utils/country-config.js +9 -4
- package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +30 -2
- package/dist/collection/components/checkout/billing-form/bank-account-billing-form-simple.js +1 -1
- package/dist/collection/components/checkout/billing-form/card-billing-form-simple.js +1 -1
- package/dist/collection/components/checkout/billing-form/justifi-billing-form.js +1 -1
- package/dist/collection/components/checkout/card-form/card-form.js +2 -2
- package/dist/collection/components/checkout/justifi-checkout.js +21 -2
- package/dist/collection/components/checkout/save-new-payment-method/justifi-save-new-payment-method.js +1 -1
- package/dist/collection/components/checkout/save-new-payment-method/save-new-payment-method.js +1 -1
- package/dist/collection/components/checkout-qr-code/justifi-checkout-qr-code.js +128 -0
- package/dist/collection/components/checkouts-list/checkouts-list-filters.js +2 -2
- package/dist/collection/components/checkouts-list/justifi-checkouts-list.js +2 -2
- package/dist/collection/components/dispute-management/dispute-notification.js +3 -3
- package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/dispute-response-actions.js +3 -3
- package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
- package/dist/collection/components/dispute-management/justifi-dispute-management.js +1 -1
- package/dist/collection/components/filters/table-filters-menu.js +1 -1
- package/dist/collection/components/filters/utils.js +1 -1
- package/dist/collection/components/gross-payment-chart/chart-utils.js +3 -3
- package/dist/collection/components/insurance/insurance-state.js +1 -1
- package/dist/collection/components/modular-checkout/justifi-modular-checkout.js +19 -13
- package/dist/collection/components/modular-checkout/sub-components/justifi-apple-pay.js +0 -21
- package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-form.js +11 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-billing-form-full.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-card-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-card-form.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-checkout-summary.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-google-pay.js +10 -6
- package/dist/collection/components/modular-checkout/sub-components/justifi-plaid-payment-method.js +15 -2
- package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
- package/dist/collection/components/order-terminals/justifi-order-terminals.js +1 -1
- package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
- package/dist/collection/components/payment-details/justifi-payment-details.js +8 -8
- package/dist/collection/components/payment-transactions-list/justifi-payment-transactions-list.js +1 -1
- package/dist/collection/components/payments-list/justifi-payments-list-filters.js +2 -2
- package/dist/collection/components/payments-list/justifi-payments-list.js +1 -1
- package/dist/collection/components/payout-details/justifi-payout-details.js +3 -3
- package/dist/collection/components/payout-transactions-list/justifi-payout-transactions-list.js +1 -1
- package/dist/collection/components/payouts-list/justifi-payouts-list-filters.js +2 -2
- package/dist/collection/components/payouts-list/justifi-payouts-list.js +4 -4
- package/dist/collection/components/qr-terminal/justifi-qr-terminal.js +349 -0
- package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list-filters.js +3 -3
- package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list.js +2 -2
- package/dist/collection/components/terminals-list/justifi-terminals-list-filters.js +1 -1
- package/dist/collection/components/terminals-list/justifi-terminals-list.js +4 -4
- package/dist/collection/components/tokenize-payment-method/justifi-tokenize-payment-method.js +5 -3
- package/dist/collection/store/checkout.store.js +9 -3
- package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
- package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
- package/dist/collection/ui-components/form/form-control-date.js +2 -2
- package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
- package/dist/collection/ui-components/form/form-control-file.js +2 -2
- package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
- package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
- package/dist/collection/ui-components/form/form-control-number.js +2 -2
- package/dist/collection/ui-components/form/form-control-radio.js +2 -2
- package/dist/collection/ui-components/form/form-control-select.js +2 -2
- package/dist/collection/ui-components/form/form-control-text.js +2 -2
- package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
- package/dist/collection/ui-components/form/hidden-input.js +2 -2
- package/dist/collection/ui-components/form/iframe-input.js +3 -3
- package/dist/collection/ui-components/internal-button.js +1 -1
- package/dist/collection/ui-components/radio-list-item.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
- package/dist/collection/utils/utils.js +4 -4
- package/dist/docs.json +314 -39
- package/dist/esm/{Analytics-Bg6T3DQV.js → Analytics-D_HycaxE.js} +3 -3
- package/dist/esm/{Api-DMd8hTI-.js → Api-DjAL73GZ.js} +1 -1
- package/dist/esm/{Plaid-CeYMgNts.js → Plaid-C8qoMZLV.js} +2 -2
- package/dist/esm/additional-questions-details_5.entry.js +1 -1
- package/dist/esm/additional-questions-form-step_15.entry.js +37 -27
- package/dist/esm/additional-questions_5.entry.js +1 -1
- package/dist/esm/additional-statement_8.entry.js +8 -8
- package/dist/esm/bank-account-billing-form-simple_4.entry.js +5 -5
- package/dist/esm/bank-account-document-form-inputs.entry.js +2 -2
- package/dist/esm/bank-account-form.entry.js +34 -5
- package/dist/esm/{business-identity-schema-D8L_UfWl.js → business-identity-schema-Csou60ZC.js} +3 -3
- package/dist/esm/{business.service-ZN8yGby7.js → business.service-BGXqAyxu.js} +2 -2
- package/dist/esm/card-form.entry.js +5 -5
- package/dist/esm/{check-pkg-version-BXdtk1fk.js → check-pkg-version-BfrWk42V.js} +1 -1
- package/dist/esm/checkout-actions-D8JS2l5e.js +59 -0
- package/dist/esm/{checkout.service-D_6Zw77V.js → checkout.service-sHKaW-M0.js} +2 -2
- package/dist/esm/{checkout.store-DFnkcDZ8.js → checkout.store-DibfdUMm.js} +9 -3
- package/dist/esm/{country-config-BW2dUoTJ.js → country-config-CEJVOOGe.js} +9 -4
- package/dist/esm/custom-popper_2.entry.js +2 -2
- package/dist/esm/dispute-notification_2.entry.js +15 -15
- package/dist/esm/{event-types-DXYUs2vg.js → event-types-ynZLear3.js} +2 -2
- package/dist/esm/form-address-fields_3.entry.js +3 -3
- package/dist/esm/form-control-checkbox.entry.js +2 -2
- package/dist/esm/form-control-date.entry.js +2 -2
- package/dist/esm/form-control-file-v2_2.entry.js +3 -3
- package/dist/esm/form-control-file.entry.js +2 -2
- package/dist/esm/form-control-monetary.entry.js +3 -3
- package/dist/esm/form-control-number_2.entry.js +3 -3
- package/dist/esm/form-control-radio.entry.js +2 -2
- package/dist/esm/form-control-select_2.entry.js +4 -4
- package/dist/esm/{get-business-rP66Ger-.js → get-business-DAv_b3vf.js} +2 -2
- package/dist/esm/{get-payment-details-zCO59zZz.js → get-payment-details-Bipad3jX.js} +2 -2
- package/dist/esm/{get-subaccounts-DUopdVm2.js → get-subaccounts-FqCT2s3S.js} +3 -3
- package/dist/esm/hidden-input_2.entry.js +6 -6
- package/dist/esm/{insurance-state-CLGc1-_4.js → insurance-state-C5OZqDCT.js} +1 -1
- package/dist/esm/internal-button.entry.js +1 -1
- package/dist/esm/justifi-apple-pay_11.entry.js +60 -90
- package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +7 -7
- package/dist/esm/justifi-bank-account-form.entry.js +17 -7
- package/dist/esm/justifi-billing-form-full.entry.js +1 -1
- package/dist/esm/justifi-billing-form.entry.js +1 -1
- package/dist/esm/justifi-business-details.entry.js +9 -9
- package/dist/esm/justifi-business-form.entry.js +12 -12
- package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
- package/dist/esm/justifi-card-form.entry.js +7 -7
- package/dist/esm/justifi-checkout-qr-code.entry.js +3139 -0
- package/dist/esm/justifi-checkout.entry.js +9 -9
- package/dist/esm/justifi-checkouts-list-filters.entry.js +4 -4
- package/dist/esm/justifi-checkouts-list.entry.js +11 -11
- package/dist/esm/justifi-dispute-management.entry.js +9 -9
- package/dist/esm/justifi-gross-payment-chart.entry.js +10 -10
- package/dist/esm/justifi-order-terminals.entry.js +11 -11
- package/dist/esm/justifi-payment-details.entry.js +17 -17
- package/dist/esm/justifi-payment-provisioning.entry.js +9 -9
- package/dist/esm/justifi-payment-transactions-list.entry.js +9 -9
- package/dist/esm/justifi-payments-list-filters.entry.js +3 -3
- package/dist/esm/justifi-payments-list.entry.js +10 -10
- package/dist/esm/justifi-payout-details.entry.js +12 -12
- package/dist/esm/justifi-payout-transactions-list.entry.js +9 -9
- package/dist/esm/justifi-payouts-list-filters.entry.js +4 -4
- package/dist/esm/justifi-payouts-list.entry.js +14 -14
- package/dist/esm/justifi-qr-terminal.entry.js +206 -0
- package/dist/esm/justifi-refund-payment.entry.js +11 -11
- package/dist/esm/justifi-save-new-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +9 -9
- package/dist/esm/justifi-skeleton.entry.js +1 -1
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +5 -5
- package/dist/esm/justifi-terminal-orders-list.entry.js +10 -10
- package/dist/esm/justifi-terminals-list-filters.entry.js +3 -3
- package/dist/esm/justifi-terminals-list.entry.js +13 -13
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-DSjpDUHk.js → package-DSavNeRB.js} +1 -1
- package/dist/esm/payment-method-option.entry.js +1 -1
- package/dist/esm/{payment-provisioning-actions-BfMdBzzh.js → payment-provisioning-actions-DI3QUsjh.js} +9 -9
- package/dist/esm/{payment.service-CRgN4aGV.js → payment.service-wSNYSRyl.js} +2 -2
- package/dist/esm/{payout.service-B_APc0x_.js → payout.service-CTAksNmD.js} +2 -2
- package/dist/esm/{payouts-status-klusV0rp.js → payouts-status-CeZoirpf.js} +2 -2
- package/dist/esm/{plaid.service-DbrHt5kj.js → plaid.service-5EpJEdwX.js} +2 -2
- package/dist/esm/radio-list-item.entry.js +1 -1
- package/dist/esm/save-new-payment-method.entry.js +2 -2
- package/dist/esm/{schema-validations-CjqWFLKt.js → schema-validations-CySYE883.js} +2 -2
- package/dist/esm/table-filters-menu.entry.js +1 -1
- package/dist/esm/terminal-quantity-selector.entry.js +1 -1
- package/dist/esm/{terminal.service-B5ezhIvW.js → terminal.service-xjfU0mJT.js} +2 -2
- package/dist/esm/{utils-BTtxWI2r.js → utils-CcA8Y5hs.js} +4 -4
- package/dist/esm/{utils-CfBIEaJJ.js → utils-myniydlM.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Plaid.js +1 -1
- package/dist/module/additional-questions-form-step2.js +1 -1
- package/dist/module/additional-statement2.js +1 -1
- package/dist/module/bank-account-billing-form-simple2.js +1 -1
- package/dist/module/bank-account-form2.js +30 -2
- package/dist/module/business-address-schema.js +1 -1
- package/dist/module/business-core-info-form-step2.js +1 -1
- package/dist/module/business-representative-form-step2.js +1 -1
- package/dist/module/cancellation-policy2.js +1 -1
- package/dist/module/card-billing-form-simple2.js +1 -1
- package/dist/module/card-form2.js +2 -2
- package/dist/module/checkout-actions.js +59 -0
- package/dist/module/checkout.store.js +9 -3
- package/dist/module/country-config.js +9 -4
- package/dist/module/custom-popper2.js +2 -2
- package/dist/module/customer-details2.js +1 -1
- package/dist/module/dispute-notification2.js +3 -3
- package/dist/module/dispute-response2.js +1 -1
- package/dist/module/document-upload-form-step2.js +24 -14
- package/dist/module/duplicate-charge2.js +1 -1
- package/dist/module/electronic-evidence2.js +1 -1
- package/dist/module/event-types3.js +3 -3
- package/dist/module/form-control-checkbox2.js +2 -2
- package/dist/module/form-control-date2.js +2 -2
- package/dist/module/form-control-file-v22.js +1 -1
- package/dist/module/form-control-file2.js +2 -2
- package/dist/module/form-control-monetary2.js +2 -2
- package/dist/module/form-control-number-masked2.js +2 -2
- package/dist/module/form-control-number2.js +2 -2
- package/dist/module/form-control-radio2.js +2 -2
- package/dist/module/form-control-select2.js +2 -2
- package/dist/module/form-control-text2.js +2 -2
- package/dist/module/form-control-textarea2.js +2 -2
- package/dist/module/get-payment-details.js +1 -1
- package/dist/module/hidden-input2.js +2 -2
- package/dist/module/iframe-input2.js +3 -3
- package/dist/module/insurance-state.js +1 -1
- package/dist/module/internal-button2.js +1 -1
- package/dist/module/justifi-apple-pay2.js +0 -2
- package/dist/module/justifi-bank-account-billing-form-simple.js +1 -1
- package/dist/module/justifi-bank-account-form.js +11 -1
- package/dist/module/justifi-billing-form-full.js +1 -1
- package/dist/module/justifi-billing-form.js +1 -1
- package/dist/module/justifi-button2.js +1 -1
- package/dist/module/justifi-card-billing-form-simple.js +1 -1
- package/dist/module/justifi-card-form.js +1 -1
- package/dist/module/justifi-checkout-qr-code.d.ts +11 -0
- package/dist/module/justifi-checkout-qr-code.js +6 -0
- package/dist/module/justifi-checkout-qr-code2.js +3154 -0
- package/dist/module/justifi-checkout-summary2.js +1 -1
- package/dist/module/justifi-checkout.js +3 -2
- package/dist/module/justifi-checkouts-list-filters.js +2 -2
- package/dist/module/justifi-checkouts-list.js +3 -3
- package/dist/module/justifi-dispute-management.js +2 -2
- package/dist/module/justifi-google-pay2.js +7 -2
- package/dist/module/justifi-gross-payment-chart.js +3 -3
- package/dist/module/justifi-header2.js +1 -1
- package/dist/module/justifi-modular-checkout2.js +21 -70
- package/dist/module/justifi-order-terminals.js +2 -2
- package/dist/module/justifi-payment-details.js +9 -9
- package/dist/module/justifi-payment-transactions-list.js +2 -2
- package/dist/module/justifi-payments-list-filters.js +2 -2
- package/dist/module/justifi-payments-list.js +3 -3
- package/dist/module/justifi-payout-details.js +4 -4
- package/dist/module/justifi-payout-transactions-list.js +2 -2
- package/dist/module/justifi-payouts-list-filters.js +2 -2
- package/dist/module/justifi-payouts-list.js +5 -5
- package/dist/module/justifi-plaid-payment-method2.js +14 -2
- package/dist/module/justifi-qr-terminal.d.ts +11 -0
- package/dist/module/justifi-qr-terminal.js +234 -0
- package/dist/module/justifi-refund-payment.js +3 -3
- package/dist/module/justifi-save-new-payment-method.js +1 -1
- package/dist/module/justifi-skeleton.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +4 -4
- package/dist/module/justifi-terminal-orders-list.js +4 -4
- package/dist/module/justifi-terminals-list-filters.js +2 -2
- package/dist/module/justifi-terminals-list.js +5 -5
- package/dist/module/justifi-tokenize-payment-method2.js +5 -3
- package/dist/module/legal-address-form-step2.js +1 -1
- package/dist/module/package.js +1 -1
- package/dist/module/payment-method-option.js +1 -1
- package/dist/module/payment-provisioning-actions.js +7 -7
- package/dist/module/product-or-service2.js +1 -1
- package/dist/module/radio-list-item2.js +1 -1
- package/dist/module/refund-policy2.js +1 -1
- package/dist/module/save-new-payment-method2.js +1 -1
- package/dist/module/schema-validations.js +1 -1
- package/dist/module/shipping-details2.js +1 -1
- package/dist/module/table-filters-menu2.js +1 -1
- package/dist/module/terminal-quantity-selector2.js +1 -1
- package/dist/module/utils2.js +4 -4
- package/dist/stencil.config.js +40 -0
- package/dist/types/api/Checkout.d.ts +1 -2
- package/dist/types/components/business-forms/payment-provisioning/document-upload/document-upload-options.d.ts +5 -1
- package/dist/types/components/checkout/bank-account-form/bank-account-form.d.ts +2 -0
- package/dist/types/components/checkout/justifi-checkout.d.ts +2 -0
- package/dist/types/components/checkout-qr-code/justifi-checkout-qr-code.d.ts +18 -0
- package/dist/types/components/modular-checkout/sub-components/justifi-apple-pay.d.ts +0 -1
- package/dist/types/components/modular-checkout/sub-components/justifi-bank-account-form.d.ts +1 -1
- package/dist/types/components/modular-checkout/sub-components/justifi-google-pay.d.ts +3 -1
- package/dist/types/components/modular-checkout/sub-components/justifi-plaid-payment-method.d.ts +1 -0
- package/dist/types/components/qr-terminal/justifi-qr-terminal.d.ts +42 -0
- package/dist/types/components.d.ts +103 -11
- package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/packages/webcomponents/stencil.config.d.ts +2 -0
- package/dist/types/store/checkout.store.d.ts +2 -0
- package/dist/webcomponents/p-015288c4.entry.js +1 -0
- package/dist/webcomponents/p-055640f9.entry.js +1 -0
- package/dist/webcomponents/p-0d98518e.entry.js +1 -0
- package/dist/webcomponents/p-0ea6aa9c.entry.js +1 -0
- package/dist/webcomponents/p-0ede7e82.entry.js +1 -0
- package/dist/webcomponents/{p-37676092.entry.js → p-0f2a1ac9.entry.js} +1 -1
- package/dist/webcomponents/p-1068ae13.entry.js +1 -0
- package/dist/webcomponents/p-14a03ad0.entry.js +1 -0
- package/dist/webcomponents/{p-69c5658c.entry.js → p-1a30f2d9.entry.js} +1 -1
- package/dist/webcomponents/p-1b51dea9.entry.js +1 -0
- package/dist/webcomponents/{p-89cd31f2.entry.js → p-1de248b1.entry.js} +1 -1
- package/dist/webcomponents/p-218b926a.entry.js +1 -0
- package/dist/webcomponents/p-25215ee7.entry.js +1 -0
- package/dist/webcomponents/p-266870f0.entry.js +1 -0
- package/dist/webcomponents/p-27c35a85.entry.js +1 -0
- package/dist/webcomponents/{p-D8MQn8ZW.js → p-2mMMaism.js} +1 -1
- package/dist/webcomponents/p-3a2629a2.entry.js +1 -0
- package/dist/webcomponents/p-3e56bbe5.entry.js +1 -0
- package/dist/webcomponents/p-4791c6d7.entry.js +1 -0
- package/dist/webcomponents/p-49d9c0a4.entry.js +1 -0
- package/dist/webcomponents/{p-49c0879b.entry.js → p-4a30693b.entry.js} +1 -1
- package/dist/webcomponents/{p-b2224f12.entry.js → p-4fab9314.entry.js} +1 -1
- package/dist/webcomponents/p-5218bcd0.entry.js +1 -0
- package/dist/webcomponents/{p-4b14b7e7.entry.js → p-53d775b9.entry.js} +1 -1
- package/dist/webcomponents/{p-70dcd833.entry.js → p-5a58f606.entry.js} +1 -1
- package/dist/webcomponents/p-5f6bc8e7.entry.js +1 -0
- package/dist/webcomponents/p-65908b5f.entry.js +1 -0
- package/dist/webcomponents/{p-5ec9634c.entry.js → p-67364f1d.entry.js} +1 -1
- package/dist/webcomponents/p-6bf4fea8.entry.js +1 -0
- package/dist/webcomponents/{p-0e4cda77.entry.js → p-6c3e9ebd.entry.js} +1 -1
- package/dist/webcomponents/{p-a9695714.entry.js → p-6fe329d6.entry.js} +1 -1
- package/dist/webcomponents/p-70e05aec.entry.js +1 -0
- package/dist/webcomponents/p-73deced9.entry.js +1 -0
- package/dist/webcomponents/p-762b1b7b.entry.js +1 -0
- package/dist/webcomponents/p-76ded81e.entry.js +1 -0
- package/dist/webcomponents/p-77cc572d.entry.js +1 -0
- package/dist/webcomponents/p-7b6cf400.entry.js +1 -0
- package/dist/webcomponents/p-8fd18ce2.entry.js +1 -0
- package/dist/webcomponents/{p-233fef57.entry.js → p-9c0760b9.entry.js} +1 -1
- package/dist/webcomponents/p-B62JX_Dh.js +1 -0
- package/dist/webcomponents/p-BB8Ce9rp.js +1 -0
- package/dist/webcomponents/{p-BRnBHsdq.js → p-BSs-2JKu.js} +1 -1
- package/dist/webcomponents/p-BUHsyQpA.js +1 -0
- package/dist/webcomponents/{p-D-zwk1J3.js → p-C-Jgmek8.js} +1 -1
- package/dist/webcomponents/p-C1gr32IS.js +1 -0
- package/dist/webcomponents/{p-DspPkDq4.js → p-C7hX61pS.js} +1 -1
- package/dist/webcomponents/{p-DIpFohcg.js → p-CO8ZGkfN.js} +1 -1
- package/dist/webcomponents/p-CPJC6tlj.js +1 -0
- package/dist/webcomponents/p-CdwzNfP1.js +1 -0
- package/dist/webcomponents/p-Cn7z5L7J.js +1 -0
- package/dist/webcomponents/{p-jlR7CJl2.js → p-CxBrydeX.js} +1 -1
- package/dist/webcomponents/p-DP9ysr2K.js +1 -0
- package/dist/webcomponents/{p-BzXQDB0t.js → p-DPA5TKvQ.js} +1 -1
- package/dist/webcomponents/p-DSavNeRB.js +1 -0
- package/dist/webcomponents/{p-DGbFOjOo.js → p-DXTa04jn.js} +1 -1
- package/dist/webcomponents/{p-CwP0ecN7.js → p-DYSc8uvs.js} +1 -1
- package/dist/webcomponents/p-Da3fPDxu.js +1 -0
- package/dist/webcomponents/{p-CYQvLgSs.js → p-De4Pig-y.js} +1 -1
- package/dist/webcomponents/p-DyPk4BJt.js +1 -0
- package/dist/webcomponents/p-NzPaWKbY.js +1 -0
- package/dist/webcomponents/{p-DlHomiZY.js → p-R_0S69Pr.js} +1 -1
- package/dist/webcomponents/{p-b393864a.entry.js → p-a1885b83.entry.js} +1 -1
- package/dist/webcomponents/p-a6b46f98.entry.js +1 -0
- package/dist/webcomponents/{p-cfe8eaf8.entry.js → p-a893d607.entry.js} +1 -1
- package/dist/webcomponents/{p-cab840bd.entry.js → p-b03e361e.entry.js} +1 -1
- package/dist/webcomponents/p-c3a25333.entry.js +1 -0
- package/dist/webcomponents/p-c60c4bed.entry.js +1 -0
- package/dist/webcomponents/{p-4f512f89.entry.js → p-c885cbf6.entry.js} +4 -4
- package/dist/webcomponents/p-c8bcc54f.entry.js +1 -0
- package/dist/webcomponents/p-d0c889e7.entry.js +1 -0
- package/dist/webcomponents/p-d554e0bb.entry.js +1 -0
- package/dist/webcomponents/p-d7e2ce48.entry.js +1 -0
- package/dist/webcomponents/{p-bbf54e31.entry.js → p-ddb885c3.entry.js} +1 -1
- package/dist/webcomponents/{p-1358a4f0.entry.js → p-ddffdec9.entry.js} +1 -1
- package/dist/webcomponents/{p-22d19755.entry.js → p-debc4768.entry.js} +1 -1
- package/dist/webcomponents/p-e1168904.entry.js +1 -0
- package/dist/webcomponents/p-e3021e22.entry.js +1 -0
- package/dist/webcomponents/p-e3f8541c.entry.js +1 -0
- package/dist/webcomponents/{p-c1539656.entry.js → p-eccc1fc6.entry.js} +1 -1
- package/dist/webcomponents/{p-3e10a0de.entry.js → p-f3c40c22.entry.js} +1 -1
- package/dist/webcomponents/{p-09d1663d.entry.js → p-f4de4ac0.entry.js} +1 -1
- package/dist/webcomponents/p-f953fd60.entry.js +1 -0
- package/dist/webcomponents/p-fdea8c57.entry.js +1 -0
- package/dist/webcomponents/p-z3RFjy9B.js +1 -0
- package/dist/webcomponents/{p-DOEMfCze.js → p-zZn1OXja.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +17 -15
- package/dist/webcomponents/p-00335f02.entry.js +0 -1
- package/dist/webcomponents/p-04480f3c.entry.js +0 -1
- package/dist/webcomponents/p-095e5b0e.entry.js +0 -1
- package/dist/webcomponents/p-0b169fac.entry.js +0 -1
- package/dist/webcomponents/p-12ae030d.entry.js +0 -1
- package/dist/webcomponents/p-1e34c488.entry.js +0 -1
- package/dist/webcomponents/p-1f3515a8.entry.js +0 -1
- package/dist/webcomponents/p-21473196.entry.js +0 -1
- package/dist/webcomponents/p-34f9fe96.entry.js +0 -1
- package/dist/webcomponents/p-382f49f6.entry.js +0 -1
- package/dist/webcomponents/p-3a28052f.entry.js +0 -1
- package/dist/webcomponents/p-46477dfe.entry.js +0 -1
- package/dist/webcomponents/p-48319292.entry.js +0 -1
- package/dist/webcomponents/p-494e1254.entry.js +0 -1
- package/dist/webcomponents/p-4ae8f4e9.entry.js +0 -1
- package/dist/webcomponents/p-4ccf9cd7.entry.js +0 -1
- package/dist/webcomponents/p-5fd4c94d.entry.js +0 -1
- package/dist/webcomponents/p-63b7abf3.entry.js +0 -1
- package/dist/webcomponents/p-649f78de.entry.js +0 -1
- package/dist/webcomponents/p-80fdd013.entry.js +0 -1
- package/dist/webcomponents/p-947950cc.entry.js +0 -1
- package/dist/webcomponents/p-9b944aa4.entry.js +0 -1
- package/dist/webcomponents/p-B1yVkh15.js +0 -1
- package/dist/webcomponents/p-BArmtmkq.js +0 -1
- package/dist/webcomponents/p-Bh1Vr2it.js +0 -1
- package/dist/webcomponents/p-BtPSM2n_.js +0 -1
- package/dist/webcomponents/p-C32sJPns.js +0 -1
- package/dist/webcomponents/p-Cdy3lPBL.js +0 -1
- package/dist/webcomponents/p-DSjpDUHk.js +0 -1
- package/dist/webcomponents/p-DV4n8kZd.js +0 -1
- package/dist/webcomponents/p-DfMQsL55.js +0 -1
- package/dist/webcomponents/p-DnDbpabY.js +0 -1
- package/dist/webcomponents/p-a3b48ba3.entry.js +0 -1
- package/dist/webcomponents/p-bd466218.entry.js +0 -1
- package/dist/webcomponents/p-be4aee79.entry.js +0 -1
- package/dist/webcomponents/p-cc558e25.entry.js +0 -1
- package/dist/webcomponents/p-d253a573.entry.js +0 -1
- package/dist/webcomponents/p-d9287237.entry.js +0 -1
- package/dist/webcomponents/p-d9eec0cc.entry.js +0 -1
- package/dist/webcomponents/p-daf41b49.entry.js +0 -1
- package/dist/webcomponents/p-e29e32aa.entry.js +0 -1
- package/dist/webcomponents/p-e5c2215a.entry.js +0 -1
- package/dist/webcomponents/p-e679b76b.entry.js +0 -1
- package/dist/webcomponents/p-eb6150a8.entry.js +0 -1
- package/dist/webcomponents/p-ebd5a44e.entry.js +0 -1
- package/dist/webcomponents/p-f0d8ffe0.entry.js +0 -1
- package/dist/webcomponents/p-f9aafb21.entry.js +0 -1
- package/dist/webcomponents/p-krYyRSq-.js +0 -1
- package/dist/webcomponents/p-rISpbtJR.js +0 -1
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { makeGetCheckout } from "../../actions/checkout/checkout-actions";
|
|
3
|
+
import { CheckoutService } from "../../api/services/checkout.service";
|
|
4
|
+
import { CompletionStatuses, ICheckoutStatus } from "../../api/Checkout";
|
|
5
|
+
import { ComponentErrorCodes, ComponentErrorMessages, ComponentErrorSeverity } from "../../api/ComponentError";
|
|
6
|
+
import JustifiAnalytics from "../../api/Analytics";
|
|
7
|
+
import { checkPkgVersion } from "../../utils/check-pkg-version";
|
|
8
|
+
export class JustifiQrTerminal {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.pollIntervalMs = 3000;
|
|
11
|
+
this.pollTimeoutMs = 600000;
|
|
12
|
+
this.terminalState = 'loading';
|
|
13
|
+
this.paymentStatus = '';
|
|
14
|
+
this.errorMessage = '';
|
|
15
|
+
this.pollIntervalHandle = null;
|
|
16
|
+
this.pollTimeoutHandle = null;
|
|
17
|
+
this.failedDismissHandle = null;
|
|
18
|
+
this.seenCompletionCreatedAts = new Set();
|
|
19
|
+
this.inFlight = false;
|
|
20
|
+
}
|
|
21
|
+
componentWillLoad() {
|
|
22
|
+
checkPkgVersion();
|
|
23
|
+
this.analytics = new JustifiAnalytics(this);
|
|
24
|
+
this.initialize();
|
|
25
|
+
}
|
|
26
|
+
disconnectedCallback() {
|
|
27
|
+
var _a;
|
|
28
|
+
this.stopAll();
|
|
29
|
+
(_a = this.analytics) === null || _a === void 0 ? void 0 : _a.cleanup();
|
|
30
|
+
}
|
|
31
|
+
propChanged() {
|
|
32
|
+
this.stopAll();
|
|
33
|
+
this.initialize();
|
|
34
|
+
}
|
|
35
|
+
suppressInnerErrors(event) {
|
|
36
|
+
// Suppress error-event bubbling from inner justifi-checkout-qr-code
|
|
37
|
+
event.stopPropagation();
|
|
38
|
+
}
|
|
39
|
+
get effectivePollInterval() {
|
|
40
|
+
return Math.max(1000, this.pollIntervalMs);
|
|
41
|
+
}
|
|
42
|
+
initialize() {
|
|
43
|
+
if (!this.authToken || !this.checkoutId) {
|
|
44
|
+
this.errorEvent.emit({
|
|
45
|
+
message: 'authToken and checkoutId are required',
|
|
46
|
+
errorCode: ComponentErrorCodes.MISSING_PROPS,
|
|
47
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
48
|
+
});
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
this.terminalState = 'loading';
|
|
52
|
+
this.getCheckout = makeGetCheckout({
|
|
53
|
+
authToken: this.authToken,
|
|
54
|
+
checkoutId: this.checkoutId,
|
|
55
|
+
service: new CheckoutService(),
|
|
56
|
+
});
|
|
57
|
+
this.getCheckout({
|
|
58
|
+
onSuccess: ({ checkout }) => this.handleInitialLoad(checkout),
|
|
59
|
+
onError: ({ error, code, severity }) => {
|
|
60
|
+
this.terminalState = 'error';
|
|
61
|
+
this.errorMessage = error;
|
|
62
|
+
this.errorEvent.emit({ message: error, errorCode: code, severity });
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
handleInitialLoad(checkout) {
|
|
67
|
+
var _a;
|
|
68
|
+
switch (checkout.status) {
|
|
69
|
+
case ICheckoutStatus.expired:
|
|
70
|
+
this.terminalState = 'expired';
|
|
71
|
+
this.checkoutExpired.emit({ checkoutId: this.checkoutId });
|
|
72
|
+
this.errorEvent.emit({
|
|
73
|
+
message: ComponentErrorMessages.CHECKOUT_EXPIRED,
|
|
74
|
+
errorCode: ComponentErrorCodes.CHECKOUT_EXPIRED,
|
|
75
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
76
|
+
});
|
|
77
|
+
break;
|
|
78
|
+
case ICheckoutStatus.completed:
|
|
79
|
+
this.terminalState = 'completed';
|
|
80
|
+
this.paymentStatus = this.resolvePaymentStatus(checkout);
|
|
81
|
+
this.checkoutCompleted.emit({ checkoutId: this.checkoutId, paymentStatus: this.paymentStatus });
|
|
82
|
+
break;
|
|
83
|
+
default:
|
|
84
|
+
((_a = checkout.completions) !== null && _a !== void 0 ? _a : []).forEach((c) => this.seenCompletionCreatedAts.add(c.created_at));
|
|
85
|
+
this.terminalState = 'ready';
|
|
86
|
+
this.startPolling();
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
startPolling() {
|
|
91
|
+
this.pollTimeoutHandle = setTimeout(() => {
|
|
92
|
+
this.stopAll();
|
|
93
|
+
this.terminalState = 'error';
|
|
94
|
+
this.errorMessage = 'Checkout polling timed out';
|
|
95
|
+
this.errorEvent.emit({
|
|
96
|
+
message: 'Checkout polling timed out',
|
|
97
|
+
errorCode: ComponentErrorCodes.FETCH_ERROR,
|
|
98
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
99
|
+
});
|
|
100
|
+
}, this.pollTimeoutMs);
|
|
101
|
+
this.pollIntervalHandle = setInterval(() => this.tick(), this.effectivePollInterval);
|
|
102
|
+
}
|
|
103
|
+
tick() {
|
|
104
|
+
if (this.inFlight)
|
|
105
|
+
return;
|
|
106
|
+
this.inFlight = true;
|
|
107
|
+
this.getCheckout({
|
|
108
|
+
onSuccess: ({ checkout }) => {
|
|
109
|
+
this.inFlight = false;
|
|
110
|
+
this.handlePollResult(checkout);
|
|
111
|
+
},
|
|
112
|
+
onError: ({ error, code, severity }) => {
|
|
113
|
+
this.inFlight = false;
|
|
114
|
+
this.stopAll();
|
|
115
|
+
this.terminalState = 'error';
|
|
116
|
+
this.errorMessage = error;
|
|
117
|
+
this.errorEvent.emit({ message: error, errorCode: code, severity });
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
handlePollResult(checkout) {
|
|
122
|
+
var _a;
|
|
123
|
+
const completions = (_a = checkout.completions) !== null && _a !== void 0 ? _a : [];
|
|
124
|
+
const newFailures = completions.filter((c) => !this.seenCompletionCreatedAts.has(c.created_at) && c.payment_status === 'failed');
|
|
125
|
+
newFailures.forEach((c) => this.seenCompletionCreatedAts.add(c.created_at));
|
|
126
|
+
if (newFailures.length > 0) {
|
|
127
|
+
this.terminalState = 'payment-failed';
|
|
128
|
+
if (this.failedDismissHandle)
|
|
129
|
+
clearTimeout(this.failedDismissHandle);
|
|
130
|
+
this.failedDismissHandle = setTimeout(() => {
|
|
131
|
+
if (this.terminalState === 'payment-failed')
|
|
132
|
+
this.terminalState = 'ready';
|
|
133
|
+
}, 3000);
|
|
134
|
+
}
|
|
135
|
+
if (checkout.status === ICheckoutStatus.completed) {
|
|
136
|
+
this.stopAll();
|
|
137
|
+
this.terminalState = 'completed';
|
|
138
|
+
this.paymentStatus = this.resolvePaymentStatus(checkout);
|
|
139
|
+
this.checkoutCompleted.emit({ checkoutId: this.checkoutId, paymentStatus: this.paymentStatus });
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (checkout.status === ICheckoutStatus.expired) {
|
|
143
|
+
this.stopAll();
|
|
144
|
+
this.terminalState = 'expired';
|
|
145
|
+
this.checkoutExpired.emit({ checkoutId: this.checkoutId });
|
|
146
|
+
this.errorEvent.emit({
|
|
147
|
+
message: ComponentErrorMessages.CHECKOUT_EXPIRED,
|
|
148
|
+
errorCode: ComponentErrorCodes.CHECKOUT_EXPIRED,
|
|
149
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
resolvePaymentStatus(checkout) {
|
|
154
|
+
var _a, _b;
|
|
155
|
+
const completions = (_a = checkout.completions) !== null && _a !== void 0 ? _a : [];
|
|
156
|
+
const sorted = [...completions].sort((a, b) => new Date(b.updated_at).getTime() - new Date(a.updated_at).getTime());
|
|
157
|
+
const latestStatus = (_b = sorted[0]) === null || _b === void 0 ? void 0 : _b.payment_status;
|
|
158
|
+
if (latestStatus === CompletionStatuses.succeeded)
|
|
159
|
+
return 'succeeded';
|
|
160
|
+
if (latestStatus == null) {
|
|
161
|
+
return checkout.successful_payment_id ? 'succeeded' : 'pending';
|
|
162
|
+
}
|
|
163
|
+
return 'pending';
|
|
164
|
+
}
|
|
165
|
+
stopAll() {
|
|
166
|
+
if (this.pollIntervalHandle) {
|
|
167
|
+
clearInterval(this.pollIntervalHandle);
|
|
168
|
+
this.pollIntervalHandle = null;
|
|
169
|
+
}
|
|
170
|
+
if (this.pollTimeoutHandle) {
|
|
171
|
+
clearTimeout(this.pollTimeoutHandle);
|
|
172
|
+
this.pollTimeoutHandle = null;
|
|
173
|
+
}
|
|
174
|
+
if (this.failedDismissHandle) {
|
|
175
|
+
clearTimeout(this.failedDismissHandle);
|
|
176
|
+
this.failedDismissHandle = null;
|
|
177
|
+
}
|
|
178
|
+
this.inFlight = false;
|
|
179
|
+
}
|
|
180
|
+
render() {
|
|
181
|
+
if (!this.authToken || !this.checkoutId)
|
|
182
|
+
return null;
|
|
183
|
+
return (h("div", null, this.terminalState === 'loading' && null, (this.terminalState === 'ready' || this.terminalState === 'payment-failed') && (h("div", null, h("justifi-checkout-qr-code", { checkoutId: this.checkoutId }), this.terminalState === 'payment-failed' && (h("p", null, "Payment failed. Please try again.")), this.terminalState === 'ready' && (h("p", null, "Scan to pay")))), this.terminalState === 'completed' && (h("div", null, this.paymentStatus === 'succeeded'
|
|
184
|
+
? h("p", null, "Payment received")
|
|
185
|
+
: h("p", null, "Payment pending"))), this.terminalState === 'expired' && (h("p", null, "Checkout expired. Please create a new checkout.")), this.terminalState === 'error' && (h("p", null, this.errorMessage))));
|
|
186
|
+
}
|
|
187
|
+
static get is() { return "justifi-qr-terminal"; }
|
|
188
|
+
static get properties() {
|
|
189
|
+
return {
|
|
190
|
+
"authToken": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"mutable": false,
|
|
193
|
+
"complexType": {
|
|
194
|
+
"original": "string",
|
|
195
|
+
"resolved": "string",
|
|
196
|
+
"references": {}
|
|
197
|
+
},
|
|
198
|
+
"required": true,
|
|
199
|
+
"optional": false,
|
|
200
|
+
"docs": {
|
|
201
|
+
"tags": [],
|
|
202
|
+
"text": ""
|
|
203
|
+
},
|
|
204
|
+
"getter": false,
|
|
205
|
+
"setter": false,
|
|
206
|
+
"reflect": false,
|
|
207
|
+
"attribute": "auth-token"
|
|
208
|
+
},
|
|
209
|
+
"checkoutId": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"mutable": false,
|
|
212
|
+
"complexType": {
|
|
213
|
+
"original": "string",
|
|
214
|
+
"resolved": "string",
|
|
215
|
+
"references": {}
|
|
216
|
+
},
|
|
217
|
+
"required": true,
|
|
218
|
+
"optional": false,
|
|
219
|
+
"docs": {
|
|
220
|
+
"tags": [],
|
|
221
|
+
"text": ""
|
|
222
|
+
},
|
|
223
|
+
"getter": false,
|
|
224
|
+
"setter": false,
|
|
225
|
+
"reflect": false,
|
|
226
|
+
"attribute": "checkout-id"
|
|
227
|
+
},
|
|
228
|
+
"pollIntervalMs": {
|
|
229
|
+
"type": "number",
|
|
230
|
+
"mutable": false,
|
|
231
|
+
"complexType": {
|
|
232
|
+
"original": "number",
|
|
233
|
+
"resolved": "number",
|
|
234
|
+
"references": {}
|
|
235
|
+
},
|
|
236
|
+
"required": false,
|
|
237
|
+
"optional": false,
|
|
238
|
+
"docs": {
|
|
239
|
+
"tags": [],
|
|
240
|
+
"text": ""
|
|
241
|
+
},
|
|
242
|
+
"getter": false,
|
|
243
|
+
"setter": false,
|
|
244
|
+
"reflect": false,
|
|
245
|
+
"attribute": "poll-interval-ms",
|
|
246
|
+
"defaultValue": "3000"
|
|
247
|
+
},
|
|
248
|
+
"pollTimeoutMs": {
|
|
249
|
+
"type": "number",
|
|
250
|
+
"mutable": false,
|
|
251
|
+
"complexType": {
|
|
252
|
+
"original": "number",
|
|
253
|
+
"resolved": "number",
|
|
254
|
+
"references": {}
|
|
255
|
+
},
|
|
256
|
+
"required": false,
|
|
257
|
+
"optional": false,
|
|
258
|
+
"docs": {
|
|
259
|
+
"tags": [],
|
|
260
|
+
"text": ""
|
|
261
|
+
},
|
|
262
|
+
"getter": false,
|
|
263
|
+
"setter": false,
|
|
264
|
+
"reflect": false,
|
|
265
|
+
"attribute": "poll-timeout-ms",
|
|
266
|
+
"defaultValue": "600000"
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
static get states() {
|
|
271
|
+
return {
|
|
272
|
+
"terminalState": {},
|
|
273
|
+
"paymentStatus": {},
|
|
274
|
+
"errorMessage": {}
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
static get events() {
|
|
278
|
+
return [{
|
|
279
|
+
"method": "checkoutCompleted",
|
|
280
|
+
"name": "checkout-completed",
|
|
281
|
+
"bubbles": true,
|
|
282
|
+
"cancelable": true,
|
|
283
|
+
"composed": true,
|
|
284
|
+
"docs": {
|
|
285
|
+
"tags": [],
|
|
286
|
+
"text": ""
|
|
287
|
+
},
|
|
288
|
+
"complexType": {
|
|
289
|
+
"original": "{ checkoutId: string; paymentStatus: string }",
|
|
290
|
+
"resolved": "{ checkoutId: string; paymentStatus: string; }",
|
|
291
|
+
"references": {}
|
|
292
|
+
}
|
|
293
|
+
}, {
|
|
294
|
+
"method": "checkoutExpired",
|
|
295
|
+
"name": "checkout-expired",
|
|
296
|
+
"bubbles": true,
|
|
297
|
+
"cancelable": true,
|
|
298
|
+
"composed": true,
|
|
299
|
+
"docs": {
|
|
300
|
+
"tags": [],
|
|
301
|
+
"text": ""
|
|
302
|
+
},
|
|
303
|
+
"complexType": {
|
|
304
|
+
"original": "{ checkoutId: string }",
|
|
305
|
+
"resolved": "{ checkoutId: string; }",
|
|
306
|
+
"references": {}
|
|
307
|
+
}
|
|
308
|
+
}, {
|
|
309
|
+
"method": "errorEvent",
|
|
310
|
+
"name": "error-event",
|
|
311
|
+
"bubbles": true,
|
|
312
|
+
"cancelable": true,
|
|
313
|
+
"composed": true,
|
|
314
|
+
"docs": {
|
|
315
|
+
"tags": [],
|
|
316
|
+
"text": ""
|
|
317
|
+
},
|
|
318
|
+
"complexType": {
|
|
319
|
+
"original": "ComponentErrorEvent",
|
|
320
|
+
"resolved": "ComponentErrorEvent",
|
|
321
|
+
"references": {
|
|
322
|
+
"ComponentErrorEvent": {
|
|
323
|
+
"location": "import",
|
|
324
|
+
"path": "../../api/ComponentEvents",
|
|
325
|
+
"id": "src/api/ComponentEvents.ts::ComponentErrorEvent"
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}];
|
|
330
|
+
}
|
|
331
|
+
static get watchers() {
|
|
332
|
+
return [{
|
|
333
|
+
"propName": "authToken",
|
|
334
|
+
"methodName": "propChanged"
|
|
335
|
+
}, {
|
|
336
|
+
"propName": "checkoutId",
|
|
337
|
+
"methodName": "propChanged"
|
|
338
|
+
}];
|
|
339
|
+
}
|
|
340
|
+
static get listeners() {
|
|
341
|
+
return [{
|
|
342
|
+
"name": "error-event",
|
|
343
|
+
"method": "suppressInnerErrors",
|
|
344
|
+
"target": undefined,
|
|
345
|
+
"capture": false,
|
|
346
|
+
"passive": false
|
|
347
|
+
}];
|
|
348
|
+
}
|
|
349
|
+
}
|
package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list-filters.js
CHANGED
|
@@ -50,9 +50,9 @@ export class JustifiTerminalOrdersListFilters {
|
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
52
|
const filterMenuParams = Object.assign({}, filterParams);
|
|
53
|
-
return (h(StyledHost, { key: '
|
|
54
|
-
convertToLocal(filterParams.created_after, { showInputDateTime: true }), showTime: true, disabled: !!this.createdAfter, part: filterParam })), h("div", { key: '
|
|
55
|
-
convertToLocal(filterParams.created_before, { showInputDateTime: true }), showTime: true, disabled: !!this.createdBefore, part: filterParam })), h("div", { key: '
|
|
53
|
+
return (h(StyledHost, { key: '287baf0a2de1287195105adbebd501d2bccd21d7' }, h("table-filters-menu", { key: 'b0112de1075f459780d01528f017780c9ceedb18', params: filterMenuParams, clearParams: clearParams, part: filterMenu }, h("div", { key: 'f9acabaf7d2edbe4eabb81edc92b2378ef563012', class: "grid-cols-2 gap-3 p-1" }, h("div", { key: 'e76d3b3771b8084fc5f6bf32fac2c75c3da87abb', class: "p-2" }, h("form-control-select", { key: '9c687e7202a310500e85d3cbce29268ac04cdd4a', name: "order_status", label: "Order Status", options: this.terminalOrderStatusOptions, inputHandler: this.setParamsOnChange, defaultValue: this.orderStatus || filterParams.order_status || '', disabled: !!this.orderStatus, part: filterParam })), h("div", { key: '345ebc972663899a456a7a660863cd81a9770a87', class: "p-2" }, h("form-control-select", { key: '26879377755e826a1d1f236ab5e54a22415451e8', name: "order_type", label: "Order Type", options: this.terminalOrderTypeOptions, inputHandler: this.setParamsOnChange, defaultValue: this.orderType || filterParams.order_type || '', disabled: !!this.orderType, part: filterParam })), h("div", { key: '2a7df2b8c9a3bfbbd76cca1a732c01521b08dd34', class: "p-2" }, h("form-control-date", { key: '3fbceb80eaf7ae48e02221961317d8c77ec2c5a5', name: "created_after", label: "Created After", inputHandler: this.handleDateInput, defaultValue: convertToLocal(this.createdAfter, { showInputDateTime: true }) ||
|
|
54
|
+
convertToLocal(filterParams.created_after, { showInputDateTime: true }), showTime: true, disabled: !!this.createdAfter, part: filterParam })), h("div", { key: '4c3c59ab54215591c5b0eb9a26c45a0265e48d96', class: "p-2" }, h("form-control-date", { key: 'aea46abb41595c0cc5d82edd0f1f09425c0a1701', name: "created_before", label: "Created Before", inputHandler: this.handleDateInput, defaultValue: convertToLocal(this.createdBefore, { showInputDateTime: true }) ||
|
|
55
|
+
convertToLocal(filterParams.created_before, { showInputDateTime: true }), showTime: true, disabled: !!this.createdBefore, part: filterParam })), h("div", { key: 'e83af454cde29c12fcd6e2e37093bf70fd03718c', class: "p-2" }, h("form-control-text", { key: '3c5fe84b5883b7df6247ed1eba1a15871cb882b5', name: "company_name", label: "Company Name", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.companyName || filterParams.company_name, disabled: !!this.companyName, part: filterParam }))))));
|
|
56
56
|
}
|
|
57
57
|
static get is() { return "justifi-terminal-orders-list-filters"; }
|
|
58
58
|
static get encapsulation() { return "shadow"; }
|
|
@@ -125,8 +125,8 @@ export class JustifiTerminalOrdersList {
|
|
|
125
125
|
return !this.showEmptyState && !this.showErrorState && !this.loading;
|
|
126
126
|
}
|
|
127
127
|
render() {
|
|
128
|
-
return (h(StyledHost, { key: '
|
|
129
|
-
this.terminalOrdersTable.rowData.map((data, index) => (h(TableRow, { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler }, data)))), this.paging && (h(TableFoot, { key: '
|
|
128
|
+
return (h(StyledHost, { key: '14c0dfe45a6833251f4c2d1d27ea49568f7ac01e' }, h(TableWrapper, { key: '7995d0b2ccb002265769804aa112dca1178d14dd' }, h(TableComponent, { key: 'ddfb54945255a1ae601659b5dee46da8e7fbfb52' }, h(TableHead, { key: '26958541cd82e414d9b079ac18ff69022969a4b8' }, h(TableHeadRow, { key: '1068214ddc3e0003bab2212c0baff74c7e086b96' }, this.terminalOrdersTable.columnData.map((column) => column))), h(TableBody, { key: '7b043e72311e7c956855320b7293a33e41f08da2' }, h(TableLoadingState, { key: 'b2532063645be1e926cfd7dca5b33414d09e5703', columnSpan: this.terminalOrdersTable.columnKeys.length, isLoading: this.loading }), h(TableEmptyState, { key: 'ceec3f0f885e1377afdf36ca2714ebac9b6f7bfc', isEmpty: this.showEmptyState, columnSpan: this.terminalOrdersTable.columnKeys.length }), h(TableErrorState, { key: '2c35baac2f8902e8bf96844f17f57104ba253986', columnSpan: this.terminalOrdersTable.columnKeys.length, errorMessage: this.errorMessage }), this.showRowData &&
|
|
129
|
+
this.terminalOrdersTable.rowData.map((data, index) => (h(TableRow, { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler }, data)))), this.paging && (h(TableFoot, { key: 'f5e1fe9ba78d5cee96e044c60ffaabe45ff3d19d' }, h(TableFootRow, { key: 'ab8c1111b2a1124ba3f0b0bf2deb5893cf4c4ce5' }, h(TableFootCell, { key: 'd463b0e2db8c5d093b38816d78c9176e302fe2c0', colSpan: this.terminalOrdersTable.columnData.length }, h("pagination-menu", { key: '364dfccaa8480e63e51fa3bbdbf4cbb560e9fbbf', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }) })))))))));
|
|
130
130
|
}
|
|
131
131
|
static get is() { return "justifi-terminal-orders-list"; }
|
|
132
132
|
static get encapsulation() { return "shadow"; }
|
|
@@ -45,7 +45,7 @@ export class JustifiTerminalsListFilters {
|
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
47
|
const filterMenuParams = Object.assign({}, filterParams);
|
|
48
|
-
return (h(StyledHost, { key: '
|
|
48
|
+
return (h(StyledHost, { key: '525d0f21fd86348f6fa6f54177f0ad119cf91bf2' }, h("table-filters-menu", { key: '70599c95318b14012ca78d108e1e766d1a8c6459', params: filterMenuParams, clearParams: clearParams, part: filterMenu }, h("div", { key: '32c1c355e6a8ac09431f4954484e60670dcc5ff5', class: "grid-cols-2 gap-3 p-1" }, h("div", { key: 'ee88118d7a04042cd7f55caaf8cc3aea64fe1760', class: "p-2" }, h("form-control-text", { key: 'e56a6496c6fb4263ae571d8ed0f63a9d0a1629da', name: "terminal_id", label: "Terminal ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.terminalId || filterParams.terminal_id, disabled: !!this.terminalId, part: filterParam })), h("div", { key: '2c76c1e127d9cf79b9ed508e6266c33a034597b0', class: "p-2" }, h("form-control-text", { key: '75917f144ab87008533d7e2c59c984b6468c36c0', name: "terminal_order_id", label: "Terminal Order ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.terminalOrderId || filterParams.terminal_order_id, disabled: !!this.terminalOrderId, part: filterParam })), h("div", { key: '38162c73f48f3bb2e5f6745c7cf215154fddcbbb', class: "p-2" }, h("form-control-text", { key: '096c325deecea07554f5cc8d59a690c8321b6a05', name: "provider_id", label: "Device ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.providerId || filterParams.provider_id, disabled: !!this.providerId, part: filterParam })), h("div", { key: '403264eb68429594acee6a5d97781eafbdb33c81', class: "p-2" }, h("form-control-text", { key: 'd39ae5201f328985d72b3a79c65848a49adbbe45', name: "serial_number", label: "Serial Number", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.serialNumber || filterParams.serial_number, disabled: !!this.serialNumber, part: filterParam })), h("div", { key: 'f609fa409e36463b9e1cd4dc68a6be4d22122553', class: "p-2" }, h("form-control-select", { key: 'c19b381e48f030b865003187e470d55b0fcbe373', name: "status", label: "Status", options: this.terminalStatusOptions, inputHandler: this.setParamsOnChange, defaultValue: this.terminalStatus || filterParams.status || '', disabled: !!this.terminalStatus, part: filterParam })), h("div", { key: '12e30437276bf2d7764a61af0a399ea519794904', class: "p-2" }, h("form-control-date", { key: 'aa30f779b70a96d9327a2adabdebe5330d453ada', name: "created_after", label: "Created After", inputHandler: this.handleDateInput, defaultValue: convertToLocal(this.createdAfter || filterParams.created_after, { showInputDateTime: true }), showTime: true, disabled: !!this.createdAfter, part: filterParam })), h("div", { key: 'e972337331bb18cdbf1ee40a241ac8de9f7b0553', class: "p-2" }, h("form-control-date", { key: 'e76864998f47a37d7fef5b1241a6dd8bc8e8a1a8', name: "created_before", label: "Created Before", inputHandler: this.handleDateInput, defaultValue: convertToLocal(this.createdBefore || filterParams.created_before, { showInputDateTime: true }), showTime: true, disabled: !!this.createdBefore, part: filterParam }))))));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "justifi-terminals-list-filters"; }
|
|
51
51
|
static get encapsulation() { return "shadow"; }
|
|
@@ -150,9 +150,9 @@ export class JustifiTerminalsList {
|
|
|
150
150
|
return params;
|
|
151
151
|
}
|
|
152
152
|
get subAccountParams() {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
const accountIdNumbers = this.terminals.map((terminal) => terminal.account_id);
|
|
154
|
+
const uniqueAccountIds = [...new Set(accountIdNumbers)];
|
|
155
|
+
const accountIdString = uniqueAccountIds.join(',');
|
|
156
156
|
return { sub_account_id: accountIdString };
|
|
157
157
|
}
|
|
158
158
|
get entityId() {
|
|
@@ -168,7 +168,7 @@ export class JustifiTerminalsList {
|
|
|
168
168
|
return !this.showEmptyState && !this.showErrorState && !this.loading;
|
|
169
169
|
}
|
|
170
170
|
render() {
|
|
171
|
-
return (h(StyledHost, { key: '
|
|
171
|
+
return (h(StyledHost, { key: '69c475e7a428c549a05f21bbd9bd80ce6d77836b' }, h(TableWrapper, { key: 'a3d916daff63336299366f27959b8e54134f54c5' }, h(TableComponent, { key: '412538503e7a212bd7b5723dddad82abe95fc3c2' }, h(TableHead, { key: '5501e72fd1931b1ffc17e6bf0d09d692b9cfbe17' }, h(TableHeadRow, { key: 'e0391a60a807cbdba97ef11f04275eb3072dc40c' }, this.terminalsTable.columnData.map((column) => column))), h(TableBody, { key: '56686e423499aff459fa3d6d93fae0fd7621b10b' }, h(TableLoadingState, { key: '0b70b5a0132754b1ce14e8baaeb7a9932c73b0ad', columnSpan: this.terminalsTable.columnKeys.length, isLoading: this.loading }), h(TableEmptyState, { key: '1230c30259de7ad89a1ccf1bb709db5bdda9152f', isEmpty: this.showEmptyState, columnSpan: this.terminalsTable.columnKeys.length }), h(TableErrorState, { key: 'fc5dbeae973d56980e077fa861d0bf95f282cbec', columnSpan: this.terminalsTable.columnKeys.length, errorMessage: this.errorMessage }), this.showRowData && this.terminalsTable.rowData.map((data, index) => (h(TableRow, { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler }, data)))), this.paging && (h(TableFoot, { key: 'c68e2cb14c8fa6a56243803e440cc13388ffaaf4' }, h(TableFootRow, { key: 'bcc17671c48f5a397dff15333a49305a443aef21' }, h(TableFootCell, { key: '92a690d558b001bb346c2e17fb1e02691ec2a029', colSpan: this.terminalsTable.columnData.length }, h("pagination-menu", { key: '2a8233397675c7af4fd95df203eb4438f1c4adbd', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }) })))))))));
|
|
172
172
|
}
|
|
173
173
|
static get is() { return "justifi-terminals-list"; }
|
|
174
174
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/tokenize-payment-method/justifi-tokenize-payment-method.js
CHANGED
|
@@ -139,7 +139,8 @@ export class JustifiTokenizePaymentMethod {
|
|
|
139
139
|
this.selectedPaymentMethod = PAYMENT_METHODS.NEW_CARD;
|
|
140
140
|
checkoutStore.selectedPaymentMethod = { type: PAYMENT_METHODS.NEW_CARD };
|
|
141
141
|
}
|
|
142
|
-
else if (!this.disableBankAccount
|
|
142
|
+
else if (!this.disableBankAccount &&
|
|
143
|
+
(!checkoutStore.checkoutLoaded || checkoutStore.achPaymentsEnabled)) {
|
|
143
144
|
this.selectedPaymentMethod = PAYMENT_METHODS.NEW_BANK_ACCOUNT;
|
|
144
145
|
checkoutStore.selectedPaymentMethod = { type: PAYMENT_METHODS.NEW_BANK_ACCOUNT };
|
|
145
146
|
}
|
|
@@ -167,10 +168,11 @@ export class JustifiTokenizePaymentMethod {
|
|
|
167
168
|
}
|
|
168
169
|
get availablePaymentMethods() {
|
|
169
170
|
const methods = [];
|
|
171
|
+
const achAllowedForCheckout = !checkoutStore.checkoutLoaded || checkoutStore.achPaymentsEnabled;
|
|
170
172
|
if (!this.disableCreditCard) {
|
|
171
173
|
methods.push(PAYMENT_METHODS.NEW_CARD);
|
|
172
174
|
}
|
|
173
|
-
if (!this.disableBankAccount) {
|
|
175
|
+
if (!this.disableBankAccount && achAllowedForCheckout) {
|
|
174
176
|
methods.push(PAYMENT_METHODS.NEW_BANK_ACCOUNT);
|
|
175
177
|
}
|
|
176
178
|
return methods;
|
|
@@ -260,7 +262,7 @@ export class JustifiTokenizePaymentMethod {
|
|
|
260
262
|
} }));
|
|
261
263
|
}
|
|
262
264
|
render() {
|
|
263
|
-
return (h(StyledHost, { key: '
|
|
265
|
+
return (h(StyledHost, { key: 'bc76697688be332ef84db56e61b6b455a6d1e986' }, h("form", { key: '8f64f55f945d4ff4ed0f144c724dbd71278ec771' }, h("fieldset", { key: '15b6d388117738391089cf91f999247cddb29714' }, h("div", { key: 'a4e23f7808b446dff6f7da437dba3cb57d2d62aa', class: "row gy-3" }, h("div", { key: '63b0584d217d9bb50036eb7d5837e7287be58760', class: "col-12" }, this.availablePaymentMethods.map((method) => this.renderPaymentMethodOption(method))), h("div", { key: 'c9345be3429cd8ab01a84e8584270938feceba39', class: "col-12" }, h("internal-button", { key: 'aa56df7b6b1250e9b81fbc281b969d2a37a05428', text: this.submitButtonText, variant: "primary", type: "submit", clickHandler: (e) => this.tokenizePaymentMethod(e), isLoading: this.isLoading, "data-testid": "submit-button", hidden: this.computedHideSubmitButton })))))));
|
|
264
266
|
}
|
|
265
267
|
static get is() { return "justifi-tokenize-payment-method"; }
|
|
266
268
|
static get encapsulation() { return "shadow"; }
|
|
@@ -11,6 +11,7 @@ const initialState = {
|
|
|
11
11
|
isWalletProcessing: false,
|
|
12
12
|
applePayEnabled: false,
|
|
13
13
|
googlePayEnabled: false,
|
|
14
|
+
achPaymentsEnabled: false,
|
|
14
15
|
insuranceEnabled: false,
|
|
15
16
|
bnplProviderApiVersion: '',
|
|
16
17
|
bnplProviderCheckoutUrl: '',
|
|
@@ -18,6 +19,7 @@ const initialState = {
|
|
|
18
19
|
bnplProviderMode: '',
|
|
19
20
|
checkoutId: '',
|
|
20
21
|
checkoutLoaded: false,
|
|
22
|
+
checkoutMode: null,
|
|
21
23
|
bankAccountVerification: undefined,
|
|
22
24
|
disableBankAccount: false,
|
|
23
25
|
disableCreditCard: false,
|
|
@@ -45,6 +47,7 @@ Object.keys(initialState).forEach((key) => {
|
|
|
45
47
|
export function getAvailablePaymentMethodTypes() {
|
|
46
48
|
var _a;
|
|
47
49
|
const methods = [];
|
|
50
|
+
const achAllowedForCheckout = !checkoutStore.checkoutLoaded || checkoutStore.achPaymentsEnabled;
|
|
48
51
|
if (!checkoutStore.disablePaymentMethodGroup &&
|
|
49
52
|
((_a = checkoutStore.paymentMethods) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
50
53
|
const hasSavedCard = checkoutStore.paymentMethods.some((pm) => pm.type === PAYMENT_METHODS.SAVED_CARD);
|
|
@@ -52,14 +55,16 @@ export function getAvailablePaymentMethodTypes() {
|
|
|
52
55
|
if (hasSavedCard && !checkoutStore.disableCreditCard) {
|
|
53
56
|
methods.push(PAYMENT_METHODS.SAVED_CARD);
|
|
54
57
|
}
|
|
55
|
-
if (hasSavedBank &&
|
|
58
|
+
if (hasSavedBank &&
|
|
59
|
+
!checkoutStore.disableBankAccount &&
|
|
60
|
+
achAllowedForCheckout) {
|
|
56
61
|
methods.push(PAYMENT_METHODS.SAVED_BANK_ACCOUNT);
|
|
57
62
|
}
|
|
58
63
|
}
|
|
59
64
|
if (!checkoutStore.disableCreditCard) {
|
|
60
65
|
methods.push(PAYMENT_METHODS.NEW_CARD);
|
|
61
66
|
}
|
|
62
|
-
if (!checkoutStore.disableBankAccount) {
|
|
67
|
+
if (!checkoutStore.disableBankAccount && achAllowedForCheckout) {
|
|
63
68
|
methods.push(PAYMENT_METHODS.NEW_BANK_ACCOUNT);
|
|
64
69
|
}
|
|
65
70
|
if (checkoutStore.bnplEnabled) {
|
|
@@ -72,7 +77,8 @@ export function getAvailablePaymentMethodTypes() {
|
|
|
72
77
|
methods.push(PAYMENT_METHODS.GOOGLE_PAY);
|
|
73
78
|
}
|
|
74
79
|
if (checkoutStore.bankAccountVerification === true &&
|
|
75
|
-
!checkoutStore.disableBankAccount
|
|
80
|
+
!checkoutStore.disableBankAccount &&
|
|
81
|
+
achAllowedForCheckout) {
|
|
76
82
|
methods.push(PAYMENT_METHODS.PLAID);
|
|
77
83
|
}
|
|
78
84
|
return methods;
|
|
@@ -108,7 +108,7 @@ export class CustomPopper {
|
|
|
108
108
|
this.hideEvent.emit();
|
|
109
109
|
}
|
|
110
110
|
render() {
|
|
111
|
-
return (h("div", { key: '
|
|
111
|
+
return (h("div", { key: 'dd78d45fac5784e4e35b567edd830849d7a6e7e6' }, h("style", { key: '9eb0b20522bf597e5220c0ccd83e0ee7bd8e5b3e' }, `
|
|
112
112
|
.popper-content {
|
|
113
113
|
display: none;
|
|
114
114
|
}
|
|
@@ -116,7 +116,7 @@ export class CustomPopper {
|
|
|
116
116
|
display: block;
|
|
117
117
|
z-index: 1030;
|
|
118
118
|
}
|
|
119
|
-
`), h("div", { key: '
|
|
119
|
+
`), h("div", { key: 'de0afbe656eacf34ed147beeeb8d5485b8e1c187', class: "popper-content", ref: (el) => this.popperContentRef = el }, h("slot", { key: 'ebb302495c71a1e5f1fd5236ce75495b5d4bc3b3' }))));
|
|
120
120
|
}
|
|
121
121
|
static get is() { return "custom-popper"; }
|
|
122
122
|
static get properties() {
|
|
@@ -34,10 +34,10 @@ export class FormControlCheckbox {
|
|
|
34
34
|
return inputCheckbox;
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
|
-
return (h(Host, { key: '
|
|
37
|
+
return (h(Host, { key: 'dc2fdbd7fd92a0205b15e4b302458d8f0d775b35' }, h("div", { key: 'f32f7d5cb559282cece071f3623bdab80998bc04', class: 'form-group d-flex flex-column' }, h("div", { key: '5481439484b97ad733a0051f1722a5c3ed45778d', class: "form-check" }, h("input", { key: '9e96a563e5b0b1a9589dff7eb4f3eb3038d4918b', ref: el => (this.checkboxElement = el), type: "checkbox", id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
|
|
38
38
|
this.isFocused = false;
|
|
39
39
|
this.formControlBlur.emit();
|
|
40
|
-
}, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-check-input is-invalid' : 'form-check-input', disabled: this.disabled, checked: this.checked }), h("label", { key: '
|
|
40
|
+
}, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-check-input is-invalid' : 'form-check-input', disabled: this.disabled, checked: this.checked }), h("label", { key: '11a27a415d7741d8a29dde8d1fd029c2e143f235', class: "form-check-label", htmlFor: this.name, part: label }, this.label)), h(FormControlHelpText, { key: '3e0ef15182200a48d3cf3142c3511a0ad8095db3', helpText: this.helpText, name: this.name }), h(FormControlErrorText, { key: 'e85175ea76f6073d7ee813a3f2d8eaecc044601a', errorText: this.errorText, name: this.name }))));
|
|
41
41
|
}
|
|
42
42
|
static get is() { return "form-control-checkbox"; }
|
|
43
43
|
static get properties() {
|
|
@@ -42,10 +42,10 @@ export class FormControlDate {
|
|
|
42
42
|
return part;
|
|
43
43
|
}
|
|
44
44
|
render() {
|
|
45
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: 'a7bf2b14b5b1d29ea4ae370c440d9fbeac550ca4' }, h("div", { key: 'bdb2162f367f5fdec34fae2d8732d084958246da', class: "form-group d-flex flex-column" }, h("div", { key: 'eb9483d77d8f1d1effd3278b83e4540b6017ee4c', class: "d-flex gap-2" }, h("label", { key: '2947a82052e88c4bb44d9d32e409d7a39baf157f', part: label, class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: 'edfbc6ddb02cb5d70abd0867f8da8bab860ba598', helpText: this.helpText })), h("input", { key: '2a2d8d464e330ae2ba56f76dadede59c180cdcb6', type: this.showTime ? 'datetime-local' : 'date', ref: el => (this.dateInput = el), id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
|
|
46
46
|
this.isFocused = false;
|
|
47
47
|
this.formControlBlur.emit();
|
|
48
|
-
}, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-control is-invalid' : 'form-control', disabled: this.disabled, max: this.maxDate }), h(FormControlErrorText, { key: '
|
|
48
|
+
}, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-control is-invalid' : 'form-control', disabled: this.disabled, max: this.maxDate }), h(FormControlErrorText, { key: '8837370dd05097b6d43489855ac87eff8270ae25', errorText: this.errorText, name: this.name }))));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "form-control-date"; }
|
|
51
51
|
static get properties() {
|
|
@@ -7,7 +7,7 @@ export class FormControlFileV2 {
|
|
|
7
7
|
this.disabled = false;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '52fee4080e9475313f4043c1a1e116d07881fd72', exportparts: "label,input,input-invalid" }, h("div", { key: 'efe6ee7fae0693fad8086e7849fdc03a01525368', class: "form-group d-flex flex-column" }, h("div", { key: 'dd224535e329aa82cc86be2f32f40b4a8904e1bc', class: "d-flex align-items-start gap-2" }, h("label", { key: '6cee04c50d6eaba123d00ee5ffdad036e46bbf7d', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: '30e545c71fa6a5e4eac985ea6073dc5b2ab78629', helpText: this.helpText })), h("input", { key: '3ba7425da1d80314acdd0050c90aa8a795473584', type: "file", name: this.name, part: `input ${this.errorText ? "input-invalid " : ""}${this.disabled ? "input-disabled" : ""}`, class: this.errorText ? "form-control is-invalid" : "form-control", multiple: this.multiple, disabled: this.disabled, onBlur: () => this.formControlBlur.emit(), onChange: () => this.errorText = "" }), h(FormControlErrorText, { key: '9ad4526e2937d98d555b325e60d20dc7305ee786', errorText: this.errorText, name: this.name }))));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "form-control-file-v2"; }
|
|
13
13
|
static get properties() {
|
|
@@ -40,10 +40,10 @@ export class FormControlFile {
|
|
|
40
40
|
return part;
|
|
41
41
|
}
|
|
42
42
|
render() {
|
|
43
|
-
return (h(Host, { key: '
|
|
43
|
+
return (h(Host, { key: '9463f54c8850245de8d3ae92a45447fe8d2ce329' }, h("div", { key: 'fec5946a226ef5c270514e6b1f8a95de60d6bcb0', class: "form-group d-flex flex-column" }, h("div", { key: '95783cbeab704b1b970af6619191667991814e73', class: "d-flex align-items-start gap-2" }, h("label", { key: 'c258720ecba808fcf18d3408569b4e391ca0e31f', part: label, class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: '280b23806bc9616506eb56025318b5c6fe395762', helpText: this.helpText })), h("input", { key: '2fcdd1ad6c923de9b28587ee3d1349d0fdf021eb', ref: (el) => this.fileInput = el, type: "file", name: this.name, part: this.part, class: this.errorText ? "form-control is-invalid" : "form-control", multiple: this.multiple, disabled: this.disabled, onChange: this.changeHandler, onInput: this.handleFormControlInput, onFocus: () => this.isFocused = true, onBlur: () => {
|
|
44
44
|
this.isFocused = false;
|
|
45
45
|
this.formControlBlur.emit();
|
|
46
|
-
} }), h(FormControlErrorText, { key: '
|
|
46
|
+
} }), h(FormControlErrorText, { key: 'df64bb1a0ac921da01fa8a4c3b63a8f5880781d2', errorText: this.errorText, name: this.name }))));
|
|
47
47
|
}
|
|
48
48
|
static get is() { return "form-control-file"; }
|
|
49
49
|
static get properties() {
|
|
@@ -42,10 +42,10 @@ export class FormControlMonetary {
|
|
|
42
42
|
return input;
|
|
43
43
|
}
|
|
44
44
|
render() {
|
|
45
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: '6b13b9d4871571ab80480c044b813f70db17a85b' }, h("div", { key: 'de33d4a9dc8c5b5048c8b95d9c860433cb488c7c', class: "form-group d-flex flex-column" }, h("label", { key: 'e243e257c45018233a948c880e4fb15676f1b776', part: label, class: "form-label", htmlFor: this.name }, this.label), h(FormControlHelpText, { key: 'c490aa1db17d5a181666631cd95c509dbb32aece', name: this.name, helpText: this.helpText }), h("div", { key: '69dd679301294e3c6a31ce0b880ec291ee6cf23e', class: "input-group" }, h("span", { key: '71ed3716a7ea67933950b2140db4552799968193', class: "input-group-text", part: inputAdornment }, "$"), h("input", { key: 'a1ddad4f875b56fde2d1a0054dd2cfe0c3797e0d', ref: el => this.formControl = el, id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
|
|
46
46
|
this.isFocused = false;
|
|
47
47
|
this.formControlBlur.emit();
|
|
48
|
-
}, onInput: (event) => this.updateInput(event.target.value), onKeyDown: this.keyDownHandler, onPaste: this.keyDownHandler, maxLength: this.maxLength, part: this.inputPart, class: this.errorText ? "form-control is-invalid" : "form-control", type: "text", disabled: this.disabled })), h(FormControlErrorText, { key: '
|
|
48
|
+
}, onInput: (event) => this.updateInput(event.target.value), onKeyDown: this.keyDownHandler, onPaste: this.keyDownHandler, maxLength: this.maxLength, part: this.inputPart, class: this.errorText ? "form-control is-invalid" : "form-control", type: "text", disabled: this.disabled })), h(FormControlErrorText, { key: '6bce010df58a187981efcad682cdc54150422bd6', errorText: this.errorText, name: this.name }))));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "form-control-monetary"; }
|
|
51
51
|
static get properties() {
|