@justifi/webcomponents 4.8.3 → 4.9.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/{Business-42d0c522.js → Business-64dffab7.js} +6 -7
- package/dist/cjs/{BusinessFormEventTypes-863f48e9.js → BusinessFormEventTypes-62990815.js} +1 -1
- package/dist/cjs/{Payout-44b49b2d.js → Payment-89a8bc21.js} +0 -43
- package/dist/cjs/Payout-a2dd7b01.js +45 -0
- package/dist/cjs/{SubAccount-2a803b22.js → SubAccount-f8144025.js} +1 -1
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +24 -10
- package/dist/{webcomponents/p-4ee44c76.entry.js → cjs/business-details-core.cjs.entry.js} +55 -1
- package/dist/cjs/form-control-datepart_3.cjs.entry.js +1 -1
- package/dist/cjs/form-control-monetary.cjs.entry.js +1 -1
- package/dist/cjs/form-control-select_2.cjs.entry.js +1 -1
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +11036 -0
- package/dist/cjs/{index-55950669.js → index-07ddbad2.js} +0 -3
- package/dist/cjs/justifi-additional-questions_5.cjs.entry.js +2 -2
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +1 -1
- package/dist/cjs/{select-input_2.cjs.entry.js → justifi-billing-form_4.cjs.entry.js} +1811 -1
- package/dist/cjs/justifi-business-details.cjs.entry.js +43 -57
- package/dist/cjs/justifi-business-form-stepped.cjs.entry.js +5 -4
- package/dist/cjs/justifi-business-form.cjs.entry.js +5 -4
- package/dist/cjs/justifi-business-list.cjs.entry.js +5 -4
- package/dist/cjs/justifi-business-owners.cjs.entry.js +1 -1
- package/dist/cjs/justifi-card-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +95 -0
- package/dist/cjs/justifi-checkout.cjs.entry.js +99 -0
- package/dist/cjs/justifi-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +39 -11008
- package/dist/cjs/justifi-new-payment-method_3.cjs.entry.js +168 -0
- package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +5 -4
- package/dist/cjs/justifi-payment-details.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payment-form.cjs.entry.js +5 -4
- package/dist/cjs/{justifi-billing-form_2.cjs.entry.js → justifi-payment-method-selector.cjs.entry.js} +4 -79
- package/dist/cjs/justifi-payments-list.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payout-details.cjs.entry.js +5 -4
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +5 -4
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js +4 -3
- package/dist/cjs/justifi-refund-form.cjs.entry.js +3 -2
- package/dist/cjs/justifi-subaccount-details.cjs.entry.js +6 -5
- package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +5 -4
- package/dist/cjs/justifi-table_2.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/payment-details-core.cjs.entry.js +10 -4
- package/dist/cjs/{payment.service-605896dc.js → payment.service-0b0086dc.js} +2 -1
- package/dist/cjs/payments-list-core.cjs.entry.js +4 -3
- package/dist/cjs/payout-details-core.cjs.entry.js +4 -4
- package/dist/cjs/{payout.service-b39f2739.js → payout.service-5cc3b4e9.js} +2 -1
- package/dist/cjs/payouts-list-core.cjs.entry.js +4 -3
- package/dist/cjs/subaccount-account-details_4.cjs.entry.js +7 -7
- package/dist/cjs/subaccount-bank-details.cjs.entry.js +3 -3
- package/dist/cjs/subaccount-terms-details.cjs.entry.js +3 -3
- package/dist/cjs/{utils-d126d17c.js → utils-5c3e442d.js} +5 -5
- package/dist/cjs/{utils-29a8a91d.js → utils-84208d99.js} +11 -2
- package/dist/cjs/webcomponents.cjs.js +2 -2
- package/dist/collection/api/Business.js +6 -7
- package/dist/collection/api/Checkout.js +1 -0
- package/dist/collection/api/index.js +1 -0
- package/dist/collection/api/services/business.service.js +8 -0
- package/dist/collection/api/services/checkout.service.js +12 -0
- package/dist/collection/api/services/reports.service.js +9 -0
- package/dist/collection/collection-manifest.json +7 -0
- package/dist/collection/components/billing-form/billing-form.js +1 -2
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +5 -2
- package/dist/collection/components/business-details/additional-questions-details/test/additional-questions.spec.js +16 -0
- package/dist/collection/components/business-details/business-details-core.js +86 -0
- package/dist/collection/components/business-details/business-details.js +20 -65
- package/dist/collection/components/business-details/generic-info-details/generic-info-details.js +4 -2
- package/dist/collection/components/business-details/generic-info-details/test/generic-info-details.spec.js +16 -0
- package/dist/collection/components/business-details/get-business.js +17 -0
- package/dist/collection/components/business-details/legal-address-details/legal-address-details.js +5 -2
- package/dist/collection/components/business-details/legal-address-details/test/legal-address-details.spec.js +16 -0
- package/dist/collection/components/business-details/owner-details/owner-details.js +10 -12
- package/dist/collection/components/business-details/owner-details/test/owner-details.spec.js +16 -0
- package/dist/collection/components/business-details/representative-details/representative-details.js +5 -3
- package/dist/collection/components/business-details/representative-details/test/representative-details.spec.js +16 -0
- package/dist/collection/components/business-details/test/busines-details-core.spec.js +53 -0
- package/dist/collection/components/business-details/test/business-details.spec.js +40 -0
- package/dist/collection/components/business-details/test/get-business.spec.js +60 -0
- package/dist/collection/components/checkout/checkout-actions.js +33 -0
- package/dist/collection/components/checkout/checkout-core.css +2604 -0
- package/dist/collection/components/checkout/checkout-core.js +248 -0
- package/dist/collection/components/checkout/checkout.js +112 -0
- package/dist/collection/components/checkout/new-payment-method.js +188 -0
- package/dist/collection/components/checkout/payment-method-option-utils.js +19 -0
- package/dist/collection/components/checkout/payment-method-options.css +7073 -0
- package/dist/collection/components/checkout/payment-method-options.js +248 -0
- package/dist/collection/components/checkout/saved-payment-method.js +123 -0
- package/dist/collection/components/checkout/test/checkout.js +22 -0
- package/dist/collection/components/checkout/test/checkout.spec.js +166 -0
- package/dist/collection/components/checkout/test/mockCheckout.js +19 -0
- package/dist/collection/components/details/utils.js +4 -1
- package/dist/collection/components/gross-payment-chart/get-gross-payment-chart-data.js +14 -0
- package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +119 -0
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +25 -73
- package/dist/collection/components/gross-payment-chart/test/get-gross-payment-chart-data.spec.js +69 -0
- package/dist/collection/components/gross-payment-chart/test/gross-payment-chart-core.spec.js +64 -0
- package/dist/collection/components/gross-payment-chart/test/gross-payment-chart.spec.js +23 -8
- package/dist/collection/components/payment-details/payment-details-core.js +8 -2
- package/dist/collection/components/payment-details/payment-details.js +0 -1
- package/dist/collection/components/payment-form/payment-form.js +1 -1
- package/dist/collection/components/payment-method-form/payment-method-form.js +1 -1
- package/dist/collection/components/payout-details/payout-details-core.js +2 -2
- package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js +2 -2
- package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js +2 -2
- package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js +2 -2
- package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js +2 -2
- package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js +2 -2
- package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js +2 -2
- package/dist/collection/utils/utils.js +9 -3
- package/dist/docs.json +1152 -187
- package/dist/esm/{Business-e9340f6b.js → Business-9921d35f.js} +6 -7
- package/dist/esm/{BusinessFormEventTypes-989960ba.js → BusinessFormEventTypes-182e20be.js} +1 -1
- package/dist/esm/{Payout-dc5f009c.js → Payment-55886c86.js} +1 -43
- package/dist/esm/Payout-dfe15b00.js +43 -0
- package/dist/esm/{SubAccount-46b4c2b1.js → SubAccount-76f6d565.js} +1 -1
- package/dist/esm/additional-questions-details_5.entry.js +24 -10
- package/dist/esm/business-details-core.entry.js +51 -0
- package/dist/esm/form-control-datepart_3.entry.js +1 -1
- package/dist/esm/form-control-monetary.entry.js +1 -1
- package/dist/esm/form-control-select_2.entry.js +1 -1
- package/dist/esm/gross-payment-chart-core.entry.js +11032 -0
- package/dist/esm/{index-62b8aa8a.js → index-fb5ca346.js} +0 -3
- package/dist/esm/justifi-additional-questions_5.entry.js +2 -2
- package/dist/esm/justifi-bank-account-form.entry.js +1 -1
- package/dist/esm/{select-input_2.entry.js → justifi-billing-form_4.entry.js} +1810 -2
- package/dist/esm/justifi-business-details.entry.js +42 -56
- package/dist/esm/justifi-business-form-stepped.entry.js +5 -4
- package/dist/esm/justifi-business-form.entry.js +5 -4
- package/dist/esm/justifi-business-list.entry.js +5 -4
- package/dist/esm/justifi-business-owners.entry.js +1 -1
- package/dist/esm/justifi-card-form.entry.js +1 -1
- package/dist/esm/justifi-checkout-core.entry.js +91 -0
- package/dist/esm/justifi-checkout.entry.js +95 -0
- package/dist/esm/justifi-details.entry.js +2 -2
- package/dist/esm/justifi-gross-payment-chart.entry.js +39 -11008
- package/dist/esm/justifi-new-payment-method_3.entry.js +162 -0
- package/dist/esm/justifi-payment-balance-transactions.entry.js +4 -3
- package/dist/esm/justifi-payment-details.entry.js +5 -4
- package/dist/esm/justifi-payment-form.entry.js +4 -3
- package/dist/esm/{justifi-billing-form_2.entry.js → justifi-payment-method-selector.entry.js} +4 -78
- package/dist/esm/justifi-payments-list.entry.js +5 -4
- package/dist/esm/justifi-payout-details.entry.js +5 -4
- package/dist/esm/justifi-payouts-list.entry.js +5 -4
- package/dist/esm/justifi-proceeds-list.entry.js +4 -3
- package/dist/esm/justifi-refund-form.entry.js +3 -2
- package/dist/esm/justifi-subaccount-details.entry.js +6 -5
- package/dist/esm/justifi-subaccounts-list.entry.js +5 -4
- package/dist/esm/justifi-table_2.entry.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/payment-details-core.entry.js +10 -4
- package/dist/esm/{payment.service-bea02ccf.js → payment.service-f274ef98.js} +2 -1
- package/dist/esm/payments-list-core.entry.js +4 -3
- package/dist/esm/payout-details-core.entry.js +4 -4
- package/dist/esm/{payout.service-92e56814.js → payout.service-af293f61.js} +2 -1
- package/dist/esm/payouts-list-core.entry.js +4 -3
- package/dist/esm/subaccount-account-details_4.entry.js +7 -7
- package/dist/esm/subaccount-bank-details.entry.js +3 -3
- package/dist/esm/subaccount-terms-details.entry.js +3 -3
- package/dist/esm/{utils-76a93600.js → utils-5193fcd7.js} +10 -3
- package/dist/esm/{utils-576874df.js → utils-a3e96d9f.js} +5 -5
- package/dist/esm/webcomponents.js +3 -3
- package/dist/module/Business.js +6 -7
- package/dist/module/Payment.js +138 -0
- package/dist/module/Payout.js +1 -138
- package/dist/module/SubAccount.js +1 -1
- package/dist/module/additional-questions-details2.js +5 -2
- package/dist/module/billing-form.js +1 -2
- package/dist/module/business-details-core.d.ts +11 -0
- package/dist/module/business-details-core.js +6 -0
- package/dist/module/business-details-core2.js +101 -0
- package/dist/module/checkout-core.js +163 -0
- package/dist/module/generic-info-details2.js +4 -2
- package/dist/module/gross-payment-chart-core.d.ts +11 -0
- package/dist/module/gross-payment-chart-core.js +6 -0
- package/dist/module/gross-payment-chart-core2.js +11055 -0
- package/dist/module/justifi-business-details.js +51 -60
- package/dist/module/justifi-business-form-stepped.js +1 -0
- package/dist/module/justifi-business-form.js +1 -0
- package/dist/module/justifi-business-list.js +2 -1
- package/dist/module/justifi-checkout-core.d.ts +11 -0
- package/dist/module/justifi-checkout-core.js +6 -0
- package/dist/module/justifi-checkout.d.ts +11 -0
- package/dist/module/justifi-checkout.js +172 -0
- package/dist/module/justifi-gross-payment-chart.js +49 -11016
- package/dist/module/justifi-new-payment-method.d.ts +11 -0
- package/dist/module/justifi-new-payment-method.js +6 -0
- package/dist/module/justifi-payment-balance-transactions.js +3 -2
- package/dist/module/justifi-payment-details.js +2 -1
- package/dist/module/justifi-payment-form.js +2 -1
- package/dist/module/justifi-payment-method-options.d.ts +11 -0
- package/dist/module/justifi-payment-method-options.js +6 -0
- package/dist/module/justifi-payments-list.js +2 -1
- package/dist/module/justifi-payout-details.js +2 -1
- package/dist/module/justifi-payouts-list.js +2 -1
- package/dist/module/justifi-proceeds-list.js +2 -1
- package/dist/module/justifi-refund-form.js +1 -0
- package/dist/module/justifi-saved-payment-method.d.ts +11 -0
- package/dist/module/justifi-saved-payment-method.js +6 -0
- package/dist/module/justifi-subaccount-details.js +2 -1
- package/dist/module/justifi-subaccounts-list.js +2 -1
- package/dist/module/legal-address-details2.js +5 -2
- package/dist/module/new-payment-method.js +105 -0
- package/dist/module/owner-details2.js +10 -4
- package/dist/module/payment-details-core2.js +9 -3
- package/dist/module/payment-method-form.js +4 -10
- package/dist/module/payment-method-options.js +128 -0
- package/dist/module/payment-method-selector.js +2 -1
- package/dist/module/payment.service.js +1 -0
- package/dist/module/payments-list-core2.js +2 -1
- package/dist/module/payout-details-core2.js +3 -3
- package/dist/module/payout.service.js +1 -0
- package/dist/module/payouts-list-core2.js +3 -2
- package/dist/module/representative-details2.js +5 -3
- package/dist/module/saved-payment-method.js +66 -0
- package/dist/module/subaccount-account-details2.js +2 -2
- package/dist/module/subaccount-bank-details.js +2 -2
- package/dist/module/subaccount-merchant-details2.js +3 -3
- package/dist/module/subaccount-owners-details2.js +2 -2
- package/dist/module/subaccount-representative-details2.js +2 -2
- package/dist/module/subaccount-terms-details.js +2 -2
- package/dist/module/utils.js +4 -4
- package/dist/module/utils2.js +10 -3
- package/dist/types/api/Api.d.ts +1 -1
- package/dist/types/api/Checkout.d.ts +14 -0
- package/dist/types/api/index.d.ts +1 -0
- package/dist/types/api/services/business.service.d.ts +8 -0
- package/dist/types/api/services/checkout.service.d.ts +9 -0
- package/dist/types/api/services/reports.service.d.ts +5 -0
- package/dist/types/components/billing-form/billing-form.d.ts +0 -1
- package/dist/types/components/business-details/business-details-core.d.ts +16 -0
- package/dist/types/components/business-details/business-details.d.ts +3 -13
- package/dist/types/components/business-details/get-business.d.ts +8 -0
- package/dist/types/components/business-details/owner-details/owner-details.d.ts +0 -8
- package/dist/types/components/checkout/checkout-actions.d.ts +17 -0
- package/dist/types/components/checkout/checkout-core.d.ts +28 -0
- package/dist/types/components/checkout/checkout.d.ts +12 -0
- package/dist/types/components/checkout/new-payment-method.d.ts +17 -0
- package/dist/types/components/checkout/payment-method-option-utils.d.ts +16 -0
- package/dist/types/components/checkout/payment-method-options.d.ts +18 -0
- package/dist/types/components/checkout/saved-payment-method.d.ts +11 -0
- package/dist/types/components/checkout/test/checkout.d.ts +1 -0
- package/dist/types/components/checkout/test/mockCheckout.d.ts +19 -0
- package/dist/types/components/details/utils.d.ts +1 -1
- package/dist/types/components/gross-payment-chart/get-gross-payment-chart-data.d.ts +11 -0
- package/dist/types/components/gross-payment-chart/gross-payment-chart-core.d.ts +18 -0
- package/dist/types/components/gross-payment-chart/gross-payment-chart.d.ts +4 -14
- package/dist/types/components/payment-details/payment-details.d.ts +0 -1
- package/dist/types/components/payment-method-form/payment-method-responses.d.ts +3 -9
- package/dist/types/components.d.ts +217 -32
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/webcomponents/p-018b71f5.entry.js +1 -0
- package/dist/webcomponents/p-0923e39c.js +1 -0
- package/dist/webcomponents/{p-7a1a06c0.entry.js → p-09b94d22.entry.js} +1 -1
- package/dist/webcomponents/p-1b04d091.entry.js +1 -0
- package/dist/webcomponents/{p-0a0cf2e6.entry.js → p-1bac1674.entry.js} +1 -1
- package/dist/webcomponents/p-1cbdca15.entry.js +1 -0
- package/dist/webcomponents/p-2f0653f4.entry.js +1 -0
- package/dist/webcomponents/p-3134ab82.entry.js +1 -0
- package/dist/webcomponents/{p-22c1acd6.js → p-34f9fe6b.js} +1 -1
- package/dist/webcomponents/p-3bae0ed3.entry.js +1 -0
- package/dist/webcomponents/p-41031759.entry.js +1 -0
- package/dist/webcomponents/p-41490d96.entry.js +1 -0
- package/dist/webcomponents/{p-081cf5f6.entry.js → p-4ed3a9f5.entry.js} +1 -1
- package/dist/webcomponents/{p-6478f3ca.js → p-4edd9721.js} +1 -1
- package/dist/webcomponents/p-51b0bf2a.entry.js +1 -0
- package/dist/webcomponents/p-531844f6.entry.js +1 -0
- package/dist/webcomponents/{p-4fa27a28.entry.js → p-591e29bf.entry.js} +1 -1
- package/dist/webcomponents/p-5d5d7550.entry.js +1 -0
- package/dist/webcomponents/{p-810b72b5.js → p-5ea274b8.js} +1 -1
- package/dist/webcomponents/{p-4ba2c711.entry.js → p-5f785ede.entry.js} +1 -1
- package/dist/webcomponents/p-63296409.js +1 -0
- package/dist/webcomponents/{p-4f14df36.js → p-6d05174c.js} +1 -1
- package/dist/webcomponents/p-72d1ad98.entry.js +1 -0
- package/dist/webcomponents/{p-40349ffc.entry.js → p-796cf44f.entry.js} +1 -1
- package/dist/webcomponents/p-7b2cddc7.js +1 -0
- package/dist/webcomponents/{p-7c0f91fa.entry.js → p-7cd06ada.entry.js} +1 -1
- package/dist/webcomponents/p-8f895ec3.entry.js +1 -0
- package/dist/webcomponents/p-92a55427.entry.js +1 -0
- package/dist/webcomponents/p-97c42345.entry.js +1 -0
- package/dist/webcomponents/p-99a8b7d0.entry.js +1 -0
- package/dist/webcomponents/p-9a63eec9.entry.js +1 -0
- package/dist/webcomponents/p-9c310f5c.entry.js +1 -0
- package/dist/webcomponents/p-9e3771b7.entry.js +19 -0
- package/dist/webcomponents/{p-6d0725ef.entry.js → p-a81229a5.entry.js} +1 -1
- package/dist/webcomponents/{p-234bc840.entry.js → p-adc96df1.entry.js} +1 -1
- package/dist/webcomponents/p-baafa7f5.js +1 -0
- package/dist/webcomponents/p-babd292f.entry.js +1 -0
- package/dist/webcomponents/{p-5c0310ee.js → p-bb037696.js} +1 -1
- package/dist/webcomponents/p-bb7f6095.entry.js +1 -0
- package/dist/webcomponents/p-c032b216.entry.js +1 -0
- package/dist/webcomponents/{p-08833966.entry.js → p-c2c3d5d1.entry.js} +1 -1
- package/dist/webcomponents/p-c8d51336.entry.js +1 -0
- package/dist/webcomponents/{p-4c01df65.entry.js → p-dc05b5c5.entry.js} +1 -1
- package/dist/webcomponents/p-e3fab0e2.js +1 -0
- package/dist/webcomponents/p-e536a4c1.entry.js +1 -0
- package/dist/webcomponents/p-e6939585.entry.js +1 -0
- package/dist/webcomponents/p-ec358d69.entry.js +1 -0
- package/dist/webcomponents/p-f55ac955.entry.js +1 -0
- package/dist/webcomponents/p-f64a85cf.entry.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +3 -2
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +0 -1747
- package/dist/esm/justifi-payment-method-form.entry.js +0 -1743
- package/dist/webcomponents/p-0bc8b02e.entry.js +0 -1
- package/dist/webcomponents/p-112acd3c.entry.js +0 -1
- package/dist/webcomponents/p-1555e6b1.js +0 -1
- package/dist/webcomponents/p-16f41fd0.entry.js +0 -1
- package/dist/webcomponents/p-17715325.js +0 -1
- package/dist/webcomponents/p-3a4d4869.entry.js +0 -1
- package/dist/webcomponents/p-3cb0b96d.js +0 -1
- package/dist/webcomponents/p-5422a24b.entry.js +0 -1
- package/dist/webcomponents/p-578e0a05.entry.js +0 -1
- package/dist/webcomponents/p-640d90dc.entry.js +0 -1
- package/dist/webcomponents/p-663bfe87.js +0 -1
- package/dist/webcomponents/p-696396c7.entry.js +0 -1
- package/dist/webcomponents/p-6ab67031.entry.js +0 -1
- package/dist/webcomponents/p-8516d602.entry.js +0 -1
- package/dist/webcomponents/p-894a7475.entry.js +0 -19
- package/dist/webcomponents/p-94ebfafb.entry.js +0 -1
- package/dist/webcomponents/p-9cb3ff78.entry.js +0 -1
- package/dist/webcomponents/p-9e81808f.entry.js +0 -1
- package/dist/webcomponents/p-a432110c.entry.js +0 -1
- package/dist/webcomponents/p-b1881723.entry.js +0 -1
- package/dist/webcomponents/p-b5aba473.entry.js +0 -1
- package/dist/webcomponents/p-bd099662.entry.js +0 -1
- package/dist/webcomponents/p-bfd917b8.entry.js +0 -1
- package/dist/webcomponents/p-c90fa055.entry.js +0 -1
- package/dist/webcomponents/p-ebb91944.entry.js +0 -1
- package/dist/webcomponents/p-ec4f27e7.entry.js +0 -1
- package/dist/webcomponents/p-fa495a43.entry.js +0 -1
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { extractComputedFontsToLoad, formatCurrency } from "../../utils/utils";
|
|
3
|
+
import { config } from "../../../config";
|
|
4
|
+
export class CheckoutCore {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.loadingSpinner = (h("div", { class: "spinner-border spinner-border-sm", role: "status" }, h("span", { class: "visually-hidden" }, "Loading...")));
|
|
7
|
+
this.iframeOrigin = config.iframeOrigin;
|
|
8
|
+
this.authToken = undefined;
|
|
9
|
+
this.getCheckout = undefined;
|
|
10
|
+
this.pay = undefined;
|
|
11
|
+
this.checkoutId = undefined;
|
|
12
|
+
this.hasLoadedFonts = false;
|
|
13
|
+
this.isLoading = false;
|
|
14
|
+
this.checkout = undefined;
|
|
15
|
+
this.serverError = false;
|
|
16
|
+
this.errorMessage = '';
|
|
17
|
+
this.creatingNewPaymentMethod = false;
|
|
18
|
+
this.selectedPaymentMethodToken = undefined;
|
|
19
|
+
}
|
|
20
|
+
componentWillLoad() {
|
|
21
|
+
if (this.getCheckout) {
|
|
22
|
+
this.fetchData();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
connectedCallback() {
|
|
26
|
+
if (!this.hasLoadedFonts) {
|
|
27
|
+
this.loadFontsOnParent();
|
|
28
|
+
this.hasLoadedFonts = true;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
fetchData() {
|
|
32
|
+
this.isLoading = true;
|
|
33
|
+
this.getCheckout({
|
|
34
|
+
onSuccess: ({ checkout }) => {
|
|
35
|
+
this.checkout = checkout;
|
|
36
|
+
this.isLoading = false;
|
|
37
|
+
},
|
|
38
|
+
onError: (errorMessage) => {
|
|
39
|
+
this.errorMessage = errorMessage;
|
|
40
|
+
this.isLoading = false;
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
;
|
|
45
|
+
async loadFontsOnParent() {
|
|
46
|
+
const parent = document.body;
|
|
47
|
+
const fontsToLoad = extractComputedFontsToLoad();
|
|
48
|
+
if (!parent || !fontsToLoad) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
// This approach is needed to load the font in a parent of the component
|
|
52
|
+
const fonts = document.createElement('link');
|
|
53
|
+
fonts.rel = 'stylesheet';
|
|
54
|
+
fonts.href = `https://fonts.googleapis.com/css2?family=${fontsToLoad}&display=swap`;
|
|
55
|
+
parent.append(fonts);
|
|
56
|
+
}
|
|
57
|
+
async submit(event) {
|
|
58
|
+
event.preventDefault();
|
|
59
|
+
this.isLoading = true;
|
|
60
|
+
const token = await this.paymentMethodOptionsRef.getPaymentMethodToken();
|
|
61
|
+
if (!token) {
|
|
62
|
+
this.isLoading = false;
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
;
|
|
66
|
+
this.pay({
|
|
67
|
+
paymentMethodToken: token,
|
|
68
|
+
onSuccess: ({ checkout }) => {
|
|
69
|
+
if (!checkout)
|
|
70
|
+
return;
|
|
71
|
+
this.checkout = checkout;
|
|
72
|
+
this.isLoading = false;
|
|
73
|
+
},
|
|
74
|
+
onError: (errorMessage) => {
|
|
75
|
+
this.errorMessage = errorMessage;
|
|
76
|
+
this.isLoading = false;
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
render() {
|
|
81
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
82
|
+
return (h(Host, null, h("div", { class: "row gy-3" }, h("div", { class: "col-12 mb-4" }, h("h2", { class: "fs-5 fw-bold" }, "Summary"), this.checkout && (h("div", null, h("div", null, (_a = this.checkout) === null || _a === void 0 ? void 0 : _a.payment_description), h("div", null, "Total ", formatCurrency(+this.checkout.payment_amount))))), h("div", { class: "col-12" }, h("h2", { class: "fs-5 fw-bold border-bottom pb-3" }, "Payment"), h("h3", { class: "fs-6 fw-bold lh-lg" }, "Select payment type"), h("div", { class: "d-flex flex-column" }, h("justifi-payment-method-options", { ref: (el) => (this.paymentMethodOptionsRef = el), "show-card": ((_c = (_b = this.checkout) === null || _b === void 0 ? void 0 : _b.payment_settings) === null || _c === void 0 ? void 0 : _c.credit_card_payments) || true, "show-ach": ((_e = (_d = this.checkout) === null || _d === void 0 ? void 0 : _d.payment_settings) === null || _e === void 0 ? void 0 : _e.ach_payments) || true, "client-id": (_f = this.checkout) === null || _f === void 0 ? void 0 : _f.payment_client_id, "account-id": (_g = this.checkout) === null || _g === void 0 ? void 0 : _g.account_id, savedPaymentMethods: (_h = this.checkout) === null || _h === void 0 ? void 0 : _h.payment_methods }))), h("div", { class: "col-12" }, h("div", { class: "d-flex justify-content-end" }, h("button", { type: "submit", onClick: event => this.submit(event), disabled: this.isLoading, class: `btn btn-primary jfi-submit-button ${this.isLoading ? 'jfi-submit-button-loading' : ''}` }, this.isLoading ? this.loadingSpinner : 'Pay'))))));
|
|
83
|
+
}
|
|
84
|
+
static get is() { return "justifi-checkout-core"; }
|
|
85
|
+
static get encapsulation() { return "shadow"; }
|
|
86
|
+
static get originalStyleUrls() {
|
|
87
|
+
return {
|
|
88
|
+
"$": ["checkout-core.scss"]
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
static get styleUrls() {
|
|
92
|
+
return {
|
|
93
|
+
"$": ["checkout-core.css"]
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
static get properties() {
|
|
97
|
+
return {
|
|
98
|
+
"iframeOrigin": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"mutable": true,
|
|
101
|
+
"complexType": {
|
|
102
|
+
"original": "string",
|
|
103
|
+
"resolved": "string",
|
|
104
|
+
"references": {}
|
|
105
|
+
},
|
|
106
|
+
"required": false,
|
|
107
|
+
"optional": true,
|
|
108
|
+
"docs": {
|
|
109
|
+
"tags": [],
|
|
110
|
+
"text": "URL for the rendered iFrame. End-users need not use this."
|
|
111
|
+
},
|
|
112
|
+
"attribute": "iframe-origin",
|
|
113
|
+
"reflect": false,
|
|
114
|
+
"defaultValue": "config.iframeOrigin"
|
|
115
|
+
},
|
|
116
|
+
"authToken": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"mutable": false,
|
|
119
|
+
"complexType": {
|
|
120
|
+
"original": "string",
|
|
121
|
+
"resolved": "string",
|
|
122
|
+
"references": {}
|
|
123
|
+
},
|
|
124
|
+
"required": false,
|
|
125
|
+
"optional": false,
|
|
126
|
+
"docs": {
|
|
127
|
+
"tags": [],
|
|
128
|
+
"text": ""
|
|
129
|
+
},
|
|
130
|
+
"attribute": "auth-token",
|
|
131
|
+
"reflect": false
|
|
132
|
+
},
|
|
133
|
+
"getCheckout": {
|
|
134
|
+
"type": "unknown",
|
|
135
|
+
"mutable": false,
|
|
136
|
+
"complexType": {
|
|
137
|
+
"original": "Function",
|
|
138
|
+
"resolved": "Function",
|
|
139
|
+
"references": {
|
|
140
|
+
"Function": {
|
|
141
|
+
"location": "global",
|
|
142
|
+
"id": "global::Function"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"required": false,
|
|
147
|
+
"optional": false,
|
|
148
|
+
"docs": {
|
|
149
|
+
"tags": [],
|
|
150
|
+
"text": ""
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"pay": {
|
|
154
|
+
"type": "unknown",
|
|
155
|
+
"mutable": false,
|
|
156
|
+
"complexType": {
|
|
157
|
+
"original": "Function",
|
|
158
|
+
"resolved": "Function",
|
|
159
|
+
"references": {
|
|
160
|
+
"Function": {
|
|
161
|
+
"location": "global",
|
|
162
|
+
"id": "global::Function"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"required": false,
|
|
167
|
+
"optional": false,
|
|
168
|
+
"docs": {
|
|
169
|
+
"tags": [],
|
|
170
|
+
"text": ""
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"checkoutId": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"mutable": false,
|
|
176
|
+
"complexType": {
|
|
177
|
+
"original": "string",
|
|
178
|
+
"resolved": "string",
|
|
179
|
+
"references": {}
|
|
180
|
+
},
|
|
181
|
+
"required": false,
|
|
182
|
+
"optional": false,
|
|
183
|
+
"docs": {
|
|
184
|
+
"tags": [],
|
|
185
|
+
"text": ""
|
|
186
|
+
},
|
|
187
|
+
"attribute": "checkout-id",
|
|
188
|
+
"reflect": false
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
static get states() {
|
|
193
|
+
return {
|
|
194
|
+
"hasLoadedFonts": {},
|
|
195
|
+
"isLoading": {},
|
|
196
|
+
"checkout": {},
|
|
197
|
+
"serverError": {},
|
|
198
|
+
"errorMessage": {},
|
|
199
|
+
"creatingNewPaymentMethod": {},
|
|
200
|
+
"selectedPaymentMethodToken": {}
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
static get events() {
|
|
204
|
+
return [{
|
|
205
|
+
"method": "submitted",
|
|
206
|
+
"name": "submitted",
|
|
207
|
+
"bubbles": true,
|
|
208
|
+
"cancelable": true,
|
|
209
|
+
"composed": true,
|
|
210
|
+
"docs": {
|
|
211
|
+
"tags": [],
|
|
212
|
+
"text": ""
|
|
213
|
+
},
|
|
214
|
+
"complexType": {
|
|
215
|
+
"original": "CreatePaymentMethodResponse",
|
|
216
|
+
"resolved": "BankAccountCreateResponse | CardCreateResponse",
|
|
217
|
+
"references": {
|
|
218
|
+
"CreatePaymentMethodResponse": {
|
|
219
|
+
"location": "import",
|
|
220
|
+
"path": "../payment-method-form/payment-method-responses",
|
|
221
|
+
"id": "src/components/payment-method-form/payment-method-responses.ts::CreatePaymentMethodResponse"
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}];
|
|
226
|
+
}
|
|
227
|
+
static get methods() {
|
|
228
|
+
return {
|
|
229
|
+
"loadFontsOnParent": {
|
|
230
|
+
"complexType": {
|
|
231
|
+
"signature": "() => Promise<any>",
|
|
232
|
+
"parameters": [],
|
|
233
|
+
"references": {
|
|
234
|
+
"Promise": {
|
|
235
|
+
"location": "global",
|
|
236
|
+
"id": "global::Promise"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"return": "Promise<any>"
|
|
240
|
+
},
|
|
241
|
+
"docs": {
|
|
242
|
+
"text": "",
|
|
243
|
+
"tags": []
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { makeGetCheckout, makePay } from "./checkout-actions";
|
|
3
|
+
import { CheckoutService } from "../../api/services/checkout.service";
|
|
4
|
+
export class Checkout {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.iframeOrigin = undefined;
|
|
7
|
+
this.authToken = undefined;
|
|
8
|
+
this.checkoutId = undefined;
|
|
9
|
+
this.getCheckout = undefined;
|
|
10
|
+
this.pay = undefined;
|
|
11
|
+
this.errorMessage = '';
|
|
12
|
+
}
|
|
13
|
+
componentWillLoad() {
|
|
14
|
+
this.initializeGetCheckout();
|
|
15
|
+
}
|
|
16
|
+
initializeGetCheckout() {
|
|
17
|
+
if (this.authToken && this.checkoutId) {
|
|
18
|
+
this.getCheckout = makeGetCheckout({
|
|
19
|
+
authToken: this.authToken,
|
|
20
|
+
checkoutId: this.checkoutId,
|
|
21
|
+
service: new CheckoutService()
|
|
22
|
+
});
|
|
23
|
+
this.pay = makePay({
|
|
24
|
+
authToken: this.authToken,
|
|
25
|
+
checkoutId: this.checkoutId,
|
|
26
|
+
service: new CheckoutService()
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
this.errorMessage = 'auth-token and checkout-id are required';
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
propChanged() {
|
|
34
|
+
this.initializeGetCheckout();
|
|
35
|
+
}
|
|
36
|
+
render() {
|
|
37
|
+
return (h("justifi-checkout-core", { getCheckout: this.getCheckout, pay: this.pay }));
|
|
38
|
+
}
|
|
39
|
+
static get is() { return "justifi-checkout"; }
|
|
40
|
+
static get encapsulation() { return "shadow"; }
|
|
41
|
+
static get properties() {
|
|
42
|
+
return {
|
|
43
|
+
"iframeOrigin": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"mutable": false,
|
|
46
|
+
"complexType": {
|
|
47
|
+
"original": "string",
|
|
48
|
+
"resolved": "string",
|
|
49
|
+
"references": {}
|
|
50
|
+
},
|
|
51
|
+
"required": false,
|
|
52
|
+
"optional": true,
|
|
53
|
+
"docs": {
|
|
54
|
+
"tags": [],
|
|
55
|
+
"text": ""
|
|
56
|
+
},
|
|
57
|
+
"attribute": "iframe-origin",
|
|
58
|
+
"reflect": false
|
|
59
|
+
},
|
|
60
|
+
"authToken": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"mutable": false,
|
|
63
|
+
"complexType": {
|
|
64
|
+
"original": "string",
|
|
65
|
+
"resolved": "string",
|
|
66
|
+
"references": {}
|
|
67
|
+
},
|
|
68
|
+
"required": false,
|
|
69
|
+
"optional": false,
|
|
70
|
+
"docs": {
|
|
71
|
+
"tags": [],
|
|
72
|
+
"text": ""
|
|
73
|
+
},
|
|
74
|
+
"attribute": "auth-token",
|
|
75
|
+
"reflect": false
|
|
76
|
+
},
|
|
77
|
+
"checkoutId": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"mutable": false,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "string",
|
|
82
|
+
"resolved": "string",
|
|
83
|
+
"references": {}
|
|
84
|
+
},
|
|
85
|
+
"required": false,
|
|
86
|
+
"optional": false,
|
|
87
|
+
"docs": {
|
|
88
|
+
"tags": [],
|
|
89
|
+
"text": ""
|
|
90
|
+
},
|
|
91
|
+
"attribute": "checkout-id",
|
|
92
|
+
"reflect": false
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
static get states() {
|
|
97
|
+
return {
|
|
98
|
+
"getCheckout": {},
|
|
99
|
+
"pay": {},
|
|
100
|
+
"errorMessage": {}
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
static get watchers() {
|
|
104
|
+
return [{
|
|
105
|
+
"propName": "authToken",
|
|
106
|
+
"methodName": "propChanged"
|
|
107
|
+
}, {
|
|
108
|
+
"propName": "checkoutId",
|
|
109
|
+
"methodName": "propChanged"
|
|
110
|
+
}];
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { config } from "../../../config";
|
|
3
|
+
const PaymentMethodTypeLabels = {
|
|
4
|
+
bankAccount: 'New bank account',
|
|
5
|
+
card: 'New credit or debit card',
|
|
6
|
+
};
|
|
7
|
+
export class NewPaymentMethod {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.onPaymentMethodOptionClick = () => {
|
|
10
|
+
this.paymentMethodOptionSelected.emit(this.paymentMethodOption);
|
|
11
|
+
};
|
|
12
|
+
this.iframeOrigin = config.iframeOrigin;
|
|
13
|
+
this.clientId = undefined;
|
|
14
|
+
this.accountId = undefined;
|
|
15
|
+
this.paymentMethodOption = undefined;
|
|
16
|
+
this.isSelected = undefined;
|
|
17
|
+
}
|
|
18
|
+
async getPaymentMethodToken() {
|
|
19
|
+
if (!this.paymentMethodFormRef || !this.billingFormRef)
|
|
20
|
+
return;
|
|
21
|
+
const billingFormValidation = await this.billingFormRef.validate();
|
|
22
|
+
const paymentMethodFormValidation = await this.paymentMethodFormRef.validate();
|
|
23
|
+
if (!billingFormValidation.isValid || !paymentMethodFormValidation.isValid)
|
|
24
|
+
return;
|
|
25
|
+
return await this.tokenize();
|
|
26
|
+
}
|
|
27
|
+
async tokenize() {
|
|
28
|
+
try {
|
|
29
|
+
const billingFormFieldValues = await this.billingFormRef.getValues();
|
|
30
|
+
const paymentMethodData = Object.assign({}, billingFormFieldValues);
|
|
31
|
+
const clientId = this.clientId;
|
|
32
|
+
const tokenizeResponse = await this.paymentMethodFormRef.tokenize(clientId, paymentMethodData, this.accountId);
|
|
33
|
+
if (tokenizeResponse.error) {
|
|
34
|
+
console.error(`An error occured submitting the form: ${tokenizeResponse.error.message}`);
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
const data = tokenizeResponse.data;
|
|
38
|
+
const tokenizedPaymentMethod = data.card || data.ach; // fix the response types to avoid this
|
|
39
|
+
return tokenizedPaymentMethod.token;
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
console.error(`An error occured submitting the form: ${error}`);
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
showNewPaymentMethodForm() {
|
|
47
|
+
var _a;
|
|
48
|
+
return (h("div", { class: "mt-2 pb-4 border-bottom" }, h("div", { class: "mb-3" }, h("justifi-payment-method-form", { ref: (el) => (this.paymentMethodFormRef = el), "payment-method-form-type": (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, "iframe-origin": this.iframeOrigin })), h("h3", { class: "fs-6 fw-bold lh-lg mb-4" }, "Billing address"), h("justifi-billing-form", { ref: (el) => (this.billingFormRef = el) })));
|
|
49
|
+
}
|
|
50
|
+
render() {
|
|
51
|
+
var _a, _b, _c, _d;
|
|
52
|
+
return (h("div", { class: "payment-method" }, h("div", { class: `payment-method-header p-3 border-bottom`, onClick: () => this.onPaymentMethodOptionClick() }, h("input", { type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, PaymentMethodTypeLabels[(_d = this.paymentMethodOption) === null || _d === void 0 ? void 0 : _d.id])), this.isSelected ? this.showNewPaymentMethodForm() : null));
|
|
53
|
+
}
|
|
54
|
+
static get is() { return "justifi-new-payment-method"; }
|
|
55
|
+
static get properties() {
|
|
56
|
+
return {
|
|
57
|
+
"iframeOrigin": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"mutable": true,
|
|
60
|
+
"complexType": {
|
|
61
|
+
"original": "string",
|
|
62
|
+
"resolved": "string",
|
|
63
|
+
"references": {}
|
|
64
|
+
},
|
|
65
|
+
"required": false,
|
|
66
|
+
"optional": true,
|
|
67
|
+
"docs": {
|
|
68
|
+
"tags": [],
|
|
69
|
+
"text": ""
|
|
70
|
+
},
|
|
71
|
+
"attribute": "iframe-origin",
|
|
72
|
+
"reflect": false,
|
|
73
|
+
"defaultValue": "config.iframeOrigin"
|
|
74
|
+
},
|
|
75
|
+
"clientId": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"mutable": false,
|
|
78
|
+
"complexType": {
|
|
79
|
+
"original": "string",
|
|
80
|
+
"resolved": "string",
|
|
81
|
+
"references": {}
|
|
82
|
+
},
|
|
83
|
+
"required": false,
|
|
84
|
+
"optional": false,
|
|
85
|
+
"docs": {
|
|
86
|
+
"tags": [],
|
|
87
|
+
"text": ""
|
|
88
|
+
},
|
|
89
|
+
"attribute": "client-id",
|
|
90
|
+
"reflect": false
|
|
91
|
+
},
|
|
92
|
+
"accountId": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"mutable": false,
|
|
95
|
+
"complexType": {
|
|
96
|
+
"original": "string",
|
|
97
|
+
"resolved": "string",
|
|
98
|
+
"references": {}
|
|
99
|
+
},
|
|
100
|
+
"required": false,
|
|
101
|
+
"optional": false,
|
|
102
|
+
"docs": {
|
|
103
|
+
"tags": [],
|
|
104
|
+
"text": ""
|
|
105
|
+
},
|
|
106
|
+
"attribute": "account-id",
|
|
107
|
+
"reflect": false
|
|
108
|
+
},
|
|
109
|
+
"paymentMethodOption": {
|
|
110
|
+
"type": "unknown",
|
|
111
|
+
"mutable": false,
|
|
112
|
+
"complexType": {
|
|
113
|
+
"original": "PaymentMethodOption",
|
|
114
|
+
"resolved": "PaymentMethodOption",
|
|
115
|
+
"references": {
|
|
116
|
+
"PaymentMethodOption": {
|
|
117
|
+
"location": "import",
|
|
118
|
+
"path": "./payment-method-option-utils",
|
|
119
|
+
"id": "src/components/checkout/payment-method-option-utils.tsx::PaymentMethodOption"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"required": false,
|
|
124
|
+
"optional": false,
|
|
125
|
+
"docs": {
|
|
126
|
+
"tags": [],
|
|
127
|
+
"text": ""
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"isSelected": {
|
|
131
|
+
"type": "boolean",
|
|
132
|
+
"mutable": false,
|
|
133
|
+
"complexType": {
|
|
134
|
+
"original": "boolean",
|
|
135
|
+
"resolved": "boolean",
|
|
136
|
+
"references": {}
|
|
137
|
+
},
|
|
138
|
+
"required": false,
|
|
139
|
+
"optional": false,
|
|
140
|
+
"docs": {
|
|
141
|
+
"tags": [],
|
|
142
|
+
"text": ""
|
|
143
|
+
},
|
|
144
|
+
"attribute": "is-selected",
|
|
145
|
+
"reflect": false
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
static get events() {
|
|
150
|
+
return [{
|
|
151
|
+
"method": "paymentMethodOptionSelected",
|
|
152
|
+
"name": "paymentMethodOptionSelected",
|
|
153
|
+
"bubbles": true,
|
|
154
|
+
"cancelable": true,
|
|
155
|
+
"composed": true,
|
|
156
|
+
"docs": {
|
|
157
|
+
"tags": [],
|
|
158
|
+
"text": ""
|
|
159
|
+
},
|
|
160
|
+
"complexType": {
|
|
161
|
+
"original": "any",
|
|
162
|
+
"resolved": "any",
|
|
163
|
+
"references": {}
|
|
164
|
+
}
|
|
165
|
+
}];
|
|
166
|
+
}
|
|
167
|
+
static get methods() {
|
|
168
|
+
return {
|
|
169
|
+
"getPaymentMethodToken": {
|
|
170
|
+
"complexType": {
|
|
171
|
+
"signature": "() => Promise<string>",
|
|
172
|
+
"parameters": [],
|
|
173
|
+
"references": {
|
|
174
|
+
"Promise": {
|
|
175
|
+
"location": "global",
|
|
176
|
+
"id": "global::Promise"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"return": "Promise<string>"
|
|
180
|
+
},
|
|
181
|
+
"docs": {
|
|
182
|
+
"text": "",
|
|
183
|
+
"tags": []
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export class PaymentMethodOption {
|
|
2
|
+
constructor(paymentMethod) {
|
|
3
|
+
this.id = paymentMethod.id;
|
|
4
|
+
this.brand = paymentMethod.brand;
|
|
5
|
+
this.acct_last_four = paymentMethod.acct_last_four;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
;
|
|
9
|
+
export var CardBrandLabels;
|
|
10
|
+
(function (CardBrandLabels) {
|
|
11
|
+
CardBrandLabels["american_express"] = "American Express";
|
|
12
|
+
CardBrandLabels["diners_club"] = "Diners Club";
|
|
13
|
+
CardBrandLabels["discover"] = "Discover";
|
|
14
|
+
CardBrandLabels["jcb"] = "JCB";
|
|
15
|
+
CardBrandLabels["mastercard"] = "Mastercard";
|
|
16
|
+
CardBrandLabels["china_unionpay"] = "UnionPay";
|
|
17
|
+
CardBrandLabels["visa"] = "Visa";
|
|
18
|
+
CardBrandLabels["unknown"] = "Unknown";
|
|
19
|
+
})(CardBrandLabels || (CardBrandLabels = {}));
|