@justifi/webcomponents 6.14.5 → 6.15.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/{Analytics-BVHauOC2.js → Analytics-VQGAbMVS.js} +3 -3
- package/dist/cjs/{Api-BzB0rppJ.js → Api--EGkA-pT.js} +1 -1
- package/dist/cjs/{Plaid-B2o4c_Ej.js → Plaid-D85oV9FN.js} +5 -0
- package/dist/cjs/additional-questions-form-step_15.cjs.entry.js +7 -7
- package/dist/cjs/additional-statement_8.cjs.entry.js +8 -8
- package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +4 -4
- package/dist/cjs/bank-account-document-form-inputs.cjs.entry.js +1 -1
- package/dist/cjs/bank-account-form.cjs.entry.js +5 -5
- package/dist/cjs/{business.service-j_VDzA2-.js → business.service-B51fjG_j.js} +2 -2
- package/dist/cjs/card-form.cjs.entry.js +5 -5
- package/dist/cjs/{check-pkg-version-JMiLuNXu.js → check-pkg-version-RMsgKzFc.js} +1 -1
- package/dist/cjs/{checkout-actions-VCJi-q4z.js → checkout-actions-BRQFQ6n-.js} +2 -2
- package/dist/cjs/{checkout.service-0vHtBDZY.js → checkout.service-BsOwkSNp.js} +2 -2
- package/dist/cjs/{checkout.store-DOa1-SjA.js → checkout.store-DaV9lvEQ.js} +6 -1
- package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
- package/dist/cjs/dispute-notification_2.cjs.entry.js +10 -10
- package/dist/cjs/{event-types-CMpeGHw8.js → event-types-C_LP6UcW.js} +2 -2
- package/dist/cjs/form-address-fields_3.cjs.entry.js +2 -2
- package/dist/cjs/form-alert_3.cjs.entry.js +5 -5
- 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-file.cjs.entry.js +2 -2
- package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number_2.cjs.entry.js +2 -2
- package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
- package/dist/cjs/form-control-select_2.cjs.entry.js +4 -4
- package/dist/cjs/{get-business-BBDsPv-b.js → get-business-BpaRbn5S.js} +2 -2
- package/dist/cjs/{get-payment-details-BYZeUFAB.js → get-payment-details-Cmg8gWvo.js} +2 -2
- package/dist/cjs/{get-subaccounts-B7e8Eovg.js → get-subaccounts-d4CUegsn.js} +3 -3
- package/dist/cjs/{index-CajjbB9t.js → index-DDa1jd08.js} +4 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/internal-button.cjs.entry.js +1 -1
- package/dist/cjs/{justifi-apple-pay_11.cjs.entry.js → justifi-apple-pay_12.cjs.entry.js} +283 -26
- package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +6 -6
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +6 -6
- package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
- package/dist/cjs/justifi-billing-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-business-details.cjs.entry.js +8 -8
- package/dist/cjs/justifi-business-form.cjs.entry.js +8 -8
- package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
- package/dist/cjs/justifi-card-form.cjs.entry.js +6 -6
- package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +5 -5
- package/dist/cjs/justifi-checkout.cjs.entry.js +8 -8
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +10 -10
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +8 -8
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +6 -6
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +10 -10
- package/dist/cjs/justifi-payment-details.cjs.entry.js +16 -16
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payments-list.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payout-details.cjs.entry.js +11 -11
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +10 -10
- package/dist/cjs/justifi-qr-terminal.cjs.entry.js +8 -8
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +8 -8
- package/dist/cjs/justifi-save-new-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +8 -8
- package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +4 -4
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +8 -8
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +9 -9
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-DfdMLmz7.js → package-DfwuePUh.js} +1 -1
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/{payment-provisioning-actions-CIsDrh8k.js → payment-provisioning-actions-DDooZhhk.js} +2 -2
- package/dist/cjs/{payment.service-Bs3HJ4Kv.js → payment.service-Vy_JnuSA.js} +2 -2
- package/dist/cjs/{payout.service-DNWZxt3R.js → payout.service-BEPglFXf.js} +2 -2
- package/dist/cjs/{payouts-status-DVU5138C.js → payouts-status-1IUtW-UQ.js} +2 -2
- package/dist/cjs/{plaid.service-B_YQGBoC.js → plaid.service-DXQ7q51E.js} +2 -2
- package/dist/cjs/radio-list-item.cjs.entry.js +1 -1
- package/dist/cjs/save-new-payment-method.cjs.entry.js +3 -3
- package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/{terminal.service-CvFZEemr.js → terminal.service-BP2YecQ_.js} +2 -2
- package/dist/cjs/{utils-WrOn06xB.js → utils-CBriZzRC.js} +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/Checkout.js +5 -0
- package/dist/collection/api/Paypal.js +1 -0
- package/dist/collection/api/index.js +1 -0
- package/dist/collection/api/services/paypal.service.js +9 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/checkout/billing-form/bank-account-billing-form-simple.js +1 -1
- package/dist/collection/components/checkout/billing-form/card-billing-form-simple.js +1 -1
- package/dist/collection/components/checkout/billing-form/justifi-billing-form.js +1 -1
- package/dist/collection/components/checkout/card-form/card-form.js +2 -2
- package/dist/collection/components/checkout/justifi-checkout.js +1 -1
- package/dist/collection/components/checkout/justifi-saved-payment-method.js +1 -1
- package/dist/collection/components/checkout/save-new-payment-method/justifi-save-new-payment-method.js +1 -1
- package/dist/collection/components/checkout/save-new-payment-method/save-new-payment-method.js +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list-filters.js +3 -3
- package/dist/collection/components/checkouts-list/justifi-checkouts-list.js +2 -2
- 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.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/dispute-management/justifi-dispute-management.js +1 -1
- package/dist/collection/components/filters/table-filters-menu.js +1 -1
- package/dist/collection/components/modular-checkout/ModularCheckout.js +4 -0
- package/dist/collection/components/modular-checkout/justifi-modular-checkout.js +75 -11
- package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-form.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-billing-form-full.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-card-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-card-form.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-checkout-summary.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/paypal/justifi-paypal.js +253 -0
- package/dist/collection/components/modular-checkout/sub-components/paypal/paypal.js +17 -0
- package/dist/collection/components/order-terminals/justifi-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/justifi-payment-details.js +8 -8
- package/dist/collection/components/payment-transactions-list/justifi-payment-transactions-list.js +1 -1
- package/dist/collection/components/payments-list/justifi-payments-list-filters.js +2 -2
- package/dist/collection/components/payments-list/justifi-payments-list.js +1 -1
- package/dist/collection/components/payout-details/justifi-payout-details.js +3 -3
- package/dist/collection/components/payout-transactions-list/justifi-payout-transactions-list.js +1 -1
- package/dist/collection/components/payouts-list/justifi-payouts-list-filters.js +2 -2
- package/dist/collection/components/payouts-list/justifi-payouts-list.js +1 -1
- package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list-filters.js +3 -3
- package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list.js +2 -2
- package/dist/collection/components/terminals-list/justifi-terminals-list-filters.js +1 -1
- package/dist/collection/components/terminals-list/justifi-terminals-list.js +1 -1
- package/dist/collection/components/tokenize-payment-method/justifi-tokenize-payment-method.js +1 -1
- package/dist/collection/store/checkout.store.js +5 -0
- package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
- package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
- package/dist/collection/ui-components/form/form-control-date.js +2 -2
- package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
- package/dist/collection/ui-components/form/form-control-file.js +2 -2
- package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
- package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
- package/dist/collection/ui-components/form/form-control-number.js +2 -2
- package/dist/collection/ui-components/form/form-control-radio.js +2 -2
- package/dist/collection/ui-components/form/form-control-select.js +2 -2
- package/dist/collection/ui-components/form/form-control-text.js +2 -2
- package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
- package/dist/collection/ui-components/form/hidden-input.js +1 -1
- package/dist/collection/ui-components/form/iframe-input.js +3 -3
- package/dist/collection/ui-components/internal-button.js +1 -1
- package/dist/collection/ui-components/radio-list-item.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
- package/dist/docs.json +115 -3
- package/dist/esm/{Analytics-Dgz_MQ1D.js → Analytics-hKJLmoJl.js} +3 -3
- package/dist/esm/{Api-DScockhO.js → Api-DAJ9sMMj.js} +1 -1
- package/dist/esm/{Plaid-DJ-4YL0_.js → Plaid-BP3xNxQF.js} +5 -0
- package/dist/esm/additional-questions-form-step_15.entry.js +7 -7
- package/dist/esm/additional-statement_8.entry.js +8 -8
- package/dist/esm/bank-account-billing-form-simple_4.entry.js +4 -4
- package/dist/esm/bank-account-document-form-inputs.entry.js +1 -1
- package/dist/esm/bank-account-form.entry.js +5 -5
- package/dist/esm/{business.service-DR2ldRqG.js → business.service-kmkjOyTm.js} +2 -2
- package/dist/esm/card-form.entry.js +5 -5
- package/dist/esm/{check-pkg-version-CPMg0K2m.js → check-pkg-version-FEAmKlDW.js} +1 -1
- package/dist/esm/{checkout-actions-DhL8YxrK.js → checkout-actions-0ftD0elo.js} +2 -2
- package/dist/esm/{checkout.service-CU4BnB34.js → checkout.service-BVBmNheb.js} +2 -2
- package/dist/esm/{checkout.store-B6amfNq_.js → checkout.store-B2mtQcB5.js} +6 -1
- package/dist/esm/custom-popper_2.entry.js +2 -2
- package/dist/esm/dispute-notification_2.entry.js +10 -10
- package/dist/esm/{event-types-BNfdthYa.js → event-types-B5-lsGjZ.js} +2 -2
- package/dist/esm/form-address-fields_3.entry.js +2 -2
- package/dist/esm/form-alert_3.entry.js +5 -5
- 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-file.entry.js +2 -2
- package/dist/esm/form-control-monetary.entry.js +2 -2
- package/dist/esm/form-control-number_2.entry.js +2 -2
- package/dist/esm/form-control-radio.entry.js +2 -2
- package/dist/esm/form-control-select_2.entry.js +4 -4
- package/dist/esm/{get-business-BSyOONF0.js → get-business-BLCT-zfN.js} +2 -2
- package/dist/esm/{get-payment-details-CoGzqJ6o.js → get-payment-details-BokzuPGl.js} +2 -2
- package/dist/esm/{get-subaccounts-BraeNX17.js → get-subaccounts-By7m_FxO.js} +3 -3
- package/dist/esm/{index-DkoufM1t.js → index-DEx8fQeW.js} +4 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal-button.entry.js +1 -1
- package/dist/esm/{justifi-apple-pay_11.entry.js → justifi-apple-pay_12.entry.js} +283 -27
- package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +6 -6
- package/dist/esm/justifi-bank-account-form.entry.js +6 -6
- package/dist/esm/justifi-billing-form-full.entry.js +1 -1
- package/dist/esm/justifi-billing-form.entry.js +1 -1
- package/dist/esm/justifi-business-details.entry.js +8 -8
- package/dist/esm/justifi-business-form.entry.js +8 -8
- package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
- package/dist/esm/justifi-card-form.entry.js +6 -6
- package/dist/esm/justifi-checkout-qr-code.entry.js +5 -5
- package/dist/esm/justifi-checkout.entry.js +8 -8
- package/dist/esm/justifi-checkouts-list-filters.entry.js +3 -3
- package/dist/esm/justifi-checkouts-list.entry.js +10 -10
- package/dist/esm/justifi-dispute-management.entry.js +8 -8
- package/dist/esm/justifi-gross-payment-chart.entry.js +6 -6
- package/dist/esm/justifi-order-terminals.entry.js +10 -10
- package/dist/esm/justifi-payment-details.entry.js +16 -16
- package/dist/esm/justifi-payment-provisioning.entry.js +8 -8
- package/dist/esm/justifi-payment-transactions-list.entry.js +8 -8
- package/dist/esm/justifi-payments-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payments-list.entry.js +8 -8
- package/dist/esm/justifi-payout-details.entry.js +11 -11
- package/dist/esm/justifi-payout-transactions-list.entry.js +8 -8
- package/dist/esm/justifi-payouts-list-filters.entry.js +3 -3
- package/dist/esm/justifi-payouts-list.entry.js +10 -10
- package/dist/esm/justifi-qr-terminal.entry.js +8 -8
- package/dist/esm/justifi-refund-payment.entry.js +8 -8
- package/dist/esm/justifi-save-new-payment-method.entry.js +1 -1
- package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +8 -8
- package/dist/esm/justifi-skeleton.entry.js +1 -1
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +4 -4
- package/dist/esm/justifi-terminal-orders-list.entry.js +8 -8
- package/dist/esm/justifi-terminals-list-filters.entry.js +2 -2
- package/dist/esm/justifi-terminals-list.entry.js +9 -9
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-CiypNylL.js → package-Dn9_7aQh.js} +1 -1
- package/dist/esm/payment-method-option.entry.js +1 -1
- package/dist/esm/{payment-provisioning-actions-DJKGndr3.js → payment-provisioning-actions-VRIPjnAQ.js} +2 -2
- package/dist/esm/{payment.service-BxBf9T-D.js → payment.service-CMUlMV1Y.js} +2 -2
- package/dist/esm/{payout.service-DKe3_O4y.js → payout.service-C0yd0JZS.js} +2 -2
- package/dist/esm/{payouts-status-C0nijel1.js → payouts-status-CaiC5qpn.js} +2 -2
- package/dist/esm/{plaid.service-DwWljJOH.js → plaid.service-CqihCTBS.js} +2 -2
- package/dist/esm/radio-list-item.entry.js +1 -1
- package/dist/esm/save-new-payment-method.entry.js +3 -3
- package/dist/esm/table-filters-menu.entry.js +1 -1
- package/dist/esm/terminal-quantity-selector.entry.js +1 -1
- package/dist/esm/{terminal.service-Q4KXLOka.js → terminal.service-DuF3uTuA.js} +2 -2
- package/dist/esm/{utils-D6LKoG0M.js → utils-YUOJKtjO.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/ModularCheckout.js +4 -0
- package/dist/module/Plaid.js +5 -0
- package/dist/module/additional-statement2.js +1 -1
- package/dist/module/bank-account-billing-form-simple2.js +1 -1
- package/dist/module/cancellation-policy2.js +1 -1
- package/dist/module/card-billing-form-simple2.js +1 -1
- package/dist/module/card-form2.js +2 -2
- package/dist/module/checkout.store.js +5 -0
- package/dist/module/custom-popper2.js +2 -2
- package/dist/module/customer-details2.js +1 -1
- package/dist/module/dispute-notification2.js +2 -2
- package/dist/module/dispute-response2.js +1 -1
- package/dist/module/duplicate-charge2.js +1 -1
- package/dist/module/electronic-evidence2.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-number2.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/hidden-input2.js +1 -1
- package/dist/module/iframe-input2.js +3 -3
- package/dist/module/internal-button2.js +1 -1
- package/dist/module/justifi-bank-account-billing-form-simple.js +1 -1
- package/dist/module/justifi-bank-account-form.js +1 -1
- package/dist/module/justifi-billing-form-full.js +1 -1
- package/dist/module/justifi-billing-form.js +1 -1
- package/dist/module/justifi-button2.js +1 -1
- package/dist/module/justifi-card-billing-form-simple.js +1 -1
- package/dist/module/justifi-card-form.js +1 -1
- package/dist/module/justifi-checkout-summary2.js +1 -1
- package/dist/module/justifi-checkout.js +53 -47
- package/dist/module/justifi-checkouts-list-filters.js +2 -2
- package/dist/module/justifi-checkouts-list.js +2 -2
- package/dist/module/justifi-dispute-management.js +1 -1
- package/dist/module/justifi-header2.js +1 -1
- package/dist/module/justifi-modular-checkout2.js +75 -11
- package/dist/module/justifi-order-terminals.js +1 -1
- package/dist/module/justifi-payment-details.js +8 -8
- package/dist/module/justifi-payment-transactions-list.js +1 -1
- package/dist/module/justifi-payments-list-filters.js +2 -2
- package/dist/module/justifi-payments-list.js +1 -1
- package/dist/module/justifi-payout-details.js +3 -3
- package/dist/module/justifi-payout-transactions-list.js +1 -1
- package/dist/module/justifi-payouts-list-filters.js +2 -2
- package/dist/module/justifi-payouts-list.js +1 -1
- package/dist/module/justifi-paypal.d.ts +11 -0
- package/dist/module/justifi-paypal.js +6 -0
- package/dist/module/justifi-paypal2.js +226 -0
- package/dist/module/justifi-save-new-payment-method.js +1 -1
- package/dist/module/justifi-saved-payment-method.js +1 -1
- package/dist/module/justifi-skeleton.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +3 -3
- package/dist/module/justifi-terminal-orders-list.js +2 -2
- package/dist/module/justifi-terminals-list-filters.js +1 -1
- package/dist/module/justifi-terminals-list.js +1 -1
- package/dist/module/justifi-tokenize-payment-method2.js +1 -1
- package/dist/module/package.js +1 -1
- package/dist/module/payment-method-option.js +1 -1
- package/dist/module/product-or-service2.js +1 -1
- package/dist/module/radio-list-item2.js +1 -1
- package/dist/module/refund-policy2.js +1 -1
- package/dist/module/save-new-payment-method2.js +1 -1
- package/dist/module/shipping-details2.js +1 -1
- package/dist/module/table-filters-menu2.js +1 -1
- package/dist/module/terminal-quantity-selector2.js +1 -1
- package/dist/types/api/Checkout.d.ts +13 -1
- package/dist/types/api/Paypal.d.ts +11 -0
- package/dist/types/api/index.d.ts +1 -0
- package/dist/types/api/services/paypal.service.d.ts +8 -0
- package/dist/types/components/modular-checkout/ModularCheckout.d.ts +6 -2
- package/dist/types/components/modular-checkout/justifi-modular-checkout.d.ts +7 -0
- package/dist/types/components/modular-checkout/sub-components/paypal/justifi-paypal.d.ts +36 -0
- package/dist/types/components/modular-checkout/sub-components/paypal/paypal.d.ts +39 -0
- package/dist/types/components.d.ts +53 -0
- package/dist/types/store/checkout.store.d.ts +2 -0
- package/dist/webcomponents/index.esm.js +1 -1
- package/dist/webcomponents/{p-e7909732.entry.js → p-0d8a256c.entry.js} +1 -1
- package/dist/webcomponents/{p-027ef7e9.entry.js → p-0f7cc07b.entry.js} +1 -1
- package/dist/webcomponents/p-1034e83d.entry.js +1 -0
- package/dist/webcomponents/{p-373586db.entry.js → p-10b91a6c.entry.js} +1 -1
- package/dist/webcomponents/p-18306b40.entry.js +1 -0
- package/dist/webcomponents/{p-e954f46c.entry.js → p-1a55efda.entry.js} +1 -1
- package/dist/webcomponents/p-22a57828.entry.js +1 -0
- package/dist/webcomponents/p-2458de56.entry.js +1 -0
- package/dist/webcomponents/{p-29f68bd0.entry.js → p-2549c891.entry.js} +1 -1
- package/dist/webcomponents/{p-36d7033b.entry.js → p-27b07530.entry.js} +1 -1
- package/dist/webcomponents/{p-4f54d1b2.entry.js → p-28fb6b50.entry.js} +1 -1
- package/dist/webcomponents/p-2e82a488.entry.js +1 -0
- package/dist/webcomponents/{p-f0083ace.entry.js → p-31204dd5.entry.js} +1 -1
- package/dist/webcomponents/p-33281304.entry.js +1 -0
- package/dist/webcomponents/{p-da21ae43.entry.js → p-36340e63.entry.js} +1 -1
- package/dist/webcomponents/p-3642e189.entry.js +1 -0
- package/dist/webcomponents/p-36f05f5f.entry.js +1 -0
- package/dist/webcomponents/{p-b8d46fc5.entry.js → p-3c33b3c1.entry.js} +1 -1
- package/dist/webcomponents/{p-3870712e.entry.js → p-408a4f5f.entry.js} +4 -4
- package/dist/webcomponents/{p-041a22dd.entry.js → p-42021e67.entry.js} +1 -1
- package/dist/webcomponents/{p-6884fa3d.entry.js → p-5348209c.entry.js} +1 -1
- package/dist/webcomponents/p-5a11c49f.entry.js +1 -0
- package/dist/webcomponents/{p-2139497d.entry.js → p-5bdae8c7.entry.js} +1 -1
- package/dist/webcomponents/p-636c9571.entry.js +1 -0
- package/dist/webcomponents/p-76e96874.entry.js +1 -0
- package/dist/webcomponents/p-772ab8a3.entry.js +1 -0
- package/dist/webcomponents/p-777470cb.entry.js +1 -0
- package/dist/webcomponents/p-7e64a668.entry.js +1 -0
- package/dist/webcomponents/{p-543fcff2.entry.js → p-80a9f84c.entry.js} +1 -1
- package/dist/webcomponents/{p-bc435cae.entry.js → p-86f9d5f6.entry.js} +1 -1
- package/dist/webcomponents/{p-d57ae599.entry.js → p-8a5ce8ff.entry.js} +1 -1
- package/dist/webcomponents/p-8d11aa27.entry.js +1 -0
- package/dist/webcomponents/{p-3086ee7a.entry.js → p-9c45729d.entry.js} +1 -1
- package/dist/webcomponents/p-9ed85832.entry.js +1 -0
- package/dist/webcomponents/{p-cb977890.entry.js → p-9f0ef3f3.entry.js} +1 -1
- package/dist/webcomponents/{p-DD9-ceDZ.js → p-B0DHIvEj.js} +1 -1
- package/dist/webcomponents/{p-BL112JyU.js → p-BFi5l0xt.js} +1 -1
- package/dist/webcomponents/{p-C8g8unYJ.js → p-BHaO3c8W.js} +1 -1
- package/dist/webcomponents/{p-rIJv0FaI.js → p-Ba0_MQtJ.js} +1 -1
- package/dist/webcomponents/{p-WnMmPpEb.js → p-Bl00tHyn.js} +1 -1
- package/dist/webcomponents/{p-DcA_wt-j.js → p-ByQMBEDC.js} +1 -1
- package/dist/webcomponents/p-C-buCQRx.js +1 -0
- package/dist/webcomponents/p-CKgQN8v0.js +1 -0
- package/dist/webcomponents/p-CLq3Og7o.js +1 -0
- package/dist/webcomponents/p-CXsRwohv.js +1 -0
- package/dist/webcomponents/p-Cy2N3vAg.js +1 -0
- package/dist/webcomponents/p-CyOXIqHo.js +1 -0
- package/dist/webcomponents/p-D6uhYbLo.js +1 -0
- package/dist/webcomponents/p-DEx8fQeW.js +1 -0
- package/dist/webcomponents/{p-Co3Rtlnu.js → p-DZQBPUfH.js} +1 -1
- package/dist/webcomponents/p-Dn9_7aQh.js +1 -0
- package/dist/webcomponents/{p-CnHbIkmu.js → p-DnLqZpI1.js} +1 -1
- package/dist/webcomponents/{p-BlqdDtQr.js → p-DsvK2pes.js} +1 -1
- package/dist/webcomponents/{p-H4vl65HO.js → p-FWuMPTxn.js} +1 -1
- package/dist/webcomponents/p-Fpaf7CLD.js +1 -0
- package/dist/webcomponents/p-a891caf8.entry.js +1 -0
- package/dist/webcomponents/{p-537ea763.entry.js → p-aebd2149.entry.js} +1 -1
- package/dist/webcomponents/{p-f6b900f4.entry.js → p-af728bc6.entry.js} +1 -1
- package/dist/webcomponents/p-b6ce91f0.entry.js +1 -0
- package/dist/webcomponents/{p-c14dde7c.entry.js → p-b9664e84.entry.js} +1 -1
- package/dist/webcomponents/{p-b17fabdc.entry.js → p-b98ea26a.entry.js} +1 -1
- package/dist/webcomponents/{p-61eae8cd.entry.js → p-c4889a06.entry.js} +1 -1
- package/dist/webcomponents/p-c6f85bef.entry.js +1 -0
- package/dist/webcomponents/p-ca6c5365.entry.js +1 -0
- package/dist/webcomponents/p-d05257f9.entry.js +1 -0
- package/dist/webcomponents/p-d2e890a3.entry.js +1 -0
- package/dist/webcomponents/p-d397b38f.entry.js +1 -0
- package/dist/webcomponents/{p-387aba3d.entry.js → p-d446ab68.entry.js} +1 -1
- package/dist/webcomponents/{p-49e40ebe.entry.js → p-d4de565d.entry.js} +1 -1
- package/dist/webcomponents/{p-b945fa49.entry.js → p-d555220f.entry.js} +1 -1
- package/dist/webcomponents/p-dd4eea27.entry.js +1 -0
- package/dist/webcomponents/{p-b9316945.entry.js → p-ddba9ab3.entry.js} +1 -1
- package/dist/webcomponents/p-e0bce67a.entry.js +1 -0
- package/dist/webcomponents/p-e1e5bddf.entry.js +1 -0
- package/dist/webcomponents/{p-b9b5d046.entry.js → p-e55216fb.entry.js} +1 -1
- package/dist/webcomponents/{p-cb5d2198.entry.js → p-ead48010.entry.js} +1 -1
- package/dist/webcomponents/{p-f8f01bbb.entry.js → p-f8764c8e.entry.js} +1 -1
- package/dist/webcomponents/{p-c5560a87.entry.js → p-fa2e7534.entry.js} +1 -1
- package/dist/webcomponents/p-fda6f27d.entry.js +1 -0
- package/dist/webcomponents/p-rznJBkm3.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +15 -15
- package/LICENSE +0 -21
- package/dist/webcomponents/p-04153e8c.entry.js +0 -1
- package/dist/webcomponents/p-0464be7b.entry.js +0 -1
- package/dist/webcomponents/p-0c1cc1e9.entry.js +0 -1
- package/dist/webcomponents/p-0d9022e5.entry.js +0 -1
- package/dist/webcomponents/p-0fe976d6.entry.js +0 -1
- package/dist/webcomponents/p-15934f30.entry.js +0 -1
- package/dist/webcomponents/p-2128265d.entry.js +0 -1
- package/dist/webcomponents/p-21a5c3d8.entry.js +0 -1
- package/dist/webcomponents/p-25d24964.entry.js +0 -1
- package/dist/webcomponents/p-3ef039ec.entry.js +0 -1
- package/dist/webcomponents/p-49f279c3.entry.js +0 -1
- package/dist/webcomponents/p-4d60d249.entry.js +0 -1
- package/dist/webcomponents/p-51714ea9.entry.js +0 -1
- package/dist/webcomponents/p-558677a7.entry.js +0 -1
- package/dist/webcomponents/p-568b81a2.entry.js +0 -1
- package/dist/webcomponents/p-6f34fa90.entry.js +0 -1
- package/dist/webcomponents/p-8fO8CrtQ.js +0 -1
- package/dist/webcomponents/p-9b758a11.entry.js +0 -1
- package/dist/webcomponents/p-9c506058.entry.js +0 -1
- package/dist/webcomponents/p-BEOJqK7T.js +0 -1
- package/dist/webcomponents/p-C0w_sG9P.js +0 -1
- package/dist/webcomponents/p-CMvr3y5s.js +0 -1
- package/dist/webcomponents/p-CaLXuYmg.js +0 -1
- package/dist/webcomponents/p-CiypNylL.js +0 -1
- package/dist/webcomponents/p-CnDagPty.js +0 -1
- package/dist/webcomponents/p-D1H6VUbM.js +0 -1
- package/dist/webcomponents/p-DNxN6bjU.js +0 -1
- package/dist/webcomponents/p-DkoufM1t.js +0 -1
- package/dist/webcomponents/p-Dl0CAW76.js +0 -1
- package/dist/webcomponents/p-a14d3d7d.entry.js +0 -1
- package/dist/webcomponents/p-a47854b9.entry.js +0 -1
- package/dist/webcomponents/p-c0bd4006.entry.js +0 -1
- package/dist/webcomponents/p-c4799285.entry.js +0 -1
- package/dist/webcomponents/p-cc5a97a0.entry.js +0 -1
- package/dist/webcomponents/p-d6122124.entry.js +0 -1
- package/dist/webcomponents/p-de8c6cd4.entry.js +0 -1
- package/dist/webcomponents/p-f6941969.entry.js +0 -1
- package/dist/webcomponents/p-f8cff289.entry.js +0 -1
|
@@ -28,7 +28,7 @@ export class DuplicateCharge {
|
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
30
|
var _a, _b, _c;
|
|
31
|
-
return (h("div", { key: '
|
|
31
|
+
return (h("div", { key: '805b160927f30729b321ffbafc15fe78fed732c9' }, h("div", { key: 'fcc99471b08ea21905c1246849ec41e05194834f', class: "row gy-3" }, h("div", { key: 'f7259723ec39b5ae09aaa552a99f3a8a15b85fd8', class: "col-12" }, h("h2", { key: '5f0719c624bce5542364120568079fb6921c7d6f', class: "h5", part: heading5 }, "Duplicate Charge")), h("div", { key: '718c50ebae8b6ca9c146d81f261dad5007945a33', class: "col-12" }, h("form-control-text", { key: '090a5f0e4ca359af300f655ad94296af1a28eef0', label: "Original Payment ID", name: "duplicate_charge_original_payment_id", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.duplicate_charge_original_payment_id, inputHandler: this.inputHandler, errorText: this.errors.duplicate_charge_original_payment_id })), h("div", { key: '217b8e9b896412a1e74d138c20d6cc42760e7a54', class: "col-12" }, h("form-control-textarea", { key: 'd9ba9a25ccaa5848f17ec8f1dfde222c29624e06', label: "Duplicate Charge Explanation", name: "duplicate_charge_explanation", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.duplicate_charge_explanation, inputHandler: this.inputHandler, errorText: this.errors.duplicate_charge_explanation })), h("div", { key: 'eb26362fb100e775339b4a64959521a1b7cad394', class: "col-12" }, h("form-control-file-v2", { key: '5753787dd59e736a7a2dea84268d93983cfdeae4', label: "Duplicate Charge Documentation", name: "duplicate_charge_documentation", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_c = this.documentErrors) === null || _c === void 0 ? void 0 : _c.duplicate_charge_documentation })))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "duplicate-charge"; }
|
|
34
34
|
static get properties() {
|
package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js
CHANGED
|
@@ -28,7 +28,7 @@ export class ElectronicEvidence {
|
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
30
|
var _a, _b;
|
|
31
|
-
return (h("div", { key: '
|
|
31
|
+
return (h("div", { key: '1de8dc7fafbd3dba15344a817fd2c008929ab0bc' }, h("div", { key: 'dda3c4b88713e0e1b9fe25c2a4fe2d015889f2b3', class: "row gy-3" }, h("div", { key: '1638ff98ca047509306f9387e68ba83c9be5c885', class: "col-12" }, h("h2", { key: '9ee705b8558a88bd4eebe2448e2da655fbcf9bf3', class: "h5", part: heading5 }, "Electronic Evidence")), h("div", { key: '71a392aa19784a1e25654791544fab6e9fd482a6', class: "col-12" }, h("form-control-text", { key: 'b2ef47161c0c73f010461f326f39f60efb140ae8', label: "Purchase IP Address", name: "customer_purchase_ip_address", helpText: "The IP address used by the customer during the purchase.", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.customer_purchase_ip_address, inputHandler: this.inputHandler, errorText: this.errors.customer_purchase_ip_address })), h("div", { key: '0341ecbd1404b29e223d508e937752ed67a5f9e2', class: "col-12" }, h("form-control-file-v2", { key: '00d8fd3c9bfded6f20ae8568aca1fd21564649df', label: "Activity Logs", name: "activity_log", helpText: "Any server or activity logs that provide evidence of the customer's access to or download of the purchased digital product. This information should encompass IP addresses, relevant timestamps, and any detailed records of activity.", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_b = this.documentErrors) === null || _b === void 0 ? void 0 : _b.activity_log })))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "electronic-evidence"; }
|
|
34
34
|
static get properties() {
|
package/dist/collection/components/dispute-management/dispute-response/product-or-service.js
CHANGED
|
@@ -28,7 +28,7 @@ export class ProductOrService {
|
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
30
|
var _a, _b, _c;
|
|
31
|
-
return (h("div", { key: '
|
|
31
|
+
return (h("div", { key: '3f2d1c2f4b0595e922712f8754ae1022b2d19261' }, h("div", { key: '0ab14085510225a4d00b352014ea72f4dc0a059a', class: "row gy-3" }, h("div", { key: '12271b714bf3e6b6756274674e3413018124fa4c', class: "col-12" }, h("h2", { key: '9b6175bf1eb88788b909be3f7a46337a75856306', class: "h5", part: heading5 }, "Product & Service Details")), h("div", { key: '912e647000393b9146329e7d4cca78ee15837621', class: "col-12" }, h("form-control-text", { key: '7b365315a58fdfa65fa7e1e6f009dc5c70c17d95', label: "Product Description", name: "product_description", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.product_description, inputHandler: this.inputHandler, errorText: this.errors.product_description })), h("div", { key: '03d48b21fb83a4a4b07ed6f0f7b6f08a32c10ce5', class: "col-12" }, h("form-control-date", { key: 'fbd7c448acc69aa0012999f90d3b38f9374af933', label: "Service Date", name: "service_date", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.service_date, inputHandler: this.inputHandler, errorText: this.errors.service_date })), h("div", { key: '74683fc2825cffa9403313b21d52a4ddb76db12e', class: "col-12" }, h("form-control-file-v2", { key: '7d3e5f2f96375d884a98e207c22d2b3115ed6e1b', label: "Service Documentation", name: "service_documentation", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_c = this.documentErrors) === null || _c === void 0 ? void 0 : _c.service_documentation })))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "product-or-service"; }
|
|
34
34
|
static get properties() {
|
|
@@ -28,7 +28,7 @@ export class RefundPolicy {
|
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
30
|
var _a, _b, _c, _d;
|
|
31
|
-
return (h("div", { key: '
|
|
31
|
+
return (h("div", { key: '828ac1997382fa491920b9439099959ae5376c81' }, h("div", { key: '8d0453e4c2ec424a2010cfd01885cb4a03020d93', class: "row gy-3" }, h("div", { key: 'd15021ea6df4b3939d4564a84951ebadb50cc7cd', class: "col-12" }, h("h2", { key: '632eafab4924af0d433f28a3329877b98376ea27', class: "h5", part: heading5 }, "Refund Policy and Receipt")), h("div", { key: 'cb55f0f106e68e9af4057a4496811db991f487d0', class: "col-12" }, h("form-control-textarea", { key: '1fdca1aea95757a0dac55b338355eeffd351c6cb', label: "Refund Policy Disclosure", name: "refund_policy_disclosure", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.refund_policy_disclosure, inputHandler: this.inputHandler })), h("div", { key: '6f6c35c4626a764e4119dc253aded2985ac6ffbc', class: "col-12" }, h("form-control-textarea", { key: '6c0fcba48cad9f8c3cc9ed6c35d6b0e1301f9c35', label: "Refund Refusal Explanation", name: "refund_refusal_explanation", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.refund_refusal_explanation, inputHandler: this.inputHandler })), h("div", { key: '1bf52c92c53313ab7542bfc1b2ed607e9d5db032', class: "col-12" }, h("form-control-file-v2", { key: '67b266e26d5568e3370b3f8aaad2c0d6450f67f6', label: "Upload Refund Policy", name: "refund_policy", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_c = this.documentErrors) === null || _c === void 0 ? void 0 : _c.refund_policy })), h("div", { key: '8994ee85c8a31fc709a0fa396d97e4da576e57c3', class: "col-12" }, h("form-control-file-v2", { key: 'c468b92349b6a92f02b6eef0dc06c71dfc924c4e', label: "Upload Receipt", name: "receipt", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_d = this.documentErrors) === null || _d === void 0 ? void 0 : _d.receipt })))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "refund-policy"; }
|
|
34
34
|
static get properties() {
|
|
@@ -29,7 +29,7 @@ export class ShippingDetails {
|
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
31
|
var _a, _b, _c, _d, _e;
|
|
32
|
-
return (h("div", { key: '
|
|
32
|
+
return (h("div", { key: '0d7695711048ad14596ba44e364b45e3aa3d1e39' }, h("div", { key: 'e6911e35f66ef8aaa591f54e389d67c202af8172', class: "row gy-3" }, h("div", { key: 'd59ab2fe6318a27c4b38650e4e9d07b9c851041f', class: "col-12" }, h("h2", { key: 'b8a8634fe9dcf11c332dab0c1736732e579aeb59', class: "h5", part: heading5 }, "Shipping Details")), h("div", { key: '5170b37a386805e194d8cf7c769ffdbac8db8fa2', class: "col-12" }, h("form-control-text", { key: '7bc3f59737fa075134e2bc476fa26d79ddc4e26b', label: "Shipping Carrier Name", name: "shipping_carrier", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.shipping_carrier, inputHandler: this.inputHandler, errorText: this.errors.shipping_carrier })), h("div", { key: 'ef41052d0eec68b02d04638ce7cfdbc1477c16eb', class: "col-12" }, h("form-control-text", { key: 'b88d31bed47cdf09e04a29122c1adf955bdc4d25', label: "Tracking Number", name: "shipping_tracking_number", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.shipping_tracking_number, inputHandler: this.inputHandler, errorText: this.errors.shipping_tracking_number })), h("div", { key: '743dea4d8f59e62103403fa58936ca86d7bbf216', class: "col-12" }, h("form-control-date", { key: '4be255a38f91f9bf758428d780649d2775d22153', label: "Date Shipped", name: "shipping_date", defaultValue: (_c = this.disputeResponse) === null || _c === void 0 ? void 0 : _c.shipping_date, inputHandler: this.inputHandler, errorText: this.errors.shipping_date })), h("div", { key: '7b274a743a9ca8f3cb7b86facbe12b723b8695e4', class: "col-12" }, h("form-control-textarea", { key: '833a03ac489cfa6fe6991e14a079b104b7b86ddc', label: "Shipping Address", name: "shipping_address", defaultValue: (_d = this.disputeResponse) === null || _d === void 0 ? void 0 : _d.shipping_address, inputHandler: this.inputHandler, errorText: this.errors.shipping_address })), h("div", { key: 'a1363e8014fe90442e1d0f6820bf2b9cf9966c90', class: "col-12" }, h("form-control-file-v2", { key: 'beb99c4b9e898265f8a904984172fb1a6a52cb49', label: "Shipping Documentation", name: "shipping_documentation", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_e = this.documentErrors) === null || _e === void 0 ? void 0 : _e.shipping_documentation })))));
|
|
33
33
|
}
|
|
34
34
|
static get is() { return "shipping-details"; }
|
|
35
35
|
static get properties() {
|
|
@@ -92,7 +92,7 @@ export class JustifiDisputeManagement {
|
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
render() {
|
|
95
|
-
return (h(StyledHost, { key: '
|
|
95
|
+
return (h(StyledHost, { key: 'd5af8e699e5b96a91d866a274addac1da03c2a10' }, h("div", { key: '14b445c20f27bed7e3131cbd6c8d87c0d3030c57' }, this.showDisputeResponseForm ? (h("dispute-response", { disputeId: this.disputeId, disputeResponse: this.dispute.dispute_response, authToken: this.authToken })) : (h("dispute-notification", { dispute: this.dispute, authToken: this.authToken, isLoading: this.isLoading })))));
|
|
96
96
|
}
|
|
97
97
|
static get is() { return "justifi-dispute-management"; }
|
|
98
98
|
static get encapsulation() { return "shadow"; }
|
|
@@ -19,7 +19,7 @@ export class TableFiltersMenu {
|
|
|
19
19
|
this.showClearButton = hasFilters(this.params);
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
return (h("div", { key: '
|
|
22
|
+
return (h("div", { key: '467c453ff98299885dfde3e25a7911211220bd21', class: "d-flex gap-2" }, h("div", { key: '3a25ceab0cccbcde3fb9e3073e4e581f6a08591a', class: "dropdown pb-3" }, h("button", { key: '833cbfe0e73c388971ef9eca8240198251b4271e', type: "button dropdown-toggle", ref: (el) => (this.anchorButton = el), class: "btn btn-primary dropdown-toggle", part: dropdownMenuButton, "data-test-id": "open-filters-button", "data-bs-toggle": "dropdown" }, "Filters"), h("custom-popper", { key: '00371051688c5b62e60c7c42cf92d8261019bd06', offset: [20, 10], strategy: "fixed", anchorRef: this.anchorButton, trigger: "click" }, h("form", { key: 'a8d97a8bde738a0ddf9f194487bc6cec590d384d', class: "dropdown-menu", part: dropdownMenu, "data-test-id": "filter-menu", ref: (el) => (this.menu = el), onSubmit: (e) => e.preventDefault() }, h("slot", { key: '97b96488fff4b33f90fdab113511a529234da457' })))), h("div", { key: '41c110a579fa3da4c9a8711fec9a6b1a0ee07218' }, h(Button, { key: '83ee38c0db83d3d25779a462fc123cedc7128870', variant: "secondary", onClick: () => this.clearParams(), hidden: !this.showClearButton, "data-test-id": "clear-filters-button" }, "Clear Filters"))));
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "table-filters-menu"; }
|
|
25
25
|
static get properties() {
|
|
@@ -4,6 +4,8 @@ export var PAYMENT_MODE;
|
|
|
4
4
|
PAYMENT_MODE["BNPL"] = "bnpl";
|
|
5
5
|
PAYMENT_MODE["APPLE_PAY"] = "apple_pay";
|
|
6
6
|
PAYMENT_MODE["GOOGLE_PAY"] = "google_pay";
|
|
7
|
+
PAYMENT_MODE["PAYPAL"] = "paypal";
|
|
8
|
+
PAYMENT_MODE["VENMO"] = "venmo";
|
|
7
9
|
})(PAYMENT_MODE || (PAYMENT_MODE = {}));
|
|
8
10
|
// Maps the backend payment method types to the frontend payment method types
|
|
9
11
|
export var PAYMENT_METHOD_TYPES;
|
|
@@ -26,6 +28,8 @@ export var PAYMENT_METHODS;
|
|
|
26
28
|
PAYMENT_METHODS["GOOGLE_PAY"] = "google_pay";
|
|
27
29
|
PAYMENT_METHODS["SEZZLE"] = "sezzle";
|
|
28
30
|
PAYMENT_METHODS["PLAID"] = "plaid";
|
|
31
|
+
PAYMENT_METHODS["PAYPAL"] = "paypal";
|
|
32
|
+
PAYMENT_METHODS["VENMO"] = "venmo";
|
|
29
33
|
})(PAYMENT_METHODS || (PAYMENT_METHODS = {}));
|
|
30
34
|
const mapPaymentMethodType = (type) => {
|
|
31
35
|
switch (type) {
|
|
@@ -11,6 +11,43 @@ import { PAYMENT_MODE, PAYMENT_METHODS, PaymentMethod } from "./ModularCheckout"
|
|
|
11
11
|
export class JustifiModularCheckout {
|
|
12
12
|
constructor() {
|
|
13
13
|
this.plaidService = new PlaidService();
|
|
14
|
+
this.handlePaypalStarted = () => {
|
|
15
|
+
checkoutStore.isWalletProcessing = true;
|
|
16
|
+
};
|
|
17
|
+
this.handlePaypalCompleted = (event) => {
|
|
18
|
+
const { success, paymentMethodId, fundingSource } = event.detail || {};
|
|
19
|
+
checkoutStore.isWalletProcessing = false;
|
|
20
|
+
if (success && paymentMethodId) {
|
|
21
|
+
checkoutStore.paymentToken = paymentMethodId;
|
|
22
|
+
checkoutStore.selectedPaymentMethod = {
|
|
23
|
+
type: fundingSource === "venmo"
|
|
24
|
+
? PAYMENT_METHODS.VENMO
|
|
25
|
+
: PAYMENT_METHODS.PAYPAL,
|
|
26
|
+
};
|
|
27
|
+
this.submitCheckout();
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
this.errorEvent.emit({
|
|
31
|
+
message: "Paypal payment failed",
|
|
32
|
+
errorCode: ComponentErrorCodes.TOKENIZE_ERROR,
|
|
33
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
this.handlePaypalCancelled = () => {
|
|
38
|
+
checkoutStore.isWalletProcessing = false;
|
|
39
|
+
checkoutStore.paymentToken = undefined;
|
|
40
|
+
checkoutStore.selectedPaymentMethod = undefined;
|
|
41
|
+
};
|
|
42
|
+
this.handlePaypalError = (event) => {
|
|
43
|
+
checkoutStore.isWalletProcessing = false;
|
|
44
|
+
const { error, code } = event.detail || {};
|
|
45
|
+
this.errorEvent.emit({
|
|
46
|
+
message: error || "Paypal error occurred",
|
|
47
|
+
errorCode: `PAYPAL_${code}`,
|
|
48
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
49
|
+
});
|
|
50
|
+
};
|
|
14
51
|
this.handleApplePayStarted = () => {
|
|
15
52
|
checkoutStore.isWalletProcessing = true;
|
|
16
53
|
};
|
|
@@ -80,6 +117,7 @@ export class JustifiModularCheckout {
|
|
|
80
117
|
this.queryFormRefs();
|
|
81
118
|
this.setupApplePayListeners(); // set up again listeners when DOM changes
|
|
82
119
|
this.setupGooglePayListeners();
|
|
120
|
+
this.setupPaypalListeners();
|
|
83
121
|
});
|
|
84
122
|
this.observer.observe(this.hostEl, {
|
|
85
123
|
childList: true,
|
|
@@ -115,6 +153,7 @@ export class JustifiModularCheckout {
|
|
|
115
153
|
this.queryFormRefs();
|
|
116
154
|
this.setupApplePayListeners();
|
|
117
155
|
this.setupGooglePayListeners();
|
|
156
|
+
this.setupPaypalListeners();
|
|
118
157
|
}
|
|
119
158
|
disconnectedCallback() {
|
|
120
159
|
var _a, _b;
|
|
@@ -123,6 +162,7 @@ export class JustifiModularCheckout {
|
|
|
123
162
|
(_b = this.observer) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
124
163
|
this.removeApplePayListeners();
|
|
125
164
|
this.removeGooglePayListeners();
|
|
165
|
+
this.removePaypalListeners();
|
|
126
166
|
}
|
|
127
167
|
fetchCheckout() {
|
|
128
168
|
if (!this.authToken || !this.checkoutId) {
|
|
@@ -165,9 +205,8 @@ export class JustifiModularCheckout {
|
|
|
165
205
|
}
|
|
166
206
|
}
|
|
167
207
|
updateStore(checkout) {
|
|
168
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
208
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
169
209
|
checkoutStore.accountId = checkout.account_id;
|
|
170
|
-
checkoutStore.checkoutLoaded = true;
|
|
171
210
|
const rawMode = checkout.mode != null ? String(checkout.mode).toLowerCase() : '';
|
|
172
211
|
checkoutStore.checkoutMode =
|
|
173
212
|
rawMode === 'test' ? 'test' : rawMode === 'live' ? 'live' : null;
|
|
@@ -179,16 +218,20 @@ export class JustifiModularCheckout {
|
|
|
179
218
|
checkoutStore.totalAmount = checkout.total_amount;
|
|
180
219
|
checkoutStore.paymentAmount = checkout.payment_amount;
|
|
181
220
|
checkoutStore.bnplEnabled = checkout.payment_settings.bnpl_payments;
|
|
182
|
-
checkoutStore.insuranceEnabled = checkout.payment_settings.insurance_payments;
|
|
183
|
-
checkoutStore.bankAccountVerification = (
|
|
184
|
-
checkoutStore.applePayEnabled = (
|
|
185
|
-
checkoutStore.googlePayEnabled = (
|
|
221
|
+
checkoutStore.insuranceEnabled = (_b = checkout.payment_settings.insurance_payments) !== null && _b !== void 0 ? _b : false;
|
|
222
|
+
checkoutStore.bankAccountVerification = (_c = checkout.payment_settings) === null || _c === void 0 ? void 0 : _c.bank_account_verification;
|
|
223
|
+
checkoutStore.applePayEnabled = (_e = (_d = checkout.payment_settings) === null || _d === void 0 ? void 0 : _d.apple_payments) !== null && _e !== void 0 ? _e : false;
|
|
224
|
+
checkoutStore.googlePayEnabled = (_g = (_f = checkout.payment_settings) === null || _f === void 0 ? void 0 : _f.google_payments) !== null && _g !== void 0 ? _g : false;
|
|
225
|
+
checkoutStore.paypalEnabled = (_j = (_h = checkout.payment_settings) === null || _h === void 0 ? void 0 : _h.paypal_payments) !== null && _j !== void 0 ? _j : false;
|
|
226
|
+
checkoutStore.paypalProviderClientId = (_l = (_k = checkout.paypal) === null || _k === void 0 ? void 0 : _k.provider_client_id) !== null && _l !== void 0 ? _l : '';
|
|
186
227
|
checkoutStore.achPaymentsEnabled = achEnabled;
|
|
187
|
-
checkoutStore.bnplProviderClientId = (
|
|
188
|
-
checkoutStore.bnplProviderMode = (
|
|
189
|
-
checkoutStore.bnplProviderApiVersion = (
|
|
228
|
+
checkoutStore.bnplProviderClientId = (_m = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _m === void 0 ? void 0 : _m.provider_client_id;
|
|
229
|
+
checkoutStore.bnplProviderMode = (_o = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _o === void 0 ? void 0 : _o.provider_mode;
|
|
230
|
+
checkoutStore.bnplProviderApiVersion = (_p = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _p === void 0 ? void 0 : _p.provider_api_version;
|
|
190
231
|
checkoutStore.bnplProviderCheckoutUrl =
|
|
191
|
-
(
|
|
232
|
+
(_q = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _q === void 0 ? void 0 : _q.provider_checkout_url;
|
|
233
|
+
checkoutStore.paymentCurrency = (checkout.payment_currency || checkoutStore.paymentCurrency).toUpperCase();
|
|
234
|
+
checkoutStore.checkoutLoaded = true;
|
|
192
235
|
}
|
|
193
236
|
emitCheckoutChanged() {
|
|
194
237
|
const detail = {
|
|
@@ -202,6 +245,7 @@ export class JustifiModularCheckout {
|
|
|
202
245
|
this.billingFormRef = this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full, justifi-tokenize-payment-method");
|
|
203
246
|
this.applePayRef = this.hostEl.querySelector("justifi-apple-pay");
|
|
204
247
|
this.googlePayRef = this.hostEl.querySelector("justifi-google-pay");
|
|
248
|
+
this.paypalRef = this.hostEl.querySelector("justifi-paypal");
|
|
205
249
|
this.paymentMethodFormRef =
|
|
206
250
|
this.hostEl.querySelector('justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method');
|
|
207
251
|
if (!checkoutStore.selectedPaymentMethod && this.paymentMethodFormRef) {
|
|
@@ -246,6 +290,22 @@ export class JustifiModularCheckout {
|
|
|
246
290
|
this.googlePayRef.removeEventListener("googlePayCancelled", this.handleGooglePayCancelled);
|
|
247
291
|
}
|
|
248
292
|
}
|
|
293
|
+
setupPaypalListeners() {
|
|
294
|
+
if (this.paypalRef) {
|
|
295
|
+
this.paypalRef.addEventListener("paypalStarted", this.handlePaypalStarted);
|
|
296
|
+
this.paypalRef.addEventListener("paypalCompleted", this.handlePaypalCompleted);
|
|
297
|
+
this.paypalRef.addEventListener("paypalCancelled", this.handlePaypalCancelled);
|
|
298
|
+
this.paypalRef.addEventListener("paypalError", this.handlePaypalError);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
removePaypalListeners() {
|
|
302
|
+
if (this.paypalRef) {
|
|
303
|
+
this.paypalRef.removeEventListener("paypalStarted", this.handlePaypalStarted);
|
|
304
|
+
this.paypalRef.removeEventListener("paypalCompleted", this.handlePaypalCompleted);
|
|
305
|
+
this.paypalRef.removeEventListener("paypalCancelled", this.handlePaypalCancelled);
|
|
306
|
+
this.paypalRef.removeEventListener("paypalError", this.handlePaypalError);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
249
309
|
async tokenizePaymentMethod(tokenizeArgs) {
|
|
250
310
|
var _a, _b, _c;
|
|
251
311
|
const billingInfoValues = (_b = (await ((_a = this.billingFormRef) === null || _a === void 0 ? void 0 : _a.getValues()))) !== null && _b !== void 0 ? _b : {};
|
|
@@ -429,6 +489,10 @@ export class JustifiModularCheckout {
|
|
|
429
489
|
return PAYMENT_MODE.APPLE_PAY;
|
|
430
490
|
case PAYMENT_METHODS.GOOGLE_PAY:
|
|
431
491
|
return PAYMENT_MODE.GOOGLE_PAY;
|
|
492
|
+
case PAYMENT_METHODS.PAYPAL:
|
|
493
|
+
return PAYMENT_MODE.PAYPAL;
|
|
494
|
+
case PAYMENT_METHODS.VENMO:
|
|
495
|
+
return PAYMENT_MODE.VENMO;
|
|
432
496
|
default:
|
|
433
497
|
return undefined;
|
|
434
498
|
}
|
|
@@ -470,7 +534,7 @@ export class JustifiModularCheckout {
|
|
|
470
534
|
});
|
|
471
535
|
}
|
|
472
536
|
render() {
|
|
473
|
-
return h(Host, { key: '
|
|
537
|
+
return h(Host, { key: '127bf2aea6758c7d91e33f252a3db4bc27b066ff' });
|
|
474
538
|
}
|
|
475
539
|
static get is() { return "justifi-modular-checkout"; }
|
|
476
540
|
static get properties() {
|
|
@@ -22,7 +22,7 @@ export class JustifiBankAccountBillingFormSimple {
|
|
|
22
22
|
return (_b = (_a = this.bankAccountBillingFormSimpleRef) === null || _a === void 0 ? void 0 : _a.validate()) !== null && _b !== void 0 ? _b : { isValid: false, errors: {} };
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
return (h(StyledHost, { key: '
|
|
25
|
+
return (h(StyledHost, { key: '9848071f08342d3f5c2f7001af6e15148e713495' }, h("bank-account-billing-form-simple", { key: '35f2baeb2f017116199ccff431d0acac01ad498f', legend: this.legend, ref: (el) => (this.bankAccountBillingFormSimpleRef = el) })));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "justifi-bank-account-billing-form-simple"; }
|
|
28
28
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-form.js
CHANGED
|
@@ -30,7 +30,7 @@ export class JustifiBankAccountForm {
|
|
|
30
30
|
return this.bankAccountFormElement.tokenize({ clientId, paymentMethodMetadata, account });
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
|
-
return (h(StyledHost, { key: '
|
|
33
|
+
return (h(StyledHost, { key: '1263233d6c63c0df4a2a6a17b263651156ad6bee' }, h("bank-account-form", { key: 'f6c6707201ef127eafc81e12535bcfa37ddf3c5d', ref: (el) => (this.bankAccountFormElement = el) })));
|
|
34
34
|
}
|
|
35
35
|
static get is() { return "justifi-bank-account-form"; }
|
|
36
36
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/modular-checkout/sub-components/justifi-billing-form-full.js
CHANGED
|
@@ -10,7 +10,7 @@ export class JustifiBillingFormFull {
|
|
|
10
10
|
return (_b = (_a = this.billingFormFullRef) === null || _a === void 0 ? void 0 : _a.validate()) !== null && _b !== void 0 ? _b : { isValid: false, errors: {} };
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h(StyledHost, { key: '
|
|
13
|
+
return (h(StyledHost, { key: '0486f3f304d4751751b54a4a698ef5d7cb742947' }, h("billing-form-full", { key: '4c0822f484b70a14dca9309f6d145e1c8b6261dd', legend: this.legend, ref: (el) => (this.billingFormFullRef = el) })));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "justifi-billing-form-full"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ export class JustifiCardBillingFormSimple {
|
|
|
10
10
|
return (_b = (_a = this.cardBillingFormSimpleRef) === null || _a === void 0 ? void 0 : _a.validate()) !== null && _b !== void 0 ? _b : { isValid: false, errors: {} };
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h(StyledHost, { key: '
|
|
13
|
+
return (h(StyledHost, { key: '252d0c30a2ce3775759aa0490592bea6608620ca' }, h("card-billing-form-simple", { key: '62a33d79b9b12dfefbfef68f0cf9ec8beb52d177', legend: this.legend, ref: (el) => (this.cardBillingFormSimpleRef = el) })));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "justifi-card-billing-form-simple"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -20,7 +20,7 @@ export class JustifiCardForm {
|
|
|
20
20
|
return this.cardFormElement.tokenize({ clientId, paymentMethodMetadata, account });
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h(StyledHost, { key: '
|
|
23
|
+
return (h(StyledHost, { key: '4fa9ff677d40a6733c33d34135fe85e52392f8b0' }, h("card-form", { key: '3fe97adcb966b78dc28d5902409671e88525ca41', ref: (el) => (this.cardFormElement = el) })));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "justifi-card-form"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/modular-checkout/sub-components/justifi-checkout-summary.js
CHANGED
|
@@ -5,7 +5,7 @@ import { checkoutStore } from "../../../store/checkout.store";
|
|
|
5
5
|
import { StyledHost } from "../../../ui-components";
|
|
6
6
|
export class JustifiCheckoutSummary {
|
|
7
7
|
render() {
|
|
8
|
-
return (h(StyledHost, { key: '
|
|
8
|
+
return (h(StyledHost, { key: '7d3447ff4daa9bf4f603ca381027b3f43cfcc6a1' }, h("section", { key: '1c8189ccde6dc986ad2d4c74da2dd10cacfc1c36' }, h("div", { key: '45e6d5f47d8a92e0bd4a7bfa427630a96f049b4a' }, h("div", { key: '9900b5fd770cd59b00803c3614216c16a803da41', part: text }, checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.paymentDescription), h("div", { key: '16cec140ef6912533a80b1f6341fcc9cb341b478' }, h("span", { key: 'f8883538c99a524017bb102bfd8cfaea7062e650', part: text }, "Total"), "\u00A0", h("span", { key: '11baa64630a60c56cedfa53548c107ec3fe3c0f5', part: text }, formatCurrency(+(checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.totalAmount))))))));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "justifi-checkout-summary"; }
|
|
11
11
|
static get encapsulation() { return "shadow"; }
|
|
@@ -3,7 +3,7 @@ import { radioListItem } from "../../../styles/parts";
|
|
|
3
3
|
import { StyledHost } from "../../../ui-components";
|
|
4
4
|
export class PaymentMethodOption {
|
|
5
5
|
render() {
|
|
6
|
-
return (h(StyledHost, { key: '
|
|
6
|
+
return (h(StyledHost, { key: 'da82ac8f91a83d8be03b6db4d0a297d71182dea3', class: "payment-method" }, h("div", { key: '0b08e32931ffdbe963334c70cf245ad2230e7cc7', class: "radio-list-item p-3", part: radioListItem, onClick: this.clickHandler, hidden: this.radioButtonHidden }, h("form-control-radio", { key: '36b905117b18c8feace01d4b28ce532c4b2826dc', name: "paymentMethodType", value: this.paymentMethodOptionId, checked: this.isSelected, label: this.label }))));
|
|
7
7
|
}
|
|
8
8
|
static get is() { return "payment-method-option"; }
|
|
9
9
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { StyledHost } from "../../../../ui-components";
|
|
3
|
+
import { checkoutStore, onChange } from "../../../../store/checkout.store";
|
|
4
|
+
import { PaypalService } from "../../../../api/services/paypal.service";
|
|
5
|
+
import { PaypalErrorCode, PAYPAL_COMPONENTS, PAYPAL_DEFAULT_CURRENCY, PAYPAL_PAGE_TYPE, PAYPAL_PRESENTATION_MODE, PAYPAL_SCRIPT_DATA_TEST_ID, paypalScriptUrl, VENMO_SUPPORTED_CURRENCY, } from "./paypal";
|
|
6
|
+
export class JustifiPaypal {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.paypalService = new PaypalService();
|
|
9
|
+
this.paypalEligible = false;
|
|
10
|
+
this.venmoEligible = false;
|
|
11
|
+
this.startSession = async (session, fundingSource) => {
|
|
12
|
+
if (!session)
|
|
13
|
+
return;
|
|
14
|
+
this.pendingOrderId = undefined;
|
|
15
|
+
this.paypalStarted.emit({ fundingSource });
|
|
16
|
+
let orderFailed = false;
|
|
17
|
+
const order = this.createOrder(fundingSource)
|
|
18
|
+
.then((created) => ({ orderId: created.provider_order_id }))
|
|
19
|
+
.catch((error) => {
|
|
20
|
+
orderFailed = true;
|
|
21
|
+
this.emitError((error === null || error === void 0 ? void 0 : error.message) || 'Could not create the Paypal order', PaypalErrorCode.ORDER_ERROR);
|
|
22
|
+
throw error;
|
|
23
|
+
});
|
|
24
|
+
// The SDK is what normally consumes this rejection; swallow a copy so a
|
|
25
|
+
// failed order can never surface as an unhandled rejection.
|
|
26
|
+
order.catch(() => undefined);
|
|
27
|
+
try {
|
|
28
|
+
await session.start({ presentationMode: PAYPAL_PRESENTATION_MODE }, order);
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (orderFailed)
|
|
32
|
+
return;
|
|
33
|
+
this.emitError((error === null || error === void 0 ? void 0 : error.message) || 'Paypal payment failed', PaypalErrorCode.PAYMENT_FAILED);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
componentDidLoad() {
|
|
38
|
+
if (checkoutStore.checkoutLoaded) {
|
|
39
|
+
this.initializePaypal();
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
onChange('checkoutLoaded', (loaded) => {
|
|
43
|
+
if (loaded)
|
|
44
|
+
this.initializePaypal();
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
get currencyCode() {
|
|
49
|
+
return (checkoutStore.paymentCurrency || PAYPAL_DEFAULT_CURRENCY).toUpperCase();
|
|
50
|
+
}
|
|
51
|
+
emitError(error, code) {
|
|
52
|
+
this.paypalError.emit({ error, code });
|
|
53
|
+
}
|
|
54
|
+
// The script tag is the dedup token, so a second instance (or a remount)
|
|
55
|
+
// reuses the in-flight load instead of appending another SDK.
|
|
56
|
+
loadPaypalScript() {
|
|
57
|
+
const loaded = window.paypal;
|
|
58
|
+
if (loaded)
|
|
59
|
+
return Promise.resolve(loaded);
|
|
60
|
+
return new Promise((resolve, reject) => {
|
|
61
|
+
const selector = `script[data-test-id="${PAYPAL_SCRIPT_DATA_TEST_ID}"]`;
|
|
62
|
+
let script = document.head.querySelector(selector);
|
|
63
|
+
if (!script) {
|
|
64
|
+
script = document.createElement('script');
|
|
65
|
+
script.src = paypalScriptUrl(checkoutStore.checkoutMode);
|
|
66
|
+
script.async = true;
|
|
67
|
+
script.setAttribute('data-test-id', PAYPAL_SCRIPT_DATA_TEST_ID);
|
|
68
|
+
document.head.appendChild(script);
|
|
69
|
+
}
|
|
70
|
+
script.addEventListener('load', () => {
|
|
71
|
+
const paypal = window.paypal;
|
|
72
|
+
if (paypal) {
|
|
73
|
+
resolve(paypal);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
reject(new Error('Paypal script loaded but window.paypal is undefined'));
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
script.addEventListener('error', () => reject(new Error('Error loading Paypal script')));
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
metadataId() {
|
|
83
|
+
return (Math.random().toString(36).substring(2, 15) +
|
|
84
|
+
Math.random().toString(36).substring(2, 15));
|
|
85
|
+
}
|
|
86
|
+
async initializePaypal() {
|
|
87
|
+
const clientId = checkoutStore.paypalProviderClientId;
|
|
88
|
+
if (!clientId) {
|
|
89
|
+
this.paypalEligible = false;
|
|
90
|
+
this.venmoEligible = false;
|
|
91
|
+
this.emitError('Missing Paypal client id', PaypalErrorCode.CONFIG_ERROR);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
try {
|
|
95
|
+
const paypal = await this.loadPaypalScript();
|
|
96
|
+
this.sdkInstance = await paypal.createInstance({
|
|
97
|
+
clientId,
|
|
98
|
+
components: PAYPAL_COMPONENTS,
|
|
99
|
+
pageType: PAYPAL_PAGE_TYPE,
|
|
100
|
+
metadataId: this.metadataId(),
|
|
101
|
+
});
|
|
102
|
+
const eligibleMethods = await this.sdkInstance.findEligibleMethods({
|
|
103
|
+
currencyCode: this.currencyCode,
|
|
104
|
+
});
|
|
105
|
+
this.paypalEligible = eligibleMethods.isEligible('paypal');
|
|
106
|
+
this.venmoEligible = eligibleMethods.isEligible('venmo');
|
|
107
|
+
if (this.paypalEligible) {
|
|
108
|
+
this.paypalSession = this.sdkInstance.createPayPalOneTimePaymentSession(this.sessionOptions('paypal'));
|
|
109
|
+
}
|
|
110
|
+
if (this.venmoEligible) {
|
|
111
|
+
this.venmoSession = this.sdkInstance.createVenmoOneTimePaymentSession(this.sessionOptions('venmo'));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
catch (error) {
|
|
115
|
+
this.paypalEligible = false;
|
|
116
|
+
this.venmoEligible = false;
|
|
117
|
+
this.emitError((error === null || error === void 0 ? void 0 : error.message) || 'Error initializing Paypal', PaypalErrorCode.INITIALIZATION_ERROR);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
sessionOptions(fundingSource) {
|
|
121
|
+
return {
|
|
122
|
+
onApprove: () => this.paypalCompleted.emit({
|
|
123
|
+
success: true,
|
|
124
|
+
paymentMethodId: this.pendingOrderId,
|
|
125
|
+
fundingSource,
|
|
126
|
+
}),
|
|
127
|
+
onCancel: () => this.paypalCancelled.emit({ fundingSource }),
|
|
128
|
+
onError: (error) => this.emitError((error === null || error === void 0 ? void 0 : error.message) || 'Paypal payment failed', PaypalErrorCode.PAYMENT_FAILED),
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
async createOrder(fundingSource) {
|
|
132
|
+
const response = await this.paypalService.createPaypalOrder(checkoutStore.authToken, checkoutStore.checkoutId, fundingSource);
|
|
133
|
+
if (response === null || response === void 0 ? void 0 : response.error) {
|
|
134
|
+
const message = typeof response.error === 'string'
|
|
135
|
+
? response.error
|
|
136
|
+
: response.error.message;
|
|
137
|
+
throw new Error(message || 'Could not create the Paypal order');
|
|
138
|
+
}
|
|
139
|
+
const order = response === null || response === void 0 ? void 0 : response.data;
|
|
140
|
+
if (!(order === null || order === void 0 ? void 0 : order.provider_order_id)) {
|
|
141
|
+
throw new Error('Paypal order is missing a provider order id');
|
|
142
|
+
}
|
|
143
|
+
this.pendingOrderId = order.id;
|
|
144
|
+
return order;
|
|
145
|
+
}
|
|
146
|
+
render() {
|
|
147
|
+
if (!checkoutStore.paypalEnabled)
|
|
148
|
+
return null;
|
|
149
|
+
const showVenmo = this.venmoEligible && this.currencyCode === VENMO_SUPPORTED_CURRENCY;
|
|
150
|
+
if (!this.paypalEligible && !showVenmo)
|
|
151
|
+
return null;
|
|
152
|
+
return (h(StyledHost, null, h("div", { class: "paypal-buttons" }, this.paypalEligible && (h("paypal-button", { type: "pay", onClick: () => this.startSession(this.paypalSession, 'paypal') })), showVenmo && (h("venmo-button", { type: "pay", onClick: () => this.startSession(this.venmoSession, 'venmo') }))), h("style", null, `
|
|
153
|
+
.paypal-buttons {
|
|
154
|
+
display: flex;
|
|
155
|
+
gap: 8px;
|
|
156
|
+
width: 100%;
|
|
157
|
+
}
|
|
158
|
+
.paypal-buttons > * {
|
|
159
|
+
flex: 1 1 0;
|
|
160
|
+
min-width: 0;
|
|
161
|
+
}
|
|
162
|
+
`)));
|
|
163
|
+
}
|
|
164
|
+
static get is() { return "justifi-paypal"; }
|
|
165
|
+
static get encapsulation() { return "shadow"; }
|
|
166
|
+
static get states() {
|
|
167
|
+
return {
|
|
168
|
+
"paypalEligible": {},
|
|
169
|
+
"venmoEligible": {}
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
static get events() {
|
|
173
|
+
return [{
|
|
174
|
+
"method": "paypalStarted",
|
|
175
|
+
"name": "paypalStarted",
|
|
176
|
+
"bubbles": true,
|
|
177
|
+
"cancelable": true,
|
|
178
|
+
"composed": true,
|
|
179
|
+
"docs": {
|
|
180
|
+
"tags": [],
|
|
181
|
+
"text": ""
|
|
182
|
+
},
|
|
183
|
+
"complexType": {
|
|
184
|
+
"original": "{\n fundingSource: PaypalFundingSource;\n }",
|
|
185
|
+
"resolved": "{ fundingSource: PaypalFundingSource; }",
|
|
186
|
+
"references": {
|
|
187
|
+
"PaypalFundingSource": {
|
|
188
|
+
"location": "import",
|
|
189
|
+
"path": "../../../../api/Paypal",
|
|
190
|
+
"id": "src/api/Paypal.ts::PaypalFundingSource"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}, {
|
|
195
|
+
"method": "paypalCompleted",
|
|
196
|
+
"name": "paypalCompleted",
|
|
197
|
+
"bubbles": true,
|
|
198
|
+
"cancelable": true,
|
|
199
|
+
"composed": true,
|
|
200
|
+
"docs": {
|
|
201
|
+
"tags": [],
|
|
202
|
+
"text": ""
|
|
203
|
+
},
|
|
204
|
+
"complexType": {
|
|
205
|
+
"original": "{\n success: boolean;\n paymentMethodId?: string;\n fundingSource: PaypalFundingSource;\n }",
|
|
206
|
+
"resolved": "{ success: boolean; paymentMethodId?: string; fundingSource: PaypalFundingSource; }",
|
|
207
|
+
"references": {
|
|
208
|
+
"PaypalFundingSource": {
|
|
209
|
+
"location": "import",
|
|
210
|
+
"path": "../../../../api/Paypal",
|
|
211
|
+
"id": "src/api/Paypal.ts::PaypalFundingSource"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}, {
|
|
216
|
+
"method": "paypalCancelled",
|
|
217
|
+
"name": "paypalCancelled",
|
|
218
|
+
"bubbles": true,
|
|
219
|
+
"cancelable": true,
|
|
220
|
+
"composed": true,
|
|
221
|
+
"docs": {
|
|
222
|
+
"tags": [],
|
|
223
|
+
"text": ""
|
|
224
|
+
},
|
|
225
|
+
"complexType": {
|
|
226
|
+
"original": "{\n fundingSource: PaypalFundingSource;\n }",
|
|
227
|
+
"resolved": "{ fundingSource: PaypalFundingSource; }",
|
|
228
|
+
"references": {
|
|
229
|
+
"PaypalFundingSource": {
|
|
230
|
+
"location": "import",
|
|
231
|
+
"path": "../../../../api/Paypal",
|
|
232
|
+
"id": "src/api/Paypal.ts::PaypalFundingSource"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}, {
|
|
237
|
+
"method": "paypalError",
|
|
238
|
+
"name": "paypalError",
|
|
239
|
+
"bubbles": true,
|
|
240
|
+
"cancelable": true,
|
|
241
|
+
"composed": true,
|
|
242
|
+
"docs": {
|
|
243
|
+
"tags": [],
|
|
244
|
+
"text": ""
|
|
245
|
+
},
|
|
246
|
+
"complexType": {
|
|
247
|
+
"original": "{ error: string; code: string }",
|
|
248
|
+
"resolved": "{ error: string; code: string; }",
|
|
249
|
+
"references": {}
|
|
250
|
+
}
|
|
251
|
+
}];
|
|
252
|
+
}
|
|
253
|
+
}
|