@justifi/webcomponents 6.4.2 → 6.5.0-rc.1
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/{Refund-BnhHNKLz.js → GooglePay-D3zN44IX.js} +415 -0
- package/dist/cjs/bank-account-document-form-inputs_6.cjs.entry.js +8 -7
- package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
- package/dist/cjs/{business.service-DIlSj5KT.js → business.service-88yKWtbE.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +2 -2
- package/dist/cjs/{check-pkg-version-goSFbVFL.js → check-pkg-version-DV1hwzA2.js} +2 -2
- package/dist/cjs/{checkout.service-Ce0F8cOf.js → checkout.service-Cj1RxduX.js} +1 -1
- package/dist/cjs/checkouts-list-core.cjs.entry.js +3 -2
- package/dist/cjs/custom-popper.cjs.entry.js +2 -2
- package/dist/cjs/{dispute.service-DuYeSUgK.js → dispute.service-AXzLxuOs.js} +1 -1
- package/dist/cjs/form-alert_5.cjs.entry.js +6 -6
- 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-provisioning.cjs.entry.js +2 -2
- package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number-masked_3.cjs.entry.js +4 -4
- 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_3.cjs.entry.js +4 -4
- package/dist/cjs/{get-payment-details-vVIxYblm.js → get-payment-details-DVBTf7h5.js} +2 -2
- package/dist/cjs/{get-subaccounts-yo2pT61R.js → get-subaccounts-DuYNs7Ny.js} +2 -2
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
- package/dist/cjs/hidden-input_2.cjs.entry.js +21 -7
- package/dist/cjs/{index-C2ITzalN.js → index-CajjbB9t.js} +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +23 -24
- package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +6 -5
- package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +12 -11
- package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +8 -8
- package/dist/cjs/{justifi-apple-pay_7.cjs.entry.js → justifi-apple-pay_8.cjs.entry.js} +903 -253
- package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-details.cjs.entry.js +5 -4
- package/dist/cjs/justifi-business-form.cjs.entry.js +5 -4
- package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +2 -2
- package/dist/cjs/justifi-checkout.cjs.entry.js +14 -15
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +9 -8
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +8 -7
- package/dist/cjs/justifi-details.cjs.entry.js +1 -1
- package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +6 -5
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +9 -8
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -3
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +10 -9
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +7 -6
- package/dist/cjs/justifi-payment-details.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +7 -6
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payments-list.cjs.entry.js +7 -6
- package/dist/cjs/justifi-payout-details.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +7 -6
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +8 -7
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +10 -9
- package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +7 -8
- package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +12 -11
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +7 -6
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +8 -7
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +8 -7
- package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-jZDXnKmY.js → package-MS7_CYge.js} +1 -1
- package/dist/cjs/pagination-menu.cjs.entry.js +3 -3
- package/dist/cjs/payment-details-core.cjs.entry.js +11 -10
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/{payment.service-DLvoJ2K6.js → payment.service-7Ayen6ud.js} +1 -1
- package/dist/cjs/payments-list-core.cjs.entry.js +3 -2
- package/dist/cjs/payout-details-core.cjs.entry.js +3 -3
- package/dist/cjs/{payout.service-CrBp8aru.js → payout.service-6PsVtHcu.js} +1 -1
- package/dist/cjs/payouts-list-core.cjs.entry.js +3 -2
- package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +4 -3
- package/dist/cjs/{terminal-orders-table-8PxObvu8.js → terminal-orders-table-BQXO4z_E.js} +3 -3
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/{terminal.service-D0fIw59V.js → terminal.service-DgE2p1j0.js} +1 -1
- package/dist/cjs/terminals-list-core.cjs.entry.js +3 -2
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/GooglePay.js +181 -0
- package/dist/collection/api/index.js +2 -0
- package/dist/collection/api/services/google-pay.service.js +240 -0
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +7 -6
- package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +2 -2
- package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +8 -7
- package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +7 -6
- 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 +8 -7
- 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-canada.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/bank-account-read-only-value.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 +2 -2
- 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-address-fields/form-address-fields.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/card-form/card-form.js +2 -2
- package/dist/collection/components/checkout/checkout.js +2 -2
- 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 +2 -2
- 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/modular-checkout/ModularCheckout.js +1 -0
- package/dist/collection/components/modular-checkout/modular-checkout.js +46 -9
- package/dist/collection/components/modular-checkout/sub-components/bank-account-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/card-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/card-form.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/google-pay-skeleton.js +10 -0
- package/dist/collection/components/modular-checkout/sub-components/google-pay.js +609 -0
- 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/internal-tokenize-payment-method.js +3 -4
- package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +5 -10
- package/dist/collection/store/checkout.store.js +4 -0
- package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
- package/dist/collection/ui-components/details/details.js +1 -1
- 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 +17 -3
- package/dist/collection/ui-components/form/iframe-input.js +3 -3
- package/dist/collection/ui-components/google-pay-button.js +255 -0
- package/dist/collection/ui-components/pagination-menu/pagination-menu.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-radio-list-item.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
- package/dist/docs.json +567 -119
- package/dist/esm/{Refund-L_muwEAh.js → GooglePay-ChLgDgG7.js} +405 -1
- package/dist/esm/bank-account-document-form-inputs_6.entry.js +8 -7
- package/dist/esm/bank-account-form.entry.js +2 -2
- package/dist/esm/{business.service-CaEVmi4X.js → business.service-C0JaOBMs.js} +1 -1
- package/dist/esm/card-form.entry.js +2 -2
- package/dist/esm/{check-pkg-version-CPDwCVPS.js → check-pkg-version-BQxLpn00.js} +2 -2
- package/dist/esm/{checkout.service-BpaVN1_f.js → checkout.service-gxuAcx_d.js} +1 -1
- package/dist/esm/checkouts-list-core.entry.js +3 -2
- package/dist/esm/custom-popper.entry.js +2 -2
- package/dist/esm/{dispute.service-Dq1SPI2m.js → dispute.service-DmYLDaWO.js} +1 -1
- package/dist/esm/form-alert_5.entry.js +6 -6
- package/dist/esm/form-control-checkbox.entry.js +2 -2
- package/dist/esm/form-control-date.entry.js +2 -2
- package/dist/esm/form-control-file-v2_2.entry.js +3 -3
- package/dist/esm/form-control-monetary-provisioning.entry.js +2 -2
- package/dist/esm/form-control-monetary.entry.js +2 -2
- package/dist/esm/form-control-number-masked_3.entry.js +4 -4
- package/dist/esm/form-control-number.entry.js +2 -2
- package/dist/esm/form-control-radio.entry.js +2 -2
- package/dist/esm/form-control-select_3.entry.js +4 -4
- package/dist/esm/{get-payment-details-C2YiQBG7.js → get-payment-details-CJ6fHbft.js} +1 -1
- package/dist/esm/{get-subaccounts-Cjz3-2D3.js → get-subaccounts-3zYjlgWb.js} +1 -1
- package/dist/esm/gross-payment-chart-core.entry.js +1 -1
- package/dist/esm/hidden-input_2.entry.js +21 -7
- package/dist/esm/{index-DCIW8z1f.js → index-DkoufM1t.js} +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal-tokenize-payment-method_7.entry.js +12 -13
- package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +2 -1
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +12 -11
- package/dist/esm/justifi-additional-statement_8.entry.js +8 -8
- package/dist/esm/{justifi-apple-pay_7.entry.js → justifi-apple-pay_8.entry.js} +786 -137
- package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +2 -2
- package/dist/esm/justifi-business-details.entry.js +5 -4
- package/dist/esm/justifi-business-form.entry.js +5 -4
- package/dist/esm/justifi-business-representative-form-inputs.entry.js +2 -2
- package/dist/esm/justifi-checkout.entry.js +7 -8
- package/dist/esm/justifi-checkouts-list-filters.entry.js +3 -2
- package/dist/esm/justifi-checkouts-list.entry.js +7 -6
- package/dist/esm/justifi-details.entry.js +1 -1
- package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
- package/dist/esm/justifi-dispute-management.entry.js +6 -5
- package/dist/esm/justifi-dispute-notification_3.entry.js +9 -8
- package/dist/esm/justifi-gross-payment-chart.entry.js +4 -3
- package/dist/esm/justifi-order-terminals.entry.js +7 -6
- package/dist/esm/justifi-owner-form_3.entry.js +7 -6
- package/dist/esm/justifi-payment-details.entry.js +6 -5
- package/dist/esm/justifi-payment-provisioning-core.entry.js +1 -1
- package/dist/esm/justifi-payment-provisioning.entry.js +6 -5
- package/dist/esm/justifi-payment-transactions-list.entry.js +6 -5
- package/dist/esm/justifi-payments-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payments-list.entry.js +6 -5
- package/dist/esm/justifi-payout-details.entry.js +5 -4
- package/dist/esm/justifi-payout-transactions-list.entry.js +6 -5
- package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payouts-list.entry.js +7 -6
- package/dist/esm/justifi-refund-payment.entry.js +6 -5
- package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +4 -5
- package/dist/esm/justifi-skeleton.entry.js +1 -1
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +4 -3
- package/dist/esm/justifi-terminal-orders-list.entry.js +6 -5
- package/dist/esm/justifi-terminals-list-filters.entry.js +3 -2
- package/dist/esm/justifi-terminals-list.entry.js +7 -6
- package/dist/esm/justifi-tokenize-payment-method.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-B3SPy-II.js → package-CYxDR985.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +3 -3
- package/dist/esm/payment-details-core.entry.js +10 -9
- package/dist/esm/payment-method-option.entry.js +1 -1
- package/dist/esm/{payment.service-4wGt-zDW.js → payment.service-CtzbcN40.js} +1 -1
- package/dist/esm/payments-list-core.entry.js +3 -2
- package/dist/esm/payout-details-core.entry.js +3 -3
- package/dist/esm/{payout.service-BYigYrQu.js → payout.service-BSepoyj1.js} +1 -1
- package/dist/esm/payouts-list-core.entry.js +3 -2
- package/dist/esm/table-filters-menu.entry.js +1 -1
- package/dist/esm/terminal-orders-list-core.entry.js +4 -3
- package/dist/esm/{terminal-orders-table-CMWBIr9y.js → terminal-orders-table-BDQyyZp2.js} +1 -1
- package/dist/esm/terminal-quantity-selector.entry.js +1 -1
- package/dist/esm/{terminal.service-RAu777Qf.js → terminal.service-DFPVyp0k.js} +1 -1
- package/dist/esm/terminals-list-core.entry.js +3 -2
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Analytics.js +2 -0
- package/dist/module/ApplePay.js +121 -0
- package/dist/module/GooglePay.js +184 -0
- package/dist/module/ModularCheckout.js +1 -0
- package/dist/module/additional-questions.js +2 -2
- package/dist/module/additional-statement.js +1 -1
- package/dist/module/apple-pay.js +1 -120
- package/dist/module/bank-account-billing-form-simple.js +1 -1
- package/dist/module/bank-account-document-inputs.js +3 -1
- package/dist/module/bank-account-form-inputs-canada2.js +1 -1
- package/dist/module/bank-account-form-inputs2.js +1 -1
- package/dist/module/bank-account-form.js +2 -2
- package/dist/module/bank-account-read-only-value2.js +1 -1
- package/dist/module/bank-account.js +2 -2
- package/dist/module/business-additional-questions-form-step.js +1 -1
- package/dist/module/business-bank-account-form-step-core.js +2 -0
- package/dist/module/business-bank-account-form-step.js +3 -1
- package/dist/module/business-core-info-form-step.js +1 -1
- package/dist/module/business-core-info.js +2 -2
- package/dist/module/business-owners-form-step.js +1 -1
- package/dist/module/business-representative-form-inputs.js +2 -2
- package/dist/module/business-representative-form-step.js +1 -1
- package/dist/module/business-representative.js +3 -3
- package/dist/module/business-terms-conditions-form-step.js +3 -1
- package/dist/module/business.service.js +2 -0
- package/dist/module/cancellation-policy.js +1 -1
- package/dist/module/card-billing-form-simple.js +1 -1
- package/dist/module/card-form.js +2 -2
- package/dist/module/card-form2.js +2 -2
- package/dist/module/checkout.service.js +2 -0
- package/dist/module/checkout.store.js +4 -0
- package/dist/module/checkouts-list-core2.js +3 -1
- package/dist/module/custom-popper2.js +2 -2
- package/dist/module/customer-details.js +1 -1
- package/dist/module/details.js +1 -1
- package/dist/module/dispute-management-core.js +1 -1
- package/dist/module/dispute-notification.js +2 -2
- package/dist/module/dispute-response-actions.js +2 -0
- package/dist/module/dispute-response-core.js +1 -1
- package/dist/module/dispute-response.js +1 -1
- package/dist/module/duplicate-charge.js +1 -1
- package/dist/module/electronic-evidence.js +1 -1
- package/dist/module/form-address-fields.js +1 -1
- 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-monetary-provisioning2.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-select2.js +2 -2
- package/dist/module/form-control-text2.js +2 -2
- package/dist/module/form-control-textarea2.js +2 -2
- package/dist/module/get-payment-details.js +2 -0
- package/dist/module/get-subaccounts.js +2 -0
- package/dist/module/google-pay.js +785 -0
- package/dist/module/gross-payment-chart-core2.js +1 -1
- package/dist/module/hidden-input2.js +17 -3
- package/dist/module/identity-address-form.js +1 -1
- package/dist/module/iframe-input2.js +3 -3
- package/dist/module/internal-tokenize-payment-method2.js +3 -1
- package/dist/module/justifi-business-form.js +2 -0
- package/dist/module/justifi-button2.js +1 -1
- package/dist/module/justifi-checkout.js +46 -40
- package/dist/module/justifi-checkouts-list-filters.js +3 -1
- package/dist/module/justifi-checkouts-list.js +3 -1
- package/dist/module/justifi-dispute-management.js +1 -1
- package/dist/module/justifi-google-pay.d.ts +11 -0
- package/dist/module/justifi-google-pay.js +6 -0
- package/dist/module/justifi-gross-payment-chart.js +2 -0
- package/dist/module/justifi-header2.js +1 -1
- package/dist/module/justifi-order-terminals.js +3 -1
- package/dist/module/justifi-payment-provisioning.js +3 -1
- package/dist/module/justifi-payment-transactions-list.js +3 -1
- package/dist/module/justifi-payments-list-filters.js +2 -2
- package/dist/module/justifi-payments-list.js +3 -1
- package/dist/module/justifi-payout-details.js +2 -0
- package/dist/module/justifi-payout-transactions-list.js +3 -1
- package/dist/module/justifi-payouts-list-filters.js +2 -2
- package/dist/module/justifi-payouts-list.js +3 -1
- package/dist/module/justifi-radio-list-item2.js +1 -1
- package/dist/module/justifi-refund-payment.js +2 -0
- package/dist/module/justifi-saved-payment-method.js +1 -1
- package/dist/module/justifi-season-interruption-insurance.js +2 -0
- package/dist/module/justifi-skeleton.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +4 -2
- package/dist/module/justifi-terminal-orders-list.js +3 -1
- package/dist/module/justifi-terminals-list-filters.js +3 -1
- package/dist/module/justifi-terminals-list.js +3 -1
- package/dist/module/justifi-tokenize-payment-method.js +1 -1
- package/dist/module/legal-address-form-step.js +1 -1
- package/dist/module/legal-address-form.js +2 -2
- package/dist/module/modular-checkout.js +46 -6
- package/dist/module/owner-form-core2.js +1 -1
- package/dist/module/owner-form-inputs2.js +3 -3
- package/dist/module/owner-form.js +1 -1
- package/dist/module/package.js +1 -1
- package/dist/module/pagination-menu2.js +3 -3
- package/dist/module/payment-details-core2.js +10 -8
- package/dist/module/payment-method-option.js +1 -1
- package/dist/module/payment-provisioning-core.js +1 -1
- package/dist/module/payment-provisioning-form-buttons.js +1 -1
- package/dist/module/payment-provisioning-form-steps.js +1 -1
- package/dist/module/payment.service.js +2 -0
- package/dist/module/payments-list-core2.js +3 -1
- package/dist/module/payout-details-core2.js +3 -3
- package/dist/module/payout.service.js +2 -0
- package/dist/module/payouts-list-core2.js +3 -1
- package/dist/module/plaid.service.js +2 -0
- package/dist/module/product-or-service.js +1 -1
- package/dist/module/refund-policy.js +1 -1
- package/dist/module/save-new-payment-method.js +1 -1
- package/dist/module/shipping-details.js +1 -1
- package/dist/module/summary.js +1 -1
- package/dist/module/table-filters-menu2.js +1 -1
- package/dist/module/terminal-orders-list-core2.js +3 -1
- package/dist/module/terminal-quantity-selector2.js +1 -1
- package/dist/module/terminal.service.js +2 -0
- package/dist/module/terminals-list-core2.js +3 -1
- package/dist/types/api/Checkout.d.ts +2 -0
- package/dist/types/api/GooglePay.d.ts +271 -0
- package/dist/types/api/index.d.ts +2 -0
- package/dist/types/api/services/google-pay.service.d.ts +60 -0
- package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +3 -3
- package/dist/types/components/checkout/checkout.d.ts +1 -0
- package/dist/types/components/modular-checkout/ModularCheckout.d.ts +2 -1
- package/dist/types/components/modular-checkout/modular-checkout.d.ts +5 -0
- package/dist/types/components/modular-checkout/sub-components/google-pay-skeleton.d.ts +6 -0
- package/dist/types/components/modular-checkout/sub-components/google-pay.d.ts +59 -0
- package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +1 -1
- package/dist/types/components.d.ts +160 -22
- package/dist/types/store/checkout.store.d.ts +1 -0
- package/dist/types/ui-components/form/hidden-input.d.ts +1 -0
- package/dist/types/ui-components/google-pay-button.d.ts +18 -0
- package/dist/webcomponents/index.esm.js +1 -1
- package/dist/webcomponents/p-032ee5b7.entry.js +1 -0
- package/dist/webcomponents/{p-aec9185f.entry.js → p-03c8c754.entry.js} +1 -1
- package/dist/webcomponents/p-0772719b.entry.js +1 -0
- package/dist/webcomponents/p-0c7db215.entry.js +1 -0
- package/dist/webcomponents/p-136b29e3.entry.js +1 -0
- package/dist/webcomponents/{p-1193a1ac.entry.js → p-19dabeab.entry.js} +1 -1
- package/dist/webcomponents/p-19ea1354.entry.js +1 -0
- package/dist/webcomponents/p-1ce0e372.entry.js +1 -0
- package/dist/webcomponents/p-1f196690.entry.js +1 -0
- package/dist/webcomponents/{p-800660f2.entry.js → p-270bf699.entry.js} +1 -1
- package/dist/webcomponents/p-2a14111e.entry.js +1 -0
- package/dist/webcomponents/p-2aa04490.entry.js +1 -0
- package/dist/webcomponents/p-2da4e6ca.entry.js +1 -0
- package/dist/webcomponents/p-2eb123a3.entry.js +1 -0
- package/dist/webcomponents/p-34a87967.entry.js +1 -0
- package/dist/webcomponents/p-36ad1db9.entry.js +1 -0
- package/dist/webcomponents/p-383f8a27.entry.js +1 -0
- package/dist/webcomponents/p-3ac5ab7e.entry.js +1 -0
- package/dist/webcomponents/p-3ad906c1.entry.js +1 -0
- package/dist/webcomponents/p-3ae12b98.entry.js +1 -0
- package/dist/webcomponents/{p-58ae4f9e.entry.js → p-3bacf834.entry.js} +1 -1
- package/dist/webcomponents/p-4040df88.entry.js +1 -0
- package/dist/webcomponents/{p-e2e6c201.entry.js → p-48d1bc83.entry.js} +1 -1
- package/dist/webcomponents/{p-af48a6bb.entry.js → p-4e71de94.entry.js} +1 -1
- package/dist/webcomponents/p-4f102cfd.entry.js +1 -0
- package/dist/webcomponents/p-5ac8f679.entry.js +1 -0
- package/dist/webcomponents/p-5ba28ff0.entry.js +1 -0
- package/dist/webcomponents/p-6794a435.entry.js +1 -0
- package/dist/webcomponents/{p-CxPieTnF.js → p-7SgMy3r5.js} +1 -1
- package/dist/webcomponents/p-81c1ebd3.entry.js +1 -0
- package/dist/webcomponents/p-8332592a.entry.js +1 -0
- package/dist/webcomponents/p-849ad4d3.entry.js +1 -0
- package/dist/webcomponents/{p-1edec396.entry.js → p-86111a0a.entry.js} +1 -1
- package/dist/webcomponents/p-8b6b7e20.entry.js +1 -0
- package/dist/webcomponents/p-8fcd277c.entry.js +1 -0
- package/dist/webcomponents/p-914b590d.entry.js +1 -0
- package/dist/webcomponents/p-9a3225e2.entry.js +1 -0
- package/dist/webcomponents/{p-BItPr6Gj.js → p-B-9GGR7s.js} +1 -1
- package/dist/webcomponents/p-Boe55CYS.js +1 -0
- package/dist/webcomponents/{p-Do561C8g.js → p-BusXmwDe.js} +1 -1
- package/dist/webcomponents/{p-C9_8N76_.js → p-ByJiG6HY.js} +1 -1
- package/dist/webcomponents/p-CQsNLuzi.js +1 -0
- package/dist/webcomponents/{p-BiizzRhw.js → p-CUkHRggn.js} +1 -1
- package/dist/webcomponents/p-CYxDR985.js +1 -0
- package/dist/webcomponents/{p-ZrJKEEoy.js → p-DELUWNSY.js} +1 -1
- package/dist/webcomponents/{p-wYnnDDuR.js → p-DjhbNep7.js} +1 -1
- package/dist/webcomponents/p-DkoufM1t.js +1 -0
- package/dist/webcomponents/{p-CriWtqRc.js → p-Ds2u5A8P.js} +1 -1
- package/dist/webcomponents/{p-jTVpG8Gt.js → p-E0ZPuuI7.js} +1 -1
- package/dist/webcomponents/p-a020c889.entry.js +1 -0
- package/dist/webcomponents/{p-0082f428.entry.js → p-a22d1078.entry.js} +1 -1
- package/dist/webcomponents/p-a6e816f6.entry.js +1 -0
- package/dist/webcomponents/{p-8681f258.entry.js → p-aaed4997.entry.js} +1 -1
- package/dist/webcomponents/p-ad9307c1.entry.js +1 -0
- package/dist/webcomponents/p-b46223fa.entry.js +1 -0
- package/dist/webcomponents/p-ba76226e.entry.js +1 -0
- package/dist/webcomponents/p-be3caaf8.entry.js +1 -0
- package/dist/webcomponents/p-c11f5079.entry.js +1 -0
- package/dist/webcomponents/p-c41191e7.entry.js +1 -0
- package/dist/webcomponents/p-c4c1c6d4.entry.js +1 -0
- package/dist/webcomponents/p-c621e7af.entry.js +1 -0
- package/dist/webcomponents/p-c8d15694.entry.js +1 -0
- package/dist/webcomponents/p-d13edf9f.entry.js +1 -0
- package/dist/webcomponents/p-d36351e9.entry.js +1 -0
- package/dist/webcomponents/p-d4738115.entry.js +1 -0
- package/dist/webcomponents/p-d913cb6b.entry.js +1 -0
- package/dist/webcomponents/p-dd0ac112.entry.js +1 -0
- package/dist/webcomponents/p-dd75958b.entry.js +1 -0
- package/dist/webcomponents/{p-2769f945.entry.js → p-e6507b93.entry.js} +1 -1
- package/dist/webcomponents/{p-ed55d333.entry.js → p-e7e5fee9.entry.js} +1 -1
- package/dist/webcomponents/{p-4e23116c.entry.js → p-f2650bfc.entry.js} +1 -1
- package/dist/webcomponents/p-f2a03f5d.entry.js +1 -0
- package/dist/webcomponents/p-f4cb581f.entry.js +1 -0
- package/dist/webcomponents/p-f528da70.entry.js +1 -0
- package/dist/webcomponents/p-f632894a.entry.js +1 -0
- package/dist/webcomponents/{p-9f70ce93.entry.js → p-fe862786.entry.js} +1 -1
- package/dist/webcomponents/p-ff2e2879.entry.js +1 -0
- package/dist/webcomponents/p-ffed8f86.entry.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +13 -13
- package/LICENSE +0 -21
- package/dist/cjs/checkout.store-BA6h-dp2.js +0 -107
- package/dist/esm/checkout.store-CaS_htQd.js +0 -101
- package/dist/webcomponents/p-01c9c76c.entry.js +0 -1
- package/dist/webcomponents/p-0389ea61.entry.js +0 -1
- package/dist/webcomponents/p-05351f0d.entry.js +0 -1
- package/dist/webcomponents/p-07e85954.entry.js +0 -1
- package/dist/webcomponents/p-087a81ff.entry.js +0 -1
- package/dist/webcomponents/p-14d2f6c6.entry.js +0 -1
- package/dist/webcomponents/p-1b94c32d.entry.js +0 -1
- package/dist/webcomponents/p-20a8b0c0.entry.js +0 -1
- package/dist/webcomponents/p-22f74666.entry.js +0 -1
- package/dist/webcomponents/p-24c22851.entry.js +0 -1
- package/dist/webcomponents/p-30f61f44.entry.js +0 -1
- package/dist/webcomponents/p-3c38cec5.entry.js +0 -1
- package/dist/webcomponents/p-4488378e.entry.js +0 -1
- package/dist/webcomponents/p-44e021e3.entry.js +0 -1
- package/dist/webcomponents/p-45936490.entry.js +0 -1
- package/dist/webcomponents/p-4761e0aa.entry.js +0 -1
- package/dist/webcomponents/p-4c3eea2b.entry.js +0 -1
- package/dist/webcomponents/p-4dcbc0af.entry.js +0 -1
- package/dist/webcomponents/p-4ed1fc3b.entry.js +0 -1
- package/dist/webcomponents/p-6550b836.entry.js +0 -1
- package/dist/webcomponents/p-6d06ea25.entry.js +0 -1
- package/dist/webcomponents/p-716ddc27.entry.js +0 -1
- package/dist/webcomponents/p-7218c312.entry.js +0 -1
- package/dist/webcomponents/p-75c65531.entry.js +0 -1
- package/dist/webcomponents/p-84e2bd93.entry.js +0 -1
- package/dist/webcomponents/p-89518b26.entry.js +0 -1
- package/dist/webcomponents/p-8bfd15af.entry.js +0 -1
- package/dist/webcomponents/p-9d914297.entry.js +0 -1
- package/dist/webcomponents/p-B3SPy-II.js +0 -1
- package/dist/webcomponents/p-CPKSE7M4.js +0 -1
- package/dist/webcomponents/p-D0YDz3L6.js +0 -1
- package/dist/webcomponents/p-DCIW8z1f.js +0 -1
- package/dist/webcomponents/p-DU8dqq9U.js +0 -1
- package/dist/webcomponents/p-a655b996.entry.js +0 -1
- package/dist/webcomponents/p-a793d1bd.entry.js +0 -1
- package/dist/webcomponents/p-a8f7cf9b.entry.js +0 -1
- package/dist/webcomponents/p-ad8b9fba.entry.js +0 -1
- package/dist/webcomponents/p-ae62e01d.entry.js +0 -1
- package/dist/webcomponents/p-ae7a027b.entry.js +0 -1
- package/dist/webcomponents/p-b3e0c981.entry.js +0 -1
- package/dist/webcomponents/p-b4d8a3f6.entry.js +0 -1
- package/dist/webcomponents/p-bd10429d.entry.js +0 -1
- package/dist/webcomponents/p-c1831747.entry.js +0 -1
- package/dist/webcomponents/p-c3b71a1f.entry.js +0 -1
- package/dist/webcomponents/p-c7279bc6.entry.js +0 -1
- package/dist/webcomponents/p-d2bb462e.entry.js +0 -1
- package/dist/webcomponents/p-d3e4697f.entry.js +0 -1
- package/dist/webcomponents/p-d4b8274f.entry.js +0 -1
- package/dist/webcomponents/p-d89c166f.entry.js +0 -1
- package/dist/webcomponents/p-dc0d3484.entry.js +0 -1
- package/dist/webcomponents/p-e3f6c3c4.entry.js +0 -1
- package/dist/webcomponents/p-eb56ba9b.entry.js +0 -1
- package/dist/webcomponents/p-ebb73921.entry.js +0 -1
- package/dist/webcomponents/p-edcb84bf.entry.js +0 -1
- package/dist/webcomponents/p-f1af630f.entry.js +0 -1
- package/dist/webcomponents/p-f5fb1af2.entry.js +0 -1
- package/dist/webcomponents/p-fab28b02.entry.js +0 -1
|
@@ -1,148 +1,27 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-DwYM91AU.js';
|
|
2
2
|
import { A as Api } from './Api-DX-IWyBw.js';
|
|
3
|
+
import { A as ApplePayConfig, o as ApplePayHelpers, p as ApplePayPaymentRequest, q as ApplePaySessionStatus, r as ApplePayButtonStyle, s as ApplePayButtonType, c as checkoutStore, t as ApplePayMerchantCapability, G as GooglePayConfig, u as GooglePayHelpers, v as GooglePayPaymentDataRequest, w as GooglePayButtonSizeMode, x as GooglePayButtonStyle, y as GooglePayButtonType, z as GooglePayEnvironment, B as onChange, D as onAnyChange, I as ICheckoutStatus, F as getAvailablePaymentMethodTypes, H as getCheckoutState } from './GooglePay-ChLgDgG7.js';
|
|
3
4
|
import { S as StyledHost } from './styled-host-DhOcKWqZ.js';
|
|
4
5
|
import './event-types-CZfYo5-1.js';
|
|
5
6
|
import { S as Skeleton } from './skeleton-BmRZRW5K.js';
|
|
6
|
-
import { c as checkoutStore, o as onAnyChange, g as getAvailablePaymentMethodTypes, a as getCheckoutState, b as onChange } from './checkout.store-CaS_htQd.js';
|
|
7
7
|
import { D as text, r as radioListItem } from './parts-wtuY7MT2.js';
|
|
8
8
|
import { f as formatCurrency } from './utils-CIaHqjQt.js';
|
|
9
|
+
import { P as PAYMENT_METHODS, a as PaymentMethod, b as PAYMENT_MODE } from './index-DkoufM1t.js';
|
|
9
10
|
import { H as Header1 } from './header-1-CPF3S2CC.js';
|
|
10
11
|
import { H as Header2, b as insuranceValuesOn, h as hasInsuranceValueChanged, i as insuranceValues } from './insurance-state-DRe0g_wf.js';
|
|
11
12
|
import { H as Header3 } from './header-3-Cah707hu.js';
|
|
12
|
-
import { J as JustifiAnalytics, c as checkPkgVersion } from './check-pkg-version-
|
|
13
|
+
import { J as JustifiAnalytics, c as checkPkgVersion } from './check-pkg-version-BQxLpn00.js';
|
|
13
14
|
import './config-state-C2NXATwF.js';
|
|
14
15
|
import './dinero-HXpYMWUU.js';
|
|
15
16
|
import { C as ComponentErrorSeverity, a as ComponentErrorCodes, b as ComponentErrorMessages } from './ComponentError-Cjcsf8ku.js';
|
|
16
|
-
import { I as ICheckoutStatus } from './Refund-L_muwEAh.js';
|
|
17
17
|
import './Pagination-CLHwhyvu.js';
|
|
18
18
|
import './Business-B5rtFhtR.js';
|
|
19
19
|
import './Dispute-BH0Xfn-F.js';
|
|
20
20
|
import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
|
|
21
|
-
import { C as CheckoutService } from './checkout.service-
|
|
22
|
-
import { P as PAYMENT_METHODS, a as PaymentMethod, b as PAYMENT_MODE } from './index-DCIW8z1f.js';
|
|
21
|
+
import { C as CheckoutService } from './checkout.service-gxuAcx_d.js';
|
|
23
22
|
import { C as CardBrandLabels } from './payment-method-option-utils-lUHAQVFl.js';
|
|
24
23
|
import './index-B-fWxE5e.js';
|
|
25
|
-
import './package-
|
|
26
|
-
|
|
27
|
-
var ApplePaySessionStatus;
|
|
28
|
-
(function (ApplePaySessionStatus) {
|
|
29
|
-
ApplePaySessionStatus["STATUS_SUCCESS"] = "STATUS_SUCCESS";
|
|
30
|
-
ApplePaySessionStatus["STATUS_FAILURE"] = "STATUS_FAILURE";
|
|
31
|
-
})(ApplePaySessionStatus || (ApplePaySessionStatus = {}));
|
|
32
|
-
var ApplePayButtonType;
|
|
33
|
-
(function (ApplePayButtonType) {
|
|
34
|
-
ApplePayButtonType["PLAIN"] = "plain";
|
|
35
|
-
ApplePayButtonType["BUY"] = "buy";
|
|
36
|
-
ApplePayButtonType["SET_UP"] = "set-up";
|
|
37
|
-
ApplePayButtonType["DONATE"] = "donate";
|
|
38
|
-
ApplePayButtonType["CHECK_OUT"] = "check-out";
|
|
39
|
-
ApplePayButtonType["BOOK"] = "book";
|
|
40
|
-
ApplePayButtonType["SUBSCRIBE"] = "subscribe";
|
|
41
|
-
})(ApplePayButtonType || (ApplePayButtonType = {}));
|
|
42
|
-
var ApplePayButtonStyle;
|
|
43
|
-
(function (ApplePayButtonStyle) {
|
|
44
|
-
ApplePayButtonStyle["BLACK"] = "black";
|
|
45
|
-
ApplePayButtonStyle["WHITE"] = "white";
|
|
46
|
-
ApplePayButtonStyle["WHITE_OUTLINE"] = "white-outline";
|
|
47
|
-
})(ApplePayButtonStyle || (ApplePayButtonStyle = {}));
|
|
48
|
-
var ApplePayMerchantCapability;
|
|
49
|
-
(function (ApplePayMerchantCapability) {
|
|
50
|
-
ApplePayMerchantCapability["SUPPORTS_3DS"] = "supports3DS";
|
|
51
|
-
ApplePayMerchantCapability["SUPPORTS_EMV"] = "supportsEMV";
|
|
52
|
-
ApplePayMerchantCapability["SUPPORTS_CREDIT"] = "supportsCredit";
|
|
53
|
-
ApplePayMerchantCapability["SUPPORTS_DEBIT"] = "supportsDebit";
|
|
54
|
-
})(ApplePayMerchantCapability || (ApplePayMerchantCapability = {}));
|
|
55
|
-
class ApplePayConfig {
|
|
56
|
-
constructor(data) {
|
|
57
|
-
this.merchantIdentifier = data.merchantIdentifier;
|
|
58
|
-
this.displayName = data.displayName;
|
|
59
|
-
this.initiative = data.initiative;
|
|
60
|
-
this.initiativeContext = data.initiativeContext;
|
|
61
|
-
this.buttonType = data.buttonType || ApplePayButtonType.PLAIN;
|
|
62
|
-
this.buttonStyle = data.buttonStyle || ApplePayButtonStyle.BLACK;
|
|
63
|
-
this.buttonLocale = data.buttonLocale || 'en-US';
|
|
64
|
-
}
|
|
65
|
-
get isValid() {
|
|
66
|
-
return !!(this.merchantIdentifier &&
|
|
67
|
-
this.displayName &&
|
|
68
|
-
this.initiative &&
|
|
69
|
-
this.initiativeContext);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
class ApplePayPaymentRequest {
|
|
73
|
-
constructor(data) {
|
|
74
|
-
this.countryCode = data.countryCode;
|
|
75
|
-
this.currencyCode = data.currencyCode;
|
|
76
|
-
this.merchantCapabilities = data.merchantCapabilities;
|
|
77
|
-
this.supportedNetworks = data.supportedNetworks;
|
|
78
|
-
this.total = data.total;
|
|
79
|
-
this.lineItems = data.lineItems;
|
|
80
|
-
this.shippingMethods = data.shippingMethods;
|
|
81
|
-
this.applicationData = data.applicationData;
|
|
82
|
-
this.supportedCountries = data.supportedCountries;
|
|
83
|
-
}
|
|
84
|
-
get isValid() {
|
|
85
|
-
var _a, _b, _c, _d;
|
|
86
|
-
return !!(this.countryCode &&
|
|
87
|
-
this.currencyCode &&
|
|
88
|
-
((_a = this.merchantCapabilities) === null || _a === void 0 ? void 0 : _a.length) &&
|
|
89
|
-
((_b = this.supportedNetworks) === null || _b === void 0 ? void 0 : _b.length) &&
|
|
90
|
-
((_c = this.total) === null || _c === void 0 ? void 0 : _c.label) &&
|
|
91
|
-
((_d = this.total) === null || _d === void 0 ? void 0 : _d.amount));
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
class ApplePayHelpers {
|
|
95
|
-
static isApplePaySupported() {
|
|
96
|
-
var _a;
|
|
97
|
-
return (typeof window !== 'undefined' &&
|
|
98
|
-
'ApplePaySession' in window &&
|
|
99
|
-
((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.supportsVersion(3)));
|
|
100
|
-
}
|
|
101
|
-
static canMakePayments() {
|
|
102
|
-
var _a;
|
|
103
|
-
if (!this.isApplePaySupported()) {
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
return ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePayments()) || false;
|
|
107
|
-
}
|
|
108
|
-
static async canMakePaymentsWithActiveCard(merchantIdentifier) {
|
|
109
|
-
var _a;
|
|
110
|
-
if (!this.isApplePaySupported()) {
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
try {
|
|
114
|
-
return ((await ((_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePaymentsWithActiveCard(merchantIdentifier))) || false);
|
|
115
|
-
}
|
|
116
|
-
catch (error) {
|
|
117
|
-
console.error('Error checking Apple Pay active card:', error);
|
|
118
|
-
return false;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
static formatAmount(amount) {
|
|
122
|
-
return (amount / 100).toFixed(2);
|
|
123
|
-
}
|
|
124
|
-
static parseAmount(amount) {
|
|
125
|
-
return Math.round(parseFloat(amount) * 100);
|
|
126
|
-
}
|
|
127
|
-
static createLineItem(label, amount, type = 'final') {
|
|
128
|
-
return {
|
|
129
|
-
label,
|
|
130
|
-
amount: this.formatAmount(amount),
|
|
131
|
-
type,
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
static getDefaultSupportedNetworks() {
|
|
135
|
-
return ['amex', 'discover', 'masterCard', 'visa'];
|
|
136
|
-
}
|
|
137
|
-
static getDefaultMerchantCapabilities() {
|
|
138
|
-
return [
|
|
139
|
-
ApplePayMerchantCapability.SUPPORTS_3DS,
|
|
140
|
-
ApplePayMerchantCapability.SUPPORTS_EMV,
|
|
141
|
-
ApplePayMerchantCapability.SUPPORTS_CREDIT,
|
|
142
|
-
ApplePayMerchantCapability.SUPPORTS_DEBIT,
|
|
143
|
-
];
|
|
144
|
-
}
|
|
145
|
-
}
|
|
24
|
+
import './package-CYxDR985.js';
|
|
146
25
|
|
|
147
26
|
// Centralized error codes for Apple Pay service
|
|
148
27
|
var ApplePayServiceErrorCode;
|
|
@@ -494,7 +373,7 @@ const ApplePaySkeleton = (props) => {
|
|
|
494
373
|
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" } })))));
|
|
495
374
|
};
|
|
496
375
|
|
|
497
|
-
const ProcessingSpinner = () => (h("div", { class: 'processing-overlay' }, h("div", { class: 'spinner' }), h("span", null, "Processing...")));
|
|
376
|
+
const ProcessingSpinner$1 = () => (h("div", { class: 'processing-overlay' }, h("div", { class: 'spinner' }), h("span", null, "Processing...")));
|
|
498
377
|
const ApplePayButton = (props) => {
|
|
499
378
|
const getApplePayButtonClass = () => {
|
|
500
379
|
let classes = "apple-pay-button";
|
|
@@ -538,7 +417,7 @@ const ApplePayButton = (props) => {
|
|
|
538
417
|
return (h("div", { class: 'apple-pay-button-container' }, h("button", Object.assign({ class: getApplePayButtonClass(), style: {
|
|
539
418
|
width: props.width,
|
|
540
419
|
height: props.height,
|
|
541
|
-
}, onClick: handleClick, disabled: props.disabled || props.isProcessing || !props.isAvailable, "aria-label": 'Pay with Apple Pay', type: 'button' }, props), props.isProcessing && ProcessingSpinner()), h("style", null, `
|
|
420
|
+
}, onClick: handleClick, disabled: props.disabled || props.isProcessing || !props.isAvailable, "aria-label": 'Pay with Apple Pay', type: 'button' }, props), props.isProcessing && ProcessingSpinner$1()), h("style", null, `
|
|
542
421
|
.apple-pay-button-container {
|
|
543
422
|
display: block;
|
|
544
423
|
position: relative;
|
|
@@ -823,10 +702,742 @@ const Summary = class {
|
|
|
823
702
|
registerInstance(this, hostRef);
|
|
824
703
|
}
|
|
825
704
|
render() {
|
|
826
|
-
return (h(StyledHost, { key: '
|
|
705
|
+
return (h(StyledHost, { key: '3ebaf90f9085614d44043d9b5ba7de3f926bf6f1' }, h("section", { key: '888ea6f17ece8e78b7ddf9302be5b1b355cd54c6' }, h("div", { key: 'bb7db155a31ceb9e824c5290b8fb8d8713622bdd' }, h("div", { key: 'dc954f18e824dabfb09fc727aeb87685020e2d1e', part: text }, checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.paymentDescription), h("div", { key: 'e7f6b12c142655fc967bd6a37e00193b9f743f84' }, h("span", { key: '25996f66626d428385422d72f5e2bba1a8301628', part: text }, "Total"), "\u00A0", h("span", { key: '958bd1242ac23e13e66b73563d2c6f73499d2574', part: text }, formatCurrency(+(checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.totalAmount))))))));
|
|
827
706
|
}
|
|
828
707
|
};
|
|
829
708
|
|
|
709
|
+
const PROCESS_TOKEN_ENDPOINT = 'google_pay/process_token';
|
|
710
|
+
class GooglePayService {
|
|
711
|
+
constructor() {
|
|
712
|
+
this.api = Api();
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* Initialize Google Pay configuration
|
|
716
|
+
*/
|
|
717
|
+
initialize(googlePayConfig) {
|
|
718
|
+
this.googlePayConfig = new GooglePayConfig(googlePayConfig);
|
|
719
|
+
if (!this.googlePayConfig.isValid) {
|
|
720
|
+
throw new Error('Invalid Google Pay configuration provided');
|
|
721
|
+
}
|
|
722
|
+
// Create Google Pay client
|
|
723
|
+
this.googlePayClient = GooglePayHelpers.createGooglePayClient(this.googlePayConfig.environment);
|
|
724
|
+
if (!this.googlePayClient) {
|
|
725
|
+
throw new Error('Failed to create Google Pay client');
|
|
726
|
+
}
|
|
727
|
+
// No debug logs
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* Process Google Pay payment via API
|
|
731
|
+
*/
|
|
732
|
+
async processPayment(authToken, accountId, payload) {
|
|
733
|
+
const endpoint = PROCESS_TOKEN_ENDPOINT;
|
|
734
|
+
try {
|
|
735
|
+
const result = await this.api.post({
|
|
736
|
+
endpoint,
|
|
737
|
+
authToken,
|
|
738
|
+
body: payload,
|
|
739
|
+
headers: {
|
|
740
|
+
'sub-account': accountId,
|
|
741
|
+
},
|
|
742
|
+
});
|
|
743
|
+
return {
|
|
744
|
+
success: result.id && !!result.data.token,
|
|
745
|
+
data: result,
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
catch (_error) {
|
|
749
|
+
throw new Error('Google Pay payment processing failed');
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Check if Google Pay is available on this device/browser
|
|
754
|
+
*/
|
|
755
|
+
isAvailable() {
|
|
756
|
+
return GooglePayHelpers.isGooglePaySupported() && !!this.googlePayClient;
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* Check if the user can make payments with Google Pay
|
|
760
|
+
*/
|
|
761
|
+
async canMakePayments() {
|
|
762
|
+
if (!this.googlePayClient || !this.googlePayConfig) {
|
|
763
|
+
return false;
|
|
764
|
+
}
|
|
765
|
+
try {
|
|
766
|
+
const baseRequest = GooglePayHelpers.createBasePaymentDataRequest();
|
|
767
|
+
const response = await this.googlePayClient.isReadyToPay(baseRequest);
|
|
768
|
+
return response.result;
|
|
769
|
+
}
|
|
770
|
+
catch (_error) {
|
|
771
|
+
return false;
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* Start Google Pay payment session
|
|
776
|
+
*/
|
|
777
|
+
async startPaymentSession(paymentDataRequest, authToken, accountId) {
|
|
778
|
+
var _a;
|
|
779
|
+
if (!this.googlePayConfig || !this.googlePayClient) {
|
|
780
|
+
throw new Error('Google Pay not initialized. Call initialize() first.');
|
|
781
|
+
}
|
|
782
|
+
if (!this.isAvailable()) {
|
|
783
|
+
throw new Error('Google Pay is not available on this device/browser');
|
|
784
|
+
}
|
|
785
|
+
const request = new GooglePayPaymentDataRequest(paymentDataRequest);
|
|
786
|
+
if (!request.isValid) {
|
|
787
|
+
throw new Error('Invalid payment data request provided');
|
|
788
|
+
}
|
|
789
|
+
try {
|
|
790
|
+
const paymentData = await this.googlePayClient.loadPaymentData(request);
|
|
791
|
+
// Build top-level snake_case fields from Google Pay tokenizationData
|
|
792
|
+
const tokenizationData = (_a = paymentData === null || paymentData === void 0 ? void 0 : paymentData.paymentMethodData) === null || _a === void 0 ? void 0 : _a.tokenizationData;
|
|
793
|
+
const tokenObj = (() => {
|
|
794
|
+
if ((tokenizationData === null || tokenizationData === void 0 ? void 0 : tokenizationData.token) &&
|
|
795
|
+
typeof tokenizationData.token === 'string') {
|
|
796
|
+
try {
|
|
797
|
+
return JSON.parse(tokenizationData.token);
|
|
798
|
+
}
|
|
799
|
+
catch (_e) {
|
|
800
|
+
return tokenizationData;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
return tokenizationData;
|
|
804
|
+
})();
|
|
805
|
+
const tokenProcessRequest = {
|
|
806
|
+
protocolVersion: tokenObj === null || tokenObj === void 0 ? void 0 : tokenObj.protocolVersion,
|
|
807
|
+
signature: tokenObj === null || tokenObj === void 0 ? void 0 : tokenObj.signature,
|
|
808
|
+
intermediateSigningKey: (tokenObj === null || tokenObj === void 0 ? void 0 : tokenObj.intermediateSigningKey)
|
|
809
|
+
? {
|
|
810
|
+
signedKey: tokenObj.intermediateSigningKey.signedKey,
|
|
811
|
+
signatures: tokenObj.intermediateSigningKey.signatures,
|
|
812
|
+
}
|
|
813
|
+
: undefined,
|
|
814
|
+
signedMessage: tokenObj === null || tokenObj === void 0 ? void 0 : tokenObj.signedMessage,
|
|
815
|
+
};
|
|
816
|
+
const paymentResult = await this.processPayment(authToken, accountId, tokenProcessRequest);
|
|
817
|
+
if (paymentResult.success) {
|
|
818
|
+
return {
|
|
819
|
+
success: true,
|
|
820
|
+
paymentData: paymentData,
|
|
821
|
+
paymentMethodId: paymentResult.data.id,
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
else {
|
|
825
|
+
return {
|
|
826
|
+
success: false,
|
|
827
|
+
error: {
|
|
828
|
+
code: 'PAYMENT_PROCESSING_ERROR',
|
|
829
|
+
message: 'Payment processing failed',
|
|
830
|
+
},
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
catch (error) {
|
|
835
|
+
// Handle different types of errors
|
|
836
|
+
if (error && typeof error === 'object' && 'statusCode' in error) {
|
|
837
|
+
const googlePayError = error;
|
|
838
|
+
switch (googlePayError.statusCode) {
|
|
839
|
+
case 'CANCELED':
|
|
840
|
+
return {
|
|
841
|
+
success: false,
|
|
842
|
+
error: {
|
|
843
|
+
code: 'USER_CANCELLED',
|
|
844
|
+
message: 'User cancelled the Google Pay session',
|
|
845
|
+
},
|
|
846
|
+
};
|
|
847
|
+
case 'DEVELOPER_ERROR':
|
|
848
|
+
return {
|
|
849
|
+
success: false,
|
|
850
|
+
error: {
|
|
851
|
+
code: 'DEVELOPER_ERROR',
|
|
852
|
+
message: 'Google Pay configuration error',
|
|
853
|
+
},
|
|
854
|
+
};
|
|
855
|
+
default:
|
|
856
|
+
return {
|
|
857
|
+
success: false,
|
|
858
|
+
error: {
|
|
859
|
+
code: 'PAYMENT_ERROR',
|
|
860
|
+
message: googlePayError.statusMessage || 'Google Pay payment failed',
|
|
861
|
+
},
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
return {
|
|
866
|
+
success: false,
|
|
867
|
+
error: {
|
|
868
|
+
code: 'PAYMENT_ERROR',
|
|
869
|
+
message: error instanceof Error
|
|
870
|
+
? error.message
|
|
871
|
+
: 'Google Pay payment failed',
|
|
872
|
+
},
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Create Google Pay button element
|
|
878
|
+
*/
|
|
879
|
+
createButton(options) {
|
|
880
|
+
if (!this.googlePayClient || !this.googlePayConfig) {
|
|
881
|
+
return null;
|
|
882
|
+
}
|
|
883
|
+
try {
|
|
884
|
+
return this.googlePayClient.createButton({
|
|
885
|
+
onClick: options.onClick,
|
|
886
|
+
buttonType: options.buttonType,
|
|
887
|
+
buttonSizeMode: options.buttonSizeMode,
|
|
888
|
+
buttonColor: options.buttonColor,
|
|
889
|
+
buttonLocale: options.buttonLocale,
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
catch (_error) {
|
|
893
|
+
return null;
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Prefetch payment data for faster loading
|
|
898
|
+
*/
|
|
899
|
+
prefetchPaymentData(paymentDataRequest) {
|
|
900
|
+
if (!this.googlePayClient) {
|
|
901
|
+
return;
|
|
902
|
+
}
|
|
903
|
+
const request = new GooglePayPaymentDataRequest(paymentDataRequest);
|
|
904
|
+
if (!request.isValid) {
|
|
905
|
+
return;
|
|
906
|
+
}
|
|
907
|
+
try {
|
|
908
|
+
this.googlePayClient.prefetchPaymentData(request);
|
|
909
|
+
}
|
|
910
|
+
catch (_error) { }
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* Create a basic payment data request
|
|
914
|
+
*/
|
|
915
|
+
static createPaymentDataRequest(amount, label, countryCode = 'US', currencyCode = 'USD', merchantName) {
|
|
916
|
+
const request = {
|
|
917
|
+
apiVersion: 2,
|
|
918
|
+
apiVersionMinor: 0,
|
|
919
|
+
allowedPaymentMethods: [GooglePayHelpers.createPaymentMethodData()],
|
|
920
|
+
transactionInfo: {
|
|
921
|
+
countryCode,
|
|
922
|
+
currencyCode,
|
|
923
|
+
totalPriceStatus: 'FINAL',
|
|
924
|
+
totalPrice: GooglePayHelpers.formatAmount(amount),
|
|
925
|
+
totalPriceLabel: label,
|
|
926
|
+
},
|
|
927
|
+
merchantInfo: {
|
|
928
|
+
merchantName,
|
|
929
|
+
},
|
|
930
|
+
};
|
|
931
|
+
// No debug logs
|
|
932
|
+
return request;
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* Get current configuration
|
|
936
|
+
*/
|
|
937
|
+
getGooglePayConfig() {
|
|
938
|
+
return this.googlePayConfig;
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* Get current Google Pay client
|
|
942
|
+
*/
|
|
943
|
+
getGooglePayClient() {
|
|
944
|
+
return this.googlePayClient;
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
const GooglePaySkeleton = (props) => {
|
|
949
|
+
const { isLoading } = props;
|
|
950
|
+
if (!isLoading) {
|
|
951
|
+
return null;
|
|
952
|
+
}
|
|
953
|
+
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" } })))));
|
|
954
|
+
};
|
|
955
|
+
|
|
956
|
+
const ProcessingSpinner = () => (h("div", { class: 'processing-overlay' }, h("div", { class: 'spinner' }), h("span", null, "Processing...")));
|
|
957
|
+
const GooglePayButton = (props) => {
|
|
958
|
+
const getGooglePayButtonClass = () => {
|
|
959
|
+
let classes = "google-pay-button";
|
|
960
|
+
// Button style
|
|
961
|
+
switch (props.buttonStyle) {
|
|
962
|
+
case GooglePayButtonStyle.WHITE:
|
|
963
|
+
classes += " google-pay-button-white";
|
|
964
|
+
break;
|
|
965
|
+
case GooglePayButtonStyle.BLACK:
|
|
966
|
+
default:
|
|
967
|
+
classes += " google-pay-button-black";
|
|
968
|
+
break;
|
|
969
|
+
}
|
|
970
|
+
// Button type
|
|
971
|
+
switch (props.buttonType) {
|
|
972
|
+
case GooglePayButtonType.BUY:
|
|
973
|
+
classes += " google-pay-button-type-buy";
|
|
974
|
+
break;
|
|
975
|
+
case GooglePayButtonType.BOOK:
|
|
976
|
+
classes += " google-pay-button-type-book";
|
|
977
|
+
break;
|
|
978
|
+
case GooglePayButtonType.CHECKOUT:
|
|
979
|
+
classes += " google-pay-button-type-checkout";
|
|
980
|
+
break;
|
|
981
|
+
case GooglePayButtonType.DONATE:
|
|
982
|
+
classes += " google-pay-button-type-donate";
|
|
983
|
+
break;
|
|
984
|
+
case GooglePayButtonType.ORDER:
|
|
985
|
+
classes += " google-pay-button-type-order";
|
|
986
|
+
break;
|
|
987
|
+
case GooglePayButtonType.PAY:
|
|
988
|
+
classes += " google-pay-button-type-pay";
|
|
989
|
+
break;
|
|
990
|
+
case GooglePayButtonType.SUBSCRIBE:
|
|
991
|
+
classes += " google-pay-button-type-subscribe";
|
|
992
|
+
break;
|
|
993
|
+
case GooglePayButtonType.PLAIN:
|
|
994
|
+
default:
|
|
995
|
+
classes += " google-pay-button-type-plain";
|
|
996
|
+
break;
|
|
997
|
+
}
|
|
998
|
+
// Size mode
|
|
999
|
+
switch (props.buttonSizeMode) {
|
|
1000
|
+
case GooglePayButtonSizeMode.FILL:
|
|
1001
|
+
classes += " google-pay-button-fill";
|
|
1002
|
+
break;
|
|
1003
|
+
case GooglePayButtonSizeMode.STATIC:
|
|
1004
|
+
default:
|
|
1005
|
+
classes += " google-pay-button-static";
|
|
1006
|
+
break;
|
|
1007
|
+
}
|
|
1008
|
+
if (props.disabled || props.isProcessing || !props.isAvailable) {
|
|
1009
|
+
classes += " disabled";
|
|
1010
|
+
}
|
|
1011
|
+
return classes;
|
|
1012
|
+
};
|
|
1013
|
+
const getButtonStyles = () => {
|
|
1014
|
+
const styles = {};
|
|
1015
|
+
if (props.buttonSizeMode === GooglePayButtonSizeMode.FILL) {
|
|
1016
|
+
styles.width = '100%';
|
|
1017
|
+
styles.minWidth = '200px';
|
|
1018
|
+
}
|
|
1019
|
+
else {
|
|
1020
|
+
styles.width = props.width || '200px';
|
|
1021
|
+
}
|
|
1022
|
+
styles.height = props.height || '48px';
|
|
1023
|
+
return styles;
|
|
1024
|
+
};
|
|
1025
|
+
const handleClick = () => {
|
|
1026
|
+
if (!props.disabled &&
|
|
1027
|
+
!props.isProcessing &&
|
|
1028
|
+
props.isAvailable &&
|
|
1029
|
+
props.clickHandler) {
|
|
1030
|
+
props.clickHandler();
|
|
1031
|
+
}
|
|
1032
|
+
};
|
|
1033
|
+
return (h("div", { class: 'google-pay-button-container' }, h("button", Object.assign({ class: getGooglePayButtonClass(), style: getButtonStyles(), onClick: handleClick, disabled: props.disabled || props.isProcessing || !props.isAvailable, "aria-label": 'Pay with Google Pay', type: 'button' }, props), props.isProcessing && ProcessingSpinner(), h("div", { class: 'google-pay-button-content' }, h("svg", { class: 'google-g-logo', viewBox: '0 0 24 24', xmlns: 'http://www.w3.org/2000/svg' }, h("path", { d: 'M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z', fill: '#4285F4' }), h("path", { d: 'M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z', fill: '#34A853' }), h("path", { d: 'M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z', fill: '#FBBC05' }), h("path", { d: 'M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z', fill: '#EA4335' })), h("span", { class: 'pay-text' }, "Pay"))), h("style", null, `
|
|
1034
|
+
.google-pay-button-container {
|
|
1035
|
+
display: block;
|
|
1036
|
+
position: relative;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
.google-pay-button {
|
|
1040
|
+
display: flex;
|
|
1041
|
+
align-items: center;
|
|
1042
|
+
justify-content: center;
|
|
1043
|
+
border: none;
|
|
1044
|
+
border-radius: 4px;
|
|
1045
|
+
cursor: pointer;
|
|
1046
|
+
font-family: 'Google Sans', arial, sans-serif;
|
|
1047
|
+
font-size: 14px;
|
|
1048
|
+
font-weight: 500;
|
|
1049
|
+
letter-spacing: 0.25px;
|
|
1050
|
+
line-height: 16px;
|
|
1051
|
+
outline: none;
|
|
1052
|
+
padding: 0 20px;
|
|
1053
|
+
position: relative;
|
|
1054
|
+
transition: box-shadow 0.2s ease;
|
|
1055
|
+
min-width: 140px;
|
|
1056
|
+
min-height: 48px;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
/* Button styles */
|
|
1060
|
+
.google-pay-button.google-pay-button-black {
|
|
1061
|
+
background-color: #000;
|
|
1062
|
+
color: #fff;
|
|
1063
|
+
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.12), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
.google-pay-button.google-pay-button-white {
|
|
1067
|
+
background-color: #fff;
|
|
1068
|
+
color: #3c4043;
|
|
1069
|
+
box-shadow: 0 1px 1px 0 rgba(60, 64, 67, 0.30), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
/* Button content */
|
|
1073
|
+
.google-pay-button-content {
|
|
1074
|
+
display: flex;
|
|
1075
|
+
align-items: center;
|
|
1076
|
+
justify-content: center;
|
|
1077
|
+
gap: 8px;
|
|
1078
|
+
white-space: nowrap;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
.google-g-logo {
|
|
1082
|
+
width: 20px;
|
|
1083
|
+
height: 20px;
|
|
1084
|
+
flex-shrink: 0;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
.pay-text {
|
|
1088
|
+
font-family: 'Google Sans', arial, sans-serif;
|
|
1089
|
+
font-size: 14px;
|
|
1090
|
+
font-weight: 500;
|
|
1091
|
+
margin-left: 8px;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
/* Button types - text content handled by ::before pseudo-element */
|
|
1095
|
+
.google-pay-button-type-buy .google-pay-button-content::before {
|
|
1096
|
+
content: 'Buy with';
|
|
1097
|
+
margin-right: 8px;
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
.google-pay-button-type-book .google-pay-button-content::before {
|
|
1101
|
+
content: 'Book with';
|
|
1102
|
+
margin-right: 8px;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
.google-pay-button-type-checkout .google-pay-button-content::before {
|
|
1106
|
+
content: 'Checkout with';
|
|
1107
|
+
margin-right: 8px;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
.google-pay-button-type-donate .google-pay-button-content::before {
|
|
1111
|
+
content: 'Donate with';
|
|
1112
|
+
margin-right: 8px;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
.google-pay-button-type-order .google-pay-button-content::before {
|
|
1116
|
+
content: 'Order with';
|
|
1117
|
+
margin-right: 8px;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
.google-pay-button-type-pay .google-pay-button-content::before {
|
|
1121
|
+
content: 'Pay with';
|
|
1122
|
+
margin-right: 8px;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
.google-pay-button-type-subscribe .google-pay-button-content::before {
|
|
1126
|
+
content: 'Subscribe with';
|
|
1127
|
+
margin-right: 8px;
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
/* Size modes */
|
|
1131
|
+
.google-pay-button.google-pay-button-fill {
|
|
1132
|
+
width: 100%;
|
|
1133
|
+
min-width: 200px;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
.google-pay-button.google-pay-button-static {
|
|
1137
|
+
width: auto;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
/* Hover and focus states */
|
|
1141
|
+
.google-pay-button:hover:not(.disabled) {
|
|
1142
|
+
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
.google-pay-button:focus:not(.disabled) {
|
|
1146
|
+
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
.google-pay-button:active:not(.disabled) {
|
|
1150
|
+
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);
|
|
1151
|
+
transform: translateY(1px);
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
/* Disabled state */
|
|
1155
|
+
.google-pay-button.disabled {
|
|
1156
|
+
opacity: 0.5;
|
|
1157
|
+
cursor: not-allowed;
|
|
1158
|
+
box-shadow: none;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
.google-pay-button.disabled:hover,
|
|
1162
|
+
.google-pay-button.disabled:focus,
|
|
1163
|
+
.google-pay-button.disabled:active {
|
|
1164
|
+
box-shadow: none;
|
|
1165
|
+
transform: none;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
/* Processing overlay */
|
|
1169
|
+
.processing-overlay {
|
|
1170
|
+
position: absolute;
|
|
1171
|
+
top: 0;
|
|
1172
|
+
left: 0;
|
|
1173
|
+
right: 0;
|
|
1174
|
+
bottom: 0;
|
|
1175
|
+
display: flex;
|
|
1176
|
+
align-items: center;
|
|
1177
|
+
justify-content: center;
|
|
1178
|
+
gap: 8px;
|
|
1179
|
+
background: rgba(0, 0, 0, 0.8);
|
|
1180
|
+
color: white;
|
|
1181
|
+
border-radius: 4px;
|
|
1182
|
+
font-size: 14px;
|
|
1183
|
+
font-weight: 500;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
.spinner {
|
|
1187
|
+
width: 16px;
|
|
1188
|
+
height: 16px;
|
|
1189
|
+
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
1190
|
+
border-top: 2px solid #fff;
|
|
1191
|
+
border-radius: 50%;
|
|
1192
|
+
animation: spin 1s linear infinite;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
@keyframes spin {
|
|
1196
|
+
0% { transform: rotate(0deg); }
|
|
1197
|
+
100% { transform: rotate(360deg); }
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
/* Responsive design */
|
|
1201
|
+
@media (max-width: 480px) {
|
|
1202
|
+
.google-pay-button {
|
|
1203
|
+
width: 100% !important;
|
|
1204
|
+
min-width: 200px;
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
`)));
|
|
1208
|
+
};
|
|
1209
|
+
|
|
1210
|
+
const GooglePay = class {
|
|
1211
|
+
constructor(hostRef) {
|
|
1212
|
+
registerInstance(this, hostRef);
|
|
1213
|
+
this.googlePayCancelled = createEvent(this, "googlePayCancelled");
|
|
1214
|
+
this.googlePayCompleted = createEvent(this, "googlePayCompleted");
|
|
1215
|
+
this.googlePayStarted = createEvent(this, "googlePayStarted");
|
|
1216
|
+
this.unsubscribes = [];
|
|
1217
|
+
this.canMakePayments = false;
|
|
1218
|
+
this.error = null;
|
|
1219
|
+
this.isAvailable = false;
|
|
1220
|
+
this.isLoading = true;
|
|
1221
|
+
this.isProcessing = false;
|
|
1222
|
+
this.buttonSizeMode = GooglePayButtonSizeMode.FILL;
|
|
1223
|
+
this.buttonStyle = GooglePayButtonStyle.BLACK;
|
|
1224
|
+
this.buttonType = GooglePayButtonType.PLAIN;
|
|
1225
|
+
this.countryCode = "US";
|
|
1226
|
+
this.disabled = false;
|
|
1227
|
+
this.environment = GooglePayEnvironment.TEST;
|
|
1228
|
+
this.merchantId = "gateway:justifi";
|
|
1229
|
+
this.merchantName = "justifi";
|
|
1230
|
+
this.showSkeleton = true;
|
|
1231
|
+
this.handleGooglePayClick = async () => {
|
|
1232
|
+
var _a;
|
|
1233
|
+
if (this.isProcessing ||
|
|
1234
|
+
this.disabled ||
|
|
1235
|
+
!this.isAvailable ||
|
|
1236
|
+
!this.canMakePayments) {
|
|
1237
|
+
return;
|
|
1238
|
+
}
|
|
1239
|
+
try {
|
|
1240
|
+
this.isProcessing = true;
|
|
1241
|
+
this.error = null;
|
|
1242
|
+
this.googlePayStarted.emit();
|
|
1243
|
+
const paymentDataRequest = this.createPaymentDataRequest();
|
|
1244
|
+
const result = await this.googlePayService.startPaymentSession(paymentDataRequest, checkoutStore.authToken, checkoutStore.accountId);
|
|
1245
|
+
if (result.success) {
|
|
1246
|
+
this.googlePayCompleted.emit({
|
|
1247
|
+
success: true,
|
|
1248
|
+
paymentData: result.paymentData,
|
|
1249
|
+
paymentMethodId: result.paymentMethodId,
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
1252
|
+
else {
|
|
1253
|
+
this.googlePayCompleted.emit({
|
|
1254
|
+
success: false,
|
|
1255
|
+
error: result.error,
|
|
1256
|
+
});
|
|
1257
|
+
if (((_a = result.error) === null || _a === void 0 ? void 0 : _a.code) === "USER_CANCELLED") {
|
|
1258
|
+
this.googlePayCancelled.emit();
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
catch (error) {
|
|
1263
|
+
const errorMessage = error instanceof Error ? error.message : "Payment failed";
|
|
1264
|
+
this.error = errorMessage;
|
|
1265
|
+
this.googlePayCompleted.emit({
|
|
1266
|
+
success: false,
|
|
1267
|
+
error: errorMessage,
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
1270
|
+
finally {
|
|
1271
|
+
this.isProcessing = false;
|
|
1272
|
+
}
|
|
1273
|
+
};
|
|
1274
|
+
}
|
|
1275
|
+
watchConfigChange() {
|
|
1276
|
+
this.initializeGooglePay();
|
|
1277
|
+
}
|
|
1278
|
+
componentWillLoad() {
|
|
1279
|
+
this.googlePayService = new GooglePayService();
|
|
1280
|
+
}
|
|
1281
|
+
componentDidLoad() {
|
|
1282
|
+
const unsub = onChange("paymentAmount", () => {
|
|
1283
|
+
this.prefetchPaymentData();
|
|
1284
|
+
});
|
|
1285
|
+
if (typeof unsub === 'function')
|
|
1286
|
+
this.unsubscribes.push(unsub);
|
|
1287
|
+
const unsubCurrency = onChange("paymentCurrency", () => {
|
|
1288
|
+
this.prefetchPaymentData();
|
|
1289
|
+
});
|
|
1290
|
+
if (typeof unsubCurrency === 'function')
|
|
1291
|
+
this.unsubscribes.push(unsubCurrency);
|
|
1292
|
+
const unsubDesc = onChange("paymentDescription", () => {
|
|
1293
|
+
this.prefetchPaymentData();
|
|
1294
|
+
});
|
|
1295
|
+
if (typeof unsubDesc === 'function')
|
|
1296
|
+
this.unsubscribes.push(unsubDesc);
|
|
1297
|
+
}
|
|
1298
|
+
disconnectedCallback() {
|
|
1299
|
+
this.unsubscribes.forEach((fn) => {
|
|
1300
|
+
try {
|
|
1301
|
+
fn();
|
|
1302
|
+
}
|
|
1303
|
+
catch (_a) { }
|
|
1304
|
+
});
|
|
1305
|
+
this.unsubscribes = [];
|
|
1306
|
+
}
|
|
1307
|
+
/**
|
|
1308
|
+
* Returns supported authentication methods when Google Pay is available.
|
|
1309
|
+
*/
|
|
1310
|
+
async getSupportedAuthMethods() {
|
|
1311
|
+
if (!this.isAvailable) {
|
|
1312
|
+
return [];
|
|
1313
|
+
}
|
|
1314
|
+
return GooglePayHelpers.getDefaultAuthMethods();
|
|
1315
|
+
}
|
|
1316
|
+
/**
|
|
1317
|
+
* Returns supported card networks when Google Pay is available.
|
|
1318
|
+
*/
|
|
1319
|
+
async getSupportedNetworks() {
|
|
1320
|
+
if (!this.isAvailable) {
|
|
1321
|
+
return [];
|
|
1322
|
+
}
|
|
1323
|
+
return GooglePayHelpers.getDefaultSupportedNetworks();
|
|
1324
|
+
}
|
|
1325
|
+
/**
|
|
1326
|
+
* Select Google Pay in the modular checkout parent.
|
|
1327
|
+
*/
|
|
1328
|
+
async handleSelectionClick() {
|
|
1329
|
+
checkoutStore.selectedPaymentMethod = { type: PAYMENT_METHODS.GOOGLE_PAY };
|
|
1330
|
+
}
|
|
1331
|
+
/**
|
|
1332
|
+
* Returns whether Google Pay is both available and can make payments.
|
|
1333
|
+
*/
|
|
1334
|
+
async isSupported() {
|
|
1335
|
+
return this.isAvailable && this.canMakePayments;
|
|
1336
|
+
}
|
|
1337
|
+
/**
|
|
1338
|
+
* Prefetch payment data for faster load times of the Google Pay sheet.
|
|
1339
|
+
*/
|
|
1340
|
+
async prefetchPaymentData() {
|
|
1341
|
+
if (!this.isAvailable || !this.canMakePayments) {
|
|
1342
|
+
return;
|
|
1343
|
+
}
|
|
1344
|
+
const paymentDataRequest = this.createPaymentDataRequest();
|
|
1345
|
+
this.googlePayService.prefetchPaymentData(paymentDataRequest);
|
|
1346
|
+
}
|
|
1347
|
+
async initializeGooglePay() {
|
|
1348
|
+
try {
|
|
1349
|
+
this.isLoading = true;
|
|
1350
|
+
this.error = null;
|
|
1351
|
+
if (!checkoutStore.paymentAmount) {
|
|
1352
|
+
this.error = "Missing required Google Pay configuration";
|
|
1353
|
+
this.isLoading = false;
|
|
1354
|
+
return;
|
|
1355
|
+
}
|
|
1356
|
+
const googlePayConfig = {
|
|
1357
|
+
environment: this.environment,
|
|
1358
|
+
merchantId: this.merchantId,
|
|
1359
|
+
merchantName: this.merchantName,
|
|
1360
|
+
buttonType: this.buttonType,
|
|
1361
|
+
buttonStyle: this.buttonStyle,
|
|
1362
|
+
buttonSizeMode: this.buttonSizeMode,
|
|
1363
|
+
};
|
|
1364
|
+
this.googlePayService.initialize(googlePayConfig);
|
|
1365
|
+
this.isAvailable = this.googlePayService.isAvailable();
|
|
1366
|
+
if (!this.isAvailable) {
|
|
1367
|
+
this.error = "Google Pay is not supported on this device";
|
|
1368
|
+
this.isLoading = false;
|
|
1369
|
+
return;
|
|
1370
|
+
}
|
|
1371
|
+
this.canMakePayments = await this.googlePayService.canMakePayments();
|
|
1372
|
+
if (!this.canMakePayments) {
|
|
1373
|
+
this.error = "Google Pay is not available for payments";
|
|
1374
|
+
this.isLoading = false;
|
|
1375
|
+
return;
|
|
1376
|
+
}
|
|
1377
|
+
const paymentDataRequest = this.createPaymentDataRequest();
|
|
1378
|
+
this.googlePayService.prefetchPaymentData(paymentDataRequest);
|
|
1379
|
+
}
|
|
1380
|
+
catch (error) {
|
|
1381
|
+
this.error =
|
|
1382
|
+
error instanceof Error
|
|
1383
|
+
? error.message
|
|
1384
|
+
: "Failed to initialize Google Pay";
|
|
1385
|
+
}
|
|
1386
|
+
finally {
|
|
1387
|
+
this.isLoading = false;
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
createPaymentDataRequest() {
|
|
1391
|
+
return GooglePayService.createPaymentDataRequest(checkoutStore.paymentAmount, checkoutStore.paymentDescription, this.countryCode, checkoutStore.paymentCurrency, this.merchantName);
|
|
1392
|
+
}
|
|
1393
|
+
render() {
|
|
1394
|
+
const showError = !this.isLoading && !!this.error;
|
|
1395
|
+
const showDeviceUnavailable = !this.isLoading && !this.error && !this.isAvailable;
|
|
1396
|
+
const showPaymentsUnavailable = !this.isLoading && !this.error && this.isAvailable && !this.canMakePayments;
|
|
1397
|
+
const showButton = !this.isLoading && !this.error && this.isAvailable && this.canMakePayments;
|
|
1398
|
+
return (h(StyledHost, { key: 'f4cf31bbc6ea32eab1f2b09de9074fa10afce596' }, checkoutStore.checkoutLoaded && (h("script", { key: '2a425b9181cacdcb9dfcfcb42f71ea3c95d8f9c2', async: true, src: 'https://pay.google.com/gp/p/js/pay.js', onLoad: () => {
|
|
1399
|
+
this.initializeGooglePay();
|
|
1400
|
+
} })), h("div", { key: 'c64ef59f1db3ded1ba50088283a893a71125b01d', class: 'google-pay-container' }, h(GooglePaySkeleton, { key: '26ee48338d84dca3f6f96b9eef1efd5044de2717', isLoading: this.isLoading }), showError && (h("div", { key: 'bd9b26a2c42a9a9635c5aec77fee4a8b54a45aad', class: 'google-pay-error', role: 'alert', "data-testid": 'gp-error' }, h("span", { key: '4ccddf69edae7f1f9bf65ad243e01284d39621e1', class: 'error-icon' }, "\u26A0\uFE0F"), h("span", { key: '7c6adf975cdfc62126feb784ba07081eef3c8c2a', class: 'error-message' }, this.error))), showDeviceUnavailable && (h("div", { key: 'c5a390895ae1d0490a2666d6632895fbb5b62c47', class: 'google-pay-unavailable', "data-testid": 'gp-device-unavailable' }, h("span", { key: 'cd0e1b12be794f3e4d6a6efda7a94827b602caa6', class: 'unavailable-message' }, "Google Pay is not available on this device"))), showPaymentsUnavailable && (h("div", { key: '4bd15c7b5a140f3632241b669008c789e847b815', class: 'google-pay-unavailable', "data-testid": 'gp-payments-unavailable' }, h("span", { key: 'b87029a460e53cb10dfe8321afae844e93c0b48d', class: 'unavailable-message' }, "Google Pay is not available for payments"))), showButton && (h(GooglePayButton, { key: '84f36f038b1bf8f472f4eccdf519f1cf4fd1ca5a', "data-testid": 'gp-button', buttonType: this.buttonType, buttonStyle: this.buttonStyle, buttonSizeMode: this.buttonSizeMode, disabled: this.disabled, isProcessing: this.isProcessing, isAvailable: this.isAvailable, clickHandler: this.handleGooglePayClick }))), h("style", { key: '56cf24d22755a83ea556406cd438a868b61da3f4' }, `
|
|
1401
|
+
.google-pay-container {
|
|
1402
|
+
width: 100%;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
.google-pay-error {
|
|
1406
|
+
display: flex;
|
|
1407
|
+
align-items: center;
|
|
1408
|
+
gap: 8px;
|
|
1409
|
+
padding: 12px;
|
|
1410
|
+
background: #fef2f2;
|
|
1411
|
+
border: 1px solid #fecaca;
|
|
1412
|
+
border-radius: 8px;
|
|
1413
|
+
color: #dc2626;
|
|
1414
|
+
font-size: 14px;
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
.google-pay-unavailable {
|
|
1418
|
+
display: flex;
|
|
1419
|
+
align-items: center;
|
|
1420
|
+
justify-content: center;
|
|
1421
|
+
padding: 12px;
|
|
1422
|
+
background: #f9fafb;
|
|
1423
|
+
border: 1px solid #e5e7eb;
|
|
1424
|
+
border-radius: 8px;
|
|
1425
|
+
color: #6b7280;
|
|
1426
|
+
font-size: 14px;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
.error-icon {
|
|
1430
|
+
font-size: 16px;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
`)));
|
|
1434
|
+
}
|
|
1435
|
+
static get watchers() { return {
|
|
1436
|
+
"merchantId": ["watchConfigChange"],
|
|
1437
|
+
"environment": ["watchConfigChange"]
|
|
1438
|
+
}; }
|
|
1439
|
+
};
|
|
1440
|
+
|
|
830
1441
|
const Header = class {
|
|
831
1442
|
constructor(hostRef) {
|
|
832
1443
|
registerInstance(this, hostRef);
|
|
@@ -839,7 +1450,7 @@ const Header = class {
|
|
|
839
1450
|
}
|
|
840
1451
|
render() {
|
|
841
1452
|
const HeaderComponent = this.levels[this.level];
|
|
842
|
-
return (h(StyledHost, { key: '
|
|
1453
|
+
return (h(StyledHost, { key: '73104ea086f8a9948e69f86451adf19e0f39fb32' }, h(HeaderComponent, { key: 'a8582109634299a24e2a9b3c7181c6bba511fde7', text: this.text, class: this.class })));
|
|
843
1454
|
}
|
|
844
1455
|
};
|
|
845
1456
|
|
|
@@ -925,6 +1536,25 @@ const ModularCheckout = class {
|
|
|
925
1536
|
this.submitEvent = createEvent(this, "submit-event");
|
|
926
1537
|
this.checkoutChangedEvent = createEvent(this, "checkout-changed");
|
|
927
1538
|
this.plaidService = new PlaidService();
|
|
1539
|
+
this.handleGooglePayCompleted = (event) => {
|
|
1540
|
+
const { success, paymentMethodId, error } = event.detail || {};
|
|
1541
|
+
if (success && paymentMethodId) {
|
|
1542
|
+
checkoutStore.paymentToken = paymentMethodId;
|
|
1543
|
+
checkoutStore.selectedPaymentMethod = { type: PAYMENT_METHODS.GOOGLE_PAY };
|
|
1544
|
+
this.submitCheckout();
|
|
1545
|
+
}
|
|
1546
|
+
else {
|
|
1547
|
+
this.errorEvent.emit({
|
|
1548
|
+
message: (error && error.message) || "Google Pay payment failed",
|
|
1549
|
+
errorCode: ComponentErrorCodes.TOKENIZE_ERROR,
|
|
1550
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
1551
|
+
});
|
|
1552
|
+
}
|
|
1553
|
+
};
|
|
1554
|
+
this.handleGooglePayCancelled = () => {
|
|
1555
|
+
checkoutStore.paymentToken = undefined;
|
|
1556
|
+
checkoutStore.selectedPaymentMethod = undefined;
|
|
1557
|
+
};
|
|
928
1558
|
this.handleApplePayCompleted = (event) => {
|
|
929
1559
|
const { success, token, paymentMethodId, error } = event.detail;
|
|
930
1560
|
if (success && token) {
|
|
@@ -960,6 +1590,7 @@ const ModularCheckout = class {
|
|
|
960
1590
|
this.observer = new MutationObserver(() => {
|
|
961
1591
|
this.queryFormRefs();
|
|
962
1592
|
this.setupApplePayListeners(); // set up again listeners when DOM changes
|
|
1593
|
+
this.setupGooglePayListeners();
|
|
963
1594
|
});
|
|
964
1595
|
this.observer.observe(this.hostEl, {
|
|
965
1596
|
childList: true,
|
|
@@ -994,11 +1625,13 @@ const ModularCheckout = class {
|
|
|
994
1625
|
componentDidLoad() {
|
|
995
1626
|
this.queryFormRefs();
|
|
996
1627
|
this.setupApplePayListeners();
|
|
1628
|
+
this.setupGooglePayListeners();
|
|
997
1629
|
}
|
|
998
1630
|
disconnectedCallback() {
|
|
999
1631
|
var _a;
|
|
1000
1632
|
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
1001
1633
|
this.removeApplePayListeners();
|
|
1634
|
+
this.removeGooglePayListeners();
|
|
1002
1635
|
}
|
|
1003
1636
|
fetchCheckout() {
|
|
1004
1637
|
if (!this.authToken || !this.checkoutId) {
|
|
@@ -1041,7 +1674,7 @@ const ModularCheckout = class {
|
|
|
1041
1674
|
}
|
|
1042
1675
|
}
|
|
1043
1676
|
updateStore(checkout) {
|
|
1044
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1677
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1045
1678
|
checkoutStore.accountId = checkout.account_id;
|
|
1046
1679
|
checkoutStore.checkoutLoaded = true;
|
|
1047
1680
|
checkoutStore.paymentMethods = checkout.payment_methods.map((paymentMethod) => new PaymentMethod(paymentMethod));
|
|
@@ -1053,11 +1686,12 @@ const ModularCheckout = class {
|
|
|
1053
1686
|
checkoutStore.insuranceEnabled = checkout.payment_settings.insurance_payments;
|
|
1054
1687
|
checkoutStore.bankAccountVerification = (_a = checkout.payment_settings) === null || _a === void 0 ? void 0 : _a.bank_account_verification;
|
|
1055
1688
|
checkoutStore.applePayEnabled = (_b = checkout.payment_settings) === null || _b === void 0 ? void 0 : _b.apple_payments;
|
|
1056
|
-
checkoutStore.
|
|
1057
|
-
checkoutStore.
|
|
1058
|
-
checkoutStore.
|
|
1689
|
+
checkoutStore.googlePayEnabled = (_c = checkout.payment_settings) === null || _c === void 0 ? void 0 : _c.google_payments;
|
|
1690
|
+
checkoutStore.bnplProviderClientId = (_d = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _d === void 0 ? void 0 : _d.provider_client_id;
|
|
1691
|
+
checkoutStore.bnplProviderMode = (_e = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _e === void 0 ? void 0 : _e.provider_mode;
|
|
1692
|
+
checkoutStore.bnplProviderApiVersion = (_f = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _f === void 0 ? void 0 : _f.provider_api_version;
|
|
1059
1693
|
checkoutStore.bnplProviderCheckoutUrl =
|
|
1060
|
-
(
|
|
1694
|
+
(_g = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _g === void 0 ? void 0 : _g.provider_checkout_url;
|
|
1061
1695
|
}
|
|
1062
1696
|
emitCheckoutChanged() {
|
|
1063
1697
|
const detail = {
|
|
@@ -1070,6 +1704,7 @@ const ModularCheckout = class {
|
|
|
1070
1704
|
queryFormRefs() {
|
|
1071
1705
|
this.billingFormRef = this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full");
|
|
1072
1706
|
this.applePayRef = this.hostEl.querySelector("justifi-apple-pay");
|
|
1707
|
+
this.googlePayRef = this.hostEl.querySelector("justifi-google-pay");
|
|
1073
1708
|
this.paymentMethodFormRef =
|
|
1074
1709
|
this.hostEl.querySelector('justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method');
|
|
1075
1710
|
this.insuranceFormRef = this.hostEl.querySelector('justifi-season-interruption-insurance');
|
|
@@ -1088,6 +1723,18 @@ const ModularCheckout = class {
|
|
|
1088
1723
|
this.applePayRef.removeEventListener("applePayCancelled", this.handleApplePayCancelled);
|
|
1089
1724
|
}
|
|
1090
1725
|
}
|
|
1726
|
+
setupGooglePayListeners() {
|
|
1727
|
+
if (this.googlePayRef) {
|
|
1728
|
+
this.googlePayRef.addEventListener("googlePayCompleted", this.handleGooglePayCompleted);
|
|
1729
|
+
this.googlePayRef.addEventListener("googlePayCancelled", this.handleGooglePayCancelled);
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
removeGooglePayListeners() {
|
|
1733
|
+
if (this.googlePayRef) {
|
|
1734
|
+
this.googlePayRef.removeEventListener("googlePayCompleted", this.handleGooglePayCompleted);
|
|
1735
|
+
this.googlePayRef.removeEventListener("googlePayCancelled", this.handleGooglePayCancelled);
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1091
1738
|
async tokenizePaymentMethod(tokenizeArgs) {
|
|
1092
1739
|
var _a, _b, _c;
|
|
1093
1740
|
const billingInfoValues = (_b = (await ((_a = this.billingFormRef) === null || _a === void 0 ? void 0 : _a.getValues()))) !== null && _b !== void 0 ? _b : {};
|
|
@@ -1242,6 +1889,8 @@ const ModularCheckout = class {
|
|
|
1242
1889
|
return PAYMENT_MODE.BNPL;
|
|
1243
1890
|
case PAYMENT_METHODS.APPLE_PAY:
|
|
1244
1891
|
return PAYMENT_MODE.APPLE_PAY;
|
|
1892
|
+
case PAYMENT_METHODS.GOOGLE_PAY:
|
|
1893
|
+
return PAYMENT_MODE.GOOGLE_PAY;
|
|
1245
1894
|
default:
|
|
1246
1895
|
return undefined;
|
|
1247
1896
|
}
|
|
@@ -1279,7 +1928,7 @@ const ModularCheckout = class {
|
|
|
1279
1928
|
});
|
|
1280
1929
|
}
|
|
1281
1930
|
render() {
|
|
1282
|
-
return h(Host, { key: '
|
|
1931
|
+
return h(Host, { key: '43f4be87e218b23251f2ccac90e0c980bf157d68' });
|
|
1283
1932
|
}
|
|
1284
1933
|
get hostEl() { return getElement(this); }
|
|
1285
1934
|
};
|
|
@@ -1975,4 +2624,4 @@ const SezzlePaymentMethod = class {
|
|
|
1975
2624
|
}
|
|
1976
2625
|
};
|
|
1977
2626
|
|
|
1978
|
-
export { ApplePay as justifi_apple_pay, Summary as justifi_checkout_summary, Header as justifi_header, ModularCheckout as justifi_modular_checkout, PlaidPaymentMethod as justifi_plaid_payment_method, SavedPaymentMethods as justifi_saved_payment_methods, SezzlePaymentMethod as justifi_sezzle_payment_method };
|
|
2627
|
+
export { ApplePay as justifi_apple_pay, Summary as justifi_checkout_summary, GooglePay as justifi_google_pay, Header as justifi_header, ModularCheckout as justifi_modular_checkout, PlaidPaymentMethod as justifi_plaid_payment_method, SavedPaymentMethods as justifi_saved_payment_methods, SezzlePaymentMethod as justifi_sezzle_payment_method };
|