@justifi/webcomponents 6.0.0-rc.2 → 6.0.0-rc.4
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/bank-account-document-form-inputs_4.cjs.entry.js +2 -2
- package/dist/cjs/{check-pkg-version-BfmeLSXP.js → check-pkg-version-BNVGE27p.js} +1 -1
- package/dist/cjs/{checkout.store-Cn3Jj5gi.js → checkout.store-CV_fuGQw.js} +0 -1
- package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
- package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/form-control-date.cjs.entry.js +2 -2
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
- package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number-masked_2.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number.cjs.entry.js +2 -2
- package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
- package/dist/cjs/form-control-select_2.cjs.entry.js +2 -2
- package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
- package/dist/cjs/justifi-bank-account-billing-form-simple_9.cjs.entry.js +8 -8
- package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-checkout-summary_6.cjs.entry.js +12 -99
- package/dist/cjs/justifi-checkout.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +2 -2
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payment-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payments-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payout-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +2 -2
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +3 -3
- package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-CuNDvHTB.js → package-BKILqyp3.js} +1 -1
- package/dist/cjs/payment-details-core.cjs.entry.js +8 -8
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/payments-list-core.cjs.entry.js +1 -1
- package/dist/cjs/payout-details-core.cjs.entry.js +3 -3
- package/dist/cjs/payouts-list-core.cjs.entry.js +1 -1
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +1 -1
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/terminals-list-core.cjs.entry.js +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/modular-checkout/modular-checkout.js +5 -92
- package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
- 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/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 +2 -2
- package/dist/collection/store/checkout.store.js +0 -1
- 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-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/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 +1 -463
- package/dist/esm/additional-questions-details_5.entry.js +2 -2
- package/dist/esm/{badge-D4ZXPFjL.js → badge-D_mzXSCQ.js} +1 -1
- package/dist/esm/bank-account-document-form-inputs_4.entry.js +5 -5
- package/dist/esm/bank-account-form.entry.js +2 -2
- package/dist/esm/business-details-core.entry.js +3 -3
- package/dist/esm/{button-C0wLsDP3.js → button-CeR8qVS3.js} +1 -1
- package/dist/esm/card-form.entry.js +2 -2
- package/dist/esm/{check-pkg-version-BuYkk-jV.js → check-pkg-version-CaWUVat7.js} +1 -1
- package/dist/esm/{checkout.store-OAv_iY1u.js → checkout.store-B60siz2l.js} +0 -1
- package/dist/esm/checkouts-list-core.entry.js +5 -5
- package/dist/esm/{checkouts-table-DjGKtqoc.js → checkouts-table-CFZYoYjn.js} +2 -2
- package/dist/esm/custom-popper_2.entry.js +3 -3
- package/dist/esm/form-alert_5.entry.js +1 -1
- package/dist/esm/form-control-checkbox.entry.js +5 -5
- package/dist/esm/form-control-date.entry.js +4 -4
- package/dist/esm/{form-control-error-text-Bzfs_rxk.js → form-control-error-text-D3ZwkOv-.js} +1 -1
- package/dist/esm/form-control-file-v2_2.entry.js +5 -5
- package/dist/esm/{form-control-help-text-ueLctOBN.js → form-control-help-text-C39ZW65w.js} +1 -1
- package/dist/esm/form-control-monetary-provisioning.entry.js +3 -3
- package/dist/esm/form-control-monetary.entry.js +5 -5
- package/dist/esm/form-control-number-masked_2.entry.js +4 -4
- package/dist/esm/form-control-number.entry.js +5 -5
- package/dist/esm/form-control-radio.entry.js +3 -3
- package/dist/esm/form-control-select_2.entry.js +4 -4
- package/dist/esm/gross-payment-chart-core.entry.js +3 -3
- package/dist/esm/{header-1-BMKEv9y6.js → header-1-E-hEi3wF.js} +1 -1
- package/dist/esm/{header-3-C3t3m27b.js → header-3-Dm7M85kz.js} +1 -1
- package/dist/esm/hidden-input_2.entry.js +7 -7
- package/dist/esm/{insurance-state-d4hjThzE.js → insurance-state-CB4l8sOv.js} +1 -1
- package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +3 -3
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +2 -2
- package/dist/esm/justifi-additional-statement_8.entry.js +1 -1
- package/dist/esm/justifi-bank-account-billing-form-simple_9.entry.js +12 -12
- package/dist/esm/justifi-business-details.entry.js +4 -4
- package/dist/esm/justifi-business-form.entry.js +6 -6
- package/dist/esm/justifi-business-representative-form-inputs.entry.js +1 -1
- package/dist/esm/justifi-checkout-summary_6.entry.js +16 -103
- package/dist/esm/justifi-checkout.entry.js +4 -4
- package/dist/esm/justifi-checkouts-list-filters.entry.js +1 -1
- package/dist/esm/justifi-checkouts-list.entry.js +5 -5
- package/dist/esm/justifi-details.entry.js +2 -2
- package/dist/esm/justifi-dispute-management.entry.js +2 -2
- package/dist/esm/justifi-dispute-notification_3.entry.js +5 -5
- package/dist/esm/justifi-gross-payment-chart.entry.js +4 -4
- package/dist/esm/justifi-order-terminals.entry.js +5 -5
- package/dist/esm/justifi-owner-form_3.entry.js +2 -2
- package/dist/esm/justifi-payment-details.entry.js +4 -4
- package/dist/esm/justifi-payment-provisioning-core.entry.js +2 -2
- package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
- package/dist/esm/justifi-payment-transactions-list.entry.js +6 -6
- package/dist/esm/justifi-payments-list-filters.entry.js +3 -3
- package/dist/esm/justifi-payments-list.entry.js +7 -7
- package/dist/esm/justifi-payout-details.entry.js +4 -4
- package/dist/esm/justifi-payout-transactions-list.entry.js +6 -6
- package/dist/esm/justifi-payouts-list-filters.entry.js +3 -3
- package/dist/esm/justifi-payouts-list.entry.js +7 -7
- package/dist/esm/justifi-refund-payment.entry.js +5 -5
- package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +6 -6
- package/dist/esm/justifi-skeleton.entry.js +3 -3
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +3 -3
- package/dist/esm/justifi-terminal-orders-list.entry.js +6 -6
- package/dist/esm/justifi-terminals-list-filters.entry.js +2 -2
- package/dist/esm/justifi-terminals-list.entry.js +6 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-C60pS6qh.js → package-BF-uL8B4.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +1 -1
- package/dist/esm/{parts-RvUQ__Pq.js → parts-CfF8KKwx.js} +1 -1
- package/dist/esm/payment-details-core.entry.js +13 -13
- package/dist/esm/payment-method-option.entry.js +2 -2
- package/dist/esm/payments-list-core.entry.js +7 -7
- package/dist/esm/{payments-status-1yRdTNeS.js → payments-status-XoZrlbiZ.js} +1 -1
- package/dist/esm/{payments-table-8RADYkma.js → payments-table-Dh4P9mTb.js} +2 -2
- package/dist/esm/payout-details-core.entry.js +9 -9
- package/dist/esm/payouts-list-core.entry.js +7 -7
- package/dist/esm/{payouts-status-BqsQVtBp.js → payouts-status-Qm2jZG1-.js} +1 -1
- package/dist/esm/{payouts-table-DPw7yIx8.js → payouts-table-DMVAZp-r.js} +2 -2
- package/dist/esm/{skeleton-BmTjpTYa.js → skeleton-DrHwsgs_.js} +1 -1
- package/dist/esm/{spinner-YGDOI-CS.js → spinner-XBq6mVJW.js} +1 -1
- package/dist/esm/table-filters-menu.entry.js +2 -2
- package/dist/esm/{table-ybHxxc9f.js → table-qqt2Ew5y.js} +2 -2
- package/dist/esm/terminal-orders-list-core.entry.js +6 -6
- package/dist/esm/{terminal-orders-table-D-xP5WuM.js → terminal-orders-table-BN4Co4T8.js} +2 -2
- package/dist/esm/terminal-quantity-selector.entry.js +2 -2
- package/dist/esm/terminals-list-core.entry.js +6 -6
- package/dist/esm/{terminals-table-DVAPCgEr.js → terminals-table-C8LczeG_.js} +2 -2
- package/dist/esm/{utils-DG5aMFmf.js → utils-kWaZhFAd.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/bank-account.js +2 -2
- package/dist/module/card-form2.js +2 -2
- package/dist/module/checkout.store.js +0 -1
- package/dist/module/custom-popper2.js +2 -2
- package/dist/module/form-control-checkbox2.js +2 -2
- package/dist/module/form-control-date2.js +2 -2
- package/dist/module/form-control-file-v22.js +1 -1
- package/dist/module/form-control-file2.js +2 -2
- package/dist/module/form-control-monetary2.js +2 -2
- package/dist/module/form-control-number-masked2.js +2 -2
- package/dist/module/form-control-number.js +2 -2
- package/dist/module/form-control-radio2.js +2 -2
- package/dist/module/form-control-text2.js +2 -2
- package/dist/module/form-control-textarea2.js +2 -2
- package/dist/module/hidden-input2.js +1 -1
- package/dist/module/iframe-input2.js +3 -3
- package/dist/module/justifi-button2.js +1 -1
- package/dist/module/justifi-header2.js +1 -1
- package/dist/module/justifi-order-terminals.js +1 -1
- package/dist/module/justifi-payment-transactions-list.js +1 -1
- package/dist/module/justifi-payments-list-filters.js +2 -2
- package/dist/module/justifi-payments-list.js +1 -1
- package/dist/module/justifi-payout-transactions-list.js +1 -1
- package/dist/module/justifi-payouts-list-filters.js +2 -2
- package/dist/module/justifi-payouts-list.js +1 -1
- package/dist/module/justifi-skeleton.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +2 -2
- package/dist/module/justifi-terminal-orders-list.js +1 -1
- package/dist/module/justifi-terminals-list-filters.js +1 -1
- package/dist/module/justifi-terminals-list.js +1 -1
- package/dist/module/modular-checkout.js +5 -92
- package/dist/module/package.js +1 -1
- package/dist/module/payment-details-core2.js +8 -8
- package/dist/module/payment-method-option.js +1 -1
- package/dist/module/payments-list-core2.js +1 -1
- package/dist/module/payout-details-core2.js +3 -3
- package/dist/module/payouts-list-core2.js +1 -1
- package/dist/module/summary.js +1 -1
- package/dist/module/terminal-orders-list-core2.js +1 -1
- package/dist/module/terminal-quantity-selector2.js +1 -1
- package/dist/module/terminals-list-core2.js +1 -1
- package/dist/module/tokenize-payment-method.js +2 -2
- package/dist/types/components/modular-checkout/modular-checkout.d.ts +0 -8
- package/dist/types/components.d.ts +0 -120
- package/dist/types/store/checkout.store.d.ts +0 -1
- package/dist/webcomponents/{p-dc245644.entry.js → p-0b790fa4.entry.js} +4 -4
- package/dist/webcomponents/{p-0e64cd09.entry.js → p-0cab7d5d.entry.js} +1 -1
- package/dist/webcomponents/{p-cbfc8269.entry.js → p-0e287092.entry.js} +1 -1
- package/dist/webcomponents/{p-59e8f027.entry.js → p-145bb9c4.entry.js} +1 -1
- package/dist/webcomponents/{p-cabaf013.entry.js → p-14d66df2.entry.js} +1 -1
- package/dist/webcomponents/{p-a406bf1a.entry.js → p-15777cfe.entry.js} +1 -1
- package/dist/webcomponents/p-1975406a.entry.js +1 -0
- package/dist/webcomponents/{p-387bcdee.entry.js → p-1ffbf771.entry.js} +1 -1
- package/dist/webcomponents/{p-7b9fa1fb.entry.js → p-29b6f15a.entry.js} +1 -1
- package/dist/webcomponents/p-2a59547b.entry.js +1 -0
- package/dist/webcomponents/p-2da63719.entry.js +1 -0
- package/dist/webcomponents/{p-fbaf62a5.entry.js → p-35bbfbf8.entry.js} +1 -1
- package/dist/webcomponents/{p-b04cc606.entry.js → p-3d85d046.entry.js} +1 -1
- package/dist/webcomponents/{p-ea1b161a.entry.js → p-413236be.entry.js} +1 -1
- package/dist/webcomponents/{p-0aee6da6.entry.js → p-43d693a3.entry.js} +1 -1
- package/dist/webcomponents/{p-03c7cee8.entry.js → p-48bccf3b.entry.js} +1 -1
- package/dist/webcomponents/p-4ae2a0b9.entry.js +1 -0
- package/dist/webcomponents/p-4b795b77.entry.js +1 -0
- package/dist/webcomponents/{p-2169c3d1.entry.js → p-518a9519.entry.js} +1 -1
- package/dist/webcomponents/{p-a1a8f6bd.entry.js → p-53c81d62.entry.js} +1 -1
- package/dist/webcomponents/p-5477c449.entry.js +1 -0
- package/dist/webcomponents/p-56980ef3.entry.js +1 -0
- package/dist/webcomponents/{p-a9d2dd5e.entry.js → p-57143978.entry.js} +1 -1
- package/dist/webcomponents/p-614fcef6.entry.js +1 -0
- package/dist/webcomponents/{p-5ad70aae.entry.js → p-6e18d13f.entry.js} +1 -1
- package/dist/webcomponents/p-70ff3b10.entry.js +1 -0
- package/dist/webcomponents/{p-0aa78c58.entry.js → p-724b0361.entry.js} +1 -1
- package/dist/webcomponents/{p-08a5cc2f.entry.js → p-738e0511.entry.js} +1 -1
- package/dist/webcomponents/p-739d6f13.entry.js +1 -0
- package/dist/webcomponents/{p-76a95d07.entry.js → p-79055216.entry.js} +1 -1
- package/dist/webcomponents/{p-42994618.entry.js → p-7b9008f1.entry.js} +1 -1
- package/dist/webcomponents/{p-281e36be.entry.js → p-84ce3bae.entry.js} +1 -1
- package/dist/webcomponents/p-8a5e168d.entry.js +1 -0
- package/dist/webcomponents/{p-cf16498f.entry.js → p-8f31a0c5.entry.js} +1 -1
- package/dist/webcomponents/{p-e8a198fa.entry.js → p-904a95e5.entry.js} +1 -1
- package/dist/webcomponents/{p-4cf9168d.entry.js → p-98579723.entry.js} +1 -1
- package/dist/webcomponents/{p-c7e5245a.entry.js → p-9c5b0b94.entry.js} +1 -1
- package/dist/webcomponents/p-9ccd19f5.entry.js +1 -0
- package/dist/webcomponents/{p-1246b999.entry.js → p-9f289c31.entry.js} +1 -1
- package/dist/webcomponents/p-BC8YDY7M.js +1 -0
- package/dist/webcomponents/p-BF-uL8B4.js +1 -0
- package/dist/webcomponents/{p-BUadwxkh.js → p-BTkXk7ol.js} +1 -1
- package/dist/webcomponents/p-BbYVgLcf.js +1 -0
- package/dist/webcomponents/{p-CP_tg-uH.js → p-BeszVz87.js} +1 -1
- package/dist/webcomponents/{p-wyEq9Pa1.js → p-BisQ61nK.js} +1 -1
- package/dist/webcomponents/{p-HAk7yBNq.js → p-Bz164TKZ.js} +1 -1
- package/dist/webcomponents/p-C1fMfnu0.js +1 -0
- package/dist/webcomponents/{p-BXKEChoo.js → p-CCME-fyU.js} +1 -1
- package/dist/webcomponents/p-C_CXv7AN.js +1 -0
- package/dist/webcomponents/{p-RvUQ__Pq.js → p-CfF8KKwx.js} +1 -1
- package/dist/webcomponents/{p-DBsw4qpn.js → p-CsNubTqD.js} +1 -1
- package/dist/webcomponents/p-CwZKT93w.js +1 -0
- package/dist/webcomponents/p-D599ZMGU.js +1 -0
- package/dist/webcomponents/{p-DuXN7Akd.js → p-DO3INvI2.js} +1 -1
- package/dist/webcomponents/{p-D9Sv4eV5.js → p-DWOKxG7j.js} +1 -1
- package/dist/webcomponents/{p-BhdBpAn9.js → p-Dvxpy_P1.js} +1 -1
- package/dist/webcomponents/{p-D48iERjQ.js → p-JgbsbAhz.js} +1 -1
- package/dist/webcomponents/{p-nWGo6sHu.js → p-YND5pTuF.js} +1 -1
- package/dist/webcomponents/{p-bfc38bc2.entry.js → p-a0573ecc.entry.js} +1 -1
- package/dist/webcomponents/p-a33ea645.entry.js +1 -0
- package/dist/webcomponents/{p-4c994761.entry.js → p-a8205044.entry.js} +1 -1
- package/dist/webcomponents/{p-c6860f60.entry.js → p-b0bfa20f.entry.js} +1 -1
- package/dist/webcomponents/{p-1202181b.entry.js → p-b93377a7.entry.js} +1 -1
- package/dist/webcomponents/p-ba018d57.entry.js +1 -0
- package/dist/webcomponents/{p-d014a155.entry.js → p-bafe873d.entry.js} +1 -1
- package/dist/webcomponents/p-be06d86a.entry.js +1 -0
- package/dist/webcomponents/{p-4a79c737.entry.js → p-befda39d.entry.js} +1 -1
- package/dist/webcomponents/{p-afc83e27.entry.js → p-c5b48e8d.entry.js} +1 -1
- package/dist/webcomponents/{p-92efb3f2.entry.js → p-c5dabaf4.entry.js} +1 -1
- package/dist/webcomponents/p-cea8e40e.entry.js +1 -0
- package/dist/webcomponents/p-d075bd72.entry.js +1 -0
- package/dist/webcomponents/{p-1a83d9f2.entry.js → p-d7720819.entry.js} +1 -1
- package/dist/webcomponents/p-df4f2af9.entry.js +1 -0
- package/dist/webcomponents/p-e1ba5735.entry.js +1 -0
- package/dist/webcomponents/{p-e6ca1872.entry.js → p-e2267656.entry.js} +1 -1
- package/dist/webcomponents/p-e4e30e84.entry.js +1 -0
- package/dist/webcomponents/{p-55b7bdba.entry.js → p-e81c5d79.entry.js} +1 -1
- package/dist/webcomponents/p-f200cbda.entry.js +1 -0
- package/dist/webcomponents/p-f4645aef.entry.js +1 -0
- package/dist/webcomponents/{p-a70bc148.entry.js → p-f4f3cae8.entry.js} +1 -1
- package/dist/webcomponents/p-f7345d66.entry.js +1 -0
- package/dist/webcomponents/{p-1b892b3a.entry.js → p-f7e62bfa.entry.js} +1 -1
- package/dist/webcomponents/{p-32cc081a.entry.js → p-fd39af50.entry.js} +1 -1
- package/dist/webcomponents/{p-C0AHrswP.js → p-qMrd7_Gp.js} +1 -1
- package/dist/webcomponents/{p-DKRXPZKS.js → p-vRhNRfmB.js} +1 -1
- package/dist/webcomponents/p-zrUQD0Wr.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/justifi-apple-pay.cjs.entry.js +0 -830
- package/dist/collection/api/ApplePay.js +0 -119
- package/dist/collection/api/services/apple-pay.service.js +0 -329
- package/dist/collection/components/modular-checkout/sub-components/apple-pay-skeleton.js +0 -10
- package/dist/collection/components/modular-checkout/sub-components/apple-pay.js +0 -554
- package/dist/collection/ui-components/apple-pay-button.js +0 -146
- package/dist/esm/justifi-apple-pay.entry.js +0 -828
- package/dist/module/justifi-apple-pay.d.ts +0 -11
- package/dist/module/justifi-apple-pay.js +0 -871
- package/dist/types/api/ApplePay.d.ts +0 -196
- package/dist/types/api/services/apple-pay.service.d.ts +0 -65
- package/dist/types/components/modular-checkout/sub-components/apple-pay-skeleton.d.ts +0 -6
- package/dist/types/components/modular-checkout/sub-components/apple-pay.d.ts +0 -38
- package/dist/types/ui-components/apple-pay-button.d.ts +0 -17
- package/dist/webcomponents/p-12c312a0.entry.js +0 -1
- package/dist/webcomponents/p-1c0c1d7b.entry.js +0 -1
- package/dist/webcomponents/p-1e206c92.entry.js +0 -1
- package/dist/webcomponents/p-2988e82c.entry.js +0 -1
- package/dist/webcomponents/p-2a0a907d.entry.js +0 -1
- package/dist/webcomponents/p-41416b5f.entry.js +0 -1
- package/dist/webcomponents/p-5510b57c.entry.js +0 -1
- package/dist/webcomponents/p-5a5f07be.entry.js +0 -1
- package/dist/webcomponents/p-5acd6add.entry.js +0 -1
- package/dist/webcomponents/p-5afbfafb.entry.js +0 -1
- package/dist/webcomponents/p-6974a44c.entry.js +0 -1
- package/dist/webcomponents/p-6f2b41f5.entry.js +0 -1
- package/dist/webcomponents/p-6f9755cc.entry.js +0 -1
- package/dist/webcomponents/p-7288473f.entry.js +0 -1
- package/dist/webcomponents/p-98939b74.entry.js +0 -1
- package/dist/webcomponents/p-BZzESzqz.js +0 -1
- package/dist/webcomponents/p-BmFoKOM3.js +0 -1
- package/dist/webcomponents/p-BtOB_CaO.js +0 -1
- package/dist/webcomponents/p-C60pS6qh.js +0 -1
- package/dist/webcomponents/p-D7eeJWA-.js +0 -1
- package/dist/webcomponents/p-DOd8HaWV.js +0 -1
- package/dist/webcomponents/p-DcE8SQPv.js +0 -1
- package/dist/webcomponents/p-Drz6LnIw.js +0 -1
- package/dist/webcomponents/p-b41d2b8f.entry.js +0 -1
- package/dist/webcomponents/p-b8f63e28.entry.js +0 -1
- package/dist/webcomponents/p-ba84c3bd.entry.js +0 -1
- package/dist/webcomponents/p-c62e23c1.entry.js +0 -1
- package/dist/webcomponents/p-eff0b0e9.entry.js +0 -1
- package/dist/webcomponents/p-f3be7b2b.entry.js +0 -1
- package/dist/webcomponents/p-f787bc18.entry.js +0 -1
- package/dist/webcomponents/p-fb1904d2.entry.js +0 -1
- package/dist/webcomponents/p-fcb6e870.entry.js +0 -1
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
export var ApplePaySessionStatus;
|
|
2
|
-
(function (ApplePaySessionStatus) {
|
|
3
|
-
ApplePaySessionStatus["STATUS_SUCCESS"] = "STATUS_SUCCESS";
|
|
4
|
-
ApplePaySessionStatus["STATUS_FAILURE"] = "STATUS_FAILURE";
|
|
5
|
-
})(ApplePaySessionStatus || (ApplePaySessionStatus = {}));
|
|
6
|
-
export var ApplePayButtonType;
|
|
7
|
-
(function (ApplePayButtonType) {
|
|
8
|
-
ApplePayButtonType["PLAIN"] = "plain";
|
|
9
|
-
ApplePayButtonType["BUY"] = "buy";
|
|
10
|
-
ApplePayButtonType["SET_UP"] = "set-up";
|
|
11
|
-
ApplePayButtonType["DONATE"] = "donate";
|
|
12
|
-
ApplePayButtonType["CHECK_OUT"] = "check-out";
|
|
13
|
-
ApplePayButtonType["BOOK"] = "book";
|
|
14
|
-
ApplePayButtonType["SUBSCRIBE"] = "subscribe";
|
|
15
|
-
})(ApplePayButtonType || (ApplePayButtonType = {}));
|
|
16
|
-
export var ApplePayButtonStyle;
|
|
17
|
-
(function (ApplePayButtonStyle) {
|
|
18
|
-
ApplePayButtonStyle["BLACK"] = "black";
|
|
19
|
-
ApplePayButtonStyle["WHITE"] = "white";
|
|
20
|
-
ApplePayButtonStyle["WHITE_OUTLINE"] = "white-outline";
|
|
21
|
-
})(ApplePayButtonStyle || (ApplePayButtonStyle = {}));
|
|
22
|
-
export var ApplePayMerchantCapability;
|
|
23
|
-
(function (ApplePayMerchantCapability) {
|
|
24
|
-
ApplePayMerchantCapability["SUPPORTS_3DS"] = "supports3DS";
|
|
25
|
-
ApplePayMerchantCapability["SUPPORTS_EMV"] = "supportsEMV";
|
|
26
|
-
ApplePayMerchantCapability["SUPPORTS_CREDIT"] = "supportsCredit";
|
|
27
|
-
ApplePayMerchantCapability["SUPPORTS_DEBIT"] = "supportsDebit";
|
|
28
|
-
})(ApplePayMerchantCapability || (ApplePayMerchantCapability = {}));
|
|
29
|
-
export class ApplePayConfig {
|
|
30
|
-
constructor(data) {
|
|
31
|
-
this.merchantIdentifier = data.merchantIdentifier;
|
|
32
|
-
this.displayName = data.displayName;
|
|
33
|
-
this.initiative = data.initiative;
|
|
34
|
-
this.initiativeContext = data.initiativeContext;
|
|
35
|
-
this.buttonType = data.buttonType || ApplePayButtonType.PLAIN;
|
|
36
|
-
this.buttonStyle = data.buttonStyle || ApplePayButtonStyle.BLACK;
|
|
37
|
-
this.buttonLocale = data.buttonLocale || 'en-US';
|
|
38
|
-
}
|
|
39
|
-
get isValid() {
|
|
40
|
-
return !!(this.merchantIdentifier &&
|
|
41
|
-
this.displayName &&
|
|
42
|
-
this.initiative &&
|
|
43
|
-
this.initiativeContext);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
export class ApplePayPaymentRequest {
|
|
47
|
-
constructor(data) {
|
|
48
|
-
this.countryCode = data.countryCode;
|
|
49
|
-
this.currencyCode = data.currencyCode;
|
|
50
|
-
this.merchantCapabilities = data.merchantCapabilities;
|
|
51
|
-
this.supportedNetworks = data.supportedNetworks;
|
|
52
|
-
this.total = data.total;
|
|
53
|
-
this.lineItems = data.lineItems;
|
|
54
|
-
this.shippingMethods = data.shippingMethods;
|
|
55
|
-
this.applicationData = data.applicationData;
|
|
56
|
-
this.supportedCountries = data.supportedCountries;
|
|
57
|
-
}
|
|
58
|
-
get isValid() {
|
|
59
|
-
var _a, _b, _c, _d;
|
|
60
|
-
return !!(this.countryCode &&
|
|
61
|
-
this.currencyCode &&
|
|
62
|
-
((_a = this.merchantCapabilities) === null || _a === void 0 ? void 0 : _a.length) &&
|
|
63
|
-
((_b = this.supportedNetworks) === null || _b === void 0 ? void 0 : _b.length) &&
|
|
64
|
-
((_c = this.total) === null || _c === void 0 ? void 0 : _c.label) &&
|
|
65
|
-
((_d = this.total) === null || _d === void 0 ? void 0 : _d.amount));
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
export class ApplePayHelpers {
|
|
69
|
-
static isApplePaySupported() {
|
|
70
|
-
var _a;
|
|
71
|
-
return (typeof window !== 'undefined' &&
|
|
72
|
-
'ApplePaySession' in window &&
|
|
73
|
-
((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.supportsVersion(3)));
|
|
74
|
-
}
|
|
75
|
-
static canMakePayments() {
|
|
76
|
-
var _a;
|
|
77
|
-
if (!this.isApplePaySupported()) {
|
|
78
|
-
return false;
|
|
79
|
-
}
|
|
80
|
-
return ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePayments()) || false;
|
|
81
|
-
}
|
|
82
|
-
static async canMakePaymentsWithActiveCard(merchantIdentifier) {
|
|
83
|
-
var _a;
|
|
84
|
-
if (!this.isApplePaySupported()) {
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
try {
|
|
88
|
-
return ((await ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePaymentsWithActiveCard(merchantIdentifier))) || false);
|
|
89
|
-
}
|
|
90
|
-
catch (error) {
|
|
91
|
-
console.error('Error checking Apple Pay active card:', error);
|
|
92
|
-
return false;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
static formatAmount(amount) {
|
|
96
|
-
return (amount / 100).toFixed(2);
|
|
97
|
-
}
|
|
98
|
-
static parseAmount(amount) {
|
|
99
|
-
return Math.round(parseFloat(amount) * 100);
|
|
100
|
-
}
|
|
101
|
-
static createLineItem(label, amount, type = 'final') {
|
|
102
|
-
return {
|
|
103
|
-
label,
|
|
104
|
-
amount: this.formatAmount(amount),
|
|
105
|
-
type,
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
static getDefaultSupportedNetworks() {
|
|
109
|
-
return ['amex', 'discover', 'masterCard', 'visa'];
|
|
110
|
-
}
|
|
111
|
-
static getDefaultMerchantCapabilities() {
|
|
112
|
-
return [
|
|
113
|
-
ApplePayMerchantCapability.SUPPORTS_3DS,
|
|
114
|
-
ApplePayMerchantCapability.SUPPORTS_EMV,
|
|
115
|
-
ApplePayMerchantCapability.SUPPORTS_CREDIT,
|
|
116
|
-
ApplePayMerchantCapability.SUPPORTS_DEBIT,
|
|
117
|
-
];
|
|
118
|
-
}
|
|
119
|
-
}
|
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
import { configState } from "../../components/config-provider/config-state";
|
|
2
|
-
import { ApplePaySessionStatus, ApplePayHelpers, ApplePayConfig, ApplePayPaymentRequest, } from "../ApplePay";
|
|
3
|
-
export class ApplePayService {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.apiBaseUrl = configState.apiOrigin;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Set custom API base URL
|
|
9
|
-
*/
|
|
10
|
-
setApiBaseUrl(url) {
|
|
11
|
-
this.apiBaseUrl = url;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Set authentication token
|
|
15
|
-
*/
|
|
16
|
-
setAuthToken(authToken) {
|
|
17
|
-
this.authToken = authToken;
|
|
18
|
-
}
|
|
19
|
-
setAccountId(accountId) {
|
|
20
|
-
this.accountId = accountId;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Initialize Apple Pay configuration
|
|
24
|
-
*/
|
|
25
|
-
initialize(applePayConfig) {
|
|
26
|
-
this.applePayConfig = new ApplePayConfig(applePayConfig);
|
|
27
|
-
if (!this.applePayConfig.isValid) {
|
|
28
|
-
throw new Error('Invalid Apple Pay configuration provided');
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Validate merchant with Apple Pay servers via API
|
|
33
|
-
*/
|
|
34
|
-
async validateMerchant(authToken) {
|
|
35
|
-
const endpoint = `${this.apiBaseUrl}/v1/apple_pay/merchant_session`;
|
|
36
|
-
console.log('=== MERCHANT VALIDATION REQUEST ===');
|
|
37
|
-
console.log('Endpoint:', endpoint);
|
|
38
|
-
console.log('Auth token present:', !!authToken);
|
|
39
|
-
console.log('Account ID:', this.accountId);
|
|
40
|
-
const response = await fetch(endpoint, {
|
|
41
|
-
method: 'POST',
|
|
42
|
-
headers: {
|
|
43
|
-
'Content-Type': 'application/json',
|
|
44
|
-
Accept: 'application/json',
|
|
45
|
-
Authorization: `Bearer ${authToken}`,
|
|
46
|
-
'Sub-Account': this.accountId,
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
console.log('Response status:', response.status);
|
|
50
|
-
if (!response.ok) {
|
|
51
|
-
const errorData = await response.text();
|
|
52
|
-
console.error('Backend validation failed - Raw response:', errorData);
|
|
53
|
-
try {
|
|
54
|
-
const jsonError = JSON.parse(errorData);
|
|
55
|
-
console.error('Backend validation failed - Parsed error:', jsonError);
|
|
56
|
-
}
|
|
57
|
-
catch (parseError) {
|
|
58
|
-
console.error('Could not parse error response as JSON:', parseError);
|
|
59
|
-
}
|
|
60
|
-
throw new Error(`Merchant validation failed: ${response.status}`);
|
|
61
|
-
}
|
|
62
|
-
const merchantSession = await response.json();
|
|
63
|
-
console.log('Merchant session received:', merchantSession);
|
|
64
|
-
return merchantSession;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Process Apple Pay payment via API (fixed to match original logic)
|
|
68
|
-
*/
|
|
69
|
-
async processPayment(authToken, payload) {
|
|
70
|
-
const endpoint = `${this.apiBaseUrl}/v1/apple_pay/process_token`;
|
|
71
|
-
const body = payload;
|
|
72
|
-
const response = await fetch(endpoint, {
|
|
73
|
-
method: 'POST',
|
|
74
|
-
headers: {
|
|
75
|
-
'Content-Type': 'application/json',
|
|
76
|
-
Accept: 'application/json',
|
|
77
|
-
Authorization: `Bearer ${authToken}`,
|
|
78
|
-
'Sub-Account': this.accountId,
|
|
79
|
-
},
|
|
80
|
-
body: JSON.stringify(body),
|
|
81
|
-
});
|
|
82
|
-
const result = await response.json();
|
|
83
|
-
return {
|
|
84
|
-
success: result.id && !!result.data.token,
|
|
85
|
-
data: result,
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Check if Apple Pay is available on this device/browser
|
|
90
|
-
*/
|
|
91
|
-
isAvailable() {
|
|
92
|
-
return (ApplePayHelpers.isApplePaySupported() && ApplePayHelpers.canMakePayments());
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Check if the user has an active card for the merchant
|
|
96
|
-
*/
|
|
97
|
-
async canMakePaymentsWithActiveCard() {
|
|
98
|
-
if (!this.applePayConfig) {
|
|
99
|
-
throw new Error('Apple Pay not initialized. Call initialize() first.');
|
|
100
|
-
}
|
|
101
|
-
return await ApplePayHelpers.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier);
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Start Apple Pay session
|
|
105
|
-
*/
|
|
106
|
-
async startPaymentSession(paymentRequest) {
|
|
107
|
-
if (!this.applePayConfig) {
|
|
108
|
-
throw new Error('Apple Pay not initialized. Call initialize() first.');
|
|
109
|
-
}
|
|
110
|
-
// if (!this.isAvailable()) {
|
|
111
|
-
// throw new Error('Apple Pay is not available on this device/browser');
|
|
112
|
-
// }
|
|
113
|
-
const request = new ApplePayPaymentRequest(paymentRequest);
|
|
114
|
-
if (!request.isValid) {
|
|
115
|
-
throw new Error('Invalid payment request provided');
|
|
116
|
-
}
|
|
117
|
-
this.currentPaymentRequest = request;
|
|
118
|
-
return new Promise((resolve, reject) => {
|
|
119
|
-
try {
|
|
120
|
-
this.currentSession = new window.ApplePaySession(3, request);
|
|
121
|
-
this.setupSessionEventHandlers(resolve, reject);
|
|
122
|
-
this.currentSession.begin();
|
|
123
|
-
}
|
|
124
|
-
catch (error) {
|
|
125
|
-
reject({
|
|
126
|
-
success: false,
|
|
127
|
-
error: {
|
|
128
|
-
code: 'SESSION_ERROR',
|
|
129
|
-
message: error instanceof Error
|
|
130
|
-
? error.message
|
|
131
|
-
: 'Failed to start Apple Pay session',
|
|
132
|
-
},
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Abort current Apple Pay session
|
|
139
|
-
*/
|
|
140
|
-
abortPaymentSession() {
|
|
141
|
-
if (this.currentSession) {
|
|
142
|
-
this.currentSession.abort();
|
|
143
|
-
this.currentSession = undefined;
|
|
144
|
-
this.currentPaymentRequest = undefined;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Setup Apple Pay session event handlers
|
|
149
|
-
*/
|
|
150
|
-
setupSessionEventHandlers(resolve, reject) {
|
|
151
|
-
if (!this.currentSession ||
|
|
152
|
-
!this.applePayConfig ||
|
|
153
|
-
!this.currentPaymentRequest) {
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
this.currentSession.onvalidatemerchant = async () => {
|
|
157
|
-
try {
|
|
158
|
-
if (!this.authToken) {
|
|
159
|
-
throw new Error('Authentication token not set. Call setAuthToken() first.');
|
|
160
|
-
}
|
|
161
|
-
const merchantSession = await this.validateMerchant(this.authToken);
|
|
162
|
-
try {
|
|
163
|
-
this.currentSession.completeMerchantValidation(merchantSession);
|
|
164
|
-
}
|
|
165
|
-
catch (completionError) {
|
|
166
|
-
console.error('Error calling completeMerchantValidation:', completionError);
|
|
167
|
-
throw completionError;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
catch (error) {
|
|
171
|
-
console.error('=== MERCHANT VALIDATION ERROR ===');
|
|
172
|
-
console.error('Error during merchant validation:', error);
|
|
173
|
-
console.error('Error stack:', error.stack);
|
|
174
|
-
this.currentSession.abort();
|
|
175
|
-
reject({
|
|
176
|
-
success: false,
|
|
177
|
-
error: {
|
|
178
|
-
code: 'MERCHANT_VALIDATION_ERROR',
|
|
179
|
-
message: error instanceof Error
|
|
180
|
-
? error.message
|
|
181
|
-
: 'Merchant validation failed',
|
|
182
|
-
},
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
this.currentSession.onpaymentauthorized = async (event) => {
|
|
187
|
-
try {
|
|
188
|
-
const payment = event.payment;
|
|
189
|
-
const paymentPayload = Object.assign(Object.assign({}, payment.token), { product_details: {
|
|
190
|
-
name: this.currentPaymentRequest.total.label,
|
|
191
|
-
price: ApplePayHelpers.parseAmount(this.currentPaymentRequest.total.amount),
|
|
192
|
-
description: this.currentPaymentRequest.total.label,
|
|
193
|
-
} });
|
|
194
|
-
if (!this.authToken) {
|
|
195
|
-
throw new Error('Authentication token not set. Call setAuthToken() first.');
|
|
196
|
-
}
|
|
197
|
-
const paymentResult = await this.processPayment(this.authToken, paymentPayload);
|
|
198
|
-
if (paymentResult.success) {
|
|
199
|
-
this.currentSession.completePayment({
|
|
200
|
-
status: ApplePaySessionStatus.STATUS_SUCCESS,
|
|
201
|
-
});
|
|
202
|
-
resolve({
|
|
203
|
-
success: true,
|
|
204
|
-
token: payment.token,
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
else {
|
|
208
|
-
console.error('PSP reported payment failure:', paymentResult.data);
|
|
209
|
-
this.currentSession.completePayment({
|
|
210
|
-
status: ApplePaySessionStatus.STATUS_FAILURE,
|
|
211
|
-
});
|
|
212
|
-
reject({
|
|
213
|
-
success: false,
|
|
214
|
-
error: {
|
|
215
|
-
code: 'PAYMENT_PROCESSING_ERROR',
|
|
216
|
-
message: 'Payment processing failed',
|
|
217
|
-
},
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
catch (error) {
|
|
222
|
-
console.error('=== PAYMENT PROCESSING ERROR ===');
|
|
223
|
-
console.error('Error processing payment:', error);
|
|
224
|
-
console.error('Error stack:', error.stack);
|
|
225
|
-
this.currentSession.completePayment({
|
|
226
|
-
status: ApplePaySessionStatus.STATUS_FAILURE,
|
|
227
|
-
});
|
|
228
|
-
reject({
|
|
229
|
-
success: false,
|
|
230
|
-
error: {
|
|
231
|
-
code: 'PAYMENT_PROCESSING_ERROR',
|
|
232
|
-
message: error instanceof Error
|
|
233
|
-
? error.message
|
|
234
|
-
: 'Payment processing failed',
|
|
235
|
-
},
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
finally {
|
|
239
|
-
this.currentSession = undefined;
|
|
240
|
-
this.currentPaymentRequest = undefined;
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
this.currentSession.onpaymentmethodselected = () => {
|
|
244
|
-
const paymentUpdate = {
|
|
245
|
-
newTotal: this.currentPaymentRequest.total,
|
|
246
|
-
newLineItems: this.currentPaymentRequest.lineItems || [],
|
|
247
|
-
};
|
|
248
|
-
try {
|
|
249
|
-
this.currentSession.completePaymentMethodSelection(paymentUpdate);
|
|
250
|
-
}
|
|
251
|
-
catch (error) {
|
|
252
|
-
console.error('Error completing payment method selection:', error);
|
|
253
|
-
this.currentSession.abort();
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
|
-
this.currentSession.onshippingmethodselected = () => {
|
|
257
|
-
this.currentSession.completeShippingMethodSelection({
|
|
258
|
-
status: ApplePaySessionStatus.STATUS_SUCCESS,
|
|
259
|
-
newTotal: this.currentPaymentRequest.total,
|
|
260
|
-
newLineItems: this.currentPaymentRequest.lineItems || [],
|
|
261
|
-
});
|
|
262
|
-
};
|
|
263
|
-
this.currentSession.oncancel = (event) => {
|
|
264
|
-
if (event.sessionError) {
|
|
265
|
-
console.error(event.sessionError);
|
|
266
|
-
switch (event.sessionError.code) {
|
|
267
|
-
case 'unknown':
|
|
268
|
-
console.error('Unknown error - likely merchant validation issue');
|
|
269
|
-
console.error('This usually means:');
|
|
270
|
-
console.error('1. Merchant certificate is invalid or expired');
|
|
271
|
-
console.error('2. Merchant identifier mismatch');
|
|
272
|
-
console.error('3. Backend validation endpoint issues');
|
|
273
|
-
break;
|
|
274
|
-
case 'invalidMerchantSession':
|
|
275
|
-
console.error('Invalid merchant session provided');
|
|
276
|
-
console.error('Check that the merchant session from backend is valid');
|
|
277
|
-
break;
|
|
278
|
-
case 'userCancel':
|
|
279
|
-
console.error('User cancelled the payment');
|
|
280
|
-
break;
|
|
281
|
-
default:
|
|
282
|
-
console.error('Other error code:', event.sessionError.code);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
this.currentSession = undefined;
|
|
286
|
-
this.currentPaymentRequest = undefined;
|
|
287
|
-
reject({
|
|
288
|
-
success: false,
|
|
289
|
-
error: {
|
|
290
|
-
code: 'USER_CANCELLED',
|
|
291
|
-
message: 'User cancelled the Apple Pay session',
|
|
292
|
-
},
|
|
293
|
-
});
|
|
294
|
-
};
|
|
295
|
-
if ('onerror' in this.currentSession) {
|
|
296
|
-
this.currentSession.onerror = (error) => {
|
|
297
|
-
console.error('=== APPLE PAY SESSION ERROR ===');
|
|
298
|
-
console.error('Session error:', error);
|
|
299
|
-
this.currentSession = undefined;
|
|
300
|
-
this.currentPaymentRequest = undefined;
|
|
301
|
-
reject({
|
|
302
|
-
success: false,
|
|
303
|
-
error: {
|
|
304
|
-
code: 'SESSION_ERROR',
|
|
305
|
-
message: 'Apple Pay session error occurred',
|
|
306
|
-
},
|
|
307
|
-
});
|
|
308
|
-
};
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
* Create a basic payment request
|
|
313
|
-
*/
|
|
314
|
-
static createPaymentRequest(amount, label, countryCode = 'US', currencyCode = 'USD') {
|
|
315
|
-
return {
|
|
316
|
-
countryCode,
|
|
317
|
-
currencyCode,
|
|
318
|
-
merchantCapabilities: ApplePayHelpers.getDefaultMerchantCapabilities(),
|
|
319
|
-
supportedNetworks: ApplePayHelpers.getDefaultSupportedNetworks(),
|
|
320
|
-
total: ApplePayHelpers.createLineItem(label, amount),
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Get current configuration
|
|
325
|
-
*/
|
|
326
|
-
getApplePayConfig() {
|
|
327
|
-
return this.applePayConfig;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
2
|
-
import { Skeleton } from "../../../ui-components";
|
|
3
|
-
const ApplePaySkeleton = (props) => {
|
|
4
|
-
const { isReady } = props;
|
|
5
|
-
if (isReady) {
|
|
6
|
-
return null;
|
|
7
|
-
}
|
|
8
|
-
return (h("div", { class: 'container-fluid p-0' }, h("div", { class: 'row mb-3' }, h("div", { class: 'col-12 align-content-center' }, h(Skeleton, { height: '44px', width: '100%', styles: { borderRadius: "8px" } })))));
|
|
9
|
-
};
|
|
10
|
-
export default ApplePaySkeleton;
|