@justifi/webcomponents 5.7.6-rc-03 → 5.7.6-rc-05
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-eP0XeJLd.js → Api-p2pK86Zd.js} +2 -2
- package/dist/cjs/{ComponentError-CEv9ltwy.js → ComponentError-D4OLnOkg.js} +8 -0
- package/dist/cjs/Payment-2Zmn-l6G.js +151 -0
- package/dist/cjs/{Refund-08OcZkXX.js → Refund-BztCb6AK.js} +1 -148
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +3 -5
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/{badge-DDksduwk.js → badge-CMmPvqtE.js} +1 -1
- package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +13 -14
- package/dist/cjs/bank-account-form.cjs.entry.js +6 -6
- package/dist/cjs/{business-additional-questions-schema-e3GCIHk5.js → business-additional-questions-schema-DNbSH3E-.js} +2 -2
- package/dist/cjs/business-details-core.cjs.entry.js +4 -4
- package/dist/cjs/{business-identity-schema-Diqj_WVQ.js → business-identity-schema-CclzWSOn.js} +2 -2
- package/dist/cjs/{business.service-CZrK48lv.js → business.service-DwZSyIlI.js} +4 -3
- package/dist/cjs/{button-0HYMPryx.js → button-CfVQSysQ.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +6 -6
- package/dist/cjs/{check-pkg-version-DBocF2eE.js → check-pkg-version-lPG_FnM4.js} +5 -4
- package/dist/cjs/{checkout.service-CllLA9W6.js → checkout.service-C_qEIb8b.js} +4 -3
- package/dist/cjs/{checkout.store--pVCO0L1.js → checkout.store-mEv437nN.js} +2 -1
- package/dist/cjs/checkouts-list-core.cjs.entry.js +13 -14
- package/dist/cjs/{payments-list-params-state-DZUKBmLC.js → checkouts-list-params-state-BNbT1fuJ.js} +1 -1
- package/dist/cjs/{checkouts-table-Cp7rNkNd.js → checkouts-table-DJoMGwVG.js} +3 -3
- package/dist/cjs/{config-state-Dz9bnWHg.js → config-state-5xZf-jax.js} +1 -1
- package/dist/cjs/custom-popper.cjs.entry.js +3 -3
- package/dist/cjs/{dispute.service-Chptj-DX.js → dispute.service-cQpQQMeh.js} +4 -3
- package/dist/cjs/form-alert_5.cjs.entry.js +5 -5
- package/dist/cjs/form-control-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/form-control-date.cjs.entry.js +4 -4
- package/dist/cjs/{form-control-error-text-CVPYL0lE.js → form-control-error-text-HM0zQerh.js} +1 -1
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +5 -5
- package/dist/cjs/{form-control-help-text-B3jRgfoa.js → form-control-help-text-5KIUw1IP.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 +5 -5
- package/dist/cjs/form-control-monetary.cjs.entry.js +6 -8
- package/dist/cjs/form-control-number-masked_2.cjs.entry.js +5 -5
- package/dist/cjs/form-control-number.cjs.entry.js +5 -5
- package/dist/cjs/form-control-radio.cjs.entry.js +3 -3
- package/dist/cjs/form-control-select_3.cjs.entry.js +6 -6
- package/dist/cjs/{get-business-BiEc-jdH.js → get-business-o5jPq_ME.js} +2 -2
- package/dist/cjs/{get-payment-details-C3qBZVdv.js → get-payment-details-DwLcmCQs.js} +7 -6
- package/dist/cjs/{get-payout-csv-CdNRRH0t.js → get-payout-csv-DE_D9y08.js} +2 -2
- package/dist/cjs/{get-subaccounts-DKyvT-ZF.js → get-subaccounts-CvtcQGsb.js} +7 -6
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +5 -7
- package/dist/cjs/{header-1-M-mc3bsa.js → header-1-DD41iNlG.js} +1 -1
- package/dist/cjs/header-3-D9Wa0IfT.js +10 -0
- package/dist/cjs/hidden-input_2.cjs.entry.js +8 -8
- package/dist/cjs/{index-BCtVWU61.js → index-Yd9aLenr.js} +22 -6
- package/dist/cjs/{index-D5bL1DOi.js → index-dm_GlYlb.js} +57 -16
- package/dist/cjs/{index.esm-CVuJLXJZ.js → index.esm-BleZSAc0.js} +869 -745
- package/dist/cjs/{insurance-state-kH0kuTD8.js → insurance-state-qT_hkvZV.js} +10 -3
- package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +13 -13
- package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +23 -23
- package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +10 -10
- package/dist/cjs/justifi-apple-pay.cjs.entry.js +836 -0
- package/dist/cjs/{justifi-bank-account-form_7.cjs.entry.js → justifi-bank-account-form_5.cjs.entry.js} +27 -69
- package/dist/cjs/justifi-billing-form.cjs.entry.js +76 -0
- package/dist/cjs/justifi-business-details.cjs.entry.js +15 -16
- package/dist/cjs/justifi-business-form.cjs.entry.js +21 -21
- package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +2 -2
- package/dist/cjs/{justifi-checkout-summary_5.cjs.entry.js → justifi-button_5.cjs.entry.js} +169 -135
- package/dist/cjs/justifi-checkout.cjs.entry.js +18 -19
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +10 -11
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +17 -18
- 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 +2 -2
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +13 -14
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +19 -20
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +12 -13
- package/dist/cjs/justifi-new-payment-method.cjs.entry.js +99 -0
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +17 -18
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +20 -20
- package/dist/cjs/justifi-payment-details.cjs.entry.js +15 -16
- package/dist/cjs/justifi-payment-method-options.cjs.entry.js +75 -0
- package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +14 -15
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +16 -17
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +7 -8
- package/dist/cjs/justifi-payments-list.cjs.entry.js +18 -19
- package/dist/cjs/justifi-payout-details.cjs.entry.js +14 -15
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +16 -17
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +7 -9
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +19 -20
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +17 -17
- package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +4 -5
- package/dist/cjs/justifi-saved-payment-methods_2.cjs.entry.js +116 -0
- package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +7 -10
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +13 -14
- package/dist/cjs/justifi-skeleton.cjs.entry.js +4 -4
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +11 -12
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +15 -16
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +10 -10
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +17 -18
- package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +38 -195
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/{package-BM2FCIB8.js → package-pyzAPwrl.js} +1 -1
- package/dist/cjs/pagination-menu.cjs.entry.js +1 -1
- package/dist/cjs/payment-details-core.cjs.entry.js +15 -17
- package/dist/cjs/{payment-method-option-utils-QODgEWhU.js → payment-method-option-utils-CfLXhpsL.js} +11 -1
- package/dist/cjs/{payment-provisioning-actions-SNMCdsyF.js → payment-provisioning-actions-CZVlnRA0.js} +2 -2
- package/dist/cjs/{payment.service-C6kdaQYS.js → payment.service-CVZ55YLl.js} +4 -3
- package/dist/cjs/payments-list-core.cjs.entry.js +14 -15
- package/dist/cjs/{payouts-list-params-state-DZUKBmLC.js → payments-list-params-state-BNbT1fuJ.js} +1 -1
- package/dist/cjs/{payments-status-DG50GuXR.js → payments-status-PB63klt3.js} +2 -2
- package/dist/cjs/{payments-table-DaW6SvdL.js → payments-table-uouQ4x2Y.js} +3 -3
- package/dist/cjs/payout-details-core.cjs.entry.js +11 -13
- package/dist/cjs/{payout.service-CLnAr59x.js → payout.service-BlbHwzd_.js} +4 -3
- package/dist/cjs/payouts-list-core.cjs.entry.js +14 -15
- package/dist/cjs/{terminal-orders-list-params-state-DZUKBmLC.js → payouts-list-params-state-BNbT1fuJ.js} +1 -1
- package/dist/cjs/{payouts-status-meuI7eBr.js → payouts-status-Bk1JFzbP.js} +2 -2
- package/dist/cjs/{payouts-table-D5hMHcaY.js → payouts-table-Bo61u5ZZ.js} +3 -3
- package/dist/cjs/{schema-validations-BSeMee-o.js → schema-validations-jek_iZ9W.js} +1 -1
- package/dist/cjs/{skeleton-CbZBGO47.js → skeleton-x-GSs3xk.js} +1 -1
- package/dist/cjs/{spinner-CIZFX7bz.js → spinner-Kb1BFvnL.js} +1 -1
- package/dist/cjs/{styled-host-DXNHOiqW.js → styled-host-CqQYxX-w.js} +1 -1
- package/dist/cjs/{table-CxvETNS1.js → table-BJVUhh3s.js} +2 -2
- package/dist/cjs/table-filters-menu.cjs.entry.js +3 -3
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +13 -14
- package/dist/cjs/{checkouts-list-params-state-DZUKBmLC.js → terminal-orders-list-params-state-BNbT1fuJ.js} +1 -1
- package/dist/cjs/{terminal-orders-table-DTZUpjkG.js → terminal-orders-table-v0Sn7jUg.js} +7 -6
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +2 -2
- package/dist/cjs/{terminal.service-CcBCXxNm.js → terminal.service-I07QoXPB.js} +4 -3
- package/dist/cjs/terminals-list-core.cjs.entry.js +13 -14
- package/dist/cjs/terminals-list-params-state-BNbT1fuJ.js +22 -0
- package/dist/cjs/{terminals-table-DOqVeHM1.js → terminals-table-CGG9EhiI.js} +3 -3
- package/dist/cjs/{utils-wkdkLmDI.js → utils-Df-pajL7.js} +1 -1
- package/dist/cjs/{utils-DqlrBltg.js → utils-Dka3MplB.js} +1661 -3
- package/dist/cjs/{utils-IGCnjtqc.js → utils-DvUQQLmR.js} +1 -1
- package/dist/cjs/webcomponents.cjs.js +5 -4
- package/dist/collection/actions/checkout/checkout-actions.js +2 -1
- package/dist/collection/api/ApplePay.js +124 -0
- package/dist/collection/api/ComponentError.js +8 -0
- package/dist/collection/api/services/apple-pay.service.js +344 -0
- package/dist/collection/collection-manifest.json +4 -2
- package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +1 -1
- package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +1 -1
- package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +1 -1
- package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +1 -1
- package/dist/collection/components/business-forms/owner-form/identity-address/identity-address-form.js +1 -1
- package/dist/collection/components/business-forms/owner-form/owner-form-core.js +1 -1
- package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +1 -1
- package/dist/collection/components/business-forms/owner-form/owner-form.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-document-inputs.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-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-owners/business-owners-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.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/form-control-monetary-provisioning.js +2 -2
- 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-core.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-buttons.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +1 -1
- package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +2 -2
- package/dist/collection/components/checkout/billing-form/billing-form.js +37 -10
- package/dist/collection/components/checkout/card-form/card-form.js +2 -2
- package/dist/collection/components/checkout/checkout.js +1 -1
- package/dist/collection/components/checkout/new-payment-method.js +378 -0
- package/dist/collection/components/checkout/payment-method-option-utils.js +1 -0
- package/dist/collection/components/checkout/payment-method-options.js +421 -0
- package/dist/collection/components/checkout/save-new-payment-method.js +1 -1
- package/dist/collection/components/checkout/saved-payment-method.js +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list-filters.js +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list.js +1 -1
- package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
- package/dist/collection/components/dispute-management/dispute-management.js +1 -1
- package/dist/collection/components/dispute-management/dispute-notification.js +1 -1
- 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-core.js +1 -1
- 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/filters/table-filters-menu.js +1 -1
- package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
- package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +1 -1
- package/dist/collection/components/modular-checkout/modular-checkout.js +118 -10
- 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 +539 -0
- package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/billing-information-form.js +5 -36
- package/dist/collection/components/modular-checkout/sub-components/card-form.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/postal-code-form.js +4 -5
- package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
- package/dist/collection/components/order-terminals/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/payment-details-core.js +8 -8
- package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +1 -1
- package/dist/collection/components/payments-list/payments-list-core.js +1 -1
- package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
- package/dist/collection/components/payments-list/payments-list.js +1 -1
- package/dist/collection/components/payout-details/payout-details-core.js +3 -3
- package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +1 -1
- package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
- package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
- package/dist/collection/components/payouts-list/payouts-list.js +1 -1
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
- package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list.js +1 -1
- package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +89 -273
- package/dist/collection/store/checkout.store.js +1 -0
- package/dist/collection/ui-components/apple-pay-button.js +146 -0
- 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 +1 -1
- package/dist/collection/ui-components/form/iframe-input.js +3 -3
- package/dist/collection/ui-components/index.js +0 -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/docs.json +2878 -1817
- package/dist/esm/{Api-BCeKXDaf.js → Api-DQM93PRm.js} +2 -2
- package/dist/esm/{ComponentError-BhrFjjAs.js → ComponentError-Cjcsf8ku.js} +9 -1
- package/dist/esm/{Dispute-BH0Xfn-F.js → Dispute-7MWRbTXI.js} +1 -1
- package/dist/esm/Payment-Bs0-9Lnt.js +149 -0
- package/dist/esm/{Refund-DBHZkemk.js → Refund-4B3c-kLz.js} +2 -148
- package/dist/esm/additional-questions-details_5.entry.js +4 -6
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/{badge-BrapPg3R.js → badge-D-vrtiQR.js} +2 -2
- package/dist/esm/bank-account-document-form-inputs_4.entry.js +15 -16
- package/dist/esm/bank-account-form.entry.js +7 -7
- package/dist/esm/{business-additional-questions-schema-uQlQ8fXQ.js → business-additional-questions-schema-C6NRHWEL.js} +2 -2
- package/dist/esm/business-details-core.entry.js +5 -5
- package/dist/esm/{business-identity-schema-BsrgqgDl.js → business-identity-schema-D8n5dyLX.js} +2 -2
- package/dist/esm/{business.service-BPBxsb8B.js → business.service-BgXdRyYa.js} +5 -4
- package/dist/esm/{button-BB-N4vit.js → button-DxM4-mlD.js} +2 -2
- package/dist/esm/card-form.entry.js +7 -7
- package/dist/esm/{check-pkg-version-Cic-MeLf.js → check-pkg-version-B7MJjFP4.js} +6 -5
- package/dist/esm/{checkout.service-C1WAmUiU.js → checkout.service-CXeKDZTF.js} +5 -4
- package/dist/esm/{checkout.store-GXtlf5-4.js → checkout.store-QrBBYQfi.js} +2 -1
- package/dist/esm/checkouts-list-core.entry.js +15 -16
- package/dist/esm/{checkouts-list-params-state-DFWVMJRJ.js → checkouts-list-params-state-SMXQIZTt.js} +1 -1
- package/dist/esm/{checkouts-table-COpCngi0.js → checkouts-table-Djb7Yj6O.js} +4 -4
- package/dist/esm/{config-state-B3mtRA6f.js → config-state-BrllxiM0.js} +1 -1
- package/dist/esm/custom-popper.entry.js +3 -3
- package/dist/esm/{dispute.service-bQh-LG0z.js → dispute.service-DWs_TX-m.js} +5 -4
- package/dist/esm/form-alert_5.entry.js +6 -6
- package/dist/esm/form-control-checkbox.entry.js +6 -6
- package/dist/esm/form-control-date.entry.js +5 -5
- package/dist/esm/{form-control-error-text-Bk3yfpFX.js → form-control-error-text-Dew-m4MW.js} +2 -2
- package/dist/esm/form-control-file-v2_2.entry.js +6 -6
- package/dist/esm/{form-control-help-text-mOLCXs00.js → form-control-help-text-CcPKT19_.js} +2 -2
- package/dist/esm/form-control-help-text.entry.js +1 -1
- package/dist/esm/form-control-monetary-provisioning.entry.js +6 -6
- package/dist/esm/form-control-monetary.entry.js +7 -9
- package/dist/esm/form-control-number-masked_2.entry.js +6 -6
- package/dist/esm/form-control-number.entry.js +6 -6
- package/dist/esm/form-control-radio.entry.js +4 -4
- package/dist/esm/form-control-select_3.entry.js +7 -7
- package/dist/esm/{get-business-BSRtbTh7.js → get-business-Crb6P-iI.js} +2 -2
- package/dist/esm/{get-payment-details-B193kh7P.js → get-payment-details-j8nOngzB.js} +7 -6
- package/dist/esm/{get-payout-csv-U_pgdPpb.js → get-payout-csv-D-Lnooki.js} +2 -2
- package/dist/esm/{get-subaccounts-DcgISPei.js → get-subaccounts-C62B2OC_.js} +8 -7
- package/dist/esm/gross-payment-chart-core.entry.js +6 -8
- package/dist/esm/{header-1-DYuf6mkF.js → header-1-B0PFwGib.js} +2 -2
- package/dist/esm/header-3-D3gxg6YU.js +8 -0
- package/dist/esm/hidden-input_2.entry.js +9 -9
- package/dist/esm/{index-BAq5IUBW.js → index-B9me4yN2.js} +22 -6
- package/dist/esm/{index-N3w5zrz2.js → index-kpoIU4v_.js} +58 -16
- package/dist/esm/{index.esm-BCNUj0Dx.js → index.esm-cYgKOXtz.js} +869 -745
- package/dist/esm/{insurance-state-DeyYNyas.js → insurance-state-DQH40x6F.js} +8 -2
- package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +15 -15
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +25 -25
- package/dist/esm/justifi-additional-statement_8.entry.js +11 -11
- package/dist/esm/justifi-apple-pay.entry.js +834 -0
- package/dist/esm/{justifi-bank-account-form_7.entry.js → justifi-bank-account-form_5.entry.js} +29 -69
- package/dist/esm/justifi-billing-form.entry.js +74 -0
- package/dist/esm/justifi-business-details.entry.js +16 -17
- package/dist/esm/justifi-business-form.entry.js +23 -23
- package/dist/esm/justifi-business-representative-form-inputs.entry.js +3 -3
- package/dist/esm/{justifi-checkout-summary_5.entry.js → justifi-button_5.entry.js} +169 -135
- package/dist/esm/justifi-checkout.entry.js +15 -16
- package/dist/esm/justifi-checkouts-list-filters.entry.js +12 -13
- package/dist/esm/justifi-checkouts-list.entry.js +19 -20
- 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 +3 -3
- package/dist/esm/justifi-dispute-management.entry.js +14 -15
- package/dist/esm/justifi-dispute-notification_3.entry.js +20 -21
- package/dist/esm/justifi-gross-payment-chart.entry.js +14 -15
- package/dist/esm/justifi-new-payment-method.entry.js +97 -0
- package/dist/esm/justifi-order-terminals.entry.js +19 -20
- package/dist/esm/justifi-owner-form_3.entry.js +21 -21
- package/dist/esm/justifi-payment-details.entry.js +16 -17
- package/dist/esm/justifi-payment-method-options.entry.js +73 -0
- package/dist/esm/justifi-payment-provisioning-core.entry.js +6 -6
- package/dist/esm/justifi-payment-provisioning.entry.js +15 -16
- package/dist/esm/justifi-payment-transactions-list.entry.js +18 -19
- package/dist/esm/justifi-payments-list-filters.entry.js +8 -9
- package/dist/esm/justifi-payments-list.entry.js +19 -20
- package/dist/esm/justifi-payout-details.entry.js +16 -17
- package/dist/esm/justifi-payout-transactions-list.entry.js +18 -19
- package/dist/esm/justifi-payouts-list-filters.entry.js +8 -10
- package/dist/esm/justifi-payouts-list.entry.js +21 -22
- package/dist/esm/justifi-refund-payment.entry.js +19 -19
- package/dist/esm/justifi-saved-payment-method.entry.js +5 -6
- package/dist/esm/justifi-saved-payment-methods_2.entry.js +113 -0
- package/dist/esm/justifi-season-interruption-insurance-core.entry.js +7 -10
- package/dist/esm/justifi-season-interruption-insurance.entry.js +14 -15
- package/dist/esm/justifi-skeleton.entry.js +5 -5
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +13 -14
- package/dist/esm/justifi-terminal-orders-list.entry.js +17 -18
- package/dist/esm/justifi-terminals-list-filters.entry.js +12 -12
- package/dist/esm/justifi-terminals-list.entry.js +19 -20
- package/dist/esm/justifi-tokenize-payment-method.entry.js +39 -196
- package/dist/esm/loader.js +4 -3
- package/dist/esm/{package-BRJ4FIJH.js → package-BLtzn9pE.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +2 -2
- package/dist/esm/{parts-CKg_luIy.js → parts-D3G5aVLy.js} +1 -1
- package/dist/esm/payment-details-core.entry.js +16 -18
- package/dist/esm/{payment-method-option-utils-zFDtQrgQ.js → payment-method-option-utils-Cm6lAaP1.js} +10 -2
- package/dist/esm/{payment-provisioning-actions-2qP7AtHj.js → payment-provisioning-actions-ONP8lDnV.js} +2 -2
- package/dist/esm/{payment.service-BTVtIbcY.js → payment.service-BnDr_9vX.js} +5 -4
- package/dist/esm/payments-list-core.entry.js +16 -17
- package/dist/esm/{payments-list-params-state-DFWVMJRJ.js → payments-list-params-state-SMXQIZTt.js} +1 -1
- package/dist/esm/{payments-status-CawBLR48.js → payments-status-DVYzDcJ4.js} +2 -2
- package/dist/esm/{payments-table-WQAD1CSz.js → payments-table-BuiNqlwv.js} +4 -4
- package/dist/esm/payout-details-core.entry.js +12 -14
- package/dist/esm/{payout.service-j8w34GsW.js → payout.service-Ai1aEuFC.js} +5 -4
- package/dist/esm/payouts-list-core.entry.js +16 -17
- package/dist/esm/{payouts-list-params-state-DFWVMJRJ.js → payouts-list-params-state-SMXQIZTt.js} +1 -1
- package/dist/esm/{payouts-status-DB_PJap6.js → payouts-status-Bae6G8Hq.js} +2 -2
- package/dist/esm/{payouts-table-DRISll8u.js → payouts-table-cgIXP54P.js} +4 -4
- package/dist/esm/{schema-validations-DLWfpHyI.js → schema-validations-DcR1ujuX.js} +1 -1
- package/dist/esm/{skeleton-D1Z4a8af.js → skeleton-CZfDofm6.js} +2 -2
- package/dist/esm/{spinner-BlffecO5.js → spinner-D-vbFqC6.js} +2 -2
- package/dist/esm/{styled-host-DtvbNFVU.js → styled-host-B_XBaM7z.js} +1 -1
- package/dist/esm/{table-BqxKVRry.js → table-CTPfsGKi.js} +3 -3
- package/dist/esm/table-filters-menu.entry.js +4 -4
- package/dist/esm/terminal-orders-list-core.entry.js +15 -16
- package/dist/esm/{terminal-orders-list-params-state-DFWVMJRJ.js → terminal-orders-list-params-state-SMXQIZTt.js} +1 -1
- package/dist/esm/{terminal-orders-table-BWf9quiN.js → terminal-orders-table-CvK516_V.js} +9 -8
- package/dist/esm/terminal-quantity-selector.entry.js +3 -3
- package/dist/esm/{terminal.service-BDRGcUj-.js → terminal.service-BLeBxTv4.js} +5 -4
- package/dist/esm/terminals-list-core.entry.js +15 -16
- package/dist/esm/terminals-list-params-state-SMXQIZTt.js +16 -0
- package/dist/esm/{terminals-table-BBPQRWja.js → terminals-table-2QGQITkt.js} +4 -4
- package/dist/esm/{utils-Cu5hITuT.js → utils-B7jE0g5_.js} +1661 -4
- package/dist/esm/{utils-BZvep88z.js → utils-BeQLScSm.js} +1 -1
- package/dist/esm/{utils-sZ_6zOKQ.js → utils-CBJo9jNE.js} +2 -2
- package/dist/esm/webcomponents.js +5 -4
- package/dist/module/Analytics.js +1 -0
- package/dist/module/Payment.js +204 -0
- package/dist/module/Refund.js +9 -202
- package/dist/module/additional-questions-details2.js +1 -1
- package/dist/module/additional-questions.js +2 -2
- package/dist/module/additional-statement.js +2 -2
- package/dist/module/badge.js +1 -1
- package/dist/module/bank-account-document-inputs.js +4 -3
- package/dist/module/bank-account-form-inputs2.js +2 -2
- package/dist/module/bank-account-form.js +3 -3
- package/dist/module/bank-account.js +3 -4
- package/dist/module/billing-form.js +58 -21
- package/dist/module/billing-information-form.js +4 -11
- package/dist/module/business-additional-questions-form-step-core.js +1 -1
- package/dist/module/business-additional-questions-form-step.js +2 -2
- package/dist/module/business-bank-account-form-step-core.js +4 -3
- package/dist/module/business-bank-account-form-step.js +4 -3
- package/dist/module/business-core-info-form-step-core.js +1 -1
- package/dist/module/business-core-info-form-step.js +2 -2
- package/dist/module/business-core-info.js +2 -2
- package/dist/module/business-details-core2.js +1 -2
- package/dist/module/business-documents-on-file2.js +2 -3
- package/dist/module/business-owners-form-step-core.js +1 -2
- package/dist/module/business-owners-form-step.js +2 -2
- package/dist/module/business-representative-form-inputs.js +2 -2
- package/dist/module/business-representative-form-step-core.js +1 -1
- package/dist/module/business-representative-form-step.js +2 -2
- package/dist/module/business-representative.js +2 -2
- package/dist/module/business-terms-conditions-form-step.js +3 -2
- package/dist/module/business.service.js +1 -0
- package/dist/module/cancellation-policy.js +2 -2
- package/dist/module/card-form.js +3 -3
- package/dist/module/card-form2.js +3 -4
- package/dist/module/checkout.service.js +1 -0
- package/dist/module/checkout.store.js +1 -0
- package/dist/module/checkouts-list-core2.js +5 -6
- package/dist/module/core-info-details2.js +1 -1
- package/dist/module/custom-popper2.js +3 -3
- package/dist/module/customer-details.js +2 -2
- package/dist/module/details.js +1 -1
- package/dist/module/dispute-management-core.js +3 -3
- package/dist/module/dispute-notification.js +2 -3
- package/dist/module/dispute-response-actions.js +1 -0
- package/dist/module/dispute-response-core.js +2 -2
- package/dist/module/dispute-response.js +2 -3
- package/dist/module/duplicate-charge.js +2 -2
- package/dist/module/electronic-evidence.js +2 -2
- package/dist/module/form-alert2.js +2 -2
- package/dist/module/form-control-checkbox2.js +4 -5
- package/dist/module/form-control-date2.js +3 -4
- package/dist/module/form-control-file-v22.js +2 -2
- package/dist/module/form-control-file2.js +3 -4
- package/dist/module/form-control-help-text2.js +1 -1
- package/dist/module/form-control-monetary-provisioning2.js +4 -5
- package/dist/module/form-control-monetary2.js +4 -5
- package/dist/module/form-control-number-masked2.js +3 -4
- package/dist/module/form-control-number.js +4 -5
- package/dist/module/form-control-radio2.js +4 -4
- package/dist/module/form-control-select2.js +3 -4
- package/dist/module/form-control-text2.js +3 -4
- package/dist/module/form-control-textarea2.js +4 -4
- package/dist/module/form-control-tooltip2.js +1 -1
- package/dist/module/form.js +869 -745
- package/dist/module/get-payment-details.js +3 -2
- package/dist/module/get-subaccounts.js +2 -1
- package/dist/module/gross-payment-chart-core2.js +3 -3
- package/dist/module/header-3.js +8 -0
- package/dist/module/hidden-input2.js +3 -3
- package/dist/module/identity-address-form.js +2 -2
- package/dist/module/iframe-input2.js +5 -5
- package/dist/module/index2.js +21 -5
- package/dist/module/justifi-apple-pay.d.ts +11 -0
- package/dist/module/justifi-apple-pay.js +876 -0
- package/dist/module/justifi-business-details.js +1 -1
- package/dist/module/justifi-business-form.js +3 -3
- package/dist/module/justifi-button2.js +2 -2
- package/dist/module/justifi-checkout.js +3 -4
- package/dist/module/justifi-checkouts-list-filters.js +5 -5
- package/dist/module/justifi-checkouts-list.js +5 -5
- package/dist/module/justifi-config-provider.js +1 -1
- package/dist/module/justifi-dispute-management.js +4 -3
- package/dist/module/justifi-gross-payment-chart.js +2 -1
- package/dist/module/justifi-header2.js +4 -8
- package/dist/module/justifi-modular-checkout.js +2 -2
- package/dist/module/justifi-new-payment-method.d.ts +11 -0
- package/dist/module/justifi-new-payment-method.js +219 -0
- package/dist/module/justifi-order-terminals.js +5 -6
- package/dist/module/justifi-payment-details.js +1 -1
- package/dist/module/justifi-payment-method-options.d.ts +11 -0
- package/dist/module/justifi-payment-method-options.js +6 -0
- package/dist/module/justifi-payment-provisioning.js +3 -2
- package/dist/module/justifi-payment-transactions-list.js +6 -7
- package/dist/module/justifi-payments-list-filters.js +4 -5
- package/dist/module/justifi-payments-list.js +5 -5
- package/dist/module/justifi-payout-details.js +4 -3
- package/dist/module/justifi-payout-transactions-list.js +6 -7
- package/dist/module/justifi-payouts-list-filters.js +4 -5
- package/dist/module/justifi-payouts-list.js +5 -5
- package/dist/module/justifi-refund-payment.js +3 -3
- package/dist/module/justifi-saved-payment-method.js +3 -3
- package/dist/module/justifi-season-interruption-insurance.js +3 -2
- package/dist/module/justifi-skeleton.js +2 -2
- package/dist/module/justifi-terminal-orders-list-filters.js +6 -6
- package/dist/module/justifi-terminal-orders-list.js +5 -5
- package/dist/module/justifi-terminals-list-filters.js +5 -5
- package/dist/module/justifi-terminals-list.js +5 -5
- package/dist/module/justifi-tokenize-payment-method.js +47 -285
- package/dist/module/legal-address-details2.js +1 -1
- package/dist/module/legal-address-form-step-core.js +1 -1
- package/dist/module/legal-address-form-step.js +2 -2
- package/dist/module/legal-address-form.js +2 -2
- package/dist/module/modular-checkout.js +125 -15
- package/dist/module/owner-details2.js +1 -1
- package/dist/module/owner-form-core2.js +3 -4
- package/dist/module/owner-form-inputs2.js +2 -2
- package/dist/module/owner-form.js +2 -2
- package/dist/module/package.js +1 -1
- package/dist/module/pagination-menu2.js +2 -2
- package/dist/module/parts.js +1 -1
- package/dist/module/payment-details-core2.js +10 -11
- package/dist/module/payment-method-option-utils.js +10 -2
- package/dist/module/payment-method-option2.js +3 -4
- package/dist/module/payment-method-options.js +129 -0
- package/dist/module/payment-provisioning-core.js +2 -3
- package/dist/module/payment-provisioning-form-buttons.js +2 -3
- package/dist/module/payment-provisioning-form-steps.js +2 -2
- package/dist/module/payment-provisioning-loading.js +0 -1
- package/dist/module/payment.service.js +1 -0
- package/dist/module/payments-list-core2.js +5 -6
- package/dist/module/payout-details-core2.js +5 -6
- package/dist/module/payout.service.js +1 -0
- package/dist/module/payouts-list-core2.js +5 -6
- package/dist/module/postal-code-form.js +3 -5
- package/dist/module/product-or-service.js +2 -2
- package/dist/module/refund-policy.js +2 -2
- package/dist/module/representative-details2.js +1 -1
- package/dist/module/save-new-payment-method.js +2 -3
- package/dist/module/saved-payment-methods.js +2 -3
- package/dist/module/season-interruption-insurance-core.js +2 -3
- package/dist/module/sezzle-payment-method.js +2 -3
- package/dist/module/shipping-details.js +2 -2
- package/dist/module/spinner.js +1 -1
- package/dist/module/summary.js +2 -3
- package/dist/module/table-filters-menu2.js +2 -2
- package/dist/module/table.js +1 -1
- package/dist/module/terminal-orders-list-core2.js +6 -7
- package/dist/module/terminal-quantity-selector2.js +3 -3
- package/dist/module/terminal.service.js +1 -0
- package/dist/module/terminals-list-core2.js +5 -6
- package/dist/module/utils2.js +1661 -4
- package/dist/types/api/ApplePay.d.ts +195 -0
- package/dist/types/api/ComponentError.d.ts +7 -0
- package/dist/types/api/services/apple-pay.service.d.ts +58 -0
- package/dist/types/components/checkout/billing-form/billing-form.d.ts +9 -3
- package/dist/types/components/checkout/checkout.d.ts +1 -1
- package/dist/types/components/checkout/new-payment-method.d.ts +31 -0
- package/dist/types/components/checkout/payment-method-options.d.ts +32 -0
- package/dist/types/components/modular-checkout/modular-checkout.d.ts +9 -2
- 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 +38 -0
- package/dist/types/components/modular-checkout/sub-components/billing-information-form.d.ts +0 -2
- package/dist/types/components/modular-checkout/sub-components/postal-code-form.d.ts +0 -1
- package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +14 -37
- package/dist/types/components.d.ts +232 -68
- package/dist/types/stencil-public-runtime.d.ts +12 -5
- package/dist/types/store/checkout.store.d.ts +1 -0
- package/dist/types/ui-components/apple-pay-button.d.ts +17 -0
- package/dist/types/ui-components/index.d.ts +0 -1
- package/dist/webcomponents/p-0144c42b.entry.js +1 -0
- package/dist/webcomponents/{p-a1c7c873.entry.js → p-06ff03e7.entry.js} +1 -1
- package/dist/webcomponents/{p-b860ec37.entry.js → p-0c37be96.entry.js} +1 -1
- package/dist/webcomponents/{p-bbd0aa4e.entry.js → p-0f5e61bc.entry.js} +1 -1
- package/dist/webcomponents/p-10e32b38.entry.js +1 -0
- package/dist/webcomponents/p-127406b5.entry.js +1 -0
- package/dist/webcomponents/p-2c6be750.entry.js +1 -0
- package/dist/webcomponents/p-30c432ab.entry.js +1 -0
- package/dist/webcomponents/{p-f9bddc04.entry.js → p-31793643.entry.js} +1 -1
- package/dist/webcomponents/p-35198019.entry.js +1 -0
- package/dist/webcomponents/{p-f67133f0.entry.js → p-367338c8.entry.js} +1 -1
- package/dist/webcomponents/p-39af38f6.entry.js +1 -0
- package/dist/webcomponents/p-453bcb9d.entry.js +1 -0
- package/dist/webcomponents/{p-7a8a06d6.entry.js → p-463ae23a.entry.js} +1 -1
- package/dist/webcomponents/p-49754c1d.entry.js +1 -0
- package/dist/webcomponents/p-4afa5d56.entry.js +1 -0
- package/dist/webcomponents/p-509d9191.entry.js +1 -0
- package/dist/webcomponents/p-52be4ff0.entry.js +1 -0
- package/dist/webcomponents/p-544c59ac.entry.js +1 -0
- package/dist/webcomponents/p-54cc3fc8.entry.js +1 -0
- package/dist/webcomponents/p-54ff0e4f.entry.js +1 -0
- package/dist/webcomponents/{p-BxfUcCXo.js → p-5aA7gjr5.js} +1 -1
- package/dist/webcomponents/p-5aa88189.entry.js +1 -0
- package/dist/webcomponents/p-5c82e024.entry.js +1 -0
- package/dist/webcomponents/p-5cfca5e0.entry.js +1 -0
- package/dist/webcomponents/{p-84df9f26.entry.js → p-5e10aa65.entry.js} +1 -1
- package/dist/webcomponents/p-5fbc0ea6.entry.js +1 -0
- package/dist/webcomponents/p-6567c1ce.entry.js +1 -0
- package/dist/webcomponents/p-689562b1.entry.js +1 -0
- package/dist/webcomponents/p-69910853.entry.js +1 -0
- package/dist/webcomponents/p-6d8355f0.entry.js +1 -0
- package/dist/webcomponents/p-6da19fde.entry.js +1 -0
- package/dist/webcomponents/p-6e40a80f.entry.js +1 -0
- package/dist/webcomponents/p-6f94530d.entry.js +1 -0
- package/dist/webcomponents/p-70beb132.entry.js +1 -0
- package/dist/webcomponents/p-79454e79.entry.js +1 -0
- package/dist/webcomponents/p-79684a85.entry.js +1 -0
- package/dist/webcomponents/{p-BH0Xfn-F.js → p-7MWRbTXI.js} +1 -1
- package/dist/webcomponents/p-7WIgS5RM.js +1 -0
- package/dist/webcomponents/p-7b5d48f7.entry.js +1 -0
- package/dist/webcomponents/p-7b5e899e.entry.js +1 -0
- package/dist/webcomponents/p-7d59de81.entry.js +1 -0
- package/dist/webcomponents/p-7f348de2.entry.js +1 -0
- package/dist/webcomponents/p-7f4305a2.entry.js +1 -0
- package/dist/webcomponents/{p-351ffd2a.entry.js → p-904acc70.entry.js} +1 -1
- package/dist/webcomponents/{p-a9ed792e.entry.js → p-92529be9.entry.js} +1 -1
- package/dist/webcomponents/p-9b6c1b33.entry.js +1 -0
- package/dist/webcomponents/p-9f3cf5a3.entry.js +1 -0
- package/dist/webcomponents/p-9y5MOK55.js +1 -0
- package/dist/webcomponents/{p-55iuf7iW.js → p-B2csvKrZ.js} +1 -1
- package/dist/webcomponents/p-B7jE0g5_.js +1 -0
- package/dist/webcomponents/p-B8tUOqiv.js +1 -0
- package/dist/webcomponents/p-B9GgcQ-7.js +1 -0
- package/dist/webcomponents/p-BDUTtU21.js +1 -0
- package/dist/webcomponents/{p-BfEOvp9h.js → p-BFL-wXPM.js} +1 -1
- package/dist/webcomponents/p-BLtzn9pE.js +1 -0
- package/dist/webcomponents/p-BO4xqc4w.js +1 -0
- package/dist/webcomponents/{p-DpUqxsf5.js → p-BRtwZAeZ.js} +1 -1
- package/dist/webcomponents/p-BVD7g3cE.js +1 -0
- package/dist/webcomponents/p-BYakc1Om.js +1 -0
- package/dist/webcomponents/p-Bou1Z4Bm.js +1 -0
- package/dist/webcomponents/p-Bt388eye.js +1 -0
- package/dist/webcomponents/{p-CDIPkflV.js → p-BvyiDejp.js} +1 -1
- package/dist/webcomponents/p-Bz8JT676.js +1 -0
- package/dist/webcomponents/p-C0EFqY0W.js +1 -0
- package/dist/webcomponents/{p-AbSg_vYv.js → p-C8ll3Wwp.js} +1 -1
- package/dist/webcomponents/p-CBWeXiqe.js +1 -0
- package/dist/webcomponents/{p-D0I-tRSs.js → p-CEYGUVns.js} +1 -1
- package/dist/webcomponents/p-CLjv4frq.js +1 -0
- package/dist/webcomponents/p-CR9D6mKt.js +1 -0
- package/dist/webcomponents/{p-o5iASgog.js → p-CRFzwZW6.js} +1 -1
- package/dist/webcomponents/p-CVQyw7ao.js +1 -0
- package/dist/webcomponents/{p-JOSiCHl7.js → p-CYBR4K2p.js} +1 -1
- package/dist/webcomponents/p-Cc27pPPQ.js +1 -0
- package/dist/webcomponents/p-Cjcsf8ku.js +1 -0
- package/dist/webcomponents/p-Cm_ywVHL.js +1 -0
- package/dist/webcomponents/p-D2muobcE.js +1 -0
- package/dist/webcomponents/{p-CKg_luIy.js → p-D3G5aVLy.js} +1 -1
- package/dist/webcomponents/p-D522G7Ja.js +1 -0
- package/dist/webcomponents/p-DCDU6JB3.js +1 -0
- package/dist/webcomponents/p-DH8F0bsw.js +1 -0
- package/dist/webcomponents/p-DQuL1Twl.js +1 -0
- package/dist/webcomponents/{p-d6tXI5Iw.js → p-DSP8qjHL.js} +1 -1
- package/dist/webcomponents/p-DSekXpCa.js +1 -0
- package/dist/webcomponents/p-DSfL8jLw.js +1 -0
- package/dist/webcomponents/p-DVPcHdzq.js +1 -0
- package/dist/webcomponents/{p-Ce8QXyUM.js → p-DX_mixvZ.js} +1 -1
- package/dist/webcomponents/p-DYGIC0QH.js +1 -0
- package/dist/webcomponents/p-DaDsBt65.js +1 -0
- package/dist/webcomponents/p-DiWKhLRS.js +1 -0
- package/dist/webcomponents/{p-DPnS0F0Y.js → p-Dj1uo4J3.js} +1 -1
- package/dist/webcomponents/p-DtsIovbb.js +1 -0
- package/dist/webcomponents/p-Dv7YEshZ.js +1 -0
- package/dist/webcomponents/p-FdjD8N0u.js +1 -0
- package/dist/webcomponents/p-ObR0KZw0.js +1 -0
- package/dist/webcomponents/p-PgEzcvI6.js +1 -0
- package/dist/webcomponents/p-Sz-UKsNL.js +1 -0
- package/dist/webcomponents/{p-1b7b7210.entry.js → p-a2b597ef.entry.js} +1 -1
- package/dist/webcomponents/p-a4cb4c39.entry.js +1 -0
- package/dist/webcomponents/p-a6fdf5b8.entry.js +1 -0
- package/dist/webcomponents/p-b06b1886.entry.js +1 -0
- package/dist/webcomponents/p-b0714111.entry.js +1 -0
- package/dist/webcomponents/p-b2098935.entry.js +1 -0
- package/dist/webcomponents/p-b56d75d5.entry.js +1 -0
- package/dist/webcomponents/p-b5ed41c0.entry.js +1 -0
- package/dist/webcomponents/p-baaef16c.entry.js +1 -0
- package/dist/webcomponents/{p-366dba79.entry.js → p-bec23c19.entry.js} +1 -1
- package/dist/webcomponents/{p-e2ee826e.entry.js → p-c663b439.entry.js} +1 -1
- package/dist/webcomponents/p-c9d5625c.entry.js +1 -0
- package/dist/webcomponents/p-cd6c6c2b.entry.js +1 -0
- package/dist/webcomponents/p-cf115375.entry.js +1 -0
- package/dist/webcomponents/p-d175799a.entry.js +1 -0
- package/dist/webcomponents/p-d5571d18.entry.js +1 -0
- package/dist/webcomponents/p-d5f70eb0.entry.js +1 -0
- package/dist/webcomponents/p-da5a9a72.entry.js +1 -0
- package/dist/webcomponents/p-e105f664.entry.js +1 -0
- package/dist/webcomponents/p-e5c94a1f.entry.js +1 -0
- package/dist/webcomponents/p-e86c876e.entry.js +1 -0
- package/dist/webcomponents/{p-8aefc49f.entry.js → p-ee2afa41.entry.js} +4 -4
- package/dist/webcomponents/p-ef472343.entry.js +1 -0
- package/dist/webcomponents/p-f35e96ce.entry.js +1 -0
- package/dist/webcomponents/p-f3f4bbef.entry.js +1 -0
- package/dist/webcomponents/p-f6ca1443.entry.js +1 -0
- package/dist/webcomponents/{p-c0bd6405.entry.js → p-fe001786.entry.js} +1 -1
- package/dist/webcomponents/{p-eccb77fa.entry.js → p-fffd5bc7.entry.js} +1 -1
- package/dist/webcomponents/p-kpoIU4v_.js +2 -0
- package/dist/webcomponents/p-pska2q1M.js +1 -0
- package/dist/webcomponents/p-vHbP4g3Q.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/dinero-J-SRFKIR.js +0 -1673
- package/dist/cjs/header-2-BXQLJn1q.js +0 -10
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +0 -49
- package/dist/cjs/terminals-list-params-state-DZUKBmLC.js +0 -22
- package/dist/collection/ui-components/shadow-dom-components/justifi-radio-list-item.js +0 -155
- package/dist/esm/dinero-DizZAUMY.js +0 -1671
- package/dist/esm/header-2-C4ZCdZwi.js +0 -8
- package/dist/esm/justifi-billing-form_2.entry.js +0 -46
- package/dist/esm/terminals-list-params-state-DFWVMJRJ.js +0 -16
- package/dist/module/dinero.js +0 -1671
- package/dist/module/justifi-radio-list-item.d.ts +0 -11
- package/dist/module/justifi-radio-list-item.js +0 -6
- package/dist/module/justifi-radio-list-item2.js +0 -55
- package/dist/types/ui-components/shadow-dom-components/justifi-radio-list-item.d.ts +0 -12
- package/dist/webcomponents/p-072d93c9.entry.js +0 -1
- package/dist/webcomponents/p-0dcc215b.entry.js +0 -1
- package/dist/webcomponents/p-0e6797c4.entry.js +0 -1
- package/dist/webcomponents/p-0fc026aa.entry.js +0 -1
- package/dist/webcomponents/p-18aa8190.entry.js +0 -1
- package/dist/webcomponents/p-19c07145.entry.js +0 -1
- package/dist/webcomponents/p-1Or21UzV.js +0 -1
- package/dist/webcomponents/p-1f76ae29.entry.js +0 -1
- package/dist/webcomponents/p-20eb7015.entry.js +0 -1
- package/dist/webcomponents/p-2437703b.entry.js +0 -1
- package/dist/webcomponents/p-24f30623.entry.js +0 -1
- package/dist/webcomponents/p-2a5ac7c9.entry.js +0 -1
- package/dist/webcomponents/p-2abae807.entry.js +0 -1
- package/dist/webcomponents/p-35411771.entry.js +0 -1
- package/dist/webcomponents/p-3add112c.entry.js +0 -1
- package/dist/webcomponents/p-48e406f1.entry.js +0 -1
- package/dist/webcomponents/p-4d0373a7.entry.js +0 -1
- package/dist/webcomponents/p-5cb87816.entry.js +0 -1
- package/dist/webcomponents/p-628cf20a.entry.js +0 -1
- package/dist/webcomponents/p-66422cbd.entry.js +0 -1
- package/dist/webcomponents/p-6f397c80.entry.js +0 -1
- package/dist/webcomponents/p-7929bdae.entry.js +0 -1
- package/dist/webcomponents/p-7a52bdb5.entry.js +0 -1
- package/dist/webcomponents/p-7e24a1f7.entry.js +0 -1
- package/dist/webcomponents/p-8027e13f.entry.js +0 -1
- package/dist/webcomponents/p-86b166eb.entry.js +0 -1
- package/dist/webcomponents/p-889e8be8.entry.js +0 -1
- package/dist/webcomponents/p-8a1171de.entry.js +0 -1
- package/dist/webcomponents/p-8b2f81b4.entry.js +0 -1
- package/dist/webcomponents/p-97429fb4.entry.js +0 -1
- package/dist/webcomponents/p-98b6943a.entry.js +0 -1
- package/dist/webcomponents/p-9bf095d2.entry.js +0 -1
- package/dist/webcomponents/p-9c1e3fb8.entry.js +0 -1
- package/dist/webcomponents/p-B2uBb14Y.js +0 -1
- package/dist/webcomponents/p-BF51n3KG.js +0 -1
- package/dist/webcomponents/p-BJuv5Y2i.js +0 -1
- package/dist/webcomponents/p-BQLEjYfZ.js +0 -1
- package/dist/webcomponents/p-BRJ4FIJH.js +0 -1
- package/dist/webcomponents/p-BdTK0wi9.js +0 -1
- package/dist/webcomponents/p-BeNhCG1Q.js +0 -1
- package/dist/webcomponents/p-BhrFjjAs.js +0 -1
- package/dist/webcomponents/p-BtT7kqMw.js +0 -1
- package/dist/webcomponents/p-ButA5T4e.js +0 -1
- package/dist/webcomponents/p-C3e-DgwK.js +0 -1
- package/dist/webcomponents/p-CKRDBISo.js +0 -1
- package/dist/webcomponents/p-CXLazxt0.js +0 -1
- package/dist/webcomponents/p-CfBKn_Vl.js +0 -1
- package/dist/webcomponents/p-ChzWF0s3.js +0 -1
- package/dist/webcomponents/p-CjAMuB2J.js +0 -1
- package/dist/webcomponents/p-Cjf9yu8r.js +0 -1
- package/dist/webcomponents/p-ClSZshaa.js +0 -1
- package/dist/webcomponents/p-Cwt_9Jzb.js +0 -1
- package/dist/webcomponents/p-D0Ko1H7J.js +0 -1
- package/dist/webcomponents/p-DC63XVwu.js +0 -1
- package/dist/webcomponents/p-DKClunJd.js +0 -1
- package/dist/webcomponents/p-DPfZxsq9.js +0 -1
- package/dist/webcomponents/p-DR0bMp9p.js +0 -1
- package/dist/webcomponents/p-DVnVdicA.js +0 -1
- package/dist/webcomponents/p-DZR542ci.js +0 -1
- package/dist/webcomponents/p-Dcbfnfn2.js +0 -1
- package/dist/webcomponents/p-Dn0KGDtq.js +0 -1
- package/dist/webcomponents/p-DniBAXrh.js +0 -1
- package/dist/webcomponents/p-DxEnw2tJ.js +0 -1
- package/dist/webcomponents/p-EAEmpCru.js +0 -1
- package/dist/webcomponents/p-N3w5zrz2.js +0 -2
- package/dist/webcomponents/p-NqdaxjDT.js +0 -1
- package/dist/webcomponents/p-Ph6Ebeu2.js +0 -1
- package/dist/webcomponents/p-RXUoM7A2.js +0 -1
- package/dist/webcomponents/p-a95db9a6.entry.js +0 -1
- package/dist/webcomponents/p-acf4c099.entry.js +0 -1
- package/dist/webcomponents/p-b47000f7.entry.js +0 -1
- package/dist/webcomponents/p-b893d5fa.entry.js +0 -1
- package/dist/webcomponents/p-b9d1d9dd.entry.js +0 -1
- package/dist/webcomponents/p-baa04544.entry.js +0 -1
- package/dist/webcomponents/p-bf2ba40d.entry.js +0 -1
- package/dist/webcomponents/p-c06bd8ea.entry.js +0 -1
- package/dist/webcomponents/p-c0955693.entry.js +0 -1
- package/dist/webcomponents/p-c6473b9b.entry.js +0 -1
- package/dist/webcomponents/p-c70dc6bd.entry.js +0 -1
- package/dist/webcomponents/p-ca6d05f9.entry.js +0 -1
- package/dist/webcomponents/p-d1c1c642.entry.js +0 -1
- package/dist/webcomponents/p-d3c966f4.entry.js +0 -1
- package/dist/webcomponents/p-d49b80b1.entry.js +0 -1
- package/dist/webcomponents/p-d69d09e6.entry.js +0 -1
- package/dist/webcomponents/p-dd3749ed.entry.js +0 -1
- package/dist/webcomponents/p-dfaf5b14.entry.js +0 -1
- package/dist/webcomponents/p-ede5eb9d.entry.js +0 -1
- package/dist/webcomponents/p-eefe4d71.entry.js +0 -1
- package/dist/webcomponents/p-f4f3bca9.entry.js +0 -1
- package/dist/webcomponents/p-f6ad1d58.entry.js +0 -1
- package/dist/webcomponents/p-pGzabKc7.js +0 -1
- package/dist/webcomponents/p-rPeW3G6n.js +0 -1
- package/dist/webcomponents/p-w128-0Mj.js +0 -1
- package/dist/webcomponents/p-xIyLUOJ6.js +0 -1
|
@@ -0,0 +1,876 @@
|
|
|
1
|
+
import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
|
|
2
|
+
import { S as StyledHost } from './styled-host.js';
|
|
3
|
+
import './details.js';
|
|
4
|
+
import './event-types.js';
|
|
5
|
+
import { S as Skeleton } from './skeleton.js';
|
|
6
|
+
import { c as checkoutStore, o as onChange } from './checkout.store.js';
|
|
7
|
+
|
|
8
|
+
var ApplePaySessionStatus;
|
|
9
|
+
(function (ApplePaySessionStatus) {
|
|
10
|
+
ApplePaySessionStatus["STATUS_SUCCESS"] = "STATUS_SUCCESS";
|
|
11
|
+
ApplePaySessionStatus["STATUS_FAILURE"] = "STATUS_FAILURE";
|
|
12
|
+
})(ApplePaySessionStatus || (ApplePaySessionStatus = {}));
|
|
13
|
+
var ApplePayButtonType;
|
|
14
|
+
(function (ApplePayButtonType) {
|
|
15
|
+
ApplePayButtonType["PLAIN"] = "plain";
|
|
16
|
+
ApplePayButtonType["BUY"] = "buy";
|
|
17
|
+
ApplePayButtonType["SET_UP"] = "set-up";
|
|
18
|
+
ApplePayButtonType["DONATE"] = "donate";
|
|
19
|
+
ApplePayButtonType["CHECK_OUT"] = "check-out";
|
|
20
|
+
ApplePayButtonType["BOOK"] = "book";
|
|
21
|
+
ApplePayButtonType["SUBSCRIBE"] = "subscribe";
|
|
22
|
+
})(ApplePayButtonType || (ApplePayButtonType = {}));
|
|
23
|
+
var ApplePayButtonStyle;
|
|
24
|
+
(function (ApplePayButtonStyle) {
|
|
25
|
+
ApplePayButtonStyle["BLACK"] = "black";
|
|
26
|
+
ApplePayButtonStyle["WHITE"] = "white";
|
|
27
|
+
ApplePayButtonStyle["WHITE_OUTLINE"] = "white-outline";
|
|
28
|
+
})(ApplePayButtonStyle || (ApplePayButtonStyle = {}));
|
|
29
|
+
var ApplePayMerchantCapability;
|
|
30
|
+
(function (ApplePayMerchantCapability) {
|
|
31
|
+
ApplePayMerchantCapability["SUPPORTS_3DS"] = "supports3DS";
|
|
32
|
+
ApplePayMerchantCapability["SUPPORTS_EMV"] = "supportsEMV";
|
|
33
|
+
ApplePayMerchantCapability["SUPPORTS_CREDIT"] = "supportsCredit";
|
|
34
|
+
ApplePayMerchantCapability["SUPPORTS_DEBIT"] = "supportsDebit";
|
|
35
|
+
})(ApplePayMerchantCapability || (ApplePayMerchantCapability = {}));
|
|
36
|
+
class ApplePayConfig {
|
|
37
|
+
constructor(data) {
|
|
38
|
+
this.merchantIdentifier = data.merchantIdentifier;
|
|
39
|
+
this.displayName = data.displayName;
|
|
40
|
+
this.initiative = data.initiative;
|
|
41
|
+
this.initiativeContext = data.initiativeContext;
|
|
42
|
+
this.buttonType = data.buttonType || ApplePayButtonType.PLAIN;
|
|
43
|
+
this.buttonStyle = data.buttonStyle || ApplePayButtonStyle.BLACK;
|
|
44
|
+
this.buttonLocale = data.buttonLocale || 'en-US';
|
|
45
|
+
}
|
|
46
|
+
get isValid() {
|
|
47
|
+
return !!(this.merchantIdentifier &&
|
|
48
|
+
this.displayName &&
|
|
49
|
+
this.initiative &&
|
|
50
|
+
this.initiativeContext);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
class ApplePayPaymentRequest {
|
|
54
|
+
constructor(data) {
|
|
55
|
+
this.countryCode = data.countryCode;
|
|
56
|
+
this.currencyCode = data.currencyCode;
|
|
57
|
+
this.merchantCapabilities = data.merchantCapabilities;
|
|
58
|
+
this.supportedNetworks = data.supportedNetworks;
|
|
59
|
+
this.total = data.total;
|
|
60
|
+
this.lineItems = data.lineItems;
|
|
61
|
+
this.shippingMethods = data.shippingMethods;
|
|
62
|
+
this.applicationData = data.applicationData;
|
|
63
|
+
this.supportedCountries = data.supportedCountries;
|
|
64
|
+
}
|
|
65
|
+
get isValid() {
|
|
66
|
+
var _a, _b, _c, _d;
|
|
67
|
+
return !!(this.countryCode &&
|
|
68
|
+
this.currencyCode &&
|
|
69
|
+
((_a = this.merchantCapabilities) === null || _a === void 0 ? void 0 : _a.length) &&
|
|
70
|
+
((_b = this.supportedNetworks) === null || _b === void 0 ? void 0 : _b.length) &&
|
|
71
|
+
((_c = this.total) === null || _c === void 0 ? void 0 : _c.label) &&
|
|
72
|
+
((_d = this.total) === null || _d === void 0 ? void 0 : _d.amount));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
class ApplePayHelpers {
|
|
76
|
+
static isApplePaySupported() {
|
|
77
|
+
var _a;
|
|
78
|
+
return typeof window !== 'undefined' &&
|
|
79
|
+
'ApplePaySession' in window &&
|
|
80
|
+
((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.supportsVersion(3));
|
|
81
|
+
}
|
|
82
|
+
static canMakePayments() {
|
|
83
|
+
var _a;
|
|
84
|
+
if (!this.isApplePaySupported()) {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
return ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePayments()) || false;
|
|
88
|
+
}
|
|
89
|
+
static async canMakePaymentsWithActiveCard(merchantIdentifier) {
|
|
90
|
+
var _a;
|
|
91
|
+
if (!this.isApplePaySupported()) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
try {
|
|
95
|
+
return await ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePaymentsWithActiveCard(merchantIdentifier)) || false;
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
console.error('Error checking Apple Pay active card:', error);
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
static formatAmount(amount) {
|
|
103
|
+
return (amount / 100).toFixed(2);
|
|
104
|
+
}
|
|
105
|
+
static parseAmount(amount) {
|
|
106
|
+
return Math.round(parseFloat(amount) * 100);
|
|
107
|
+
}
|
|
108
|
+
static createLineItem(label, amount, type = 'final') {
|
|
109
|
+
return {
|
|
110
|
+
label,
|
|
111
|
+
amount: this.formatAmount(amount),
|
|
112
|
+
type
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
static getDefaultSupportedNetworks() {
|
|
116
|
+
return [
|
|
117
|
+
'amex',
|
|
118
|
+
'discover',
|
|
119
|
+
'masterCard',
|
|
120
|
+
'visa'
|
|
121
|
+
];
|
|
122
|
+
}
|
|
123
|
+
static getDefaultMerchantCapabilities() {
|
|
124
|
+
return [
|
|
125
|
+
ApplePayMerchantCapability.SUPPORTS_3DS,
|
|
126
|
+
ApplePayMerchantCapability.SUPPORTS_EMV,
|
|
127
|
+
ApplePayMerchantCapability.SUPPORTS_CREDIT,
|
|
128
|
+
ApplePayMerchantCapability.SUPPORTS_DEBIT
|
|
129
|
+
];
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const isValidMerchantSession = (merchantSession) => {
|
|
134
|
+
const requiredFields = [
|
|
135
|
+
'merchantSessionIdentifier',
|
|
136
|
+
'nonce',
|
|
137
|
+
'merchantIdentifier',
|
|
138
|
+
'epochTimestamp',
|
|
139
|
+
'expiresAt',
|
|
140
|
+
];
|
|
141
|
+
const missingFields = requiredFields.filter((field) => !merchantSession[field]);
|
|
142
|
+
if (missingFields.length > 0) {
|
|
143
|
+
console.error('Missing required fields in merchant session:', missingFields);
|
|
144
|
+
console.error('Available fields:', Object.keys(merchantSession));
|
|
145
|
+
return false;
|
|
146
|
+
}
|
|
147
|
+
const now = Date.now();
|
|
148
|
+
if (merchantSession.expiresAt && merchantSession.expiresAt < now) {
|
|
149
|
+
console.error('Merchant session is expired:', {
|
|
150
|
+
expiresAt: merchantSession.expiresAt,
|
|
151
|
+
currentTime: now,
|
|
152
|
+
expired: merchantSession.expiresAt < now,
|
|
153
|
+
});
|
|
154
|
+
return false;
|
|
155
|
+
}
|
|
156
|
+
return true;
|
|
157
|
+
};
|
|
158
|
+
class ApplePayService {
|
|
159
|
+
constructor() {
|
|
160
|
+
this.apiBaseUrl = 'https://api.justifi-staging.com';
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Set custom API base URL
|
|
164
|
+
*/
|
|
165
|
+
setApiBaseUrl(url) {
|
|
166
|
+
this.apiBaseUrl = url;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Initialize Apple Pay configuration
|
|
170
|
+
*/
|
|
171
|
+
initialize(applePayConfig) {
|
|
172
|
+
this.applePayConfig = new ApplePayConfig(applePayConfig);
|
|
173
|
+
if (!this.applePayConfig.isValid) {
|
|
174
|
+
throw new Error('Invalid Apple Pay configuration provided');
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Validate merchant with Apple Pay servers via API (fixed to match original logic)
|
|
179
|
+
*/
|
|
180
|
+
async validateMerchant(payload) {
|
|
181
|
+
const endpoint = `${this.apiBaseUrl}/apple_pay/merchant_session`;
|
|
182
|
+
const body = payload;
|
|
183
|
+
const response = await fetch(endpoint, {
|
|
184
|
+
method: 'POST',
|
|
185
|
+
headers: {
|
|
186
|
+
'Content-Type': 'application/json',
|
|
187
|
+
Accept: 'application/json',
|
|
188
|
+
},
|
|
189
|
+
body: JSON.stringify(body),
|
|
190
|
+
});
|
|
191
|
+
if (!response.ok) {
|
|
192
|
+
const errorData = await response.text();
|
|
193
|
+
console.error('Backend validation failed - Raw response:', errorData);
|
|
194
|
+
try {
|
|
195
|
+
const jsonError = JSON.parse(errorData);
|
|
196
|
+
console.error('Backend validation failed - Parsed error:', jsonError);
|
|
197
|
+
}
|
|
198
|
+
catch (parseError) {
|
|
199
|
+
console.error('Could not parse error response as JSON:', parseError);
|
|
200
|
+
}
|
|
201
|
+
throw new Error(`Merchant validation failed: ${response.status}`);
|
|
202
|
+
}
|
|
203
|
+
const merchantSession = await response.json();
|
|
204
|
+
return merchantSession;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Process Apple Pay payment via API (fixed to match original logic)
|
|
208
|
+
*/
|
|
209
|
+
async processPayment(payload) {
|
|
210
|
+
const endpoint = `${this.apiBaseUrl}/apple_pay/process_token`;
|
|
211
|
+
const body = payload;
|
|
212
|
+
const response = await fetch(endpoint, {
|
|
213
|
+
method: 'POST',
|
|
214
|
+
headers: {
|
|
215
|
+
'Content-Type': 'application/json',
|
|
216
|
+
Accept: 'application/json',
|
|
217
|
+
},
|
|
218
|
+
body: JSON.stringify(body),
|
|
219
|
+
});
|
|
220
|
+
const result = await response.json();
|
|
221
|
+
return {
|
|
222
|
+
success: response.ok && result.status === 'success',
|
|
223
|
+
data: result,
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Check if Apple Pay is available on this device/browser
|
|
228
|
+
*/
|
|
229
|
+
isAvailable() {
|
|
230
|
+
return (ApplePayHelpers.isApplePaySupported() && ApplePayHelpers.canMakePayments());
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Check if the user has an active card for the merchant
|
|
234
|
+
*/
|
|
235
|
+
async canMakePaymentsWithActiveCard() {
|
|
236
|
+
if (!this.applePayConfig) {
|
|
237
|
+
throw new Error('Apple Pay not initialized. Call initialize() first.');
|
|
238
|
+
}
|
|
239
|
+
return await ApplePayHelpers.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier);
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Start Apple Pay session
|
|
243
|
+
*/
|
|
244
|
+
async startPaymentSession(paymentRequest) {
|
|
245
|
+
if (!this.applePayConfig) {
|
|
246
|
+
throw new Error('Apple Pay not initialized. Call initialize() first.');
|
|
247
|
+
}
|
|
248
|
+
if (!this.isAvailable()) {
|
|
249
|
+
throw new Error('Apple Pay is not available on this device/browser');
|
|
250
|
+
}
|
|
251
|
+
const request = new ApplePayPaymentRequest(paymentRequest);
|
|
252
|
+
if (!request.isValid) {
|
|
253
|
+
throw new Error('Invalid payment request provided');
|
|
254
|
+
}
|
|
255
|
+
this.currentPaymentRequest = request;
|
|
256
|
+
return new Promise((resolve, reject) => {
|
|
257
|
+
try {
|
|
258
|
+
this.currentSession = new window.ApplePaySession(3, request);
|
|
259
|
+
this.setupSessionEventHandlers(resolve, reject);
|
|
260
|
+
this.currentSession.begin();
|
|
261
|
+
}
|
|
262
|
+
catch (error) {
|
|
263
|
+
reject({
|
|
264
|
+
success: false,
|
|
265
|
+
error: {
|
|
266
|
+
code: 'SESSION_ERROR',
|
|
267
|
+
message: error instanceof Error
|
|
268
|
+
? error.message
|
|
269
|
+
: 'Failed to start Apple Pay session',
|
|
270
|
+
},
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Abort current Apple Pay session
|
|
277
|
+
*/
|
|
278
|
+
abortPaymentSession() {
|
|
279
|
+
if (this.currentSession) {
|
|
280
|
+
this.currentSession.abort();
|
|
281
|
+
this.currentSession = undefined;
|
|
282
|
+
this.currentPaymentRequest = undefined;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Setup Apple Pay session event handlers
|
|
287
|
+
*/
|
|
288
|
+
setupSessionEventHandlers(resolve, reject) {
|
|
289
|
+
if (!this.currentSession ||
|
|
290
|
+
!this.applePayConfig ||
|
|
291
|
+
!this.currentPaymentRequest) {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
this.currentSession.onvalidatemerchant = async (event) => {
|
|
295
|
+
try {
|
|
296
|
+
const validationPayload = {
|
|
297
|
+
validation_url: event.validationURL,
|
|
298
|
+
};
|
|
299
|
+
const merchantSession = await this.validateMerchant(validationPayload);
|
|
300
|
+
if (merchantSession && isValidMerchantSession(merchantSession)) {
|
|
301
|
+
try {
|
|
302
|
+
this.currentSession.completeMerchantValidation(merchantSession);
|
|
303
|
+
}
|
|
304
|
+
catch (completionError) {
|
|
305
|
+
console.error('Error calling completeMerchantValidation:', completionError);
|
|
306
|
+
throw completionError;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
this.currentSession.abort();
|
|
311
|
+
reject({
|
|
312
|
+
success: false,
|
|
313
|
+
error: {
|
|
314
|
+
code: 'MERCHANT_VALIDATION_ERROR',
|
|
315
|
+
message: 'Merchant validation failed',
|
|
316
|
+
},
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
catch (error) {
|
|
321
|
+
console.error('=== MERCHANT VALIDATION ERROR ===');
|
|
322
|
+
console.error('Error during merchant validation:', error);
|
|
323
|
+
console.error('Error stack:', error.stack);
|
|
324
|
+
this.currentSession.abort();
|
|
325
|
+
reject({
|
|
326
|
+
success: false,
|
|
327
|
+
error: {
|
|
328
|
+
code: 'MERCHANT_VALIDATION_ERROR',
|
|
329
|
+
message: error instanceof Error
|
|
330
|
+
? error.message
|
|
331
|
+
: 'Merchant validation failed',
|
|
332
|
+
},
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
this.currentSession.onpaymentauthorized = async (event) => {
|
|
337
|
+
try {
|
|
338
|
+
const payment = event.payment;
|
|
339
|
+
const paymentPayload = Object.assign(Object.assign({}, payment.token), { product_details: {
|
|
340
|
+
name: this.currentPaymentRequest.total.label,
|
|
341
|
+
price: ApplePayHelpers.parseAmount(this.currentPaymentRequest.total.amount),
|
|
342
|
+
description: this.currentPaymentRequest.total.label,
|
|
343
|
+
} });
|
|
344
|
+
const paymentResult = await this.processPayment(paymentPayload);
|
|
345
|
+
if (paymentResult.success) {
|
|
346
|
+
this.currentSession.completePayment({
|
|
347
|
+
status: ApplePaySessionStatus.STATUS_SUCCESS,
|
|
348
|
+
});
|
|
349
|
+
resolve({
|
|
350
|
+
success: true,
|
|
351
|
+
token: payment.token,
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
else {
|
|
355
|
+
console.error('PSP reported payment failure:', paymentResult.data);
|
|
356
|
+
this.currentSession.completePayment({
|
|
357
|
+
status: ApplePaySessionStatus.STATUS_FAILURE,
|
|
358
|
+
});
|
|
359
|
+
reject({
|
|
360
|
+
success: false,
|
|
361
|
+
error: {
|
|
362
|
+
code: 'PAYMENT_PROCESSING_ERROR',
|
|
363
|
+
message: 'Payment processing failed',
|
|
364
|
+
},
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
catch (error) {
|
|
369
|
+
console.error('=== PAYMENT PROCESSING ERROR ===');
|
|
370
|
+
console.error('Error processing payment:', error);
|
|
371
|
+
console.error('Error stack:', error.stack);
|
|
372
|
+
this.currentSession.completePayment({
|
|
373
|
+
status: ApplePaySessionStatus.STATUS_FAILURE,
|
|
374
|
+
});
|
|
375
|
+
reject({
|
|
376
|
+
success: false,
|
|
377
|
+
error: {
|
|
378
|
+
code: 'PAYMENT_PROCESSING_ERROR',
|
|
379
|
+
message: error instanceof Error
|
|
380
|
+
? error.message
|
|
381
|
+
: 'Payment processing failed',
|
|
382
|
+
},
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
finally {
|
|
386
|
+
this.currentSession = undefined;
|
|
387
|
+
this.currentPaymentRequest = undefined;
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
this.currentSession.onpaymentmethodselected = () => {
|
|
391
|
+
const paymentUpdate = {
|
|
392
|
+
newTotal: this.currentPaymentRequest.total,
|
|
393
|
+
newLineItems: this.currentPaymentRequest.lineItems || [],
|
|
394
|
+
};
|
|
395
|
+
try {
|
|
396
|
+
this.currentSession.completePaymentMethodSelection(paymentUpdate);
|
|
397
|
+
}
|
|
398
|
+
catch (error) {
|
|
399
|
+
console.error('Error completing payment method selection:', error);
|
|
400
|
+
this.currentSession.abort();
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
this.currentSession.onshippingmethodselected = () => {
|
|
404
|
+
this.currentSession.completeShippingMethodSelection({
|
|
405
|
+
status: ApplePaySessionStatus.STATUS_SUCCESS,
|
|
406
|
+
newTotal: this.currentPaymentRequest.total,
|
|
407
|
+
newLineItems: this.currentPaymentRequest.lineItems || [],
|
|
408
|
+
});
|
|
409
|
+
};
|
|
410
|
+
this.currentSession.oncancel = (event) => {
|
|
411
|
+
if (event.sessionError) {
|
|
412
|
+
switch (event.sessionError.code) {
|
|
413
|
+
case 'unknown':
|
|
414
|
+
console.error('Unknown error - likely merchant validation issue');
|
|
415
|
+
console.error('This usually means:');
|
|
416
|
+
console.error('1. Merchant certificate is invalid or expired');
|
|
417
|
+
console.error('2. Merchant identifier mismatch');
|
|
418
|
+
console.error('3. Backend validation endpoint issues');
|
|
419
|
+
break;
|
|
420
|
+
case 'invalidMerchantSession':
|
|
421
|
+
console.error('Invalid merchant session provided');
|
|
422
|
+
console.error('Check that the merchant session from backend is valid');
|
|
423
|
+
break;
|
|
424
|
+
case 'userCancel':
|
|
425
|
+
console.error('User cancelled the payment');
|
|
426
|
+
break;
|
|
427
|
+
default:
|
|
428
|
+
console.error('Other error code:', event.sessionError.code);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
this.currentSession = undefined;
|
|
432
|
+
this.currentPaymentRequest = undefined;
|
|
433
|
+
reject({
|
|
434
|
+
success: false,
|
|
435
|
+
error: {
|
|
436
|
+
code: 'USER_CANCELLED',
|
|
437
|
+
message: 'User cancelled the Apple Pay session',
|
|
438
|
+
},
|
|
439
|
+
});
|
|
440
|
+
};
|
|
441
|
+
if ('onerror' in this.currentSession) {
|
|
442
|
+
this.currentSession.onerror = (error) => {
|
|
443
|
+
console.error('=== APPLE PAY SESSION ERROR ===');
|
|
444
|
+
console.error('Session error:', error);
|
|
445
|
+
this.currentSession = undefined;
|
|
446
|
+
this.currentPaymentRequest = undefined;
|
|
447
|
+
reject({
|
|
448
|
+
success: false,
|
|
449
|
+
error: {
|
|
450
|
+
code: 'SESSION_ERROR',
|
|
451
|
+
message: 'Apple Pay session error occurred',
|
|
452
|
+
},
|
|
453
|
+
});
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* Create a basic payment request
|
|
459
|
+
*/
|
|
460
|
+
static createPaymentRequest(amount, label, countryCode = 'US', currencyCode = 'USD') {
|
|
461
|
+
return {
|
|
462
|
+
countryCode,
|
|
463
|
+
currencyCode,
|
|
464
|
+
merchantCapabilities: ApplePayHelpers.getDefaultMerchantCapabilities(),
|
|
465
|
+
supportedNetworks: ApplePayHelpers.getDefaultSupportedNetworks(),
|
|
466
|
+
total: ApplePayHelpers.createLineItem(label, amount),
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Get current configuration
|
|
471
|
+
*/
|
|
472
|
+
getApplePayConfig() {
|
|
473
|
+
return this.applePayConfig;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
const ApplePaySkeleton = (props) => {
|
|
478
|
+
const { isReady } = props;
|
|
479
|
+
if (isReady) {
|
|
480
|
+
return null;
|
|
481
|
+
}
|
|
482
|
+
return (h("div", { class: 'container-fluid p-0' },
|
|
483
|
+
h("div", { class: 'row mb-3' },
|
|
484
|
+
h("div", { class: 'col-12 align-content-center' },
|
|
485
|
+
h(Skeleton, { height: '44px', width: '100%', styles: { borderRadius: "8px" } })))));
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
const ProcessingSpinner = () => (h("div", { class: 'processing-overlay' },
|
|
489
|
+
h("div", { class: 'spinner' }),
|
|
490
|
+
h("span", null, "Processing...")));
|
|
491
|
+
const ApplePayButton = (props) => {
|
|
492
|
+
const getApplePayButtonClass = () => {
|
|
493
|
+
let classes = "apple-pay-button";
|
|
494
|
+
switch (props.buttonStyle) {
|
|
495
|
+
case ApplePayButtonStyle.WHITE:
|
|
496
|
+
classes += " apple-pay-button-white";
|
|
497
|
+
break;
|
|
498
|
+
case ApplePayButtonStyle.WHITE_OUTLINE:
|
|
499
|
+
classes += " apple-pay-button-white-outline";
|
|
500
|
+
break;
|
|
501
|
+
case ApplePayButtonStyle.BLACK:
|
|
502
|
+
default:
|
|
503
|
+
classes += " apple-pay-button-black";
|
|
504
|
+
break;
|
|
505
|
+
}
|
|
506
|
+
switch (props.buttonType) {
|
|
507
|
+
case ApplePayButtonType.BUY:
|
|
508
|
+
classes += " apple-pay-button-type-buy";
|
|
509
|
+
break;
|
|
510
|
+
case ApplePayButtonType.DONATE:
|
|
511
|
+
classes += " apple-pay-button-type-donate";
|
|
512
|
+
break;
|
|
513
|
+
case ApplePayButtonType.PLAIN:
|
|
514
|
+
default:
|
|
515
|
+
classes += " apple-pay-button-type-plain";
|
|
516
|
+
break;
|
|
517
|
+
}
|
|
518
|
+
if (props.disabled || props.isProcessing || !props.isAvailable) {
|
|
519
|
+
classes += " disabled";
|
|
520
|
+
}
|
|
521
|
+
return classes;
|
|
522
|
+
};
|
|
523
|
+
const getButtonStyles = () => {
|
|
524
|
+
return {
|
|
525
|
+
width: props.width || "200px",
|
|
526
|
+
height: props.height || "48px",
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
const handleClick = () => {
|
|
530
|
+
if (!props.disabled &&
|
|
531
|
+
!props.isProcessing &&
|
|
532
|
+
props.isAvailable &&
|
|
533
|
+
props.clickHandler) {
|
|
534
|
+
props.clickHandler();
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
return (h("div", { class: 'apple-pay-button-container' },
|
|
538
|
+
h("button", Object.assign({ class: getApplePayButtonClass(), style: getButtonStyles(), onClick: handleClick, disabled: props.disabled || props.isProcessing || !props.isAvailable, "aria-label": 'Pay with Apple Pay', type: 'button' }, props), props.isProcessing && ProcessingSpinner()),
|
|
539
|
+
h("style", null, `
|
|
540
|
+
.apple-pay-button-container {
|
|
541
|
+
display: inline-block;
|
|
542
|
+
position: relative;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/* Apple Pay CSS classes - these are the official Apple Pay button styles */
|
|
546
|
+
.apple-pay-button {
|
|
547
|
+
display: inline-block;
|
|
548
|
+
-webkit-appearance: -apple-pay-button;
|
|
549
|
+
-apple-pay-button-type: plain; /* default */
|
|
550
|
+
-apple-pay-button-style: black; /* default */
|
|
551
|
+
border-radius: 8px;
|
|
552
|
+
cursor: pointer;
|
|
553
|
+
border: none;
|
|
554
|
+
outline: none;
|
|
555
|
+
transition: opacity 0.2s ease;
|
|
556
|
+
position: relative;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
/* Button styles */
|
|
560
|
+
.apple-pay-button.apple-pay-button-black {
|
|
561
|
+
-apple-pay-button-style: black;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.apple-pay-button.apple-pay-button-white {
|
|
565
|
+
-apple-pay-button-style: white;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.apple-pay-button.apple-pay-button-white-outline {
|
|
569
|
+
-apple-pay-button-style: white-outline;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/* Button types */
|
|
573
|
+
.apple-pay-button.apple-pay-button-type-plain {
|
|
574
|
+
-apple-pay-button-type: plain;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.apple-pay-button.apple-pay-button-type-buy {
|
|
578
|
+
-apple-pay-button-type: buy;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.apple-pay-button.apple-pay-button-type-donate {
|
|
582
|
+
-apple-pay-button-type: donate;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
/* Hover and disabled states */
|
|
586
|
+
.apple-pay-button:hover:not(.disabled) {
|
|
587
|
+
opacity: 0.9;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.apple-pay-button.disabled {
|
|
591
|
+
opacity: 0.5;
|
|
592
|
+
cursor: not-allowed;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/* Processing overlay */
|
|
596
|
+
.processing-overlay {
|
|
597
|
+
position: absolute;
|
|
598
|
+
top: 0;
|
|
599
|
+
left: 0;
|
|
600
|
+
right: 0;
|
|
601
|
+
bottom: 0;
|
|
602
|
+
display: flex;
|
|
603
|
+
align-items: center;
|
|
604
|
+
justify-content: center;
|
|
605
|
+
gap: 8px;
|
|
606
|
+
background: rgba(0, 0, 0, 0.8);
|
|
607
|
+
color: white;
|
|
608
|
+
border-radius: 8px;
|
|
609
|
+
font-size: 14px;
|
|
610
|
+
font-weight: 500;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.spinner {
|
|
614
|
+
width: 16px;
|
|
615
|
+
height: 16px;
|
|
616
|
+
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
617
|
+
border-top: 2px solid #fff;
|
|
618
|
+
border-radius: 50%;
|
|
619
|
+
animation: spin 1s linear infinite;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
@keyframes spin {
|
|
623
|
+
0% { transform: rotate(0deg); }
|
|
624
|
+
100% { transform: rotate(360deg); }
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
/* Responsive design */
|
|
628
|
+
@media (max-width: 480px) {
|
|
629
|
+
.apple-pay-button {
|
|
630
|
+
width: 100% !important;
|
|
631
|
+
min-width: 200px;
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
`)));
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
const ApplePay = /*@__PURE__*/ proxyCustomElement(class ApplePay extends HTMLElement {
|
|
638
|
+
constructor() {
|
|
639
|
+
super();
|
|
640
|
+
this.__registerHost();
|
|
641
|
+
this.__attachShadow();
|
|
642
|
+
this.applePayStarted = createEvent(this, "applePayStarted", 7);
|
|
643
|
+
this.applePayCompleted = createEvent(this, "applePayCompleted", 7);
|
|
644
|
+
this.applePayCancelled = createEvent(this, "applePayCancelled", 7);
|
|
645
|
+
this.applePayError = createEvent(this, "applePayError", 7);
|
|
646
|
+
this.countryCode = "US";
|
|
647
|
+
this.merchantIdentifier = "merchant.com.justifi.checkout";
|
|
648
|
+
this.merchantDisplayName = "JustiFi Checkout";
|
|
649
|
+
this.initiativeContext = "checkout.justifi.tech";
|
|
650
|
+
this.apiBaseUrl = "https://api.justifi-staging.com";
|
|
651
|
+
this.buttonType = ApplePayButtonType.PLAIN;
|
|
652
|
+
this.buttonStyle = ApplePayButtonStyle.BLACK;
|
|
653
|
+
this.disabled = false;
|
|
654
|
+
this.showSkeleton = true;
|
|
655
|
+
this.isLoading = true;
|
|
656
|
+
this.isProcessing = false;
|
|
657
|
+
this.isAvailable = false;
|
|
658
|
+
this.canMakePayments = false;
|
|
659
|
+
this.error = null;
|
|
660
|
+
this.handleApplePayClick = async () => {
|
|
661
|
+
var _a;
|
|
662
|
+
if (this.isProcessing || this.disabled || !this.isAvailable) {
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
try {
|
|
666
|
+
this.isProcessing = true;
|
|
667
|
+
this.error = null;
|
|
668
|
+
this.applePayStarted.emit();
|
|
669
|
+
const paymentRequest = {
|
|
670
|
+
countryCode: this.countryCode,
|
|
671
|
+
currencyCode: checkoutStore.paymentCurrency,
|
|
672
|
+
merchantCapabilities: ApplePayHelpers.getDefaultMerchantCapabilities(),
|
|
673
|
+
supportedNetworks: ApplePayHelpers.getDefaultSupportedNetworks(),
|
|
674
|
+
total: ApplePayHelpers.createLineItem(checkoutStore.paymentDescription, checkoutStore.paymentAmount),
|
|
675
|
+
};
|
|
676
|
+
const result = await this.applePayService.startPaymentSession(paymentRequest);
|
|
677
|
+
if (result.success) {
|
|
678
|
+
this.applePayCompleted.emit({
|
|
679
|
+
success: true,
|
|
680
|
+
token: result.token,
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
else {
|
|
684
|
+
this.applePayCompleted.emit({
|
|
685
|
+
success: false,
|
|
686
|
+
error: result.error,
|
|
687
|
+
});
|
|
688
|
+
this.applePayError.emit({
|
|
689
|
+
error: ((_a = result.error) === null || _a === void 0 ? void 0 : _a.message) || "Payment failed",
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
catch (error) {
|
|
694
|
+
console.error("Apple Pay payment error:", error);
|
|
695
|
+
const errorMessage = error instanceof Error ? error.message : "Payment failed";
|
|
696
|
+
this.error = errorMessage;
|
|
697
|
+
this.applePayError.emit({ error: errorMessage });
|
|
698
|
+
this.applePayCompleted.emit({
|
|
699
|
+
success: false,
|
|
700
|
+
error: errorMessage,
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
finally {
|
|
704
|
+
this.isProcessing = false;
|
|
705
|
+
}
|
|
706
|
+
};
|
|
707
|
+
}
|
|
708
|
+
componentWillLoad() {
|
|
709
|
+
this.applePayService = new ApplePayService();
|
|
710
|
+
this.applePayService.setApiBaseUrl(this.apiBaseUrl);
|
|
711
|
+
this.initializeApplePay();
|
|
712
|
+
}
|
|
713
|
+
componentDidLoad() {
|
|
714
|
+
onChange('paymentAmount', () => {
|
|
715
|
+
this.initializeApplePay();
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
watchPropsChange() {
|
|
719
|
+
if (this.applePayService) {
|
|
720
|
+
this.applePayService.setApiBaseUrl(this.apiBaseUrl);
|
|
721
|
+
}
|
|
722
|
+
this.initializeApplePay();
|
|
723
|
+
}
|
|
724
|
+
async initializeApplePay() {
|
|
725
|
+
try {
|
|
726
|
+
this.isLoading = true;
|
|
727
|
+
this.error = null;
|
|
728
|
+
if (!checkoutStore.paymentAmount) {
|
|
729
|
+
this.error = "Missing required Apple Pay configuration";
|
|
730
|
+
this.isLoading = false;
|
|
731
|
+
return;
|
|
732
|
+
}
|
|
733
|
+
this.isAvailable = ApplePayHelpers.isApplePaySupported();
|
|
734
|
+
this.canMakePayments = ApplePayHelpers.canMakePayments();
|
|
735
|
+
if (!this.isAvailable) {
|
|
736
|
+
this.error = "Apple Pay is not supported on this device";
|
|
737
|
+
this.isLoading = false;
|
|
738
|
+
return;
|
|
739
|
+
}
|
|
740
|
+
if (!this.canMakePayments) {
|
|
741
|
+
this.error = "Apple Pay is not available";
|
|
742
|
+
this.isLoading = false;
|
|
743
|
+
return;
|
|
744
|
+
}
|
|
745
|
+
const applePayConfig = {
|
|
746
|
+
merchantIdentifier: this.merchantIdentifier,
|
|
747
|
+
displayName: this.merchantDisplayName,
|
|
748
|
+
initiative: "web",
|
|
749
|
+
initiativeContext: this.initiativeContext,
|
|
750
|
+
buttonType: this.buttonType,
|
|
751
|
+
buttonStyle: this.buttonStyle,
|
|
752
|
+
};
|
|
753
|
+
this.applePayService.initialize(applePayConfig);
|
|
754
|
+
const hasActiveCard = await this.applePayService.canMakePaymentsWithActiveCard();
|
|
755
|
+
if (!hasActiveCard) {
|
|
756
|
+
console.warn("No Apple Pay cards available, but continuing...");
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
catch (error) {
|
|
760
|
+
console.error("Apple Pay initialization error:", error);
|
|
761
|
+
this.error =
|
|
762
|
+
error instanceof Error
|
|
763
|
+
? error.message
|
|
764
|
+
: "Failed to initialize Apple Pay";
|
|
765
|
+
}
|
|
766
|
+
finally {
|
|
767
|
+
this.isLoading = false;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
async isSupported() {
|
|
771
|
+
return this.isAvailable && this.canMakePayments;
|
|
772
|
+
}
|
|
773
|
+
async getPaymentMethods() {
|
|
774
|
+
if (!this.isAvailable) {
|
|
775
|
+
return [];
|
|
776
|
+
}
|
|
777
|
+
return ApplePayHelpers.getDefaultSupportedNetworks();
|
|
778
|
+
}
|
|
779
|
+
async abort() {
|
|
780
|
+
this.applePayService.abortPaymentSession();
|
|
781
|
+
this.isProcessing = false;
|
|
782
|
+
this.applePayCancelled.emit();
|
|
783
|
+
}
|
|
784
|
+
render() {
|
|
785
|
+
const isReady = !this.isLoading &&
|
|
786
|
+
this.isAvailable &&
|
|
787
|
+
this.canMakePayments &&
|
|
788
|
+
!this.error;
|
|
789
|
+
return (h(StyledHost, { key: '01f45866c347cedc1e960cc2330aa2254cd21176' }, h("div", { key: 'cf3bb10db74d2f299aa1e67b0d0de1774f50f63d', class: 'apple-pay-container' }, h(ApplePaySkeleton, { key: 'b149112f9308709f958827f0aeb5a5410250601e', isReady: isReady }), !this.isLoading && this.error && (h("div", { key: '758336a1da163d64d7094e43d69e6a7655ee63c6', class: 'apple-pay-error', role: 'alert' }, h("span", { key: 'b5a41cdab76a8b23e6baeaf3b59f9a20e6788dff', class: 'error-icon' }, "\u26A0\uFE0F"), h("span", { key: '218d9e47295b6899b57c862df49b3cc365d3e786', class: 'error-message' }, this.error))), !this.isLoading && !this.error && !this.isAvailable && (h("div", { key: 'f231298d4a10c1eeae2a3360095fd2f3b044620a', class: 'apple-pay-unavailable' }, h("span", { key: 'd943185545a9f19f8edc763cbd0946679e526f22', class: 'unavailable-message' }, "Apple Pay is not available on this device"))), !this.isLoading &&
|
|
790
|
+
!this.error &&
|
|
791
|
+
this.isAvailable &&
|
|
792
|
+
this.canMakePayments && (h(ApplePayButton, { key: 'a1aa0a7ba9c95610130e258e5d9b88fa0a533ffb', buttonType: this.buttonType, buttonStyle: this.buttonStyle, disabled: this.disabled, isProcessing: this.isProcessing, isAvailable: this.isAvailable, clickHandler: this.handleApplePayClick }))), h("style", { key: '460c99302788488e3475c7851f571f3cfc8bfc21' }, `
|
|
793
|
+
.apple-pay-container {
|
|
794
|
+
width: 100%;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
.apple-pay-error {
|
|
798
|
+
display: flex;
|
|
799
|
+
align-items: center;
|
|
800
|
+
gap: 8px;
|
|
801
|
+
padding: 12px;
|
|
802
|
+
background: #fef2f2;
|
|
803
|
+
border: 1px solid #fecaca;
|
|
804
|
+
border-radius: 8px;
|
|
805
|
+
color: #dc2626;
|
|
806
|
+
font-size: 14px;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
.apple-pay-unavailable {
|
|
810
|
+
display: flex;
|
|
811
|
+
align-items: center;
|
|
812
|
+
justify-content: center;
|
|
813
|
+
padding: 12px;
|
|
814
|
+
background: #f9fafb;
|
|
815
|
+
border: 1px solid #e5e7eb;
|
|
816
|
+
border-radius: 8px;
|
|
817
|
+
color: #6b7280;
|
|
818
|
+
font-size: 14px;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
.error-icon {
|
|
822
|
+
font-size: 16px;
|
|
823
|
+
}
|
|
824
|
+
`)));
|
|
825
|
+
}
|
|
826
|
+
static get watchers() { return {
|
|
827
|
+
"merchantIdentifier": ["watchPropsChange"],
|
|
828
|
+
"apiBaseUrl": ["watchPropsChange"],
|
|
829
|
+
"buttonType": ["watchPropsChange"],
|
|
830
|
+
"buttonStyle": ["watchPropsChange"],
|
|
831
|
+
"disabled": ["watchPropsChange"]
|
|
832
|
+
}; }
|
|
833
|
+
}, [257, "justifi-apple-pay", {
|
|
834
|
+
"countryCode": [1, "country-code"],
|
|
835
|
+
"merchantIdentifier": [1, "merchant-identifier"],
|
|
836
|
+
"merchantDisplayName": [1, "merchant-display-name"],
|
|
837
|
+
"initiativeContext": [1, "initiative-context"],
|
|
838
|
+
"apiBaseUrl": [1, "api-base-url"],
|
|
839
|
+
"buttonType": [1, "button-type"],
|
|
840
|
+
"buttonStyle": [1, "button-style"],
|
|
841
|
+
"disabled": [4],
|
|
842
|
+
"showSkeleton": [4, "show-skeleton"],
|
|
843
|
+
"isLoading": [32],
|
|
844
|
+
"isProcessing": [32],
|
|
845
|
+
"isAvailable": [32],
|
|
846
|
+
"canMakePayments": [32],
|
|
847
|
+
"error": [32],
|
|
848
|
+
"isSupported": [64],
|
|
849
|
+
"getPaymentMethods": [64],
|
|
850
|
+
"abort": [64]
|
|
851
|
+
}, undefined, {
|
|
852
|
+
"merchantIdentifier": ["watchPropsChange"],
|
|
853
|
+
"apiBaseUrl": ["watchPropsChange"],
|
|
854
|
+
"buttonType": ["watchPropsChange"],
|
|
855
|
+
"buttonStyle": ["watchPropsChange"],
|
|
856
|
+
"disabled": ["watchPropsChange"]
|
|
857
|
+
}]);
|
|
858
|
+
function defineCustomElement$1() {
|
|
859
|
+
if (typeof customElements === "undefined") {
|
|
860
|
+
return;
|
|
861
|
+
}
|
|
862
|
+
const components = ["justifi-apple-pay"];
|
|
863
|
+
components.forEach(tagName => { switch (tagName) {
|
|
864
|
+
case "justifi-apple-pay":
|
|
865
|
+
if (!customElements.get(tagName)) {
|
|
866
|
+
customElements.define(tagName, ApplePay);
|
|
867
|
+
}
|
|
868
|
+
break;
|
|
869
|
+
} });
|
|
870
|
+
}
|
|
871
|
+
defineCustomElement$1();
|
|
872
|
+
|
|
873
|
+
const JustifiApplePay = ApplePay;
|
|
874
|
+
const defineCustomElement = defineCustomElement$1;
|
|
875
|
+
|
|
876
|
+
export { JustifiApplePay, defineCustomElement };
|