@justifi/webcomponents 6.5.1-rc.3 → 6.5.1-rc.5
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/{GooglePay-40aEKdDF.js → Refund-Blquw3jZ.js} +0 -446
- package/dist/cjs/bank-account-document-form-inputs_6.cjs.entry.js +4 -5
- package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
- package/dist/cjs/{business.service-BggHdPOV.js → business.service-DrBmfEbR.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +2 -2
- package/dist/cjs/{check-pkg-version-DuPkU5qI.js → check-pkg-version-T54BeR4n.js} +2 -2
- package/dist/cjs/{checkout.service-BUcIs9az.js → checkout.service-BEU6CI0t.js} +1 -1
- package/dist/cjs/checkout.store-BA6h-dp2.js +107 -0
- package/dist/cjs/checkouts-list-core.cjs.entry.js +2 -3
- package/dist/cjs/custom-popper.cjs.entry.js +2 -2
- package/dist/cjs/{dispute.service-CxWqivLc.js → dispute.service-c0CZxPpe.js} +1 -1
- 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_3.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_3.cjs.entry.js +4 -4
- package/dist/cjs/{get-payment-details-D_dDxsPG.js → get-payment-details-D8UQRtX1.js} +2 -2
- package/dist/cjs/{get-subaccounts-_D9lzD5O.js → get-subaccounts-fKcKqvrx.js} +2 -2
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
- package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
- package/dist/cjs/{index-CajjbB9t.js → index-C2ITzalN.js} +0 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +23 -22
- package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +5 -6
- package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +2 -3
- package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +8 -8
- package/dist/cjs/{justifi-apple-pay_8.cjs.entry.js → justifi-apple-pay_7.cjs.entry.js} +253 -1124
- package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-details.cjs.entry.js +4 -5
- package/dist/cjs/justifi-business-form.cjs.entry.js +4 -5
- package/dist/cjs/justifi-checkout.cjs.entry.js +15 -14
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +9 -10
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +7 -8
- package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +5 -6
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +8 -9
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -4
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +9 -10
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +2 -3
- package/dist/cjs/justifi-payment-details.cjs.entry.js +5 -6
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +4 -5
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +6 -7
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payments-list.cjs.entry.js +6 -7
- package/dist/cjs/justifi-payout-details.cjs.entry.js +5 -6
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +6 -7
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +7 -8
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +9 -10
- package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +8 -7
- package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +11 -12
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +6 -7
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +7 -8
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +7 -8
- package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-C6nOTkVV.js → package-JstJdxIu.js} +1 -1
- package/dist/cjs/pagination-menu.cjs.entry.js +3 -3
- package/dist/cjs/payment-details-core.cjs.entry.js +10 -11
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/{payment.service-wWZTmyFv.js → payment.service-DXbR13Kq.js} +1 -1
- package/dist/cjs/payments-list-core.cjs.entry.js +2 -3
- package/dist/cjs/payout-details-core.cjs.entry.js +3 -3
- package/dist/cjs/{payout.service-CWAem5VG.js → payout.service-D0U6kzXJ.js} +1 -1
- package/dist/cjs/payouts-list-core.cjs.entry.js +2 -3
- package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +3 -4
- package/dist/cjs/{terminal-orders-table-DBNG4K5I.js → terminal-orders-table-BByfBAEK.js} +3 -3
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/{terminal.service-DSlqCGxE.js → terminal.service-BqXeiERV.js} +1 -1
- package/dist/cjs/terminals-list-core.cjs.entry.js +2 -3
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/index.js +0 -2
- package/dist/collection/collection-manifest.json +0 -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 +0 -1
- package/dist/collection/components/modular-checkout/modular-checkout.js +6 -44
- 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/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 +1 -1
- package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +1 -1
- package/dist/collection/store/checkout.store.js +0 -4
- package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
- package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
- package/dist/collection/ui-components/form/form-control-date.js +2 -2
- package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
- package/dist/collection/ui-components/form/form-control-file.js +2 -2
- package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
- package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
- package/dist/collection/ui-components/form/form-control-number.js +2 -2
- package/dist/collection/ui-components/form/form-control-radio.js +2 -2
- package/dist/collection/ui-components/form/form-control-select.js +2 -2
- package/dist/collection/ui-components/form/form-control-text.js +2 -2
- package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
- package/dist/collection/ui-components/form/hidden-input.js +1 -1
- package/dist/collection/ui-components/form/iframe-input.js +3 -3
- package/dist/collection/ui-components/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-skeleton.js +1 -1
- package/dist/docs.json +3 -540
- package/dist/esm/{GooglePay-f7mYX17c.js → Refund-BugCdfRo.js} +1 -436
- package/dist/esm/bank-account-document-form-inputs_6.entry.js +3 -4
- package/dist/esm/bank-account-form.entry.js +2 -2
- package/dist/esm/{business.service-CzHfftZk.js → business.service-pWcc3kfX.js} +1 -1
- package/dist/esm/card-form.entry.js +2 -2
- package/dist/esm/{check-pkg-version-Cqb7EhvC.js → check-pkg-version-C8hgGLFx.js} +2 -2
- package/dist/esm/{checkout.service-BWdnJLVG.js → checkout.service-B4xSV2-X.js} +1 -1
- package/dist/esm/checkout.store-CaS_htQd.js +101 -0
- package/dist/esm/checkouts-list-core.entry.js +2 -3
- package/dist/esm/custom-popper.entry.js +2 -2
- package/dist/esm/{dispute.service-CqX5HR5o.js → dispute.service-3Kbbh1J9.js} +1 -1
- 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.entry.js +2 -2
- package/dist/esm/form-control-number-masked_3.entry.js +2 -2
- 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-D0T7bd_-.js → get-payment-details-CakzKvOr.js} +1 -1
- package/dist/esm/{get-subaccounts-Gil-SOoF.js → get-subaccounts-Cw1Adtmo.js} +1 -1
- package/dist/esm/gross-payment-chart-core.entry.js +1 -1
- package/dist/esm/hidden-input_2.entry.js +5 -5
- package/dist/esm/{index-DkoufM1t.js → index-DCIW8z1f.js} +0 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal-tokenize-payment-method_7.entry.js +12 -11
- package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +1 -2
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +2 -3
- package/dist/esm/justifi-additional-statement_8.entry.js +8 -8
- package/dist/esm/{justifi-apple-pay_8.entry.js → justifi-apple-pay_7.entry.js} +137 -1007
- package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +2 -2
- package/dist/esm/justifi-business-details.entry.js +4 -5
- package/dist/esm/justifi-business-form.entry.js +4 -5
- package/dist/esm/justifi-checkout.entry.js +8 -7
- package/dist/esm/justifi-checkouts-list-filters.entry.js +2 -3
- package/dist/esm/justifi-checkouts-list.entry.js +6 -7
- package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
- package/dist/esm/justifi-dispute-management.entry.js +5 -6
- package/dist/esm/justifi-dispute-notification_3.entry.js +8 -9
- package/dist/esm/justifi-gross-payment-chart.entry.js +3 -4
- package/dist/esm/justifi-order-terminals.entry.js +6 -7
- package/dist/esm/justifi-owner-form_3.entry.js +2 -3
- package/dist/esm/justifi-payment-details.entry.js +5 -6
- package/dist/esm/justifi-payment-provisioning.entry.js +4 -5
- package/dist/esm/justifi-payment-transactions-list.entry.js +5 -6
- package/dist/esm/justifi-payments-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payments-list.entry.js +5 -6
- package/dist/esm/justifi-payout-details.entry.js +4 -5
- package/dist/esm/justifi-payout-transactions-list.entry.js +5 -6
- package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payouts-list.entry.js +6 -7
- package/dist/esm/justifi-refund-payment.entry.js +5 -6
- package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +5 -4
- package/dist/esm/justifi-skeleton.entry.js +1 -1
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +3 -4
- package/dist/esm/justifi-terminal-orders-list.entry.js +5 -6
- package/dist/esm/justifi-terminals-list-filters.entry.js +2 -3
- package/dist/esm/justifi-terminals-list.entry.js +6 -7
- package/dist/esm/justifi-tokenize-payment-method.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-CzedYX3W.js → package-DEhd71m_.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +3 -3
- package/dist/esm/payment-details-core.entry.js +9 -10
- package/dist/esm/payment-method-option.entry.js +1 -1
- package/dist/esm/{payment.service-CWyZF34P.js → payment.service-nExZY_sU.js} +1 -1
- package/dist/esm/payments-list-core.entry.js +2 -3
- package/dist/esm/payout-details-core.entry.js +3 -3
- package/dist/esm/{payout.service-CkTievFG.js → payout.service-B9-JQqU6.js} +1 -1
- package/dist/esm/payouts-list-core.entry.js +2 -3
- package/dist/esm/table-filters-menu.entry.js +1 -1
- package/dist/esm/terminal-orders-list-core.entry.js +3 -4
- package/dist/esm/{terminal-orders-table-OX3ZvzZy.js → terminal-orders-table-DsrpmD9F.js} +1 -1
- package/dist/esm/terminal-quantity-selector.entry.js +1 -1
- package/dist/esm/{terminal.service-Bu5-dhum.js → terminal.service-DvFiKAKV.js} +1 -1
- package/dist/esm/terminals-list-core.entry.js +2 -3
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Analytics.js +0 -2
- package/dist/module/ModularCheckout.js +0 -1
- package/dist/module/additional-statement.js +1 -1
- package/dist/module/apple-pay.js +120 -1
- package/dist/module/bank-account-billing-form-simple.js +1 -1
- package/dist/module/bank-account-document-inputs.js +0 -2
- package/dist/module/bank-account-form.js +2 -2
- package/dist/module/bank-account.js +2 -2
- package/dist/module/business-bank-account-form-step-core.js +0 -2
- package/dist/module/business-bank-account-form-step.js +0 -2
- package/dist/module/business-terms-conditions-form-step.js +0 -2
- package/dist/module/business.service.js +0 -2
- 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 +0 -2
- package/dist/module/checkout.store.js +0 -4
- package/dist/module/checkouts-list-core2.js +1 -3
- package/dist/module/custom-popper2.js +2 -2
- package/dist/module/customer-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 +0 -2
- 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-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-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 +0 -2
- package/dist/module/get-subaccounts.js +0 -2
- package/dist/module/gross-payment-chart-core2.js +1 -1
- package/dist/module/hidden-input2.js +1 -1
- package/dist/module/iframe-input2.js +3 -3
- package/dist/module/internal-tokenize-payment-method2.js +1 -3
- package/dist/module/justifi-business-form.js +0 -2
- package/dist/module/justifi-button2.js +1 -1
- package/dist/module/justifi-checkout.js +40 -46
- package/dist/module/justifi-checkouts-list-filters.js +1 -3
- package/dist/module/justifi-checkouts-list.js +1 -3
- package/dist/module/justifi-dispute-management.js +1 -1
- package/dist/module/justifi-gross-payment-chart.js +0 -2
- package/dist/module/justifi-header2.js +1 -1
- package/dist/module/justifi-order-terminals.js +1 -3
- package/dist/module/justifi-payment-provisioning.js +0 -2
- package/dist/module/justifi-payment-transactions-list.js +1 -3
- package/dist/module/justifi-payments-list-filters.js +2 -2
- package/dist/module/justifi-payments-list.js +1 -3
- package/dist/module/justifi-payout-details.js +0 -2
- package/dist/module/justifi-payout-transactions-list.js +1 -3
- package/dist/module/justifi-payouts-list-filters.js +2 -2
- package/dist/module/justifi-payouts-list.js +1 -3
- package/dist/module/justifi-refund-payment.js +0 -2
- package/dist/module/justifi-saved-payment-method.js +1 -1
- package/dist/module/justifi-season-interruption-insurance.js +0 -2
- package/dist/module/justifi-skeleton.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +2 -4
- package/dist/module/justifi-terminal-orders-list.js +1 -3
- package/dist/module/justifi-terminals-list-filters.js +1 -3
- package/dist/module/justifi-terminals-list.js +1 -3
- package/dist/module/justifi-tokenize-payment-method.js +1 -1
- package/dist/module/modular-checkout.js +6 -46
- package/dist/module/package.js +1 -1
- package/dist/module/pagination-menu2.js +3 -3
- package/dist/module/payment-details-core2.js +8 -10
- package/dist/module/payment-method-option.js +1 -1
- package/dist/module/payment.service.js +0 -2
- package/dist/module/payments-list-core2.js +1 -3
- package/dist/module/payout-details-core2.js +3 -3
- package/dist/module/payout.service.js +0 -2
- package/dist/module/payouts-list-core2.js +1 -3
- package/dist/module/plaid.service.js +0 -2
- 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 +1 -3
- package/dist/module/terminal-quantity-selector2.js +1 -1
- package/dist/module/terminal.service.js +0 -2
- package/dist/module/terminals-list-core2.js +1 -3
- package/dist/types/api/Checkout.d.ts +0 -2
- package/dist/types/api/index.d.ts +0 -2
- package/dist/types/components/checkout/checkout.d.ts +0 -1
- package/dist/types/components/modular-checkout/ModularCheckout.d.ts +1 -2
- package/dist/types/components/modular-checkout/modular-checkout.d.ts +0 -5
- package/dist/types/components.d.ts +0 -140
- package/dist/types/store/checkout.store.d.ts +0 -1
- package/dist/webcomponents/index.esm.js +1 -1
- package/dist/webcomponents/{p-a22d1078.entry.js → p-0082f428.entry.js} +1 -1
- package/dist/webcomponents/p-04b23547.entry.js +1 -0
- package/dist/webcomponents/p-04ed045b.entry.js +1 -0
- package/dist/webcomponents/{p-19dabeab.entry.js → p-1193a1ac.entry.js} +1 -1
- package/dist/webcomponents/p-159d8ae7.entry.js +1 -0
- package/dist/webcomponents/{p-86111a0a.entry.js → p-1edec396.entry.js} +1 -1
- package/dist/webcomponents/p-20608f0c.entry.js +1 -0
- package/dist/webcomponents/p-266a9aee.entry.js +1 -0
- package/dist/webcomponents/p-2bafa257.entry.js +1 -0
- package/dist/webcomponents/p-30f61f44.entry.js +1 -0
- package/dist/webcomponents/p-3101565c.entry.js +1 -0
- package/dist/webcomponents/p-34aa9298.entry.js +1 -0
- package/dist/webcomponents/p-3c38cec5.entry.js +1 -0
- package/dist/webcomponents/p-3c40eefe.entry.js +1 -0
- package/dist/webcomponents/p-42c3bda4.entry.js +1 -0
- package/dist/webcomponents/p-44a94dac.entry.js +1 -0
- package/dist/webcomponents/p-4dcbc0af.entry.js +1 -0
- package/dist/webcomponents/{p-f2650bfc.entry.js → p-4e23116c.entry.js} +1 -1
- package/dist/webcomponents/{p-3bacf834.entry.js → p-58ae4f9e.entry.js} +1 -1
- package/dist/webcomponents/p-5a3687bf.entry.js +1 -0
- package/dist/webcomponents/p-5c8c88c6.entry.js +1 -0
- package/dist/webcomponents/p-614b0adc.entry.js +1 -0
- package/dist/webcomponents/p-7081eb35.entry.js +1 -0
- package/dist/webcomponents/p-7128920a.entry.js +1 -0
- package/dist/webcomponents/p-7218c312.entry.js +1 -0
- package/dist/webcomponents/p-73388c68.entry.js +1 -0
- package/dist/webcomponents/p-77b76007.entry.js +1 -0
- package/dist/webcomponents/p-77bd4fb0.entry.js +1 -0
- package/dist/webcomponents/p-7a3d9c24.entry.js +1 -0
- package/dist/webcomponents/p-8c07d9f0.entry.js +1 -0
- package/dist/webcomponents/p-8cfda6c1.entry.js +1 -0
- package/dist/webcomponents/p-90de8098.entry.js +1 -0
- package/dist/webcomponents/p-98b8028e.entry.js +1 -0
- package/dist/webcomponents/p-9efd1bce.entry.js +1 -0
- package/dist/webcomponents/p-9fef2496.entry.js +1 -0
- package/dist/webcomponents/{p-DUs94fK3.js → p-B4ZUYyNh.js} +1 -1
- package/dist/webcomponents/{p-B4W3my_D.js → p-BCPutgAi.js} +1 -1
- package/dist/webcomponents/p-BojLBYsY.js +1 -0
- package/dist/webcomponents/p-BpaE8q5f.js +1 -0
- package/dist/webcomponents/{p-DXnwIxTB.js → p-C6wS5-M7.js} +1 -1
- package/dist/webcomponents/{p-DeX_cIoV.js → p-C8QOezo8.js} +1 -1
- package/dist/webcomponents/{p-aZ8YkDMZ.js → p-CFevTCAJ.js} +1 -1
- package/dist/webcomponents/{p-CPRPR6fJ.js → p-CPtsjcdm.js} +1 -1
- package/dist/webcomponents/p-Ch9cTPyq.js +1 -0
- package/dist/webcomponents/p-DCIW8z1f.js +1 -0
- package/dist/webcomponents/p-DEhd71m_.js +1 -0
- package/dist/webcomponents/p-DU8dqq9U.js +1 -0
- package/dist/webcomponents/{p-TKWqvm_A.js → p-D_IJC4HG.js} +1 -1
- package/dist/webcomponents/p-MQxr_LMC.js +1 -0
- package/dist/webcomponents/p-a54b8901.entry.js +1 -0
- package/dist/webcomponents/p-a655b996.entry.js +1 -0
- package/dist/webcomponents/p-a7f8cacb.entry.js +1 -0
- package/dist/webcomponents/p-a9bd4e27.entry.js +1 -0
- package/dist/webcomponents/{p-03c8c754.entry.js → p-aec9185f.entry.js} +1 -1
- package/dist/webcomponents/{p-4e71de94.entry.js → p-af48a6bb.entry.js} +1 -1
- package/dist/webcomponents/p-b24a2971.entry.js +1 -0
- package/dist/webcomponents/p-bf8cf72d.entry.js +1 -0
- package/dist/webcomponents/p-c364c76d.entry.js +1 -0
- package/dist/webcomponents/p-c3b71a1f.entry.js +1 -0
- package/dist/webcomponents/{p-f528da70.entry.js → p-cd10cd05.entry.js} +1 -1
- package/dist/webcomponents/p-cfd858be.entry.js +1 -0
- package/dist/webcomponents/p-d1951301.entry.js +1 -0
- package/dist/webcomponents/p-d39598e4.entry.js +1 -0
- package/dist/webcomponents/p-dc0d3484.entry.js +1 -0
- package/dist/webcomponents/{p-88074dd7.entry.js → p-de35abb6.entry.js} +1 -1
- package/dist/webcomponents/p-e47a2592.entry.js +1 -0
- package/dist/webcomponents/p-eb56ba9b.entry.js +1 -0
- package/dist/webcomponents/{p-e7e5fee9.entry.js → p-ed55d333.entry.js} +1 -1
- package/dist/webcomponents/p-edcb84bf.entry.js +1 -0
- package/dist/webcomponents/{p-aaed4997.entry.js → p-f0957fca.entry.js} +1 -1
- package/dist/webcomponents/p-f0fc86ce.entry.js +1 -0
- package/dist/webcomponents/p-f223fabb.entry.js +1 -0
- package/dist/webcomponents/p-f26db2e6.entry.js +1 -0
- package/dist/webcomponents/p-fab28b02.entry.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/docs/.eslintrc.cjs +17 -0
- package/docs/changelog/index.mdx +17 -0
- package/docs/entities/businessdetails/index.mdx +158 -0
- package/docs/entities/businessform/index.mdx +241 -0
- package/docs/entities/index.mdx +19 -0
- package/docs/entities/payment-provisioning/index.mdx +131 -0
- package/docs/frameworks/angular/index.mdx +112 -0
- package/docs/frameworks/index.mdx +18 -0
- package/docs/frameworks/react/index.mdx +125 -0
- package/docs/frameworks/vue/index.mdx +102 -0
- package/docs/helpers/PartsTable.js +50 -0
- package/docs/helpers/PartsTable.ts +55 -0
- package/docs/helpers/PropsTable.js +56 -0
- package/docs/helpers/PropsTable.ts +63 -0
- package/docs/helpers/index.js +4 -0
- package/docs/helpers/index.ts +3 -0
- package/docs/helpers/version.js +32 -0
- package/docs/helpers/version.ts +32 -0
- package/docs/introduction/index.mdx +125 -0
- package/docs/merchant-tools/checkouts-list/index.mdx +107 -0
- package/docs/merchant-tools/gross-payments-chart/index.mdx +81 -0
- package/docs/merchant-tools/index.mdx +25 -0
- package/docs/merchant-tools/order-terminals/index.mdx +84 -0
- package/docs/merchant-tools/payment-details/index.mdx +130 -0
- package/docs/merchant-tools/payment-transactions-list/index.mdx +85 -0
- package/docs/merchant-tools/payments-list/index.mdx +111 -0
- package/docs/merchant-tools/payout-details/index.mdx +90 -0
- package/docs/merchant-tools/payout-transactions-list/index.mdx +84 -0
- package/docs/merchant-tools/payouts-list/index.mdx +94 -0
- package/docs/merchant-tools/terminal-orders-list/index.mdx +85 -0
- package/docs/merchant-tools/terminals-list/index.mdx +93 -0
- package/docs/modular-checkout/complete-examples/index.mdx +20 -0
- package/docs/modular-checkout/docs/index.mdx +32 -0
- package/docs/modular-checkout/example/index.mdx +25 -0
- package/docs/modular-checkout/index.mdx +25 -0
- package/docs/modular-checkout/introduction/index.mdx +100 -0
- package/docs/modular-checkout/sub-components/apple-pay.mdx +96 -0
- package/docs/modular-checkout/sub-components/bank-account-form.mdx +162 -0
- package/docs/modular-checkout/sub-components/card-form.mdx +177 -0
- package/docs/modular-checkout/sub-components/index.mdx +23 -0
- package/docs/modular-checkout/sub-components/payment-method-options.mdx +85 -0
- package/docs/modular-checkout/sub-components/plaid-payment-method.mdx +175 -0
- package/docs/modular-checkout/sub-components/saved-payment-methods.mdx +177 -0
- package/docs/modular-checkout/sub-components/season-interruption-insurance.mdx +219 -0
- package/docs/modular-checkout/sub-components/sezzle-payment-method.mdx +183 -0
- package/docs/modular-checkout/sub-components/summary.mdx +107 -0
- package/docs/payment-facilitation/dispute-management/index.mdx +98 -0
- package/docs/payment-facilitation/index.mdx +21 -0
- package/docs/payment-facilitation/refund-payment/index.mdx +229 -0
- package/docs/payment-facilitation/tokenize-payment-method/index.mdx +361 -0
- package/docs/payment-facilitation/unified-fintech-checkout/342/204/242/index.mdx +164 -0
- package/package.json +21 -6
- package/dist/collection/api/GooglePay.js +0 -212
- package/dist/collection/api/services/google-pay.service.js +0 -368
- package/dist/collection/components/modular-checkout/sub-components/google-pay-skeleton.js +0 -10
- package/dist/collection/components/modular-checkout/sub-components/google-pay.js +0 -706
- package/dist/collection/ui-components/google-pay-button.js +0 -251
- package/dist/module/ApplePay.js +0 -121
- package/dist/module/GooglePay.js +0 -215
- package/dist/module/google-pay.js +0 -1006
- package/dist/module/justifi-google-pay.d.ts +0 -11
- package/dist/module/justifi-google-pay.js +0 -6
- package/dist/types/api/GooglePay.d.ts +0 -271
- package/dist/types/api/services/google-pay.service.d.ts +0 -60
- package/dist/types/components/modular-checkout/sub-components/google-pay-skeleton.d.ts +0 -6
- package/dist/types/components/modular-checkout/sub-components/google-pay.d.ts +0 -59
- package/dist/types/ui-components/google-pay-button.d.ts +0 -18
- package/dist/webcomponents/p-0437c330.entry.js +0 -1
- package/dist/webcomponents/p-065b24c3.entry.js +0 -1
- package/dist/webcomponents/p-0772719b.entry.js +0 -1
- package/dist/webcomponents/p-136b29e3.entry.js +0 -1
- package/dist/webcomponents/p-14cbf366.entry.js +0 -1
- package/dist/webcomponents/p-1e014ee7.entry.js +0 -1
- package/dist/webcomponents/p-1f196690.entry.js +0 -1
- package/dist/webcomponents/p-20e66fc0.entry.js +0 -1
- package/dist/webcomponents/p-22fdf7a4.entry.js +0 -1
- package/dist/webcomponents/p-25755af4.entry.js +0 -1
- package/dist/webcomponents/p-270bf699.entry.js +0 -1
- package/dist/webcomponents/p-2da4e6ca.entry.js +0 -1
- package/dist/webcomponents/p-2eb123a3.entry.js +0 -1
- package/dist/webcomponents/p-3ae12b98.entry.js +0 -1
- package/dist/webcomponents/p-3d3a65ca.entry.js +0 -1
- package/dist/webcomponents/p-3f291e6b.entry.js +0 -1
- package/dist/webcomponents/p-44011a41.entry.js +0 -1
- package/dist/webcomponents/p-4ccd753b.entry.js +0 -1
- package/dist/webcomponents/p-4f102cfd.entry.js +0 -1
- package/dist/webcomponents/p-4f16a3ce.entry.js +0 -1
- package/dist/webcomponents/p-50a32503.entry.js +0 -1
- package/dist/webcomponents/p-57ed105e.entry.js +0 -1
- package/dist/webcomponents/p-5e3bc1dc.entry.js +0 -1
- package/dist/webcomponents/p-62cfe9b6.entry.js +0 -1
- package/dist/webcomponents/p-6a075da4.entry.js +0 -1
- package/dist/webcomponents/p-8c16e4aa.entry.js +0 -1
- package/dist/webcomponents/p-8ee61443.entry.js +0 -1
- package/dist/webcomponents/p-8efea1e4.entry.js +0 -1
- package/dist/webcomponents/p-914b590d.entry.js +0 -1
- package/dist/webcomponents/p-A2FbmAEt.js +0 -1
- package/dist/webcomponents/p-BrazW3nF.js +0 -1
- package/dist/webcomponents/p-CIOILVyM.js +0 -1
- package/dist/webcomponents/p-CzedYX3W.js +0 -1
- package/dist/webcomponents/p-DkoufM1t.js +0 -1
- package/dist/webcomponents/p-Yp5v6wmS.js +0 -1
- package/dist/webcomponents/p-a020c889.entry.js +0 -1
- package/dist/webcomponents/p-a6e816f6.entry.js +0 -1
- package/dist/webcomponents/p-aa42e3c1.entry.js +0 -1
- package/dist/webcomponents/p-ad0f8d85.entry.js +0 -1
- package/dist/webcomponents/p-ad9307c1.entry.js +0 -1
- package/dist/webcomponents/p-b8c47cb1.entry.js +0 -1
- package/dist/webcomponents/p-c11e6c03.entry.js +0 -1
- package/dist/webcomponents/p-c41191e7.entry.js +0 -1
- package/dist/webcomponents/p-c5af7149.entry.js +0 -1
- package/dist/webcomponents/p-c621e7af.entry.js +0 -1
- package/dist/webcomponents/p-c7df4370.entry.js +0 -1
- package/dist/webcomponents/p-cf9d8e1a.entry.js +0 -1
- package/dist/webcomponents/p-d3663663.entry.js +0 -1
- package/dist/webcomponents/p-daedfe82.entry.js +0 -1
- package/dist/webcomponents/p-dd11e67b.entry.js +0 -1
- package/dist/webcomponents/p-e3ab5fe2.entry.js +0 -1
- package/dist/webcomponents/p-e95e27af.entry.js +0 -1
- package/dist/webcomponents/p-f4cb581f.entry.js +0 -1
- package/dist/webcomponents/p-f66778b8.entry.js +0 -1
- package/dist/webcomponents/p-ff212635.entry.js +0 -1
|
@@ -1,1006 +0,0 @@
|
|
|
1
|
-
import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
|
|
2
|
-
import { A as Api } from './Api.js';
|
|
3
|
-
import { G as GooglePayConfig, a as GooglePayHelpers, b as GooglePayPaymentDataRequest, c as GooglePayButtonSizeMode, d as GooglePayButtonStyle, e as GooglePayButtonType, f as GooglePayEnvironment } from './GooglePay.js';
|
|
4
|
-
import { S as StyledHost } from './styled-host.js';
|
|
5
|
-
import './details.js';
|
|
6
|
-
import './event-types.js';
|
|
7
|
-
import './justifi-radio-list-item2.js';
|
|
8
|
-
import { S as Skeleton } from './skeleton.js';
|
|
9
|
-
import { c as checkoutStore, b as onChange } from './checkout.store.js';
|
|
10
|
-
import { P as PAYMENT_METHODS } from './ModularCheckout.js';
|
|
11
|
-
|
|
12
|
-
const PROCESS_TOKEN_ENDPOINT = 'google_pay/process_token';
|
|
13
|
-
class GooglePayService {
|
|
14
|
-
constructor() {
|
|
15
|
-
this.api = Api();
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Initialize Google Pay configuration
|
|
19
|
-
*/
|
|
20
|
-
initialize(googlePayConfig) {
|
|
21
|
-
console.log('[GooglePayService] initialize: Starting initialization', {
|
|
22
|
-
config: googlePayConfig,
|
|
23
|
-
});
|
|
24
|
-
this.googlePayConfig = new GooglePayConfig(googlePayConfig);
|
|
25
|
-
console.log('[GooglePayService] initialize: Config object created', {
|
|
26
|
-
isValid: this.googlePayConfig.isValid,
|
|
27
|
-
environment: this.googlePayConfig.environment,
|
|
28
|
-
merchantId: this.googlePayConfig.merchantId,
|
|
29
|
-
});
|
|
30
|
-
if (!this.googlePayConfig.isValid) {
|
|
31
|
-
console.error('[GooglePayService] initialize: Invalid configuration');
|
|
32
|
-
throw new Error('Invalid Google Pay configuration provided');
|
|
33
|
-
}
|
|
34
|
-
// Create Google Pay client
|
|
35
|
-
console.log('[GooglePayService] initialize: Creating Google Pay client', {
|
|
36
|
-
environment: this.googlePayConfig.environment,
|
|
37
|
-
});
|
|
38
|
-
this.googlePayClient = GooglePayHelpers.createGooglePayClient(this.googlePayConfig.environment);
|
|
39
|
-
if (!this.googlePayClient) {
|
|
40
|
-
console.error('[GooglePayService] initialize: Failed to create client');
|
|
41
|
-
throw new Error('Failed to create Google Pay client');
|
|
42
|
-
}
|
|
43
|
-
console.log('[GooglePayService] initialize: Client created successfully', {
|
|
44
|
-
hasClient: !!this.googlePayClient,
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Process Google Pay payment via API
|
|
49
|
-
*/
|
|
50
|
-
async processPayment(authToken, accountId, payload) {
|
|
51
|
-
var _a;
|
|
52
|
-
const endpoint = PROCESS_TOKEN_ENDPOINT;
|
|
53
|
-
console.log('[GooglePayService] processPayment: Starting', {
|
|
54
|
-
endpoint,
|
|
55
|
-
hasAuthToken: !!authToken,
|
|
56
|
-
accountId,
|
|
57
|
-
payload,
|
|
58
|
-
});
|
|
59
|
-
try {
|
|
60
|
-
const result = await this.api.post({
|
|
61
|
-
endpoint,
|
|
62
|
-
authToken,
|
|
63
|
-
body: payload,
|
|
64
|
-
headers: {
|
|
65
|
-
'sub-account': accountId,
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
console.log('[GooglePayService] processPayment: API response received', {
|
|
69
|
-
hasId: !!result.id,
|
|
70
|
-
hasToken: !!((_a = result.data) === null || _a === void 0 ? void 0 : _a.token),
|
|
71
|
-
result,
|
|
72
|
-
});
|
|
73
|
-
const success = result.id && !!result.data.token;
|
|
74
|
-
console.log('[GooglePayService] processPayment: Result', { success });
|
|
75
|
-
return {
|
|
76
|
-
success,
|
|
77
|
-
data: result,
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
catch (error) {
|
|
81
|
-
console.error('[GooglePayService] processPayment: API error', error);
|
|
82
|
-
throw new Error('Google Pay payment processing failed');
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Check if Google Pay is available on this device/browser
|
|
87
|
-
*/
|
|
88
|
-
isAvailable() {
|
|
89
|
-
const isSupported = GooglePayHelpers.isGooglePaySupported();
|
|
90
|
-
const hasClient = !!this.googlePayClient;
|
|
91
|
-
const result = isSupported && hasClient;
|
|
92
|
-
console.log('[GooglePayService] isAvailable:', {
|
|
93
|
-
isSupported,
|
|
94
|
-
hasClient,
|
|
95
|
-
result,
|
|
96
|
-
});
|
|
97
|
-
return result;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Check if the user can make payments with Google Pay
|
|
101
|
-
*/
|
|
102
|
-
async canMakePayments() {
|
|
103
|
-
console.log('[GooglePayService] canMakePayments: Checking', {
|
|
104
|
-
hasClient: !!this.googlePayClient,
|
|
105
|
-
hasConfig: !!this.googlePayConfig,
|
|
106
|
-
});
|
|
107
|
-
if (!this.googlePayClient || !this.googlePayConfig) {
|
|
108
|
-
console.warn('[GooglePayService] canMakePayments: Missing client or config');
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
111
|
-
try {
|
|
112
|
-
const baseRequest = GooglePayHelpers.createBasePaymentDataRequest();
|
|
113
|
-
console.log('[GooglePayService] canMakePayments: Calling isReadyToPay', {
|
|
114
|
-
baseRequest,
|
|
115
|
-
});
|
|
116
|
-
const response = await this.googlePayClient.isReadyToPay(baseRequest);
|
|
117
|
-
console.log('[GooglePayService] canMakePayments: Response received', {
|
|
118
|
-
result: response.result,
|
|
119
|
-
response,
|
|
120
|
-
});
|
|
121
|
-
return response.result;
|
|
122
|
-
}
|
|
123
|
-
catch (error) {
|
|
124
|
-
console.error('[GooglePayService] canMakePayments: Error', error);
|
|
125
|
-
return false;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Start Google Pay payment session
|
|
130
|
-
*/
|
|
131
|
-
async startPaymentSession(paymentDataRequest, authToken, accountId) {
|
|
132
|
-
var _a;
|
|
133
|
-
console.log('[GooglePayService] startPaymentSession: Starting', {
|
|
134
|
-
hasConfig: !!this.googlePayConfig,
|
|
135
|
-
hasClient: !!this.googlePayClient,
|
|
136
|
-
hasAuthToken: !!authToken,
|
|
137
|
-
accountId,
|
|
138
|
-
paymentDataRequest,
|
|
139
|
-
});
|
|
140
|
-
if (!this.googlePayConfig || !this.googlePayClient) {
|
|
141
|
-
console.error('[GooglePayService] startPaymentSession: Not initialized');
|
|
142
|
-
throw new Error('Google Pay not initialized. Call initialize() first.');
|
|
143
|
-
}
|
|
144
|
-
if (!this.isAvailable()) {
|
|
145
|
-
console.error('[GooglePayService] startPaymentSession: Not available');
|
|
146
|
-
throw new Error('Google Pay is not available on this device/browser');
|
|
147
|
-
}
|
|
148
|
-
const request = new GooglePayPaymentDataRequest(paymentDataRequest);
|
|
149
|
-
console.log('[GooglePayService] startPaymentSession: Request object created', {
|
|
150
|
-
isValid: request.isValid,
|
|
151
|
-
request,
|
|
152
|
-
});
|
|
153
|
-
if (!request.isValid) {
|
|
154
|
-
console.error('[GooglePayService] startPaymentSession: Invalid request');
|
|
155
|
-
throw new Error('Invalid payment data request provided');
|
|
156
|
-
}
|
|
157
|
-
try {
|
|
158
|
-
console.log('[GooglePayService] startPaymentSession: Loading payment data...');
|
|
159
|
-
const paymentData = await this.googlePayClient.loadPaymentData(request);
|
|
160
|
-
console.log('[GooglePayService] startPaymentSession: Payment data loaded', {
|
|
161
|
-
hasPaymentData: !!paymentData,
|
|
162
|
-
paymentMethodData: paymentData === null || paymentData === void 0 ? void 0 : paymentData.paymentMethodData,
|
|
163
|
-
});
|
|
164
|
-
// Build top-level snake_case fields from Google Pay tokenizationData
|
|
165
|
-
const tokenizationData = (_a = paymentData === null || paymentData === void 0 ? void 0 : paymentData.paymentMethodData) === null || _a === void 0 ? void 0 : _a.tokenizationData;
|
|
166
|
-
console.log('[GooglePayService] startPaymentSession: Extracted tokenization data', {
|
|
167
|
-
hasTokenizationData: !!tokenizationData,
|
|
168
|
-
tokenizationData,
|
|
169
|
-
});
|
|
170
|
-
const tokenObj = (() => {
|
|
171
|
-
if ((tokenizationData === null || tokenizationData === void 0 ? void 0 : tokenizationData.token) &&
|
|
172
|
-
typeof tokenizationData.token === 'string') {
|
|
173
|
-
try {
|
|
174
|
-
const parsed = JSON.parse(tokenizationData.token);
|
|
175
|
-
console.log('[GooglePayService] startPaymentSession: Parsed token', parsed);
|
|
176
|
-
return parsed;
|
|
177
|
-
}
|
|
178
|
-
catch (_e) {
|
|
179
|
-
console.warn('[GooglePayService] startPaymentSession: Failed to parse token, using raw', _e);
|
|
180
|
-
return tokenizationData;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
return tokenizationData;
|
|
184
|
-
})();
|
|
185
|
-
const tokenProcessRequest = {
|
|
186
|
-
protocolVersion: tokenObj === null || tokenObj === void 0 ? void 0 : tokenObj.protocolVersion,
|
|
187
|
-
signature: tokenObj === null || tokenObj === void 0 ? void 0 : tokenObj.signature,
|
|
188
|
-
intermediateSigningKey: (tokenObj === null || tokenObj === void 0 ? void 0 : tokenObj.intermediateSigningKey)
|
|
189
|
-
? {
|
|
190
|
-
signedKey: tokenObj.intermediateSigningKey.signedKey,
|
|
191
|
-
signatures: tokenObj.intermediateSigningKey.signatures,
|
|
192
|
-
}
|
|
193
|
-
: undefined,
|
|
194
|
-
signedMessage: tokenObj === null || tokenObj === void 0 ? void 0 : tokenObj.signedMessage,
|
|
195
|
-
};
|
|
196
|
-
console.log('[GooglePayService] startPaymentSession: Token process request created', {
|
|
197
|
-
hasProtocolVersion: !!tokenProcessRequest.protocolVersion,
|
|
198
|
-
hasSignature: !!tokenProcessRequest.signature,
|
|
199
|
-
hasSignedMessage: !!tokenProcessRequest.signedMessage,
|
|
200
|
-
hasIntermediateSigningKey: !!tokenProcessRequest.intermediateSigningKey,
|
|
201
|
-
});
|
|
202
|
-
console.log('[GooglePayService] startPaymentSession: Processing payment...');
|
|
203
|
-
const paymentResult = await this.processPayment(authToken, accountId, tokenProcessRequest);
|
|
204
|
-
console.log('[GooglePayService] startPaymentSession: Payment processed', paymentResult);
|
|
205
|
-
if (paymentResult.success) {
|
|
206
|
-
console.log('[GooglePayService] startPaymentSession: Payment successful', {
|
|
207
|
-
paymentMethodId: paymentResult.data.id,
|
|
208
|
-
});
|
|
209
|
-
return {
|
|
210
|
-
success: true,
|
|
211
|
-
paymentData: paymentData,
|
|
212
|
-
paymentMethodId: paymentResult.data.id,
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
else {
|
|
216
|
-
console.error('[GooglePayService] startPaymentSession: Payment processing failed');
|
|
217
|
-
return {
|
|
218
|
-
success: false,
|
|
219
|
-
error: {
|
|
220
|
-
code: 'PAYMENT_PROCESSING_ERROR',
|
|
221
|
-
message: 'Payment processing failed',
|
|
222
|
-
},
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
catch (error) {
|
|
227
|
-
console.error('[GooglePayService] startPaymentSession: Exception caught', error);
|
|
228
|
-
// Handle different types of errors
|
|
229
|
-
if (error && typeof error === 'object' && 'statusCode' in error) {
|
|
230
|
-
const googlePayError = error;
|
|
231
|
-
console.log('[GooglePayService] startPaymentSession: Google Pay error', {
|
|
232
|
-
statusCode: googlePayError.statusCode,
|
|
233
|
-
statusMessage: googlePayError.statusMessage,
|
|
234
|
-
});
|
|
235
|
-
switch (googlePayError.statusCode) {
|
|
236
|
-
case 'CANCELED':
|
|
237
|
-
console.log('[GooglePayService] startPaymentSession: User cancelled');
|
|
238
|
-
return {
|
|
239
|
-
success: false,
|
|
240
|
-
error: {
|
|
241
|
-
code: 'USER_CANCELLED',
|
|
242
|
-
message: 'User cancelled the Google Pay session',
|
|
243
|
-
},
|
|
244
|
-
};
|
|
245
|
-
case 'DEVELOPER_ERROR':
|
|
246
|
-
console.error('[GooglePayService] startPaymentSession: Developer error');
|
|
247
|
-
return {
|
|
248
|
-
success: false,
|
|
249
|
-
error: {
|
|
250
|
-
code: 'DEVELOPER_ERROR',
|
|
251
|
-
message: 'Google Pay configuration error',
|
|
252
|
-
},
|
|
253
|
-
};
|
|
254
|
-
default:
|
|
255
|
-
console.error('[GooglePayService] startPaymentSession: Unknown error', {
|
|
256
|
-
statusCode: googlePayError.statusCode,
|
|
257
|
-
});
|
|
258
|
-
return {
|
|
259
|
-
success: false,
|
|
260
|
-
error: {
|
|
261
|
-
code: 'PAYMENT_ERROR',
|
|
262
|
-
message: googlePayError.statusMessage || 'Google Pay payment failed',
|
|
263
|
-
},
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
console.error('[GooglePayService] startPaymentSession: Generic error', error);
|
|
268
|
-
return {
|
|
269
|
-
success: false,
|
|
270
|
-
error: {
|
|
271
|
-
code: 'PAYMENT_ERROR',
|
|
272
|
-
message: error instanceof Error
|
|
273
|
-
? error.message
|
|
274
|
-
: 'Google Pay payment failed',
|
|
275
|
-
},
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* Create Google Pay button element
|
|
281
|
-
*/
|
|
282
|
-
createButton(options) {
|
|
283
|
-
if (!this.googlePayClient || !this.googlePayConfig) {
|
|
284
|
-
return null;
|
|
285
|
-
}
|
|
286
|
-
try {
|
|
287
|
-
return this.googlePayClient.createButton({
|
|
288
|
-
onClick: options.onClick,
|
|
289
|
-
buttonType: options.buttonType,
|
|
290
|
-
buttonSizeMode: options.buttonSizeMode,
|
|
291
|
-
buttonColor: options.buttonColor,
|
|
292
|
-
buttonLocale: options.buttonLocale,
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
catch (_error) {
|
|
296
|
-
return null;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* Prefetch payment data for faster loading
|
|
301
|
-
*/
|
|
302
|
-
prefetchPaymentData(paymentDataRequest) {
|
|
303
|
-
console.log('[GooglePayService] prefetchPaymentData: Starting', {
|
|
304
|
-
hasClient: !!this.googlePayClient,
|
|
305
|
-
paymentDataRequest,
|
|
306
|
-
});
|
|
307
|
-
if (!this.googlePayClient) {
|
|
308
|
-
console.warn('[GooglePayService] prefetchPaymentData: No client available');
|
|
309
|
-
return;
|
|
310
|
-
}
|
|
311
|
-
const request = new GooglePayPaymentDataRequest(paymentDataRequest);
|
|
312
|
-
console.log('[GooglePayService] prefetchPaymentData: Request created', {
|
|
313
|
-
isValid: request.isValid,
|
|
314
|
-
});
|
|
315
|
-
if (!request.isValid) {
|
|
316
|
-
console.warn('[GooglePayService] prefetchPaymentData: Invalid request');
|
|
317
|
-
return;
|
|
318
|
-
}
|
|
319
|
-
try {
|
|
320
|
-
console.log('[GooglePayService] prefetchPaymentData: Calling prefetchPaymentData');
|
|
321
|
-
this.googlePayClient.prefetchPaymentData(request);
|
|
322
|
-
console.log('[GooglePayService] prefetchPaymentData: Prefetch complete');
|
|
323
|
-
}
|
|
324
|
-
catch (error) {
|
|
325
|
-
console.error('[GooglePayService] prefetchPaymentData: Error', error);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
/**
|
|
329
|
-
* Create a basic payment data request
|
|
330
|
-
*/
|
|
331
|
-
static createPaymentDataRequest(amount, label, countryCode = 'US', currencyCode = 'USD', merchantName, merchantId) {
|
|
332
|
-
var _a;
|
|
333
|
-
console.log('[GooglePayService] createPaymentDataRequest: Creating request', {
|
|
334
|
-
amount,
|
|
335
|
-
label,
|
|
336
|
-
countryCode,
|
|
337
|
-
currencyCode,
|
|
338
|
-
merchantName,
|
|
339
|
-
});
|
|
340
|
-
const request = {
|
|
341
|
-
apiVersion: 2,
|
|
342
|
-
apiVersionMinor: 0,
|
|
343
|
-
allowedPaymentMethods: [GooglePayHelpers.createPaymentMethodData()],
|
|
344
|
-
transactionInfo: {
|
|
345
|
-
countryCode,
|
|
346
|
-
currencyCode,
|
|
347
|
-
totalPriceStatus: 'FINAL',
|
|
348
|
-
totalPrice: GooglePayHelpers.formatAmount(amount),
|
|
349
|
-
totalPriceLabel: label,
|
|
350
|
-
},
|
|
351
|
-
merchantInfo: {
|
|
352
|
-
merchantId,
|
|
353
|
-
merchantName,
|
|
354
|
-
},
|
|
355
|
-
};
|
|
356
|
-
console.log('[GooglePayService] createPaymentDataRequest: Request created', {
|
|
357
|
-
apiVersion: request.apiVersion,
|
|
358
|
-
apiVersionMinor: request.apiVersionMinor,
|
|
359
|
-
transactionInfo: request.transactionInfo,
|
|
360
|
-
merchantInfo: request.merchantInfo,
|
|
361
|
-
allowedPaymentMethodsCount: (_a = request.allowedPaymentMethods) === null || _a === void 0 ? void 0 : _a.length,
|
|
362
|
-
});
|
|
363
|
-
return request;
|
|
364
|
-
}
|
|
365
|
-
/**
|
|
366
|
-
* Get current configuration
|
|
367
|
-
*/
|
|
368
|
-
getGooglePayConfig() {
|
|
369
|
-
return this.googlePayConfig;
|
|
370
|
-
}
|
|
371
|
-
/**
|
|
372
|
-
* Get current Google Pay client
|
|
373
|
-
*/
|
|
374
|
-
getGooglePayClient() {
|
|
375
|
-
return this.googlePayClient;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
const GooglePaySkeleton = (props) => {
|
|
380
|
-
const { isLoading } = props;
|
|
381
|
-
if (!isLoading) {
|
|
382
|
-
return null;
|
|
383
|
-
}
|
|
384
|
-
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" } })))));
|
|
385
|
-
};
|
|
386
|
-
|
|
387
|
-
const ProcessingSpinner = () => (h("div", { class: 'processing-overlay' }, h("div", { class: 'spinner' }), h("span", null, "Processing...")));
|
|
388
|
-
const GooglePayButton = (props) => {
|
|
389
|
-
const getGooglePayButtonClass = () => {
|
|
390
|
-
let classes = "google-pay-button";
|
|
391
|
-
// Button style
|
|
392
|
-
switch (props.buttonStyle) {
|
|
393
|
-
case GooglePayButtonStyle.WHITE:
|
|
394
|
-
classes += " google-pay-button-white";
|
|
395
|
-
break;
|
|
396
|
-
case GooglePayButtonStyle.BLACK:
|
|
397
|
-
default:
|
|
398
|
-
classes += " google-pay-button-black";
|
|
399
|
-
break;
|
|
400
|
-
}
|
|
401
|
-
// Button type
|
|
402
|
-
switch (props.buttonType) {
|
|
403
|
-
case GooglePayButtonType.BUY:
|
|
404
|
-
classes += " google-pay-button-type-buy";
|
|
405
|
-
break;
|
|
406
|
-
case GooglePayButtonType.BOOK:
|
|
407
|
-
classes += " google-pay-button-type-book";
|
|
408
|
-
break;
|
|
409
|
-
case GooglePayButtonType.CHECKOUT:
|
|
410
|
-
classes += " google-pay-button-type-checkout";
|
|
411
|
-
break;
|
|
412
|
-
case GooglePayButtonType.DONATE:
|
|
413
|
-
classes += " google-pay-button-type-donate";
|
|
414
|
-
break;
|
|
415
|
-
case GooglePayButtonType.ORDER:
|
|
416
|
-
classes += " google-pay-button-type-order";
|
|
417
|
-
break;
|
|
418
|
-
case GooglePayButtonType.PAY:
|
|
419
|
-
classes += " google-pay-button-type-pay";
|
|
420
|
-
break;
|
|
421
|
-
case GooglePayButtonType.SUBSCRIBE:
|
|
422
|
-
classes += " google-pay-button-type-subscribe";
|
|
423
|
-
break;
|
|
424
|
-
case GooglePayButtonType.PLAIN:
|
|
425
|
-
default:
|
|
426
|
-
classes += " google-pay-button-type-plain";
|
|
427
|
-
break;
|
|
428
|
-
}
|
|
429
|
-
// Size mode
|
|
430
|
-
switch (props.buttonSizeMode) {
|
|
431
|
-
case GooglePayButtonSizeMode.FILL:
|
|
432
|
-
classes += " google-pay-button-fill";
|
|
433
|
-
break;
|
|
434
|
-
case GooglePayButtonSizeMode.STATIC:
|
|
435
|
-
default:
|
|
436
|
-
classes += " google-pay-button-static";
|
|
437
|
-
break;
|
|
438
|
-
}
|
|
439
|
-
if (props.disabled || props.isProcessing || !props.isAvailable) {
|
|
440
|
-
classes += " disabled";
|
|
441
|
-
}
|
|
442
|
-
return classes;
|
|
443
|
-
};
|
|
444
|
-
const getButtonStyles = () => {
|
|
445
|
-
const styles = {};
|
|
446
|
-
if (props.buttonSizeMode === GooglePayButtonSizeMode.FILL) {
|
|
447
|
-
styles.width = '100%';
|
|
448
|
-
styles.minWidth = '200px';
|
|
449
|
-
}
|
|
450
|
-
else {
|
|
451
|
-
styles.width = props.width || '200px';
|
|
452
|
-
}
|
|
453
|
-
styles.height = props.height || '48px';
|
|
454
|
-
return styles;
|
|
455
|
-
};
|
|
456
|
-
const handleClick = () => {
|
|
457
|
-
if (!props.disabled &&
|
|
458
|
-
!props.isProcessing &&
|
|
459
|
-
props.isAvailable &&
|
|
460
|
-
props.clickHandler) {
|
|
461
|
-
props.clickHandler();
|
|
462
|
-
}
|
|
463
|
-
};
|
|
464
|
-
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": "Google Pay", type: "button" }, props), props.isProcessing && ProcessingSpinner(), h("div", { class: 'google-pay-button-content' }, h("svg", { width: "41", height: "17", xmlns: "http://www.w3.org/2000/svg" }, h("g", { fill: "none", "fill-rule": "evenodd" }, h("path", { d: "M19.526 2.635v4.083h2.518c.6 0 1.096-.202 1.488-.605.403-.402.605-.882.605-1.437 0-.544-.202-1.018-.605-1.422-.392-.413-.888-.62-1.488-.62h-2.518zm0 5.52v4.736h-1.504V1.198h3.99c1.013 0 1.873.337 2.582 1.012.72.675 1.08 1.497 1.08 2.466 0 .991-.36 1.819-1.08 2.482-.697.665-1.559.996-2.583.996h-2.485v.001zm7.668 2.287c0 .392.166.718.499.98.332.26.722.391 1.168.391.633 0 1.196-.234 1.692-.701.497-.469.744-1.019.744-1.65-.469-.37-1.123-.555-1.962-.555-.61 0-1.12.148-1.528.442-.409.294-.613.657-.613 1.093m1.946-5.815c1.112 0 1.989.297 2.633.89.642.594.964 1.408.964 2.442v4.932h-1.439v-1.11h-.065c-.622.914-1.45 1.372-2.486 1.372-.882 0-1.621-.262-2.215-.784-.594-.523-.891-1.176-.891-1.96 0-.828.313-1.486.94-1.976s1.463-.735 2.51-.735c.892 0 1.629.163 2.206.49v-.344c0-.522-.207-.966-.621-1.33a2.132 2.132 0 0 0-1.455-.547c-.84 0-1.504.353-1.995 1.062l-1.324-.834c.73-1.045 1.81-1.568 3.238-1.568m11.853.262l-5.02 11.53H34.42l1.864-4.034-3.302-7.496h1.635l2.387 5.749h.032l2.322-5.75z", fill: "#FFF" }), h("path", { d: "M13.448 7.134c0-.473-.04-.93-.116-1.366H6.988v2.588h3.634a3.11 3.11 0 0 1-1.344 2.042v1.68h2.169c1.27-1.17 2.001-2.9 2.001-4.944", fill: "#4285F4" }), h("path", { d: "M6.988 13.7c1.816 0 3.344-.595 4.459-1.621l-2.169-1.681c-.603.406-1.38.643-2.29.643-1.754 0-3.244-1.182-3.776-2.774H.978v1.731a6.728 6.728 0 0 0 6.01 3.703", fill: "#34A853" }), h("path", { d: "M3.212 8.267a4.034 4.034 0 0 1 0-2.572V3.964H.978A6.678 6.678 0 0 0 .261 6.98c0 1.085.26 2.11.717 3.017l2.234-1.731z", fill: "#FABB05" }), h("path", { d: "M6.988 2.921c.992 0 1.88.34 2.58 1.008v.001l1.92-1.918C10.324.928 8.804.262 6.989.262a6.728 6.728 0 0 0-6.01 3.702l2.234 1.731c.532-1.592 2.022-2.774 3.776-2.774", fill: "#E94235" }))))), h("style", null, `
|
|
465
|
-
.google-pay-button-container {
|
|
466
|
-
display: block;
|
|
467
|
-
position: relative;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
.google-pay-button {
|
|
471
|
-
display: flex;
|
|
472
|
-
align-items: center;
|
|
473
|
-
justify-content: center;
|
|
474
|
-
border: none;
|
|
475
|
-
border-radius: 4px;
|
|
476
|
-
cursor: pointer;
|
|
477
|
-
font-size: 14px;
|
|
478
|
-
font-weight: 500;
|
|
479
|
-
letter-spacing: 0.25px;
|
|
480
|
-
line-height: 16px;
|
|
481
|
-
outline: none;
|
|
482
|
-
padding: 0 20px;
|
|
483
|
-
position: relative;
|
|
484
|
-
min-width: 140px;
|
|
485
|
-
min-height: 48px;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
/* Button styles */
|
|
489
|
-
.google-pay-button.google-pay-button-black {
|
|
490
|
-
background-color: #000;
|
|
491
|
-
color: #fff;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
.google-pay-button.google-pay-button-white {
|
|
495
|
-
background-color: #fff;
|
|
496
|
-
color: #3c4043;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
/* Button content */
|
|
500
|
-
.google-pay-button-content {
|
|
501
|
-
display: flex;
|
|
502
|
-
align-items: center;
|
|
503
|
-
justify-content: center;
|
|
504
|
-
gap: 8px;
|
|
505
|
-
white-space: nowrap;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
.google-g-logo {
|
|
509
|
-
width: 20px;
|
|
510
|
-
height: 20px;
|
|
511
|
-
flex-shrink: 0;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
.pay-text {
|
|
515
|
-
font-family: 'Google Sans', arial, sans-serif;
|
|
516
|
-
font-size: 14px;
|
|
517
|
-
font-weight: 500;
|
|
518
|
-
margin-left: 8px;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
/* Button types - text content handled by ::before pseudo-element */
|
|
522
|
-
.google-pay-button-type-buy .google-pay-button-content::before {
|
|
523
|
-
content: 'Buy with';
|
|
524
|
-
margin-right: 8px;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
.google-pay-button-type-book .google-pay-button-content::before {
|
|
528
|
-
content: 'Book with';
|
|
529
|
-
margin-right: 8px;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
.google-pay-button-type-checkout .google-pay-button-content::before {
|
|
533
|
-
content: 'Checkout with';
|
|
534
|
-
margin-right: 8px;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
.google-pay-button-type-donate .google-pay-button-content::before {
|
|
538
|
-
content: 'Donate with';
|
|
539
|
-
margin-right: 8px;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
.google-pay-button-type-order .google-pay-button-content::before {
|
|
543
|
-
content: 'Order with';
|
|
544
|
-
margin-right: 8px;
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
.google-pay-button-type-pay .google-pay-button-content::before {
|
|
548
|
-
content: 'Pay with';
|
|
549
|
-
margin-right: 8px;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
.google-pay-button-type-subscribe .google-pay-button-content::before {
|
|
553
|
-
content: 'Subscribe with';
|
|
554
|
-
margin-right: 8px;
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
/* Size modes */
|
|
558
|
-
.google-pay-button.google-pay-button-fill {
|
|
559
|
-
width: 100%;
|
|
560
|
-
min-width: 200px;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
.google-pay-button.google-pay-button-static {
|
|
564
|
-
width: auto;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
/* Hover and focus states */
|
|
568
|
-
.google-pay-button:hover:not(.disabled) {
|
|
569
|
-
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
.google-pay-button:focus:not(.disabled) {
|
|
573
|
-
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
.google-pay-button:active:not(.disabled) {
|
|
577
|
-
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);
|
|
578
|
-
transform: translateY(1px);
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
/* Disabled state */
|
|
582
|
-
.google-pay-button.disabled {
|
|
583
|
-
opacity: 0.5;
|
|
584
|
-
cursor: not-allowed;
|
|
585
|
-
box-shadow: none;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
.google-pay-button.disabled:hover,
|
|
589
|
-
.google-pay-button.disabled:focus,
|
|
590
|
-
.google-pay-button.disabled:active {
|
|
591
|
-
box-shadow: none;
|
|
592
|
-
transform: none;
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
/* Processing overlay */
|
|
596
|
-
.processing-overlay {
|
|
597
|
-
position: absolute;
|
|
598
|
-
top: 0;
|
|
599
|
-
left: 0;
|
|
600
|
-
right: 0;
|
|
601
|
-
bottom: 0;
|
|
602
|
-
display: flex;
|
|
603
|
-
align-items: center;
|
|
604
|
-
justify-content: center;
|
|
605
|
-
gap: 8px;
|
|
606
|
-
background: rgba(0, 0, 0, 0.8);
|
|
607
|
-
color: white;
|
|
608
|
-
border-radius: 4px;
|
|
609
|
-
font-size: 14px;
|
|
610
|
-
font-weight: 500;
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
.spinner {
|
|
614
|
-
width: 16px;
|
|
615
|
-
height: 16px;
|
|
616
|
-
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
617
|
-
border-top: 2px solid #fff;
|
|
618
|
-
border-radius: 50%;
|
|
619
|
-
animation: spin 1s linear infinite;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
@keyframes spin {
|
|
623
|
-
0% { transform: rotate(0deg); }
|
|
624
|
-
100% { transform: rotate(360deg); }
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
/* Responsive design */
|
|
628
|
-
@media (max-width: 480px) {
|
|
629
|
-
.google-pay-button {
|
|
630
|
-
width: 100% !important;
|
|
631
|
-
min-width: 200px;
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
`)));
|
|
635
|
-
};
|
|
636
|
-
|
|
637
|
-
const GooglePay = /*@__PURE__*/ proxyCustomElement(class GooglePay extends HTMLElement {
|
|
638
|
-
constructor(registerHost) {
|
|
639
|
-
super();
|
|
640
|
-
if (registerHost !== false) {
|
|
641
|
-
this.__registerHost();
|
|
642
|
-
}
|
|
643
|
-
this.__attachShadow();
|
|
644
|
-
this.googlePayCancelled = createEvent(this, "googlePayCancelled", 7);
|
|
645
|
-
this.googlePayCompleted = createEvent(this, "googlePayCompleted", 7);
|
|
646
|
-
this.googlePayStarted = createEvent(this, "googlePayStarted", 7);
|
|
647
|
-
this.unsubscribes = [];
|
|
648
|
-
this.canMakePayments = false;
|
|
649
|
-
this.error = null;
|
|
650
|
-
this.isAvailable = false;
|
|
651
|
-
this.isLoading = true;
|
|
652
|
-
this.isProcessing = false;
|
|
653
|
-
this.buttonSizeMode = GooglePayButtonSizeMode.FILL;
|
|
654
|
-
this.buttonStyle = GooglePayButtonStyle.BLACK;
|
|
655
|
-
this.buttonType = GooglePayButtonType.PLAIN;
|
|
656
|
-
this.countryCode = "US";
|
|
657
|
-
this.disabled = false;
|
|
658
|
-
this.environment = GooglePayEnvironment.PRODUCTION;
|
|
659
|
-
this.merchantId = "gateway:justifi";
|
|
660
|
-
this.merchantName = "justifi";
|
|
661
|
-
this.showSkeleton = true;
|
|
662
|
-
this.handleGooglePayClick = async () => {
|
|
663
|
-
var _a;
|
|
664
|
-
console.log('[GooglePay] handleGooglePayClick: Button clicked', {
|
|
665
|
-
isProcessing: this.isProcessing,
|
|
666
|
-
disabled: this.disabled,
|
|
667
|
-
isAvailable: this.isAvailable,
|
|
668
|
-
canMakePayments: this.canMakePayments,
|
|
669
|
-
});
|
|
670
|
-
if (this.isProcessing ||
|
|
671
|
-
this.disabled ||
|
|
672
|
-
!this.isAvailable ||
|
|
673
|
-
!this.canMakePayments) {
|
|
674
|
-
console.warn('[GooglePay] handleGooglePayClick: Payment blocked', {
|
|
675
|
-
reason: this.isProcessing ? 'isProcessing' :
|
|
676
|
-
this.disabled ? 'disabled' :
|
|
677
|
-
!this.isAvailable ? 'notAvailable' :
|
|
678
|
-
!this.canMakePayments ? 'cannotMakePayments' : 'unknown',
|
|
679
|
-
});
|
|
680
|
-
return;
|
|
681
|
-
}
|
|
682
|
-
try {
|
|
683
|
-
console.log('[GooglePay] handleGooglePayClick: Starting payment session');
|
|
684
|
-
this.isProcessing = true;
|
|
685
|
-
this.error = null;
|
|
686
|
-
this.googlePayStarted.emit();
|
|
687
|
-
console.log('[GooglePay] handleGooglePayClick: googlePayStarted event emitted');
|
|
688
|
-
const paymentDataRequest = this.createPaymentDataRequest();
|
|
689
|
-
console.log('[GooglePay] handleGooglePayClick: Starting payment session with service', {
|
|
690
|
-
hasAuthToken: !!checkoutStore.authToken,
|
|
691
|
-
accountId: checkoutStore.accountId,
|
|
692
|
-
});
|
|
693
|
-
const result = await this.googlePayService.startPaymentSession(paymentDataRequest, checkoutStore.authToken, checkoutStore.accountId);
|
|
694
|
-
console.log('[GooglePay] handleGooglePayClick: Payment session result', result);
|
|
695
|
-
if (result.success) {
|
|
696
|
-
console.log('[GooglePay] handleGooglePayClick: Payment successful', {
|
|
697
|
-
paymentMethodId: result.paymentMethodId,
|
|
698
|
-
hasPaymentData: !!result.paymentData,
|
|
699
|
-
});
|
|
700
|
-
this.googlePayCompleted.emit({
|
|
701
|
-
success: true,
|
|
702
|
-
paymentData: result.paymentData,
|
|
703
|
-
paymentMethodId: result.paymentMethodId,
|
|
704
|
-
});
|
|
705
|
-
}
|
|
706
|
-
else {
|
|
707
|
-
console.error('[GooglePay] handleGooglePayClick: Payment failed', {
|
|
708
|
-
error: result.error,
|
|
709
|
-
});
|
|
710
|
-
this.googlePayCompleted.emit({
|
|
711
|
-
success: false,
|
|
712
|
-
error: result.error,
|
|
713
|
-
});
|
|
714
|
-
if (((_a = result.error) === null || _a === void 0 ? void 0 : _a.code) === "USER_CANCELLED") {
|
|
715
|
-
console.log('[GooglePay] handleGooglePayClick: User cancelled payment');
|
|
716
|
-
this.googlePayCancelled.emit();
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
catch (error) {
|
|
721
|
-
console.error('[GooglePay] handleGooglePayClick: Exception during payment', error);
|
|
722
|
-
const errorMessage = error instanceof Error ? error.message : "Payment failed";
|
|
723
|
-
this.error = errorMessage;
|
|
724
|
-
this.googlePayCompleted.emit({
|
|
725
|
-
success: false,
|
|
726
|
-
error: errorMessage,
|
|
727
|
-
});
|
|
728
|
-
}
|
|
729
|
-
finally {
|
|
730
|
-
this.isProcessing = false;
|
|
731
|
-
console.log('[GooglePay] handleGooglePayClick: Payment flow complete', {
|
|
732
|
-
isProcessing: this.isProcessing,
|
|
733
|
-
error: this.error,
|
|
734
|
-
});
|
|
735
|
-
}
|
|
736
|
-
};
|
|
737
|
-
}
|
|
738
|
-
watchConfigChange() {
|
|
739
|
-
console.log('[GooglePay] watchConfigChange: Configuration changed', {
|
|
740
|
-
merchantId: this.merchantId,
|
|
741
|
-
environment: this.environment,
|
|
742
|
-
});
|
|
743
|
-
this.initializeGooglePay();
|
|
744
|
-
}
|
|
745
|
-
componentWillLoad() {
|
|
746
|
-
console.log('[GooglePay] componentWillLoad: Initializing GooglePayService');
|
|
747
|
-
this.googlePayService = new GooglePayService();
|
|
748
|
-
console.log('[GooglePay] componentWillLoad: GooglePayService created', {
|
|
749
|
-
service: this.googlePayService,
|
|
750
|
-
});
|
|
751
|
-
}
|
|
752
|
-
componentDidLoad() {
|
|
753
|
-
console.log('[GooglePay] componentDidLoad: Setting up store subscriptions', {
|
|
754
|
-
checkoutLoaded: checkoutStore.checkoutLoaded,
|
|
755
|
-
paymentAmount: checkoutStore.paymentAmount,
|
|
756
|
-
paymentCurrency: checkoutStore.paymentCurrency,
|
|
757
|
-
paymentDescription: checkoutStore.paymentDescription,
|
|
758
|
-
});
|
|
759
|
-
const unsub = onChange("paymentAmount", () => {
|
|
760
|
-
console.log('[GooglePay] paymentAmount changed:', checkoutStore.paymentAmount);
|
|
761
|
-
this.prefetchPaymentData();
|
|
762
|
-
});
|
|
763
|
-
if (typeof unsub === 'function')
|
|
764
|
-
this.unsubscribes.push(unsub);
|
|
765
|
-
const unsubCurrency = onChange("paymentCurrency", () => {
|
|
766
|
-
console.log('[GooglePay] paymentCurrency changed:', checkoutStore.paymentCurrency);
|
|
767
|
-
this.prefetchPaymentData();
|
|
768
|
-
});
|
|
769
|
-
if (typeof unsubCurrency === 'function')
|
|
770
|
-
this.unsubscribes.push(unsubCurrency);
|
|
771
|
-
const unsubDesc = onChange("paymentDescription", () => {
|
|
772
|
-
console.log('[GooglePay] paymentDescription changed:', checkoutStore.paymentDescription);
|
|
773
|
-
this.prefetchPaymentData();
|
|
774
|
-
});
|
|
775
|
-
if (typeof unsubDesc === 'function')
|
|
776
|
-
this.unsubscribes.push(unsubDesc);
|
|
777
|
-
}
|
|
778
|
-
disconnectedCallback() {
|
|
779
|
-
this.unsubscribes.forEach((fn) => {
|
|
780
|
-
try {
|
|
781
|
-
fn();
|
|
782
|
-
}
|
|
783
|
-
catch (_a) { }
|
|
784
|
-
});
|
|
785
|
-
this.unsubscribes = [];
|
|
786
|
-
}
|
|
787
|
-
/**
|
|
788
|
-
* Returns supported authentication methods when Google Pay is available.
|
|
789
|
-
*/
|
|
790
|
-
async getSupportedAuthMethods() {
|
|
791
|
-
if (!this.isAvailable) {
|
|
792
|
-
return [];
|
|
793
|
-
}
|
|
794
|
-
return GooglePayHelpers.getDefaultAuthMethods();
|
|
795
|
-
}
|
|
796
|
-
/**
|
|
797
|
-
* Returns supported card networks when Google Pay is available.
|
|
798
|
-
*/
|
|
799
|
-
async getSupportedNetworks() {
|
|
800
|
-
if (!this.isAvailable) {
|
|
801
|
-
return [];
|
|
802
|
-
}
|
|
803
|
-
return GooglePayHelpers.getDefaultSupportedNetworks();
|
|
804
|
-
}
|
|
805
|
-
/**
|
|
806
|
-
* Select Google Pay in the modular checkout parent.
|
|
807
|
-
*/
|
|
808
|
-
async handleSelectionClick() {
|
|
809
|
-
checkoutStore.selectedPaymentMethod = { type: PAYMENT_METHODS.GOOGLE_PAY };
|
|
810
|
-
}
|
|
811
|
-
/**
|
|
812
|
-
* Returns whether Google Pay is both available and can make payments.
|
|
813
|
-
*/
|
|
814
|
-
async isSupported() {
|
|
815
|
-
return this.isAvailable && this.canMakePayments;
|
|
816
|
-
}
|
|
817
|
-
/**
|
|
818
|
-
* Prefetch payment data for faster load times of the Google Pay sheet.
|
|
819
|
-
*/
|
|
820
|
-
async prefetchPaymentData() {
|
|
821
|
-
console.log('[GooglePay] prefetchPaymentData: Called', {
|
|
822
|
-
isAvailable: this.isAvailable,
|
|
823
|
-
canMakePayments: this.canMakePayments,
|
|
824
|
-
});
|
|
825
|
-
if (!this.isAvailable || !this.canMakePayments) {
|
|
826
|
-
console.warn('[GooglePay] prefetchPaymentData: Skipped - not available or cannot make payments');
|
|
827
|
-
return;
|
|
828
|
-
}
|
|
829
|
-
const paymentDataRequest = this.createPaymentDataRequest();
|
|
830
|
-
console.log('[GooglePay] prefetchPaymentData: Prefetching', { paymentDataRequest });
|
|
831
|
-
this.googlePayService.prefetchPaymentData(paymentDataRequest);
|
|
832
|
-
console.log('[GooglePay] prefetchPaymentData: Prefetch complete');
|
|
833
|
-
}
|
|
834
|
-
async initializeGooglePay() {
|
|
835
|
-
console.log('[GooglePay] initializeGooglePay: Starting initialization');
|
|
836
|
-
try {
|
|
837
|
-
this.isLoading = true;
|
|
838
|
-
this.error = null;
|
|
839
|
-
console.log('[GooglePay] initializeGooglePay: Checking payment amount', {
|
|
840
|
-
paymentAmount: checkoutStore.paymentAmount,
|
|
841
|
-
paymentCurrency: checkoutStore.paymentCurrency,
|
|
842
|
-
paymentDescription: checkoutStore.paymentDescription,
|
|
843
|
-
});
|
|
844
|
-
if (!checkoutStore.paymentAmount) {
|
|
845
|
-
console.error('[GooglePay] initializeGooglePay: Missing payment amount');
|
|
846
|
-
this.error = "Missing required Google Pay configuration";
|
|
847
|
-
this.isLoading = false;
|
|
848
|
-
return;
|
|
849
|
-
}
|
|
850
|
-
const googlePayConfig = {
|
|
851
|
-
environment: this.environment,
|
|
852
|
-
merchantId: this.merchantId,
|
|
853
|
-
merchantName: this.merchantName,
|
|
854
|
-
buttonType: this.buttonType,
|
|
855
|
-
buttonStyle: this.buttonStyle,
|
|
856
|
-
buttonSizeMode: this.buttonSizeMode,
|
|
857
|
-
};
|
|
858
|
-
console.log('[GooglePay] initializeGooglePay: Config created', googlePayConfig);
|
|
859
|
-
this.googlePayService.initialize(googlePayConfig);
|
|
860
|
-
console.log('[GooglePay] initializeGooglePay: Service initialized');
|
|
861
|
-
this.isAvailable = this.googlePayService.isAvailable();
|
|
862
|
-
console.log('[GooglePay] initializeGooglePay: Availability check', {
|
|
863
|
-
isAvailable: this.isAvailable,
|
|
864
|
-
});
|
|
865
|
-
if (!this.isAvailable) {
|
|
866
|
-
console.warn('[GooglePay] initializeGooglePay: Google Pay not available on device');
|
|
867
|
-
this.error = "Google Pay is not supported on this device";
|
|
868
|
-
this.isLoading = false;
|
|
869
|
-
return;
|
|
870
|
-
}
|
|
871
|
-
console.log('[GooglePay] initializeGooglePay: Checking canMakePayments...');
|
|
872
|
-
this.canMakePayments = await this.googlePayService.canMakePayments();
|
|
873
|
-
console.log('[GooglePay] initializeGooglePay: canMakePayments result', {
|
|
874
|
-
canMakePayments: this.canMakePayments,
|
|
875
|
-
});
|
|
876
|
-
if (!this.canMakePayments) {
|
|
877
|
-
console.warn('[GooglePay] initializeGooglePay: Cannot make payments');
|
|
878
|
-
this.error = "Google Pay is not available for payments";
|
|
879
|
-
this.isLoading = false;
|
|
880
|
-
return;
|
|
881
|
-
}
|
|
882
|
-
const paymentDataRequest = this.createPaymentDataRequest();
|
|
883
|
-
console.log('[GooglePay] initializeGooglePay: Prefetching payment data', {
|
|
884
|
-
paymentDataRequest,
|
|
885
|
-
});
|
|
886
|
-
this.googlePayService.prefetchPaymentData(paymentDataRequest);
|
|
887
|
-
console.log('[GooglePay] initializeGooglePay: Initialization complete');
|
|
888
|
-
}
|
|
889
|
-
catch (error) {
|
|
890
|
-
console.error('[GooglePay] initializeGooglePay: Error during initialization', error);
|
|
891
|
-
this.error =
|
|
892
|
-
error instanceof Error
|
|
893
|
-
? error.message
|
|
894
|
-
: "Failed to initialize Google Pay";
|
|
895
|
-
}
|
|
896
|
-
finally {
|
|
897
|
-
this.isLoading = false;
|
|
898
|
-
console.log('[GooglePay] initializeGooglePay: Final state', {
|
|
899
|
-
isLoading: this.isLoading,
|
|
900
|
-
isAvailable: this.isAvailable,
|
|
901
|
-
canMakePayments: this.canMakePayments,
|
|
902
|
-
error: this.error,
|
|
903
|
-
});
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
createPaymentDataRequest() {
|
|
907
|
-
const request = GooglePayService.createPaymentDataRequest(checkoutStore.paymentAmount, checkoutStore.paymentDescription, this.countryCode, checkoutStore.paymentCurrency, this.merchantName, this.merchantId);
|
|
908
|
-
console.log('[GooglePay] createPaymentDataRequest: Created request', {
|
|
909
|
-
amount: checkoutStore.paymentAmount,
|
|
910
|
-
currency: checkoutStore.paymentCurrency,
|
|
911
|
-
description: checkoutStore.paymentDescription,
|
|
912
|
-
countryCode: this.countryCode,
|
|
913
|
-
merchantName: this.merchantName,
|
|
914
|
-
request,
|
|
915
|
-
});
|
|
916
|
-
return request;
|
|
917
|
-
}
|
|
918
|
-
render() {
|
|
919
|
-
const showError = !this.isLoading && !!this.error;
|
|
920
|
-
const showDeviceUnavailable = !this.isLoading && !this.error && !this.isAvailable;
|
|
921
|
-
const showPaymentsUnavailable = !this.isLoading && !this.error && this.isAvailable && !this.canMakePayments;
|
|
922
|
-
const showButton = !this.isLoading && !this.error && this.isAvailable && this.canMakePayments;
|
|
923
|
-
return (h(StyledHost, { key: 'cf4dcfa14dd83683c0d6e811ea464968c38f38d6' }, checkoutStore.checkoutLoaded && (h("script", { key: 'e942fe8e2eb80ee0d2119e864c62d89a79d9d12a', async: true, src: 'https://pay.google.com/gp/p/js/pay.js', onLoad: () => {
|
|
924
|
-
console.log('[GooglePay] Script loaded: Google Pay JS library loaded successfully');
|
|
925
|
-
this.initializeGooglePay();
|
|
926
|
-
}, onError: (e) => {
|
|
927
|
-
console.error('[GooglePay] Script error: Failed to load Google Pay JS library', e);
|
|
928
|
-
} })), h("div", { key: '7ce1234392d3ea3abdcb1a385462cf740f4b98bb', class: 'google-pay-container' }, h(GooglePaySkeleton, { key: '3532e93f39bb69d76663c159bc6b1322a39e1361', isLoading: this.isLoading }), showError && (h("div", { key: '9e42e567d383522d03bc361008cb470fd2e2d602', class: 'google-pay-error', role: 'alert', "data-testid": 'gp-error' }, h("span", { key: '8b49d628ff8f5175d36f82e32191f1f3291e826f', class: 'error-icon' }, "\u26A0\uFE0F"), h("span", { key: 'b01e94934cd30b8dbad3127239ea625c51511d35', class: 'error-message' }, this.error))), showDeviceUnavailable && (h("div", { key: '12ad123c7516e9ce2ad1084f6b0c366e8bb5b9d5', class: 'google-pay-unavailable', "data-testid": 'gp-device-unavailable' }, h("span", { key: 'e0fa8f13423b6b545b340cc4b2b0411e833202c6', class: 'unavailable-message' }, "Google Pay is not available on this device"))), showPaymentsUnavailable && (h("div", { key: 'acb4c6661ca0aa6b944c8ed67642c4ad9effa1e5', class: 'google-pay-unavailable', "data-testid": 'gp-payments-unavailable' }, h("span", { key: '8a83dc8f5140d3ecade1fd68f69b5ebeaeb020d2', class: 'unavailable-message' }, "Google Pay is not available for payments"))), showButton && (h(GooglePayButton, { key: '46ea586c90aaa5eb909af4f1dfcb873a7ac50069', "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: '8f77166ec7d772f0c51c74cdb166f9e8ae295088' }, `
|
|
929
|
-
.google-pay-container {
|
|
930
|
-
width: 100%;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
.google-pay-error {
|
|
934
|
-
display: flex;
|
|
935
|
-
align-items: center;
|
|
936
|
-
gap: 8px;
|
|
937
|
-
padding: 12px;
|
|
938
|
-
background: #fef2f2;
|
|
939
|
-
border: 1px solid #fecaca;
|
|
940
|
-
border-radius: 8px;
|
|
941
|
-
color: #dc2626;
|
|
942
|
-
font-size: 14px;
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
.google-pay-unavailable {
|
|
946
|
-
display: flex;
|
|
947
|
-
align-items: center;
|
|
948
|
-
justify-content: center;
|
|
949
|
-
padding: 12px;
|
|
950
|
-
background: #f9fafb;
|
|
951
|
-
border: 1px solid #e5e7eb;
|
|
952
|
-
border-radius: 8px;
|
|
953
|
-
color: #6b7280;
|
|
954
|
-
font-size: 14px;
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
.error-icon {
|
|
958
|
-
font-size: 16px;
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
`)));
|
|
962
|
-
}
|
|
963
|
-
static get watchers() { return {
|
|
964
|
-
"merchantId": ["watchConfigChange"],
|
|
965
|
-
"environment": ["watchConfigChange"]
|
|
966
|
-
}; }
|
|
967
|
-
}, [257, "justifi-google-pay", {
|
|
968
|
-
"buttonSizeMode": [1, "button-size-mode"],
|
|
969
|
-
"buttonStyle": [1, "button-style"],
|
|
970
|
-
"buttonType": [1, "button-type"],
|
|
971
|
-
"countryCode": [1, "country-code"],
|
|
972
|
-
"disabled": [4],
|
|
973
|
-
"environment": [1],
|
|
974
|
-
"merchantId": [1, "merchant-id"],
|
|
975
|
-
"merchantName": [1, "merchant-name"],
|
|
976
|
-
"showSkeleton": [4, "show-skeleton"],
|
|
977
|
-
"canMakePayments": [32],
|
|
978
|
-
"error": [32],
|
|
979
|
-
"isAvailable": [32],
|
|
980
|
-
"isLoading": [32],
|
|
981
|
-
"isProcessing": [32],
|
|
982
|
-
"getSupportedAuthMethods": [64],
|
|
983
|
-
"getSupportedNetworks": [64],
|
|
984
|
-
"handleSelectionClick": [64],
|
|
985
|
-
"isSupported": [64],
|
|
986
|
-
"prefetchPaymentData": [64]
|
|
987
|
-
}, undefined, {
|
|
988
|
-
"merchantId": ["watchConfigChange"],
|
|
989
|
-
"environment": ["watchConfigChange"]
|
|
990
|
-
}]);
|
|
991
|
-
function defineCustomElement() {
|
|
992
|
-
if (typeof customElements === "undefined") {
|
|
993
|
-
return;
|
|
994
|
-
}
|
|
995
|
-
const components = ["justifi-google-pay"];
|
|
996
|
-
components.forEach(tagName => { switch (tagName) {
|
|
997
|
-
case "justifi-google-pay":
|
|
998
|
-
if (!customElements.get(tagName)) {
|
|
999
|
-
customElements.define(tagName, GooglePay);
|
|
1000
|
-
}
|
|
1001
|
-
break;
|
|
1002
|
-
} });
|
|
1003
|
-
}
|
|
1004
|
-
defineCustomElement();
|
|
1005
|
-
|
|
1006
|
-
export { GooglePay as G, defineCustomElement as d };
|