@justifi/webcomponents 6.0.0-rc.1 → 6.0.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Api-CPuq_15r.js → Api-DyimBzKT.js} +2 -2
- package/dist/cjs/{Refund-CqWNG8sx.js → Refund-BefKONu4.js} +6 -3
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +3 -3
- package/dist/cjs/{badge-CMmPvqtE.js → badge-CcJ9H85-.js} +1 -1
- package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +7 -7
- package/dist/cjs/bank-account-form.cjs.entry.js +9 -6
- package/dist/cjs/business-details-core.cjs.entry.js +4 -4
- package/dist/cjs/{business.service-C3BdUPlm.js → business.service-BB6zl4Gc.js} +2 -2
- package/dist/cjs/{button-CfVQSysQ.js → button-DsHDMHaa.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +9 -6
- package/dist/cjs/{check-pkg-version-D_lazhBQ.js → check-pkg-version-DiQ-d5Nl.js} +9 -3
- package/dist/cjs/{checkout.service-B0ZmvWwI.js → checkout.service-B-R80p4f.js} +2 -2
- package/dist/cjs/checkout.store-BGvYPPz0.js +88 -0
- package/dist/cjs/checkouts-list-core.cjs.entry.js +10 -10
- package/dist/cjs/{payments-list-params-state-BNbT1fuJ.js → checkouts-list-params-state-Cewmin_p.js} +1 -1
- package/dist/cjs/{checkouts-table-UN5gPpQ_.js → checkouts-table-DjMdEiEW.js} +3 -3
- package/dist/cjs/{config-state-5xZf-jax.js → config-state-BBOZIS8x.js} +1 -1
- package/dist/cjs/custom-popper_2.cjs.entry.js +1 -1
- package/dist/cjs/{dispute.service-DsPEAcDn.js → dispute.service-B5tITFAh.js} +2 -2
- package/dist/cjs/form-alert_5.cjs.entry.js +1 -1
- package/dist/cjs/form-control-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/form-control-date.cjs.entry.js +2 -2
- package/dist/cjs/{form-control-error-text-HM0zQerh.js → form-control-error-text-B-P5UDhm.js} +1 -1
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +2 -2
- package/dist/cjs/{form-control-help-text-5KIUw1IP.js → form-control-help-text-JoZjhb9m.js} +1 -1
- package/dist/cjs/form-control-help-text.cjs.entry.js +1 -1
- package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +3 -3
- package/dist/cjs/form-control-monetary.cjs.entry.js +4 -4
- package/dist/cjs/form-control-number-masked_2.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number.cjs.entry.js +3 -3
- package/dist/cjs/form-control-radio.cjs.entry.js +3 -3
- package/dist/cjs/form-control-select_2.cjs.entry.js +2 -2
- package/dist/cjs/{get-payment-details-DtCXaIMx.js → get-payment-details-BfgRmNL4.js} +2 -2
- package/dist/cjs/{get-subaccounts-CwCH5rC8.js → get-subaccounts-Bnfv2tEN.js} +3 -3
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +4 -4
- package/dist/cjs/{header-1-DD41iNlG.js → header-1-DRA3f4Jh.js} +1 -1
- package/dist/cjs/{header-3-D9Wa0IfT.js → header-3-sOdOpfx3.js} +1 -1
- package/dist/cjs/hidden-input_2.cjs.entry.js +4 -4
- package/dist/cjs/{index-Yd9aLenr.js → index-B32W0A3m.js} +1 -1
- package/dist/cjs/{index-dm_GlYlb.js → index-C9hBD-32.js} +2 -2
- package/dist/cjs/index-D-dD-aC2.js +30 -0
- package/dist/cjs/index.cjs.js +8 -0
- package/dist/cjs/{insurance-state-Cyva9u6S.js → insurance-state-d2thhXUX.js} +2 -2
- package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +7 -7
- package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +8 -8
- package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +1 -1
- package/dist/cjs/justifi-apple-pay.cjs.entry.js +782 -0
- package/dist/cjs/justifi-bank-account-billing-form-simple_9.cjs.entry.js +16 -15
- package/dist/cjs/justifi-business-details.cjs.entry.js +10 -10
- package/dist/cjs/justifi-business-form.cjs.entry.js +13 -13
- package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +1 -1
- package/dist/cjs/justifi-checkout-summary_7.cjs.entry.js +1421 -0
- package/dist/cjs/justifi-checkout.cjs.entry.js +26 -48
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +7 -7
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +13 -13
- package/dist/cjs/justifi-config-provider.cjs.entry.js +3 -3
- package/dist/cjs/justifi-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +9 -9
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +12 -12
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +9 -9
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +12 -12
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payment-details.cjs.entry.js +11 -11
- package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +12 -12
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payments-list.cjs.entry.js +13 -13
- package/dist/cjs/justifi-payout-details.cjs.entry.js +10 -10
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +12 -12
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +14 -14
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +13 -13
- package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +17 -12
- package/dist/cjs/justifi-skeleton.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +7 -7
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +11 -11
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +7 -7
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +13 -13
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-Cp_7Ls2E.js → package-Be2aoTf8.js} +1 -1
- package/dist/cjs/pagination-menu.cjs.entry.js +1 -1
- package/dist/cjs/payment-details-core.cjs.entry.js +7 -7
- package/dist/cjs/payment-method-option.cjs.entry.js +2 -2
- package/dist/cjs/{payment.service-1H0VC3LV.js → payment.service-aR96UW5e.js} +2 -2
- package/dist/cjs/payments-list-core.cjs.entry.js +11 -11
- package/dist/cjs/{payouts-list-params-state-BNbT1fuJ.js → payments-list-params-state-Cewmin_p.js} +1 -1
- package/dist/cjs/{payments-status-PB63klt3.js → payments-status-DXRh_ekP.js} +2 -2
- package/dist/cjs/{payments-table-quF0NnsS.js → payments-table-BE8u0-i0.js} +3 -3
- package/dist/cjs/payout-details-core.cjs.entry.js +8 -8
- package/dist/cjs/{payout.service-CIZFU-hV.js → payout.service-6Cl_yXXQ.js} +2 -2
- package/dist/cjs/payouts-list-core.cjs.entry.js +11 -11
- package/dist/cjs/{checkouts-list-params-state-BNbT1fuJ.js → payouts-list-params-state-Cewmin_p.js} +1 -1
- package/dist/cjs/{payouts-status-Bk1JFzbP.js → payouts-status-DxTQZv3i.js} +2 -2
- package/dist/cjs/{payouts-table-D_CCTR_k.js → payouts-table-BbydhJUr.js} +3 -3
- package/dist/cjs/{skeleton-x-GSs3xk.js → skeleton-C7DQRD6r.js} +1 -1
- package/dist/cjs/{spinner-Kb1BFvnL.js → spinner-jmeA44Ee.js} +1 -1
- package/dist/cjs/{styled-host-CqQYxX-w.js → styled-host-BfVJlAsJ.js} +1 -1
- package/dist/cjs/{table-BJVUhh3s.js → table-Ccdrt0v_.js} +2 -2
- package/dist/cjs/table-filters-menu.cjs.entry.js +2 -2
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +10 -10
- package/dist/cjs/{terminal-orders-list-params-state-BNbT1fuJ.js → terminal-orders-list-params-state-Cewmin_p.js} +1 -1
- package/dist/cjs/{terminal-orders-table-0O5jtzYj.js → terminal-orders-table-B4HjERrK.js} +5 -5
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/{terminal.service-DUlyMTrX.js → terminal.service-D1FAYZzd.js} +2 -2
- package/dist/cjs/terminals-list-core.cjs.entry.js +10 -10
- package/dist/cjs/terminals-list-params-state-Cewmin_p.js +22 -0
- package/dist/cjs/{terminals-table-C2BNRUS5.js → terminals-table-C79Xc4FI.js} +3 -3
- package/dist/cjs/{utils-Df-pajL7.js → utils-Bzyj4qWe.js} +1 -1
- package/dist/cjs/{utils-BaGF9XIe.js → utils-ChCUZgUy.js} +6 -0
- package/dist/cjs/webcomponents.cjs.js +3 -3
- package/dist/collection/api/ApplePay.js +119 -0
- package/dist/collection/api/Payment.js +5 -2
- package/dist/collection/api/services/apple-pay.service.js +293 -0
- package/dist/collection/api/services/plaid.service.js +20 -0
- package/dist/collection/assets/plaid-icon.svg +1 -0
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +6 -3
- package/dist/collection/components/checkout/card-form/card-form.js +6 -3
- package/dist/collection/components/checkout/checkout.js +17 -39
- package/dist/collection/components/checkout/save-new-payment-method.js +1 -1
- package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +4 -0
- package/dist/collection/components/modular-checkout/ModularCheckout.js +28 -0
- package/dist/collection/components/modular-checkout/modular-checkout.js +228 -125
- package/dist/collection/components/modular-checkout/sub-components/apple-pay-skeleton.js +10 -0
- package/dist/collection/components/modular-checkout/sub-components/apple-pay.js +509 -0
- package/dist/collection/components/modular-checkout/sub-components/plaid-payment-method.js +885 -0
- package/dist/collection/components/modular-checkout/sub-components/plaid-payment-method.test.js +124 -0
- package/dist/collection/components/modular-checkout/sub-components/saved-payment-methods.js +7 -5
- package/dist/collection/components/modular-checkout/sub-components/sezzle-payment-method.js +25 -8
- package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +63 -34
- package/dist/collection/index.js +1 -0
- package/dist/collection/store/checkout.store.js +46 -2
- package/dist/collection/ui-components/apple-pay-button.js +146 -0
- package/dist/collection/ui-components/form/form-control-radio.js +5 -5
- package/dist/collection/ui-components/shadow-dom-components/justifi-radio-list-item.js +4 -4
- package/dist/collection/utils/check-pkg-version.js +6 -0
- package/dist/collection/utils/utils.js +5 -0
- package/dist/docs.json +1037 -212
- package/dist/esm/{Api-N_veT2p6.js → Api-DAWuvzbl.js} +2 -2
- package/dist/esm/{Refund-Di6J0oN2.js → Refund-CVh70dXA.js} +7 -4
- package/dist/esm/additional-questions-details_5.entry.js +4 -4
- package/dist/esm/{badge-D_mzXSCQ.js → badge-DSYSJcRy.js} +2 -2
- package/dist/esm/bank-account-document-form-inputs_4.entry.js +8 -8
- package/dist/esm/bank-account-form.entry.js +10 -7
- package/dist/esm/business-details-core.entry.js +5 -5
- package/dist/esm/{business.service-Bdvhdc_d.js → business.service-cQrH5BqF.js} +2 -2
- package/dist/esm/{button-CeR8qVS3.js → button-CpllL0At.js} +2 -2
- package/dist/esm/card-form.entry.js +10 -7
- package/dist/esm/{check-pkg-version-Bb69ihTN.js → check-pkg-version-CAnDiqiu.js} +9 -3
- package/dist/esm/{checkout.service-XgGFa7H8.js → checkout.service-Bbgi1I6V.js} +2 -2
- package/dist/esm/checkout.store-CCdFOPCK.js +83 -0
- package/dist/esm/checkouts-list-core.entry.js +11 -11
- package/dist/esm/{checkouts-list-params-state-SMXQIZTt.js → checkouts-list-params-state-D8tzsGR_.js} +1 -1
- package/dist/esm/{checkouts-table-CFZYoYjn.js → checkouts-table-Ddf2I-Ul.js} +4 -4
- package/dist/esm/{config-state-BrllxiM0.js → config-state-DZeVYerv.js} +1 -1
- package/dist/esm/custom-popper_2.entry.js +2 -2
- package/dist/esm/{dispute.service-CKPcmwhH.js → dispute.service-CrZsNDW8.js} +2 -2
- package/dist/esm/form-alert_5.entry.js +2 -2
- package/dist/esm/form-control-checkbox.entry.js +4 -4
- package/dist/esm/form-control-date.entry.js +3 -3
- package/dist/esm/{form-control-error-text-D3ZwkOv-.js → form-control-error-text-R7U07nTg.js} +2 -2
- package/dist/esm/form-control-file-v2_2.entry.js +3 -3
- package/dist/esm/{form-control-help-text-C39ZW65w.js → form-control-help-text-CRLH-2f7.js} +2 -2
- package/dist/esm/form-control-help-text.entry.js +1 -1
- package/dist/esm/form-control-monetary-provisioning.entry.js +4 -4
- package/dist/esm/form-control-monetary.entry.js +5 -5
- package/dist/esm/form-control-number-masked_2.entry.js +3 -3
- package/dist/esm/form-control-number.entry.js +4 -4
- package/dist/esm/form-control-radio.entry.js +4 -4
- package/dist/esm/form-control-select_2.entry.js +3 -3
- package/dist/esm/{get-payment-details-Dt-dr16k.js → get-payment-details-0VzpMNY9.js} +2 -2
- package/dist/esm/{get-subaccounts-BsoVLANw.js → get-subaccounts-9UMbyFiT.js} +3 -3
- package/dist/esm/gross-payment-chart-core.entry.js +5 -5
- package/dist/esm/{header-1-E-hEi3wF.js → header-1-3M9If0gM.js} +2 -2
- package/dist/esm/{header-3-Dm7M85kz.js → header-3-CWa41YWq.js} +2 -2
- package/dist/esm/hidden-input_2.entry.js +5 -5
- package/dist/esm/{index-B9me4yN2.js → index-B_KxSZIF.js} +1 -1
- package/dist/esm/{index-kpoIU4v_.js → index-Bn7inNWG.js} +2 -2
- package/dist/esm/index-CbL73B6U.js +30 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/{insurance-state-CB4l8sOv.js → insurance-state-CTalqbNa.js} +3 -3
- package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +8 -8
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +9 -9
- package/dist/esm/justifi-additional-statement_8.entry.js +2 -2
- package/dist/esm/justifi-apple-pay.entry.js +780 -0
- package/dist/esm/justifi-bank-account-billing-form-simple_9.entry.js +17 -16
- package/dist/esm/justifi-business-details.entry.js +11 -11
- package/dist/esm/justifi-business-form.entry.js +14 -14
- package/dist/esm/justifi-business-representative-form-inputs.entry.js +2 -2
- package/dist/esm/justifi-checkout-summary_7.entry.js +1413 -0
- package/dist/esm/justifi-checkout.entry.js +26 -48
- package/dist/esm/justifi-checkouts-list-filters.entry.js +8 -8
- package/dist/esm/justifi-checkouts-list.entry.js +14 -14
- package/dist/esm/justifi-config-provider.entry.js +3 -3
- package/dist/esm/justifi-details.entry.js +3 -3
- package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
- package/dist/esm/justifi-dispute-management.entry.js +9 -9
- package/dist/esm/justifi-dispute-notification_3.entry.js +13 -13
- package/dist/esm/justifi-gross-payment-chart.entry.js +10 -10
- package/dist/esm/justifi-order-terminals.entry.js +13 -13
- package/dist/esm/justifi-owner-form_3.entry.js +9 -9
- package/dist/esm/justifi-payment-details.entry.js +12 -12
- package/dist/esm/justifi-payment-provisioning-core.entry.js +4 -4
- package/dist/esm/justifi-payment-provisioning.entry.js +9 -9
- package/dist/esm/justifi-payment-transactions-list.entry.js +13 -13
- package/dist/esm/justifi-payments-list-filters.entry.js +6 -6
- package/dist/esm/justifi-payments-list.entry.js +14 -14
- package/dist/esm/justifi-payout-details.entry.js +11 -11
- package/dist/esm/justifi-payout-transactions-list.entry.js +13 -13
- package/dist/esm/justifi-payouts-list-filters.entry.js +6 -6
- package/dist/esm/justifi-payouts-list.entry.js +15 -15
- package/dist/esm/justifi-refund-payment.entry.js +14 -14
- package/dist/esm/justifi-saved-payment-method.entry.js +2 -2
- package/dist/esm/justifi-season-interruption-insurance.entry.js +18 -13
- package/dist/esm/justifi-skeleton.entry.js +4 -4
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +8 -8
- package/dist/esm/justifi-terminal-orders-list.entry.js +12 -12
- package/dist/esm/justifi-terminals-list-filters.entry.js +8 -8
- package/dist/esm/justifi-terminals-list.entry.js +14 -14
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{package-O3LY2Da6.js → package-CnWtPu8L.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +2 -2
- package/dist/esm/{parts-CfF8KKwx.js → parts-RvUQ__Pq.js} +1 -1
- package/dist/esm/payment-details-core.entry.js +8 -8
- package/dist/esm/payment-method-option.entry.js +3 -3
- package/dist/esm/{payment.service-BWO84KlP.js → payment.service-TxyxCg0E.js} +2 -2
- package/dist/esm/payments-list-core.entry.js +12 -12
- package/dist/esm/{payments-list-params-state-SMXQIZTt.js → payments-list-params-state-D8tzsGR_.js} +1 -1
- package/dist/esm/{payments-status-XoZrlbiZ.js → payments-status-5orNU2Rd.js} +2 -2
- package/dist/esm/{payments-table-Dh4P9mTb.js → payments-table-gkJV5GNK.js} +4 -4
- package/dist/esm/payout-details-core.entry.js +9 -9
- package/dist/esm/{payout.service-Cld6TS5W.js → payout.service-BOwZ4wWh.js} +2 -2
- package/dist/esm/payouts-list-core.entry.js +12 -12
- package/dist/esm/{payouts-list-params-state-SMXQIZTt.js → payouts-list-params-state-D8tzsGR_.js} +1 -1
- package/dist/esm/{payouts-status-Qm2jZG1-.js → payouts-status-CZPwa2AE.js} +2 -2
- package/dist/esm/{payouts-table-DMVAZp-r.js → payouts-table-0PtktGRd.js} +4 -4
- package/dist/esm/{skeleton-DrHwsgs_.js → skeleton-qMb0_Cjy.js} +2 -2
- package/dist/esm/{spinner-XBq6mVJW.js → spinner-DUzyWLhj.js} +2 -2
- package/dist/esm/{styled-host-B_XBaM7z.js → styled-host-CTAGIN84.js} +1 -1
- package/dist/esm/{table-qqt2Ew5y.js → table-Br3n9Xu-.js} +3 -3
- package/dist/esm/table-filters-menu.entry.js +3 -3
- package/dist/esm/terminal-orders-list-core.entry.js +11 -11
- package/dist/esm/{terminal-orders-list-params-state-SMXQIZTt.js → terminal-orders-list-params-state-D8tzsGR_.js} +1 -1
- package/dist/esm/{terminal-orders-table-BN4Co4T8.js → terminal-orders-table-DTBSIMlJ.js} +6 -6
- package/dist/esm/terminal-quantity-selector.entry.js +2 -2
- package/dist/esm/{terminal.service-DmYCUQcA.js → terminal.service-E6dZlM43.js} +2 -2
- package/dist/esm/terminals-list-core.entry.js +11 -11
- package/dist/esm/terminals-list-params-state-D8tzsGR_.js +16 -0
- package/dist/esm/{terminals-table-C8LczeG_.js → terminals-table-TGUKTi7I.js} +4 -4
- package/dist/esm/{utils-lb8p1Exq.js → utils-BscIVFn8.js} +6 -1
- package/dist/esm/{utils-kWaZhFAd.js → utils-Dg6gMUTv.js} +2 -2
- package/dist/esm/webcomponents.js +4 -4
- package/dist/module/Analytics.js +6 -0
- package/dist/module/ModularCheckout.js +30 -0
- package/dist/module/Refund.js +5 -2
- package/dist/module/bank-account-form.js +5 -2
- package/dist/module/card-form.js +5 -2
- package/dist/module/checkout.store.js +47 -2
- package/dist/module/form-control-radio2.js +3 -3
- package/dist/module/gross-payment-chart-core2.js +1 -1
- package/dist/module/index.js +1 -0
- package/dist/module/justifi-apple-pay.d.ts +11 -0
- package/dist/module/justifi-apple-pay.js +811 -0
- package/dist/module/justifi-checkout.js +63 -75
- package/dist/module/justifi-order-terminals.js +1 -1
- package/dist/module/justifi-plaid-payment-method.d.ts +11 -0
- package/dist/module/justifi-plaid-payment-method.js +6 -0
- package/dist/module/justifi-radio-list-item2.js +2 -2
- package/dist/module/justifi-season-interruption-insurance.js +5 -1
- package/dist/module/modular-checkout.js +179 -101
- package/dist/module/package.js +1 -1
- package/dist/module/plaid-payment-method.js +687 -0
- package/dist/module/save-new-payment-method.js +1 -1
- package/dist/module/saved-payment-methods.js +7 -5
- package/dist/module/sezzle-payment-method.js +14 -22
- package/dist/module/terminals-list-core2.js +1 -1
- package/dist/module/tokenize-payment-method.js +44 -34
- package/dist/module/utils2.js +6 -1
- package/dist/types/api/ApplePay.d.ts +196 -0
- package/dist/types/api/Checkout.d.ts +9 -14
- package/dist/types/api/Payment.d.ts +4 -3
- package/dist/types/api/services/apple-pay.service.d.ts +55 -0
- package/dist/types/api/services/plaid.service.d.ts +12 -0
- package/dist/types/components/checkout/bank-account-form/bank-account-form.d.ts +1 -0
- package/dist/types/components/checkout/card-form/card-form.d.ts +1 -0
- package/dist/types/components/checkout/checkout.d.ts +6 -7
- package/dist/types/components/modular-checkout/ModularCheckout.d.ts +31 -0
- package/dist/types/components/modular-checkout/modular-checkout.d.ts +13 -4
- package/dist/types/components/modular-checkout/sub-components/apple-pay-skeleton.d.ts +6 -0
- package/dist/types/components/modular-checkout/sub-components/apple-pay.d.ts +39 -0
- package/dist/types/components/modular-checkout/sub-components/plaid-payment-method.d.ts +80 -0
- package/dist/types/components/modular-checkout/sub-components/plaid-payment-method.test.d.ts +1 -0
- package/dist/types/components/modular-checkout/sub-components/saved-payment-methods.d.ts +1 -1
- package/dist/types/components/modular-checkout/sub-components/sezzle-payment-method.d.ts +1 -1
- package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +7 -6
- package/dist/types/components.d.ts +172 -11
- package/dist/types/index.d.ts +2 -0
- package/dist/types/store/checkout.store.d.ts +14 -3
- package/dist/types/ui-components/apple-pay-button.d.ts +17 -0
- package/dist/types/ui-components/form/form-control-radio.d.ts +1 -1
- package/dist/types/ui-components/shadow-dom-components/justifi-radio-list-item.d.ts +1 -1
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/webcomponents/index.esm.js +1 -0
- package/dist/webcomponents/p-0803d130.entry.js +1 -0
- package/dist/webcomponents/{p-Dvxpy_P1.js → p-0Om7jLBs.js} +1 -1
- package/dist/webcomponents/{p-0932f6a9.entry.js → p-117b7f47.entry.js} +1 -1
- package/dist/webcomponents/p-17093105.entry.js +1 -0
- package/dist/webcomponents/{p-f01953ea.entry.js → p-1a08b47f.entry.js} +1 -1
- package/dist/webcomponents/p-1bcb3852.entry.js +1 -0
- package/dist/webcomponents/{p-ae4297dd.entry.js → p-1eb2b847.entry.js} +1 -1
- package/dist/webcomponents/{p-dd257e60.entry.js → p-2f7aa249.entry.js} +1 -1
- package/dist/webcomponents/{p-28c7bef7.entry.js → p-2fa34c82.entry.js} +4 -4
- package/dist/webcomponents/{p-08ea8974.entry.js → p-33311d41.entry.js} +1 -1
- package/dist/webcomponents/p-336c31b3.entry.js +1 -0
- package/dist/webcomponents/{p-22be0859.entry.js → p-3f33c940.entry.js} +1 -1
- package/dist/webcomponents/{p-f3a757b2.entry.js → p-442f86e8.entry.js} +1 -1
- package/dist/webcomponents/{p-a8205044.entry.js → p-44450a94.entry.js} +1 -1
- package/dist/webcomponents/{p-cebe360b.entry.js → p-464e7a8e.entry.js} +1 -1
- package/dist/webcomponents/{p-ba8ae31f.entry.js → p-50392803.entry.js} +1 -1
- package/dist/webcomponents/p-52cbd667.entry.js +1 -0
- package/dist/webcomponents/{p-ded22005.entry.js → p-54ca3070.entry.js} +1 -1
- package/dist/webcomponents/{p-77515be6.entry.js → p-5ad0f438.entry.js} +1 -1
- package/dist/webcomponents/{p-6e18d13f.entry.js → p-613421d4.entry.js} +1 -1
- package/dist/webcomponents/{p-9b75aced.entry.js → p-62d12566.entry.js} +1 -1
- package/dist/webcomponents/p-65ed60bf.entry.js +1 -0
- package/dist/webcomponents/p-6cf30a24.entry.js +1 -0
- package/dist/webcomponents/{p-48bccf3b.entry.js → p-70f51444.entry.js} +1 -1
- package/dist/webcomponents/{p-a4172773.entry.js → p-729dbd8f.entry.js} +1 -1
- package/dist/webcomponents/p-77948b46.entry.js +1 -0
- package/dist/webcomponents/{p-1d53f0b8.entry.js → p-7bcfaff4.entry.js} +1 -1
- package/dist/webcomponents/{p-b0bfa20f.entry.js → p-7cf87637.entry.js} +1 -1
- package/dist/webcomponents/{p-dfd7c212.entry.js → p-7dd74e6f.entry.js} +1 -1
- package/dist/webcomponents/{p-I8XpD1TX.js → p-7s1gsXM5.js} +1 -1
- package/dist/webcomponents/{p-3d85d046.entry.js → p-80331983.entry.js} +1 -1
- package/dist/webcomponents/{p-d0e24727.entry.js → p-85f20746.entry.js} +1 -1
- package/dist/webcomponents/{p-79055216.entry.js → p-8687e5d6.entry.js} +1 -1
- package/dist/webcomponents/p-89ecd650.entry.js +1 -0
- package/dist/webcomponents/p-8a6718b6.entry.js +1 -0
- package/dist/webcomponents/p-8d6b81ba.entry.js +1 -0
- package/dist/webcomponents/{p-a7d5e434.entry.js → p-8d743490.entry.js} +1 -1
- package/dist/webcomponents/{p-8f0339de.entry.js → p-8f7396b1.entry.js} +1 -1
- package/dist/webcomponents/{p-15777cfe.entry.js → p-8ff839a4.entry.js} +1 -1
- package/dist/webcomponents/{p-57143978.entry.js → p-95cbb655.entry.js} +1 -1
- package/dist/webcomponents/{p-ae5a3c2a.entry.js → p-98cffba9.entry.js} +1 -1
- package/dist/webcomponents/{p-4ba144ac.entry.js → p-9a2c044f.entry.js} +1 -1
- package/dist/webcomponents/{p-904a95e5.entry.js → p-9be67b19.entry.js} +1 -1
- package/dist/webcomponents/{p-df199396.entry.js → p-9e8021a1.entry.js} +1 -1
- package/dist/webcomponents/{p-131d799c.entry.js → p-9fc0ea58.entry.js} +1 -1
- package/dist/webcomponents/p-9fc567d8.entry.js +1 -0
- package/dist/webcomponents/{p-424f491c.entry.js → p-9fcff84c.entry.js} +1 -1
- package/dist/webcomponents/p-B71k50jz.js +1 -0
- package/dist/webcomponents/p-BF4U0yVj.js +1 -0
- package/dist/webcomponents/{p-zdIeCUeh.js → p-BHf9IqGw.js} +1 -1
- package/dist/webcomponents/p-BQ2TIFoY.js +1 -0
- package/dist/webcomponents/p-BSt6p1oq.js +1 -0
- package/dist/webcomponents/p-BY1mRAvj.js +1 -0
- package/dist/webcomponents/{p-YND5pTuF.js → p-Bb-6bNcq.js} +1 -1
- package/dist/webcomponents/p-BbZwa5UI.js +1 -0
- package/dist/webcomponents/p-BdKWuCys.js +1 -0
- package/dist/webcomponents/p-BfM6X7lF.js +1 -0
- package/dist/webcomponents/{p-BbYVgLcf.js → p-BjVfIXWC.js} +1 -1
- package/dist/webcomponents/{p-kpoIU4v_.js → p-Bn7inNWG.js} +1 -1
- package/dist/webcomponents/{p-BisQ61nK.js → p-BsGE9UDv.js} +1 -1
- package/dist/webcomponents/{p-BeszVz87.js → p-C5id7s_l.js} +1 -1
- package/dist/webcomponents/{p-CsNubTqD.js → p-CAJnQLZF.js} +1 -1
- package/dist/webcomponents/{p-Bz164TKZ.js → p-CB0mCq1M.js} +1 -1
- package/dist/webcomponents/p-CaAVuW6B.js +1 -0
- package/dist/webcomponents/p-Cb0FhuyU.js +1 -0
- package/dist/webcomponents/p-CbL73B6U.js +1 -0
- package/dist/webcomponents/p-CnWtPu8L.js +1 -0
- package/dist/webcomponents/p-CpaS1Lex.js +1 -0
- package/dist/webcomponents/p-DD0Mvpeu.js +1 -0
- package/dist/webcomponents/p-DDUmOl3v.js +1 -0
- package/dist/webcomponents/p-DIDloHpm.js +1 -0
- package/dist/webcomponents/p-DIjoBk44.js +1 -0
- package/dist/webcomponents/{p-UD2JhYS2.js → p-DK2sRMlx.js} +1 -1
- package/dist/webcomponents/{p-DO3INvI2.js → p-DNo0OPOP.js} +1 -1
- package/dist/webcomponents/{p-BTkXk7ol.js → p-DRXvcLy9.js} +1 -1
- package/dist/webcomponents/{p-BNz6wy4f.js → p-DZYcH7jA.js} +1 -1
- package/dist/webcomponents/p-Da3idOSV.js +1 -0
- package/dist/webcomponents/p-Dgflaz6J.js +1 -0
- package/dist/webcomponents/{p-9y5MOK55.js → p-DhGNCW2f.js} +1 -1
- package/dist/webcomponents/p-DsZZxRXY.js +1 -0
- package/dist/webcomponents/{p-CRFzwZW6.js → p-DxqCFDtF.js} +1 -1
- package/dist/webcomponents/p-ED_TzwCp.js +1 -0
- package/dist/webcomponents/p-JyHlIFWl.js +1 -0
- package/dist/webcomponents/{p-CfF8KKwx.js → p-RvUQ__Pq.js} +1 -1
- package/dist/webcomponents/{p-DWUnL_zj.js → p-Wh1V0gvF.js} +1 -1
- package/dist/webcomponents/{p-c3a2c619.entry.js → p-a55f07af.entry.js} +1 -1
- package/dist/webcomponents/{p-40ba49e4.entry.js → p-aa6194ef.entry.js} +1 -1
- package/dist/webcomponents/{p-d77908ca.entry.js → p-ab6a5dc9.entry.js} +1 -1
- package/dist/webcomponents/{p-463ae23a.entry.js → p-abbf14b5.entry.js} +1 -1
- package/dist/webcomponents/{p-283cd78b.entry.js → p-af9c4174.entry.js} +1 -1
- package/dist/webcomponents/{p-f47095cd.entry.js → p-b7d2f2eb.entry.js} +1 -1
- package/dist/webcomponents/p-bbc4b4cb.entry.js +1 -0
- package/dist/webcomponents/{p-36d72e2d.entry.js → p-c599e526.entry.js} +1 -1
- package/dist/webcomponents/{p-5e10aa65.entry.js → p-d46dbb83.entry.js} +1 -1
- package/dist/webcomponents/{p-6849bf8e.entry.js → p-d62cd269.entry.js} +1 -1
- package/dist/webcomponents/{p-ff3377e7.entry.js → p-d9dd7d24.entry.js} +1 -1
- package/dist/webcomponents/p-dd7352da.entry.js +1 -0
- package/dist/webcomponents/{p-7c51805a.entry.js → p-e8a67dc7.entry.js} +1 -1
- package/dist/webcomponents/p-eP3fmhta.js +1 -0
- package/dist/webcomponents/p-eb2d9e5b.entry.js +1 -0
- package/dist/webcomponents/{p-1f8cd44e.entry.js → p-eddaca4e.entry.js} +1 -1
- package/dist/webcomponents/{p-9106fd74.entry.js → p-ef32fe0e.entry.js} +1 -1
- package/dist/webcomponents/{p-c5b48e8d.entry.js → p-f1cba43c.entry.js} +1 -1
- package/dist/webcomponents/{p-e830a580.entry.js → p-f1f0b405.entry.js} +1 -1
- package/dist/webcomponents/p-f499a8de.entry.js +1 -0
- package/dist/webcomponents/{p-828a61b9.entry.js → p-f4d0cdf0.entry.js} +1 -1
- package/dist/webcomponents/{p-818f51fd.entry.js → p-f680e617.entry.js} +1 -1
- package/dist/webcomponents/{p-bea4309d.entry.js → p-f7c4222f.entry.js} +1 -1
- package/dist/webcomponents/p-fa1884b4.entry.js +1 -0
- package/dist/webcomponents/p-sw5RO19U.js +1 -0
- package/dist/webcomponents/p-z-5r0gWn.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/checkout.store-CV_fuGQw.js +0 -39
- package/dist/cjs/justifi-checkout-summary_6.cjs.entry.js +0 -698
- package/dist/cjs/terminals-list-params-state-BNbT1fuJ.js +0 -22
- package/dist/esm/checkout.store-B60siz2l.js +0 -36
- package/dist/esm/justifi-checkout-summary_6.entry.js +0 -691
- package/dist/esm/terminals-list-params-state-SMXQIZTt.js +0 -16
- package/dist/webcomponents/p-09e768fe.entry.js +0 -1
- package/dist/webcomponents/p-0dcc83ac.entry.js +0 -1
- package/dist/webcomponents/p-1bdce018.entry.js +0 -1
- package/dist/webcomponents/p-2f31a4e5.entry.js +0 -1
- package/dist/webcomponents/p-3a4ca4df.entry.js +0 -1
- package/dist/webcomponents/p-466f33d7.entry.js +0 -1
- package/dist/webcomponents/p-57802e57.entry.js +0 -1
- package/dist/webcomponents/p-5rVtZ2GJ.js +0 -1
- package/dist/webcomponents/p-7322c86e.entry.js +0 -1
- package/dist/webcomponents/p-7WIgS5RM.js +0 -1
- package/dist/webcomponents/p-89e27079.entry.js +0 -1
- package/dist/webcomponents/p-BC8YDY7M.js +0 -1
- package/dist/webcomponents/p-BVD7g3cE.js +0 -1
- package/dist/webcomponents/p-Bb6FBEPP.js +0 -1
- package/dist/webcomponents/p-Bpcb3SsP.js +0 -1
- package/dist/webcomponents/p-Bt388eye.js +0 -1
- package/dist/webcomponents/p-BySyDTv5.js +0 -1
- package/dist/webcomponents/p-C1fMfnu0.js +0 -1
- package/dist/webcomponents/p-CCME-fyU.js +0 -1
- package/dist/webcomponents/p-CLwzqWk2.js +0 -1
- package/dist/webcomponents/p-CVQyw7ao.js +0 -1
- package/dist/webcomponents/p-C_CXv7AN.js +0 -1
- package/dist/webcomponents/p-CwZKT93w.js +0 -1
- package/dist/webcomponents/p-D599ZMGU.js +0 -1
- package/dist/webcomponents/p-DD74a16D.js +0 -1
- package/dist/webcomponents/p-DaDsBt65.js +0 -1
- package/dist/webcomponents/p-JgbsbAhz.js +0 -1
- package/dist/webcomponents/p-O3LY2Da6.js +0 -1
- package/dist/webcomponents/p-WEguiGt1.js +0 -1
- package/dist/webcomponents/p-be06d86a.entry.js +0 -1
- package/dist/webcomponents/p-dd689b5e.entry.js +0 -1
- package/dist/webcomponents/p-dd6d6ddb.entry.js +0 -1
- package/dist/webcomponents/p-e859ece8.entry.js +0 -1
- package/dist/webcomponents/p-eaea7cc1.entry.js +0 -1
- package/dist/webcomponents/p-fa33df9f.entry.js +0 -1
- package/dist/webcomponents/p-ff869ded.entry.js +0 -1
- package/dist/webcomponents/p-pska2q1M.js +0 -1
- package/dist/webcomponents/p-qMrd7_Gp.js +0 -1
- package/dist/webcomponents/p-vRhNRfmB.js +0 -1
- package/dist/webcomponents/p-zrUQD0Wr.js +0 -1
|
@@ -20,7 +20,7 @@ const SaveNewPaymentMethod = /*@__PURE__*/ proxyCustomElement(class SaveNewPayme
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h(StyledHost, { key: '
|
|
23
|
+
return (h(StyledHost, { key: '407e24ad9cd84378dab6a85ed813a8040f93942a' }, h("form-control-checkbox", { key: '73dc01e01c4ca57e26c6897c06a0280fda8c98db', label: "Save New Payment Method", name: "saveNewPaymentMethod", checked: this.isChecked, inputHandler: this.handleCheckboxChange })));
|
|
24
24
|
}
|
|
25
25
|
}, [257, "justifi-save-new-payment-method", {
|
|
26
26
|
"isChecked": [32]
|
|
@@ -6,6 +6,7 @@ import './event-types.js';
|
|
|
6
6
|
import './justifi-radio-list-item2.js';
|
|
7
7
|
import { c as checkoutStore } from './checkout.store.js';
|
|
8
8
|
import { C as CardBrandLabels } from './payment-method-option-utils.js';
|
|
9
|
+
import { a as PAYMENT_METHOD_TYPES } from './ModularCheckout.js';
|
|
9
10
|
import { d as defineCustomElement$2 } from './form-control-help-text2.js';
|
|
10
11
|
import { d as defineCustomElement$1 } from './form-control-radio2.js';
|
|
11
12
|
|
|
@@ -14,15 +15,16 @@ const SavedPaymentMethods = /*@__PURE__*/ proxyCustomElement(class SavedPaymentM
|
|
|
14
15
|
super();
|
|
15
16
|
this.__registerHost();
|
|
16
17
|
this.__attachShadow();
|
|
17
|
-
this.onPaymentMethodOptionClick = (
|
|
18
|
+
this.onPaymentMethodOptionClick = (paymentMethod) => (e) => {
|
|
18
19
|
e.preventDefault();
|
|
19
|
-
checkoutStore.selectedPaymentMethod =
|
|
20
|
+
checkoutStore.selectedPaymentMethod = paymentMethod;
|
|
21
|
+
checkoutStore.paymentToken = paymentMethod.id;
|
|
20
22
|
};
|
|
21
23
|
this.isAllowedPaymentMethod = (paymentMethod) => {
|
|
22
|
-
if (paymentMethod.type ===
|
|
24
|
+
if (paymentMethod.type === PAYMENT_METHOD_TYPES.CARD && checkoutStore.disableCreditCard) {
|
|
23
25
|
return false;
|
|
24
26
|
}
|
|
25
|
-
if (paymentMethod.type ===
|
|
27
|
+
if (paymentMethod.type === PAYMENT_METHOD_TYPES.BANK_ACCOUNT && checkoutStore.disableBankAccount) {
|
|
26
28
|
return false;
|
|
27
29
|
}
|
|
28
30
|
return true;
|
|
@@ -42,7 +44,7 @@ const SavedPaymentMethods = /*@__PURE__*/ proxyCustomElement(class SavedPaymentM
|
|
|
42
44
|
}
|
|
43
45
|
return (h(StyledHost, null, h("div", { class: "saved-payment-methods" }, checkoutStore.paymentMethods.length ? checkoutStore.paymentMethods
|
|
44
46
|
.filter(this.isAllowedPaymentMethod)
|
|
45
|
-
.map((paymentMethod) => (h("div", { class: "radio-list-item p-3", part: radioListItem, onClick: this.onPaymentMethodOptionClick(paymentMethod
|
|
47
|
+
.map((paymentMethod) => (h("div", { class: "radio-list-item p-3", part: radioListItem, onClick: this.onPaymentMethodOptionClick(paymentMethod) }, h("form-control-radio", { name: "paymentMethodType", value: paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id, checked: checkoutStore.paymentToken === (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id), label: `${CardBrandLabels[paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.brand] || ''} *${paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.acct_last_four}` })))) : null)));
|
|
46
48
|
}
|
|
47
49
|
}, [257, "justifi-saved-payment-methods"]);
|
|
48
50
|
function defineCustomElement() {
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as formatCurrency } from './utils2.js';
|
|
3
|
-
import { r as radioListItem } from './parts.js';
|
|
4
3
|
import { c as checkoutStore } from './checkout.store.js';
|
|
5
4
|
import { S as StyledHost } from './styled-host.js';
|
|
6
5
|
import './details.js';
|
|
7
6
|
import './event-types.js';
|
|
8
7
|
import './justifi-radio-list-item2.js';
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
8
|
+
import { P as PAYMENT_METHODS } from './ModularCheckout.js';
|
|
9
|
+
import './config-state.js';
|
|
10
|
+
import { P as PaymentMethodTypes } from './Refund.js';
|
|
11
|
+
import './Pagination.js';
|
|
12
|
+
import './Business.js';
|
|
11
13
|
|
|
12
14
|
const sezzleLogo = (h("img", { class: "sezzle-smart-button-logo-img", src: "https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg", alt: "Sezzle", style: {
|
|
13
15
|
display: 'inline',
|
|
@@ -21,12 +23,7 @@ const SezzlePaymentMethod = /*@__PURE__*/ proxyCustomElement(class SezzlePayment
|
|
|
21
23
|
this.__registerHost();
|
|
22
24
|
this.__attachShadow();
|
|
23
25
|
this.paymentMethodOptionSelected = createEvent(this, "paymentMethodOptionSelected", 7);
|
|
24
|
-
this.paymentMethodOptionId =
|
|
25
|
-
this.onPaymentMethodOptionClick = (e) => {
|
|
26
|
-
e.preventDefault();
|
|
27
|
-
checkoutStore.selectedPaymentMethod = this.paymentMethodOptionId;
|
|
28
|
-
this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId);
|
|
29
|
-
};
|
|
26
|
+
this.paymentMethodOptionId = PAYMENT_METHODS.SEZZLE;
|
|
30
27
|
this.initializeSezzleCheckout = () => {
|
|
31
28
|
let resolveSezzlePromise;
|
|
32
29
|
this.sezzlePromise = new Promise((resolve) => { resolveSezzlePromise = resolve; });
|
|
@@ -69,41 +66,36 @@ const SezzlePaymentMethod = /*@__PURE__*/ proxyCustomElement(class SezzlePayment
|
|
|
69
66
|
this.sezzleButtonRef.click();
|
|
70
67
|
return this.sezzlePromise;
|
|
71
68
|
}
|
|
69
|
+
async handleSelectionClick() {
|
|
70
|
+
checkoutStore.selectedPaymentMethod = { type: PaymentMethodTypes.sezzle };
|
|
71
|
+
this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId);
|
|
72
|
+
}
|
|
72
73
|
render() {
|
|
73
74
|
var _a, _b;
|
|
74
75
|
if (!checkoutStore.bnplEnabled || checkoutStore.disableBnpl) {
|
|
75
76
|
console.warn('justifi-sezzle-payment-method: BNPL is not enabled for this account.');
|
|
76
77
|
return null;
|
|
77
78
|
}
|
|
78
|
-
return (h(StyledHost, { class: "payment-method" }, h("script", { src: "https://checkout-sdk.sezzle.com/checkout.min.js", async: true, ref: (el) => (this.scriptRef = el) }), h("div",
|
|
79
|
+
return (h(StyledHost, { class: "payment-method" }, h("script", { src: "https://checkout-sdk.sezzle.com/checkout.min.js", async: true, ref: (el) => (this.scriptRef = el) }), h("div", null, h("div", null, "Buy now, pay later with ", sezzleLogo), this.installmentPlan && (h("small", null, h("span", null, (_a = this.installmentPlan) === null || _a === void 0 ? void 0 : _a.installments.length), "\u00A0", h("span", null, this.installmentPlan.schedule, " payments of"), "\u00A0", h("span", { class: "fw-bold" }, formatCurrency((_b = this.installmentPlan) === null || _b === void 0 ? void 0 : _b.installments[0].amountInCents)))))));
|
|
79
80
|
}
|
|
80
81
|
}, [257, "justifi-sezzle-payment-method", {
|
|
81
82
|
"installmentPlan": [32],
|
|
82
83
|
"sezzleCheckout": [32],
|
|
83
84
|
"sezzlePromise": [32],
|
|
84
|
-
"resolvePaymentMethod": [64]
|
|
85
|
+
"resolvePaymentMethod": [64],
|
|
86
|
+
"handleSelectionClick": [64]
|
|
85
87
|
}]);
|
|
86
88
|
function defineCustomElement() {
|
|
87
89
|
if (typeof customElements === "undefined") {
|
|
88
90
|
return;
|
|
89
91
|
}
|
|
90
|
-
const components = ["justifi-sezzle-payment-method"
|
|
92
|
+
const components = ["justifi-sezzle-payment-method"];
|
|
91
93
|
components.forEach(tagName => { switch (tagName) {
|
|
92
94
|
case "justifi-sezzle-payment-method":
|
|
93
95
|
if (!customElements.get(tagName)) {
|
|
94
96
|
customElements.define(tagName, SezzlePaymentMethod);
|
|
95
97
|
}
|
|
96
98
|
break;
|
|
97
|
-
case "form-control-help-text":
|
|
98
|
-
if (!customElements.get(tagName)) {
|
|
99
|
-
defineCustomElement$2();
|
|
100
|
-
}
|
|
101
|
-
break;
|
|
102
|
-
case "form-control-radio":
|
|
103
|
-
if (!customElements.get(tagName)) {
|
|
104
|
-
defineCustomElement$1();
|
|
105
|
-
}
|
|
106
|
-
break;
|
|
107
99
|
} });
|
|
108
100
|
}
|
|
109
101
|
defineCustomElement();
|
|
@@ -10,7 +10,7 @@ import { T as TableClickActions } from './event-types.js';
|
|
|
10
10
|
import './justifi-radio-list-item2.js';
|
|
11
11
|
import { B as Badge, a as BadgeVariant } from './badge.js';
|
|
12
12
|
import { v as tableHeadCell, a8 as getAlternateTableCellPart } from './parts.js';
|
|
13
|
-
import {
|
|
13
|
+
import { k as capitalFirstLetter } from './utils2.js';
|
|
14
14
|
import { o as onQueryParamsChange, g as getRequestParams } from './terminals-list-params-state.js';
|
|
15
15
|
import { d as defineCustomElement$1 } from './pagination-menu2.js';
|
|
16
16
|
|
|
@@ -4,9 +4,9 @@ import './details.js';
|
|
|
4
4
|
import './event-types.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './justifi-radio-list-item2.js';
|
|
6
6
|
import { c as checkPkgVersion, J as JustifiAnalytics } from './Analytics.js';
|
|
7
|
-
import { a as ComponentErrorCodes, P as PaymentMethodTypes, C as ComponentErrorSeverity } from './Refund.js';
|
|
8
7
|
import './config-state.js';
|
|
9
8
|
import './dinero.js';
|
|
9
|
+
import { a as ComponentErrorCodes, P as PaymentMethodTypes, C as ComponentErrorSeverity } from './Refund.js';
|
|
10
10
|
import './Pagination.js';
|
|
11
11
|
import './Business.js';
|
|
12
12
|
import { c as checkoutStore } from './checkout.store.js';
|
|
@@ -45,14 +45,12 @@ const TokenizePaymentMethod = /*@__PURE__*/ proxyCustomElement(class TokenizePay
|
|
|
45
45
|
this.__registerHost();
|
|
46
46
|
this.errorEvent = createEvent(this, "error-event", 7);
|
|
47
47
|
this.submitEvent = createEvent(this, "submit-event", 7);
|
|
48
|
-
this.isLoading = false;
|
|
49
48
|
this.computedHideSubmitButton = false;
|
|
49
|
+
this.isLoading = false;
|
|
50
50
|
this.submitButtonText = 'Submit';
|
|
51
51
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
this.analytics = new JustifiAnalytics(this);
|
|
55
|
-
this.validateRequiredProps();
|
|
52
|
+
paymentMethodsChanged() {
|
|
53
|
+
this.setDefaultSelectedPaymentMethod();
|
|
56
54
|
}
|
|
57
55
|
connectedCallback() {
|
|
58
56
|
this.setDefaultSelectedPaymentMethod();
|
|
@@ -61,12 +59,17 @@ const TokenizePaymentMethod = /*@__PURE__*/ proxyCustomElement(class TokenizePay
|
|
|
61
59
|
disconnectedCallback() {
|
|
62
60
|
var _a;
|
|
63
61
|
(_a = this.analytics) === null || _a === void 0 ? void 0 : _a.cleanup();
|
|
62
|
+
if (this.unsubscribeFromStore) {
|
|
63
|
+
this.unsubscribeFromStore();
|
|
64
|
+
}
|
|
64
65
|
}
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
componentWillLoad() {
|
|
67
|
+
checkPkgVersion();
|
|
68
|
+
this.analytics = new JustifiAnalytics(this);
|
|
67
69
|
}
|
|
68
70
|
handleRadioClick(event) {
|
|
69
|
-
this.
|
|
71
|
+
this.selectedPaymentMethod = event.detail;
|
|
72
|
+
checkoutStore.selectedPaymentMethod = { type: event.detail };
|
|
70
73
|
}
|
|
71
74
|
async fillBillingForm(fields) {
|
|
72
75
|
var _a;
|
|
@@ -74,6 +77,7 @@ const TokenizePaymentMethod = /*@__PURE__*/ proxyCustomElement(class TokenizePay
|
|
|
74
77
|
}
|
|
75
78
|
async tokenizePaymentMethod(event) {
|
|
76
79
|
event === null || event === void 0 ? void 0 : event.preventDefault();
|
|
80
|
+
this.validateRequiredProps();
|
|
77
81
|
this.isLoading = true;
|
|
78
82
|
try {
|
|
79
83
|
const validation = await this.validate();
|
|
@@ -116,11 +120,27 @@ const TokenizePaymentMethod = /*@__PURE__*/ proxyCustomElement(class TokenizePay
|
|
|
116
120
|
this.billingFormRef.validate(),
|
|
117
121
|
this.paymentMethodFormRef.validate(),
|
|
118
122
|
]);
|
|
119
|
-
|
|
123
|
+
const result = {
|
|
120
124
|
isValid: billingValidation.isValid && paymentMethodValidation.isValid,
|
|
121
125
|
errors: Object.assign(Object.assign({}, billingValidation.errors), paymentMethodValidation.errors),
|
|
122
126
|
};
|
|
127
|
+
return result;
|
|
128
|
+
}
|
|
129
|
+
async tokenize() {
|
|
130
|
+
try {
|
|
131
|
+
const billingFormFieldValues = await this.billingFormRef.getValues();
|
|
132
|
+
const config = {
|
|
133
|
+
clientId: this.authToken || checkoutStore.authToken,
|
|
134
|
+
account: this.accountId || checkoutStore.accountId,
|
|
135
|
+
paymentMethodMetadata: this.buildPaymentMethodMetadata(billingFormFieldValues),
|
|
136
|
+
};
|
|
137
|
+
return await this.paymentMethodFormRef.tokenize(config);
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
return error;
|
|
141
|
+
}
|
|
123
142
|
}
|
|
143
|
+
// 9. Local methods
|
|
124
144
|
validateRequiredProps() {
|
|
125
145
|
if (!this.authToken && !checkoutStore.authToken) {
|
|
126
146
|
this.emitError({
|
|
@@ -136,14 +156,16 @@ const TokenizePaymentMethod = /*@__PURE__*/ proxyCustomElement(class TokenizePay
|
|
|
136
156
|
}
|
|
137
157
|
}
|
|
138
158
|
setDefaultSelectedPaymentMethod() {
|
|
139
|
-
if (this.
|
|
159
|
+
if (this.selectedPaymentMethod) {
|
|
140
160
|
return;
|
|
141
161
|
}
|
|
142
162
|
if (!this.disableCreditCard) {
|
|
143
|
-
this.
|
|
163
|
+
this.selectedPaymentMethod = PaymentMethodTypes.card;
|
|
164
|
+
checkoutStore.selectedPaymentMethod = { type: PaymentMethodTypes.card };
|
|
144
165
|
}
|
|
145
166
|
else if (!this.disableBankAccount) {
|
|
146
|
-
this.
|
|
167
|
+
this.selectedPaymentMethod = PaymentMethodTypes.bankAccount;
|
|
168
|
+
checkoutStore.selectedPaymentMethod = { type: PaymentMethodTypes.bankAccount };
|
|
147
169
|
}
|
|
148
170
|
}
|
|
149
171
|
setComputedHideSubmitButton() {
|
|
@@ -209,7 +231,8 @@ const TokenizePaymentMethod = /*@__PURE__*/ proxyCustomElement(class TokenizePay
|
|
|
209
231
|
},
|
|
210
232
|
};
|
|
211
233
|
}
|
|
212
|
-
|
|
234
|
+
const result = await this.performTokenization();
|
|
235
|
+
return result;
|
|
213
236
|
}
|
|
214
237
|
catch (error) {
|
|
215
238
|
return { error };
|
|
@@ -227,20 +250,6 @@ const TokenizePaymentMethod = /*@__PURE__*/ proxyCustomElement(class TokenizePay
|
|
|
227
250
|
data: tokenizeResponseData,
|
|
228
251
|
};
|
|
229
252
|
}
|
|
230
|
-
async tokenize() {
|
|
231
|
-
try {
|
|
232
|
-
const billingFormFieldValues = await this.billingFormRef.getValues();
|
|
233
|
-
const config = {
|
|
234
|
-
clientId: this.authToken || checkoutStore.authToken,
|
|
235
|
-
account: this.accountId || checkoutStore.accountId,
|
|
236
|
-
paymentMethodMetadata: this.buildPaymentMethodMetadata(billingFormFieldValues),
|
|
237
|
-
};
|
|
238
|
-
return await this.paymentMethodFormRef.tokenize(config);
|
|
239
|
-
}
|
|
240
|
-
catch (error) {
|
|
241
|
-
return error;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
253
|
buildPaymentMethodMetadata(billingFormFieldValues) {
|
|
245
254
|
return this.shouldSavePaymentMethod
|
|
246
255
|
? Object.assign(Object.assign({}, billingFormFieldValues), { payment_method_group_id: this.paymentMethodGroupID }) : Object.assign({}, billingFormFieldValues);
|
|
@@ -255,17 +264,17 @@ const TokenizePaymentMethod = /*@__PURE__*/ proxyCustomElement(class TokenizePay
|
|
|
255
264
|
return this.disableCreditCard || this.disableBankAccount;
|
|
256
265
|
}
|
|
257
266
|
renderPaymentMethodOption(paymentMethodType) {
|
|
258
|
-
const isSelected = this.
|
|
267
|
+
const isSelected = this.selectedPaymentMethod === paymentMethodType && checkoutStore.selectedPaymentMethod.id === undefined;
|
|
259
268
|
return (h("div", { class: "payment-method" }, h("justifi-radio-list-item", { name: "paymentMethodType", value: paymentMethodType, checked: isSelected, label: PAYMENT_METHOD_TYPE_LABELS[paymentMethodType], hidden: this.shouldHideRadioInput }), isSelected && this.renderSelectedPaymentMethodForm(paymentMethodType)));
|
|
260
269
|
}
|
|
261
270
|
renderSelectedPaymentMethodForm(paymentMethodId) {
|
|
262
|
-
return (h("div", { class: "mt-4 pb-4" }, this.renderPaymentMethodForm(paymentMethodId), h("div", { class: "mt-4" }, h("justifi-billing-form", { ref: (el) => (this.billingFormRef = el), hideCardBillingForm: this.hideCardBillingForm, hideBankAccountBillingForm: this.hideBankAccountBillingForm, paymentMethodType: paymentMethodId })), h("justifi-save-new-payment-method", { hidden: !this.paymentMethodGroupID })));
|
|
271
|
+
return (h("div", { class: "mt-4 pb-4" }, this.renderPaymentMethodForm(paymentMethodId), h("div", { class: "mt-4" }, h("justifi-billing-form", { ref: (el) => (this.billingFormRef = el), hideCardBillingForm: this.hideCardBillingForm, hideBankAccountBillingForm: this.hideBankAccountBillingForm, paymentMethodType: paymentMethodId })), h("div", { class: "mt-4" }, h("justifi-save-new-payment-method", { hidden: !this.paymentMethodGroupID }))));
|
|
263
272
|
}
|
|
264
273
|
renderPaymentMethodForm(paymentMethodId) {
|
|
265
274
|
return paymentMethodId === PaymentMethodTypes.card ? (h("justifi-card-form", { ref: (el) => (this.paymentMethodFormRef = el) })) : (h("justifi-bank-account-form", { ref: (el) => (this.paymentMethodFormRef = el) }));
|
|
266
275
|
}
|
|
267
276
|
render() {
|
|
268
|
-
return (h(StyledHost, { key: '
|
|
277
|
+
return (h(StyledHost, { key: 'a89908d2f192d86edf016b052734f81f46e00f8b' }, h("form", { key: '527d1e5ff94a2db8b2d1223d7beda86fdaf08ff0' }, h("fieldset", { key: 'd8479461d3788dbcb319f1eaf99b7e05c00c49f9' }, h("div", { key: '17f68ee0dceb8353ca54ccf383dc2709444a3b26', class: "row gy-3" }, h("div", { key: '3568f3ac4ef04a9a245d61f2b94f3b79371b0a6f', class: "col-12" }, this.availablePaymentMethods.map((method) => this.renderPaymentMethodOption(method))), h("div", { key: '97be6dbaf8373a82a706a7eb97e9107baa6c1823', class: "col-12" }, h("justifi-button", { key: 'afcd192881ad092f8d31a01e571541079d4d33ac', text: this.submitButtonText, variant: "primary", type: "submit", clickHandler: (e) => this.tokenizePaymentMethod(e), isLoading: this.isLoading, "data-testid": "submit-button", hidden: this.computedHideSubmitButton })))))));
|
|
269
278
|
}
|
|
270
279
|
get host() { return this; }
|
|
271
280
|
static get watchers() { return {
|
|
@@ -282,12 +291,13 @@ const TokenizePaymentMethod = /*@__PURE__*/ proxyCustomElement(class TokenizePay
|
|
|
282
291
|
"hideSubmitButton": [4, "hide-submit-button"],
|
|
283
292
|
"paymentMethodGroupId": [1, "payment-method-group-id"],
|
|
284
293
|
"submitButtonText": [1, "submit-button-text"],
|
|
285
|
-
"isLoading": [32],
|
|
286
|
-
"selectedPaymentMethodId": [32],
|
|
287
294
|
"computedHideSubmitButton": [32],
|
|
295
|
+
"isLoading": [32],
|
|
296
|
+
"selectedPaymentMethod": [32],
|
|
288
297
|
"fillBillingForm": [64],
|
|
289
298
|
"tokenizePaymentMethod": [64],
|
|
290
|
-
"validate": [64]
|
|
299
|
+
"validate": [64],
|
|
300
|
+
"tokenize": [64]
|
|
291
301
|
}, [[0, "radio-click", "handleRadioClick"]], {
|
|
292
302
|
"disableCreditCard": ["paymentMethodsChanged"],
|
|
293
303
|
"disableBankAccount": ["paymentMethodsChanged"]
|
package/dist/module/utils2.js
CHANGED
|
@@ -22295,5 +22295,10 @@ function generateId(length = 10) {
|
|
|
22295
22295
|
}
|
|
22296
22296
|
return result;
|
|
22297
22297
|
}
|
|
22298
|
+
function generateTabId() {
|
|
22299
|
+
var _a;
|
|
22300
|
+
return (((_a = crypto.randomUUID) === null || _a === void 0 ? void 0 : _a.call(crypto)) ||
|
|
22301
|
+
`${Date.now()}-${Math.random().toString(36).slice(2)}`);
|
|
22302
|
+
}
|
|
22298
22303
|
|
|
22299
|
-
export { formatDate as a, formatTimeSeconds as b, formatCurrency as c, formatTime as d, convertToLocal as e, formatMediumDate as f, generateId as g, convertToUTC as h, isEmptyObject as i,
|
|
22304
|
+
export { formatDate as a, formatTimeSeconds as b, formatCurrency as c, formatTime as d, convertToLocal as e, formatMediumDate as f, generateId as g, convertToUTC as h, isEmptyObject as i, generateTabId as j, capitalFirstLetter as k, formatDisplayDate as l, addAttribute as m, formatPhoneNumber as n, processHTML as p, removeAttribute as r, snakeCaseToHumanReadable as s };
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { PagingInfo } from "./Pagination";
|
|
2
|
+
export declare enum ApplePaySessionStatus {
|
|
3
|
+
STATUS_SUCCESS = "STATUS_SUCCESS",
|
|
4
|
+
STATUS_FAILURE = "STATUS_FAILURE"
|
|
5
|
+
}
|
|
6
|
+
export declare enum ApplePayButtonType {
|
|
7
|
+
PLAIN = "plain",
|
|
8
|
+
BUY = "buy",
|
|
9
|
+
SET_UP = "set-up",
|
|
10
|
+
DONATE = "donate",
|
|
11
|
+
CHECK_OUT = "check-out",
|
|
12
|
+
BOOK = "book",
|
|
13
|
+
SUBSCRIBE = "subscribe"
|
|
14
|
+
}
|
|
15
|
+
export declare enum ApplePayButtonStyle {
|
|
16
|
+
BLACK = "black",
|
|
17
|
+
WHITE = "white",
|
|
18
|
+
WHITE_OUTLINE = "white-outline"
|
|
19
|
+
}
|
|
20
|
+
export declare enum ApplePayMerchantCapability {
|
|
21
|
+
SUPPORTS_3DS = "supports3DS",
|
|
22
|
+
SUPPORTS_EMV = "supportsEMV",
|
|
23
|
+
SUPPORTS_CREDIT = "supportsCredit",
|
|
24
|
+
SUPPORTS_DEBIT = "supportsDebit"
|
|
25
|
+
}
|
|
26
|
+
export interface IApplePayLineItem {
|
|
27
|
+
label: string;
|
|
28
|
+
amount: string;
|
|
29
|
+
type?: 'final' | 'pending';
|
|
30
|
+
}
|
|
31
|
+
export interface IApplePayShippingMethod {
|
|
32
|
+
label: string;
|
|
33
|
+
amount: string;
|
|
34
|
+
identifier: string;
|
|
35
|
+
detail?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface IApplePayPaymentRequest {
|
|
38
|
+
countryCode: string;
|
|
39
|
+
currencyCode: string;
|
|
40
|
+
merchantCapabilities: ApplePayMerchantCapability[];
|
|
41
|
+
supportedNetworks: string[];
|
|
42
|
+
total: IApplePayLineItem;
|
|
43
|
+
lineItems?: IApplePayLineItem[];
|
|
44
|
+
shippingMethods?: IApplePayShippingMethod[];
|
|
45
|
+
applicationData?: string;
|
|
46
|
+
supportedCountries?: string[];
|
|
47
|
+
}
|
|
48
|
+
export interface IApplePaySession {
|
|
49
|
+
canMakePayments(): boolean;
|
|
50
|
+
canMakePaymentsWithActiveCard(merchantIdentifier: string): Promise<boolean>;
|
|
51
|
+
supportsVersion(version: number): boolean;
|
|
52
|
+
begin(): void;
|
|
53
|
+
abort(): void;
|
|
54
|
+
completeMerchantValidation(merchantSession: IMerchantSession): void;
|
|
55
|
+
completePayment(result: {
|
|
56
|
+
status: ApplePaySessionStatus;
|
|
57
|
+
}): void;
|
|
58
|
+
completeShippingMethodSelection(update: any): void;
|
|
59
|
+
completePaymentMethodSelection(update: any): void;
|
|
60
|
+
onvalidatemerchant?: (event: IApplePayValidateEvent) => void;
|
|
61
|
+
onpaymentmethodselected?: (event: IApplePayMethodSelectedEvent) => void;
|
|
62
|
+
onshippingmethodselected?: () => void;
|
|
63
|
+
onpaymentauthorized?: (event: any) => void;
|
|
64
|
+
oncancel?: (event: IApplePayCancelEvent) => void;
|
|
65
|
+
}
|
|
66
|
+
export interface IApplePayConfig {
|
|
67
|
+
merchantIdentifier: string;
|
|
68
|
+
displayName: string;
|
|
69
|
+
initiative: string;
|
|
70
|
+
initiativeContext: string;
|
|
71
|
+
buttonType?: ApplePayButtonType;
|
|
72
|
+
buttonStyle?: ApplePayButtonStyle;
|
|
73
|
+
buttonLocale?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface IApplePayError {
|
|
76
|
+
code: string;
|
|
77
|
+
message: string;
|
|
78
|
+
}
|
|
79
|
+
export interface IMerchantSession {
|
|
80
|
+
displayName: string;
|
|
81
|
+
domainName: string;
|
|
82
|
+
epochTimestamp: number;
|
|
83
|
+
expiresAt: number;
|
|
84
|
+
merchantIdentifier: string;
|
|
85
|
+
merchantSessionIdentifier: string;
|
|
86
|
+
nonce: string;
|
|
87
|
+
operationalAnalyticsIdentifier: string;
|
|
88
|
+
pspId: string;
|
|
89
|
+
retries: number;
|
|
90
|
+
signature: string;
|
|
91
|
+
}
|
|
92
|
+
export interface IApplePayTokenData {
|
|
93
|
+
data: string;
|
|
94
|
+
header: {
|
|
95
|
+
publicKeyHash: string;
|
|
96
|
+
ephemeralPublicKey: string;
|
|
97
|
+
transactionId: string;
|
|
98
|
+
};
|
|
99
|
+
signature: string;
|
|
100
|
+
version: string;
|
|
101
|
+
}
|
|
102
|
+
export interface IApplePayTokenPaymentMethod {
|
|
103
|
+
displayName: string;
|
|
104
|
+
network: string;
|
|
105
|
+
type: string;
|
|
106
|
+
}
|
|
107
|
+
export interface IApplePayToken {
|
|
108
|
+
paymentData: IApplePayTokenData;
|
|
109
|
+
paymentMethod: IApplePayTokenPaymentMethod;
|
|
110
|
+
transactionIdentifier: string;
|
|
111
|
+
}
|
|
112
|
+
export interface IApplePayValidateEvent {
|
|
113
|
+
validationURL: string;
|
|
114
|
+
}
|
|
115
|
+
export interface IApplePayCancelEvent {
|
|
116
|
+
sessionError?: {
|
|
117
|
+
code: 'unknown' | 'invalidMerchantSession' | 'userCancel' | string;
|
|
118
|
+
info?: string;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
export interface IApplePayMethodSelectedEvent {
|
|
122
|
+
paymentMethod: IApplePayTokenPaymentMethod;
|
|
123
|
+
}
|
|
124
|
+
export interface IApplePayPaymentProcessRequest {
|
|
125
|
+
paymentData: IApplePayTokenData;
|
|
126
|
+
paymentMethod: IApplePayTokenPaymentMethod;
|
|
127
|
+
transactionIdentifier: string;
|
|
128
|
+
product_details?: {
|
|
129
|
+
name: string;
|
|
130
|
+
price: number;
|
|
131
|
+
description: string;
|
|
132
|
+
};
|
|
133
|
+
description?: string;
|
|
134
|
+
}
|
|
135
|
+
export interface IApplePayPaymentResponse {
|
|
136
|
+
id: string;
|
|
137
|
+
type: string;
|
|
138
|
+
page_info: PagingInfo | null;
|
|
139
|
+
data: {
|
|
140
|
+
account_id: string;
|
|
141
|
+
token: string;
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
export interface IApplePayService {
|
|
145
|
+
validateMerchant(authToken: string, accountId: string): Promise<IMerchantSession>;
|
|
146
|
+
processPayment(authToken: string, accountId: string, payload: IApplePayPaymentProcessRequest): Promise<{
|
|
147
|
+
success: boolean;
|
|
148
|
+
data: IApplePayPaymentResponse;
|
|
149
|
+
}>;
|
|
150
|
+
}
|
|
151
|
+
export declare class ApplePayConfig implements IApplePayConfig {
|
|
152
|
+
merchantIdentifier: string;
|
|
153
|
+
displayName: string;
|
|
154
|
+
initiative: string;
|
|
155
|
+
initiativeContext: string;
|
|
156
|
+
buttonType?: ApplePayButtonType;
|
|
157
|
+
buttonStyle?: ApplePayButtonStyle;
|
|
158
|
+
buttonLocale?: string;
|
|
159
|
+
constructor(data: IApplePayConfig);
|
|
160
|
+
get isValid(): boolean;
|
|
161
|
+
}
|
|
162
|
+
export declare class ApplePayPaymentRequest implements IApplePayPaymentRequest {
|
|
163
|
+
countryCode: string;
|
|
164
|
+
currencyCode: string;
|
|
165
|
+
merchantCapabilities: ApplePayMerchantCapability[];
|
|
166
|
+
supportedNetworks: string[];
|
|
167
|
+
total: IApplePayLineItem;
|
|
168
|
+
lineItems?: IApplePayLineItem[];
|
|
169
|
+
shippingMethods?: IApplePayShippingMethod[];
|
|
170
|
+
applicationData?: string;
|
|
171
|
+
supportedCountries?: string[];
|
|
172
|
+
constructor(data: IApplePayPaymentRequest);
|
|
173
|
+
get isValid(): boolean;
|
|
174
|
+
}
|
|
175
|
+
export declare class ApplePayHelpers {
|
|
176
|
+
static isApplePaySupported(): boolean;
|
|
177
|
+
static canMakePayments(): boolean;
|
|
178
|
+
static canMakePaymentsWithActiveCard(merchantIdentifier: string): Promise<boolean>;
|
|
179
|
+
static formatAmount(amount: number): string;
|
|
180
|
+
static parseAmount(amount: string): number;
|
|
181
|
+
static createLineItem(label: string, amount: number, type?: 'final' | 'pending'): IApplePayLineItem;
|
|
182
|
+
static getDefaultSupportedNetworks(): string[];
|
|
183
|
+
static getDefaultMerchantCapabilities(): ApplePayMerchantCapability[];
|
|
184
|
+
}
|
|
185
|
+
declare global {
|
|
186
|
+
interface Window {
|
|
187
|
+
ApplePaySession?: {
|
|
188
|
+
new (version: number, paymentRequest: IApplePayPaymentRequest): IApplePaySession;
|
|
189
|
+
canMakePayments(): boolean;
|
|
190
|
+
canMakePaymentsWithActiveCard(merchantIdentifier: string): Promise<boolean>;
|
|
191
|
+
supportsVersion(version: number): boolean;
|
|
192
|
+
STATUS_SUCCESS: number;
|
|
193
|
+
STATUS_FAILURE: number;
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
}
|
|
@@ -48,24 +48,14 @@ export interface ICheckout {
|
|
|
48
48
|
payment_amount: number;
|
|
49
49
|
payment_client_id: string;
|
|
50
50
|
payment_description: string;
|
|
51
|
-
payment_methods:
|
|
52
|
-
id: string;
|
|
53
|
-
status: string;
|
|
54
|
-
invalid_reason: null;
|
|
55
|
-
name: string;
|
|
56
|
-
brand: string;
|
|
57
|
-
acct_last_four: string;
|
|
58
|
-
month: string;
|
|
59
|
-
year: string;
|
|
60
|
-
address_line1_check: string;
|
|
61
|
-
address_postal_code_check: string;
|
|
62
|
-
bin_details: null;
|
|
63
|
-
}[];
|
|
51
|
+
payment_methods: ICheckoutPaymentMethod[];
|
|
64
52
|
payment_method_group_id: string;
|
|
65
53
|
payment_settings: {
|
|
66
54
|
ach_payments: boolean;
|
|
67
55
|
bnpl_payments: boolean;
|
|
68
56
|
credit_card_payments: boolean;
|
|
57
|
+
insurance_payments?: boolean;
|
|
58
|
+
bank_account_verification?: boolean;
|
|
69
59
|
};
|
|
70
60
|
bnpl?: IBnpl;
|
|
71
61
|
total_amount: number;
|
|
@@ -95,6 +85,8 @@ export declare class Checkout implements ICheckout {
|
|
|
95
85
|
ach_payments: boolean;
|
|
96
86
|
bnpl_payments: boolean;
|
|
97
87
|
credit_card_payments: boolean;
|
|
88
|
+
insurance_payments?: boolean;
|
|
89
|
+
bank_account_verification?: boolean;
|
|
98
90
|
};
|
|
99
91
|
bnpl?: IBnpl;
|
|
100
92
|
total_amount: number;
|
|
@@ -151,14 +143,17 @@ export interface CheckoutsQueryParams {
|
|
|
151
143
|
status?: ICheckoutStatus;
|
|
152
144
|
payment_mode?: ICheckoutPaymentMode;
|
|
153
145
|
}
|
|
146
|
+
export type CardBrand = 'visa' | 'mastercard' | 'american_express' | 'discover' | 'jcb' | 'diners_club' | 'unionpay';
|
|
147
|
+
export type AccountType = 'checking' | 'savings';
|
|
154
148
|
export interface ICheckoutPaymentMethod {
|
|
155
149
|
id: string;
|
|
156
150
|
type?: string;
|
|
157
151
|
status: string;
|
|
158
152
|
invalid_reason: null;
|
|
159
153
|
name: string;
|
|
160
|
-
brand:
|
|
154
|
+
brand: CardBrand;
|
|
161
155
|
acct_last_four: string;
|
|
156
|
+
account_type: AccountType;
|
|
162
157
|
month: string;
|
|
163
158
|
year: string;
|
|
164
159
|
address_line1_check: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DisputeStatus } from
|
|
2
|
-
import { IRefund } from
|
|
1
|
+
import { DisputeStatus } from './Dispute';
|
|
2
|
+
import { IRefund } from '.';
|
|
3
3
|
export declare enum CaptureStrategy {
|
|
4
4
|
automatic = "automatic",
|
|
5
5
|
manual = "manual"
|
|
@@ -8,7 +8,8 @@ export declare enum PaymentMethodTypes {
|
|
|
8
8
|
card = "card",
|
|
9
9
|
bankAccount = "bankAccount",
|
|
10
10
|
sezzle = "sezzle",
|
|
11
|
-
|
|
11
|
+
plaid = "plaid",
|
|
12
|
+
applePay = "applePay"
|
|
12
13
|
}
|
|
13
14
|
export declare enum PaymentTypes {
|
|
14
15
|
card = "Card",
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { IApplePayConfig, IApplePayPaymentRequest, IApplePayError, ApplePayConfig, IMerchantSession, IApplePayService, IApplePayPaymentProcessRequest, IApplePayPaymentResponse, IApplePayToken } from '../ApplePay';
|
|
2
|
+
export declare class ApplePayService implements IApplePayService {
|
|
3
|
+
private applePayConfig?;
|
|
4
|
+
private currentSession?;
|
|
5
|
+
private currentPaymentRequest?;
|
|
6
|
+
private api;
|
|
7
|
+
/**
|
|
8
|
+
* Initialize Apple Pay configuration
|
|
9
|
+
*/
|
|
10
|
+
initialize(applePayConfig: IApplePayConfig): void;
|
|
11
|
+
/**
|
|
12
|
+
* Validate merchant with Apple Pay servers via API
|
|
13
|
+
*/
|
|
14
|
+
validateMerchant(authToken: string, accountId: string): Promise<IMerchantSession>;
|
|
15
|
+
/**
|
|
16
|
+
* Process Apple Pay payment via API (fixed to match original logic)
|
|
17
|
+
*/
|
|
18
|
+
processPayment(authToken: string, accountId: string, payload: IApplePayPaymentProcessRequest): Promise<{
|
|
19
|
+
success: boolean;
|
|
20
|
+
data: IApplePayPaymentResponse;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* Check if Apple Pay is available on this device/browser
|
|
24
|
+
*/
|
|
25
|
+
isAvailable(): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Check if the user has an active card for the merchant
|
|
28
|
+
*/
|
|
29
|
+
canMakePaymentsWithActiveCard(): Promise<boolean>;
|
|
30
|
+
/**
|
|
31
|
+
* Start Apple Pay session
|
|
32
|
+
*/
|
|
33
|
+
startPaymentSession(paymentRequest: IApplePayPaymentRequest, authToken: string, accountId: string): Promise<{
|
|
34
|
+
success: boolean;
|
|
35
|
+
token?: IApplePayToken;
|
|
36
|
+
paymentMethodId?: string;
|
|
37
|
+
error?: IApplePayError;
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Abort current Apple Pay session
|
|
41
|
+
*/
|
|
42
|
+
abortPaymentSession(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Setup Apple Pay session event handlers
|
|
45
|
+
*/
|
|
46
|
+
private setupSessionEventHandlers;
|
|
47
|
+
/**
|
|
48
|
+
* Create a basic payment request
|
|
49
|
+
*/
|
|
50
|
+
static createPaymentRequest(amount: number, label: string, countryCode?: string, currencyCode?: string): IApplePayPaymentRequest;
|
|
51
|
+
/**
|
|
52
|
+
* Get current configuration
|
|
53
|
+
*/
|
|
54
|
+
getApplePayConfig(): ApplePayConfig | undefined;
|
|
55
|
+
}
|