@solvimon/solvimon-web 0.1.0-alpha.28 → 0.1.0-alpha.29
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/README.md +26 -1
- package/dist/{Alert.vue.es-lIiAWf2S.mjs → Alert.vue.es-CNrEaLvh.mjs} +58 -46
- package/dist/AuthProvider.handle-DKfNs8rr.mjs +50 -0
- package/dist/{Avatar.vue.es-Beg7umjO.mjs → Avatar.vue.es-r0NbcIib.mjs} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DBGe1PvD.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-Cp4yGqaw.mjs} +8 -8
- package/dist/{Button.vue.es-rh6mITmN.mjs → Button.vue.es-Zw--kuaU.mjs} +4 -4
- package/dist/{ChargeOnDemandModal-CPjPa_uq.mjs → ChargeOnDemandModal-B8FDkS9U.mjs} +35 -34
- package/dist/Checkout.entry.ce-DsGl-5aR.mjs +4202 -0
- package/dist/CheckoutAddressFields.vue_vue_type_script_setup_true_lang-2D8VM_7W.mjs +828 -0
- package/dist/{Chip.vue.es-Cn2R_0mE.mjs → Chip.vue.es-D3UDSyXC.mjs} +3 -3
- package/dist/ContentWithAsideLayout-Bnbsq8_5.mjs +32 -0
- package/dist/{ContextMenu.vue.es-DRxsa7bZ.mjs → ContextMenu.vue.es-B9mFpUQK.mjs} +87 -88
- package/dist/{CustomerBillingInformation.vue.es-DQfL5RMR.mjs → CustomerBillingInformation.vue.es-B8NiQaJs.mjs} +3 -3
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Ct-eYaEN.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DBivC5Eb.mjs} +21 -20
- package/dist/CustomerShippingAddresses-Bj8Y17O8.mjs +397 -0
- package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BzTSwo4i.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BmPKfIjT.mjs} +798 -792
- package/dist/{DividerText.vue.es-M0XqSz55.mjs → DividerText.vue.es-CNbgif-3.mjs} +1 -1
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CVP-7ne3.mjs +55 -0
- package/dist/{ErrorNotification.vue.es-CKlt4hr2.mjs → ErrorNotification.vue.es-DNd65mQq.mjs} +2 -2
- package/dist/FormMessage.vue.es-Cjv358Ab.mjs +39 -0
- package/dist/{IconButton.vue.es-oe4MVBK1.mjs → IconButton.vue.es-C8lYFx5_.mjs} +2 -2
- package/dist/{IconTitle.vue.es-BO6KBS4v.mjs → IconTitle.vue.es-O2kcqgKm.mjs} +3 -3
- package/dist/{Input.vue.es-DAlPmtE_.mjs → Input.vue.es-D8Oj8MWv.mjs} +23 -22
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CCTl5GWa.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-rhqYVdfV.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DMGqj_Uk.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-06R-M8Q3.mjs} +4 -4
- package/dist/InvoicePreview.vue.es-4Q2hzaFS.mjs +286 -0
- package/dist/InvoicePricingClauseChip.vue.es-DKU0xu0t.mjs +124 -0
- package/dist/Label.vue.es-DtpLM1KH.mjs +113 -0
- package/dist/{Modal.vue.es-CTNACAst.mjs → Modal.vue.es-C8ZcO117.mjs} +109 -103
- package/dist/OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-3DQLCR3U.mjs +441 -0
- package/dist/PaymentCompletedCard.vue_vue_type_script_setup_true_lang-DfTb9psX.mjs +48 -0
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DLfAfB_m.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-BoGTtg5G.mjs} +46 -88
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CKm-XYuF.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BIAm22Kq.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-BmA8jbMb.mjs → PaymentHistoryBlock-BvY2nXGV.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BDMse2lO.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-bQKhUonq.mjs} +4 -4
- package/dist/{PaymentIntegrationForm-D1Xw-xIt.mjs → PaymentIntegrationForm-CcfQSzKM.mjs} +1 -1
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCxw0PCv.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CvzcLJVq.mjs} +68 -69
- package/dist/{PaymentIntegrationFormAdyen-CfT5aD4L.mjs → PaymentIntegrationFormAdyen-DqgDfO6K.mjs} +126 -117
- package/dist/{PaymentIntegrationFormStripe-DKXJ-mjd.mjs → PaymentIntegrationFormStripe-BYdAkvLt.mjs} +193 -179
- package/dist/{PaymentMethod.vue.es-Cauxx4Xr.mjs → PaymentMethod.vue.es-b0p3a0L-.mjs} +7 -7
- package/dist/{PaymentMethodForm-CypZOYUZ.mjs → PaymentMethodForm-BsTrTwCg.mjs} +1 -1
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-De8FgdYD.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-sUOmLORl.mjs} +7 -7
- package/dist/{PaymentMethodSelector.vue_vue_type_script_setup_true_lang-Dw28tfpD.mjs → PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DsnAhR79.mjs} +36 -35
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-OtjVO7lR.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CSW4LfmH.mjs} +7 -7
- package/dist/{PlanCustomizationEditor-Xtww2r9K.mjs → PlanCustomizationEditor-D29N4HUM.mjs} +9 -9
- package/dist/PortalLinkUnverified-B_EE2wTJ.mjs +52 -0
- package/dist/{PortalNotAvailable-B_59GUwN.mjs → PortalNotAvailable-DPE9y37H.mjs} +2 -2
- package/dist/{PricingGroupRangeInput.vue.es-C9LJW3b8.mjs → PricingGroupRangeInput.vue.es-tIMXIhpZ.mjs} +14 -13
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DdWxoB8q.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DqxWxSQe.mjs} +32 -32
- package/dist/RadioGroupExtended.vue.es-3nDXqIGi.mjs +176 -0
- package/dist/{Section.vue.es-iS8hVGWA.mjs → Section.vue.es-CvX9tg2f.mjs} +1 -1
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cl7I1Apo.mjs +60 -0
- package/dist/ShippingAddressesModal-C4p1IXXk.mjs +418 -0
- package/dist/{StepInput.vue.es-Dpan1RQd.mjs → StepInput.vue.es-DweyzpkL.mjs} +4 -4
- package/dist/{SubscriptionDetails.entry.ce-DufQX3uI.mjs → SubscriptionDetails.entry.ce-D5SwM0YS.mjs} +230 -225
- package/dist/{SubscriptionSchedules-DAahcNoI.mjs → SubscriptionSchedules-BZqlpAtk.mjs} +1 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BH7DdOWK.mjs +5185 -0
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-Wmjqy7RZ.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-DoJxiqVB.mjs} +3 -3
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BeRLuEyR.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BbjdBHSQ.mjs} +23 -22
- package/dist/TooltipParagraph.vue.es-Dw0ndjle.mjs +132 -0
- package/dist/TranslationOverride.vue_vue_type_script_setup_true_lang-BhjZVMSx.mjs +31 -0
- package/dist/{TrialChip.vue.es-B-XBSHWE.mjs → TrialChip.vue.es-DOopmaXA.mjs} +2 -2
- package/dist/{api.es-QaC926Xu.mjs → api.es-qgvzNMU-.mjs} +2 -2
- package/dist/{cn.es-2bVdkiFV.mjs → cn.es-B8acFrov.mjs} +380 -476
- package/dist/components/BillingInformation/BillingInformation.mjs +9 -7
- package/dist/components/BillingInformationForm/BillingInformationForm.mjs +57 -54
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +20 -18
- package/dist/components/Invoice/Invoice.mjs +2660 -193
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +6 -4
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +18 -17
- package/dist/components/InvoicesList/InvoicesList.mjs +13 -11
- package/dist/components/PaymentHistory/PaymentHistory.mjs +8 -6
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +19 -17
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +19 -17
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +20 -18
- package/dist/components/WalletBalances/WalletBalances.mjs +17 -15
- package/dist/customElements-BTj4ii4f.mjs +5072 -0
- package/dist/{customer-CqddTiOr.mjs → customer-BIjC0CWJ.mjs} +1 -1
- package/dist/customer.es-DQKl6wFt.mjs +24 -0
- package/dist/{de-DE-BW8dMvhW.mjs → de-DE-DBbERiFr.mjs} +38 -0
- package/dist/{de-DE-BNMj3boy.mjs → de-DE-UJ6X6jXu.mjs} +1 -1
- package/dist/floating-ui.vue.es-BvAf8-si.mjs +1003 -0
- package/dist/{formControl-CsITfsBk.mjs → formControl-BZQLHnOO.mjs} +5 -5
- package/dist/fr-FR-Cvvbkwlj.mjs +307 -0
- package/dist/fr-FR-IWJE-urI.mjs +431 -0
- package/dist/icon-sprite.svg.es-BWBB8SGw.mjs +4 -0
- package/dist/{index.es-CXkP_k3u.mjs → index.es-C7J3WGGo.mjs} +4 -4
- package/dist/index.es-CpmQmvOg.mjs +633 -0
- package/dist/index.mjs +2 -2
- package/dist/{invoices-Cf1qDAv4.mjs → invoices-e1sKLgxg.mjs} +3 -3
- package/dist/{it-IT-Byg06KWc.mjs → it-IT-B7ui2oxO.mjs} +38 -0
- package/dist/{it-IT-DRvuxM1F.mjs → it-IT-DnJP5URH.mjs} +1 -1
- package/dist/{nl-NL-x3zQqzZ7.mjs → nl-NL-Bafh2xoT.mjs} +38 -0
- package/dist/{nl-NL-DLUwWbMG.mjs → nl-NL-q9xfTZF0.mjs} +1 -1
- package/dist/{paymentMethods-BUuOmDq9.mjs → paymentMethods-B_82JGk_.mjs} +2 -2
- package/dist/paymentMethods-Nfv9HdkS.mjs +61 -0
- package/dist/{paymentOutcome-D17VD4MV.mjs → paymentOutcome-BXEU5-84.mjs} +5 -5
- package/dist/payments-BnxbzQUC.mjs +68 -0
- package/dist/pricing-BOhvWWMj.mjs +29 -0
- package/dist/{pricingPlanScheduleOverrides-COr9F8DO.mjs → pricingPlanScheduleOverrides-Dxv5FOBd.mjs} +2 -2
- package/dist/{pricingPlanSchedules-BK_o9p6h.mjs → pricingPlanSchedules-Dv7ZCgNp.mjs} +1 -1
- package/dist/screens/Checkout/Checkout.mjs +2 -2
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +128 -83
- package/dist/screens/PayInvoice/PayInvoice.mjs +572 -218
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +21 -19
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +261 -266
- package/dist/{sorting.es-qtEN8J8T.mjs → sorting.es-CVyKw23D.mjs} +1 -1
- package/dist/subscriptions-BWXZGK0E.mjs +66 -0
- package/dist/taxId.es-DkD3Ltr8.mjs +243 -0
- package/dist/types/components/customer/CheckoutForm/CheckoutAddressFields.types.d.ts +2 -0
- package/dist/types/components/customer/ShippingAddressForm/ShippingAddressForm.types.d.ts +9 -0
- package/dist/types/components/customer/ShippingAddresses/ShippingAddressCard.types.d.ts +11 -0
- package/dist/types/components/customer/ShippingAddresses/ShippingAddressList.types.d.ts +9 -0
- package/dist/types/components/customer/ShippingAddresses/ShippingAddressesModal.types.d.ts +26 -0
- package/dist/types/components/invoices/InvoiceOrderSummary/InvoiceOrderSummary.types.d.ts +5 -0
- package/dist/types/components/payments/PayButton/PayButton.types.d.ts +2 -0
- package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +11 -0
- package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +4 -1
- package/dist/types/components/providers/AuthProvider/AuthProvider.handle.d.ts +17 -0
- package/dist/types/components/providers/AuthProvider/AuthProvider.lib.d.ts +23 -1
- package/dist/types/components/providers/AuthProvider/AuthProvider.types.d.ts +12 -0
- package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +3 -1
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +2 -2
- package/dist/types/components/providers/Provider/Provider.types.d.ts +1 -1
- package/dist/types/components/providers/Provider/Provider.vue.d.ts +3 -1
- package/dist/types/components/subscriptions/OrderSummaryInvoice.types.d.ts +16 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +2 -0
- package/dist/types/public/components/CustomerShippingAddresses/CustomerShippingAddresses.types.d.ts +12 -0
- package/dist/types/public/core/types.d.ts +5 -0
- package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +3 -1
- package/dist/types/translations/supported.d.ts +1 -1
- package/dist/types/types/portalAuthentication.d.ts +2 -0
- package/dist/types/types/portalToken.d.ts +9 -0
- package/dist/types/types/shippingAddress.d.ts +9 -0
- package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +2 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalRequests.d.ts +27 -6
- package/dist/types/vendor/@solvimon/solvimon-types/types/ConfigMeterProperties.d.ts +3 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Entitlement.d.ts +6 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Integrations.d.ts +9 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +16 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/JWT.d.ts +10 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterPropertyVariable.d.ts +16 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +6 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -1
- package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +12 -3
- package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +71 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +14 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteVersions.d.ts +35 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Quotes.d.ts +16 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ShippingAddress.d.ts +54 -0
- package/dist/{useActionDispatchProvider-DC_fUykI.mjs → useActionDispatchProvider-3W2vEyIg.mjs} +1 -1
- package/dist/{useCustomer-C3kTh7wn.mjs → useCustomer-cObBvDOu.mjs} +2 -2
- package/dist/useCustomerFormLabels-DJWf2O17.mjs +1173 -0
- package/dist/{useIncrementalLoading-C_sHmW7d.mjs → useIncrementalLoading-CATuO36d.mjs} +2 -2
- package/dist/{useInvoiceData-BIh8-h8b.mjs → useInvoiceData-DD44HTl7.mjs} +2 -2
- package/dist/{useInvoicesList-Y6p0Pqpy.mjs → useInvoicesList-CpB-41MQ.mjs} +10 -10
- package/dist/useLazyFloating.es-CycqRyeb.mjs +68 -0
- package/dist/useLoadInitialData-qzdnBoui.mjs +15 -0
- package/dist/{usePaymentFormHold-FfNc578l.mjs → usePaymentFormHold-ByUZi3A-.mjs} +28 -36
- package/dist/{usePaymentMethodAvailability-CnYTvG15.mjs → usePaymentMethodAvailability-DUdrs0Ji.mjs} +4 -4
- package/dist/usePaymentMethods-ByaKF7mf.mjs +21 -0
- package/dist/{usePayments-CykCZPG2.mjs → usePayments-BXABv-lF.mjs} +9 -9
- package/dist/{usePortal-CxzKGhbK.mjs → usePortal-CwR_FxTb.mjs} +1 -1
- package/dist/{useService-B0OQJmif.mjs → useService-BZcbUZHI.mjs} +3 -3
- package/dist/{useTimePeriod.es-JkXdHNWr.mjs → useTimePeriod.es-BpdiVwg8.mjs} +1 -1
- package/package.json +7 -7
- package/dist/Checkbox.vue.es-DsyiJ-VY.mjs +0 -50
- package/dist/Checkout.entry.ce-BZ1rYQvt.mjs +0 -5279
- package/dist/ContentWithAsideLayout-BCM8tmZN.mjs +0 -38
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-Bk4zwyWa.mjs +0 -362
- package/dist/FormMessage.vue.es-jG3fQZms.mjs +0 -29
- package/dist/InvoiceSummary.vue.es-DbNoGfYN.mjs +0 -2596
- package/dist/RadioGroupExtended.vue.es-UtKsdmiv.mjs +0 -163
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Djc1SkEU.mjs +0 -688
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DNr1CqVj.mjs +0 -5221
- package/dist/TooltipParagraph.vue.es-BjCn2BF6.mjs +0 -129
- package/dist/customElements-Di3zwlEU.mjs +0 -6447
- package/dist/customer.es-B5ppZf0j.mjs +0 -20
- package/dist/floating-ui.vue.es-CYt0fSY7.mjs +0 -1108
- package/dist/icon-sprite.svg.es-BZIz7-0d.mjs +0 -4
- package/dist/payments-Ci8bF4C6.mjs +0 -45
- package/dist/subscriptions-CwogJODR.mjs +0 -54
- package/dist/useCustomerFormLabels-CK7K50nB.mjs +0 -1369
- package/dist/useLoadInitialData-4k_Cyqef.mjs +0 -15
- package/dist/usePaymentMethodOptions-1QBcmgUf.mjs +0 -40
- package/dist/usePaymentMethods-gvr-rmwE.mjs +0 -15
package/dist/{PaymentIntegrationFormStripe-DKXJ-mjd.mjs → PaymentIntegrationFormStripe-BYdAkvLt.mjs}
RENAMED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { a as
|
|
4
|
-
import { t as
|
|
5
|
-
import { _ as
|
|
6
|
-
import {
|
|
7
|
-
import { c as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
1
|
+
import { defineComponent as q, ref as T, onMounted as X, onBeforeUnmount as Q, watch as me, openBlock as M, createElementBlock as pe, unref as de, computed as x, createBlock as Z, createCommentVNode as le } from "vue";
|
|
2
|
+
import { a as K } from "./useService-BZcbUZHI.mjs";
|
|
3
|
+
import { a as ye, e as Ee } from "./customElements-BTj4ii4f.mjs";
|
|
4
|
+
import { t as fe } from "./amount-CondixVt.mjs";
|
|
5
|
+
import { _ as Ie } from "./PaymentCompletedCard.vue_vue_type_script_setup_true_lang-DfTb9psX.mjs";
|
|
6
|
+
import { _ as _e } from "./PaymentErrorCard.vue_vue_type_script_setup_true_lang-BoGTtg5G.mjs";
|
|
7
|
+
import { c as ge } from "./payments-BnxbzQUC.mjs";
|
|
8
|
+
import { c as Te } from "./paymentMethods-B_82JGk_.mjs";
|
|
9
|
+
import { f as Re, e as he, c as be } from "./usePaymentFormHold-ByUZi3A-.mjs";
|
|
10
|
+
import { c as Se, i as ve, b as Ae, a as Oe, d as $ } from "./paymentOutcome-BXEU5-84.mjs";
|
|
11
|
+
const J = "https://js.stripe.com/dahlia/stripe.js", Ne = `<!DOCTYPE html>
|
|
11
12
|
<html>
|
|
12
13
|
<head>
|
|
13
14
|
<meta charset="UTF-8">
|
|
@@ -19,7 +20,7 @@ body { overflow: hidden; }
|
|
|
19
20
|
</head>
|
|
20
21
|
<body>
|
|
21
22
|
<div id="stripe-root"></div>
|
|
22
|
-
<script src="${
|
|
23
|
+
<script src="${J}"><\/script>
|
|
23
24
|
<script>
|
|
24
25
|
(function () {
|
|
25
26
|
let stripe, elements, paymentElement, resizeObserver, countryCode, email, name, parentOrigin;
|
|
@@ -56,14 +57,14 @@ body { overflow: hidden; }
|
|
|
56
57
|
if (paymentElement) paymentElement.destroy();
|
|
57
58
|
stripe = Stripe(event.data.publicKey);
|
|
58
59
|
elements = stripe.elements(event.data.options);
|
|
59
|
-
paymentElement = elements.create('payment', { layout: { type: 'accordion', defaultCollapsed:
|
|
60
|
+
paymentElement = elements.create('payment', { layout: { type: 'accordion', defaultCollapsed: event.data.collapsed === true }, wallets: event.data.options.wallets, fields: event.data.options.fields });
|
|
60
61
|
|
|
61
62
|
paymentElement.on('ready', function () {
|
|
62
63
|
parent.postMessage({ type: 'stripe:ready', initId: initId }, parentTarget());
|
|
63
64
|
});
|
|
64
65
|
|
|
65
66
|
paymentElement.on('change', function (e) {
|
|
66
|
-
parent.postMessage({ type: 'stripe:change', paymentMethodType: e.value.type }, parentTarget());
|
|
67
|
+
parent.postMessage({ type: 'stripe:change', paymentMethodType: e.value.type, empty: e.empty === true, collapsed: e.collapsed === true }, parentTarget());
|
|
67
68
|
});
|
|
68
69
|
|
|
69
70
|
paymentElement.on('loaderror', function (e) {
|
|
@@ -140,7 +141,7 @@ body { overflow: hidden; }
|
|
|
140
141
|
})();
|
|
141
142
|
<\/script>
|
|
142
143
|
</body>
|
|
143
|
-
</html>`,
|
|
144
|
+
</html>`, G = { link: "never" }, V = {
|
|
144
145
|
variables: { borderRadius: "4px", colorBackground: "rgba(243, 244, 246, 0.5)" },
|
|
145
146
|
rules: {
|
|
146
147
|
".TermsText": { fontSize: "14px" },
|
|
@@ -151,7 +152,7 @@ body { overflow: hidden; }
|
|
|
151
152
|
}
|
|
152
153
|
}
|
|
153
154
|
};
|
|
154
|
-
function
|
|
155
|
+
function we(a, s) {
|
|
155
156
|
return {
|
|
156
157
|
billingDetails: {
|
|
157
158
|
address: { country: "never" },
|
|
@@ -160,33 +161,33 @@ function Ae(a, s) {
|
|
|
160
161
|
}
|
|
161
162
|
};
|
|
162
163
|
}
|
|
163
|
-
function
|
|
164
|
+
function Pe({
|
|
164
165
|
amount: a,
|
|
165
166
|
email: s,
|
|
166
167
|
name: f,
|
|
167
168
|
variant: t,
|
|
168
169
|
storePaymentMethod: c = !1
|
|
169
170
|
}) {
|
|
170
|
-
const R = a.currency.toLowerCase(), d =
|
|
171
|
+
const R = a.currency.toLowerCase(), d = we(s, f);
|
|
171
172
|
return t === "TOKENIZE" ? {
|
|
172
173
|
mode: "setup",
|
|
173
174
|
currency: R,
|
|
174
175
|
setup_future_usage: "off_session",
|
|
175
|
-
wallets:
|
|
176
|
+
wallets: G,
|
|
176
177
|
fields: d,
|
|
177
|
-
appearance:
|
|
178
|
+
appearance: V
|
|
178
179
|
} : {
|
|
179
180
|
mode: "payment",
|
|
180
181
|
currency: R,
|
|
181
|
-
amount:
|
|
182
|
+
amount: fe(a).value,
|
|
182
183
|
...c ? { setup_future_usage: "off_session" } : {},
|
|
183
|
-
wallets:
|
|
184
|
+
wallets: G,
|
|
184
185
|
fields: d,
|
|
185
|
-
appearance:
|
|
186
|
+
appearance: V
|
|
186
187
|
};
|
|
187
188
|
}
|
|
188
|
-
function
|
|
189
|
-
if (!(a.mode !== s.mode || !
|
|
189
|
+
function Ce(a, s) {
|
|
190
|
+
if (!(a.mode !== s.mode || !K(a.fields, s.fields) || !K(a.wallets, s.wallets)))
|
|
190
191
|
return {
|
|
191
192
|
currency: s.currency,
|
|
192
193
|
...s.mode === "payment" ? { amount: s.amount } : {},
|
|
@@ -194,10 +195,10 @@ function we(a, s) {
|
|
|
194
195
|
...s.appearance ? { appearance: s.appearance } : {}
|
|
195
196
|
};
|
|
196
197
|
}
|
|
197
|
-
function
|
|
198
|
+
function z(a) {
|
|
198
199
|
return a === "null" ? "*" : a;
|
|
199
200
|
}
|
|
200
|
-
const
|
|
201
|
+
const De = {
|
|
201
202
|
api_connection_error: !0,
|
|
202
203
|
api_error: !0,
|
|
203
204
|
authentication_error: !0,
|
|
@@ -207,90 +208,94 @@ const Pe = {
|
|
|
207
208
|
rate_limit_error: !0,
|
|
208
209
|
validation_error: !0
|
|
209
210
|
};
|
|
210
|
-
function
|
|
211
|
-
return typeof a == "string" && Object.hasOwn(
|
|
211
|
+
function H(a) {
|
|
212
|
+
return typeof a == "string" && Object.hasOwn(De, a);
|
|
212
213
|
}
|
|
213
|
-
function
|
|
214
|
+
function C(a) {
|
|
214
215
|
if (typeof a != "object" || a === null) return {};
|
|
215
216
|
const s = Reflect.get(a, "code"), f = Reflect.get(a, "type"), t = Reflect.get(a, "message");
|
|
216
217
|
return {
|
|
217
218
|
code: typeof s == "string" ? s : void 0,
|
|
218
|
-
type:
|
|
219
|
+
type: H(f) ? f : void 0,
|
|
219
220
|
message: typeof t == "string" ? t : void 0
|
|
220
221
|
};
|
|
221
222
|
}
|
|
222
|
-
const
|
|
223
|
+
const Me = ["src", "height", "title"], Fe = /* @__PURE__ */ q({
|
|
223
224
|
__name: "PaymentIntegrationFormStripeFrame",
|
|
224
225
|
props: {
|
|
225
226
|
publicKey: { type: String },
|
|
226
227
|
options: { type: Object },
|
|
227
228
|
countryCode: { type: String },
|
|
228
229
|
email: { type: String },
|
|
229
|
-
name: { type: String }
|
|
230
|
+
name: { type: String },
|
|
231
|
+
collapsed: { type: Boolean }
|
|
230
232
|
},
|
|
231
233
|
emits: ["ready", "change", "loaderror", "submit-success", "submit-error"],
|
|
232
234
|
setup(a, { expose: s, emit: f }) {
|
|
233
|
-
const t = a, c = f, { $t: R } =
|
|
234
|
-
s({ triggerSubmit:
|
|
235
|
+
const t = a, c = f, { $t: R } = ye();
|
|
236
|
+
s({ triggerSubmit: F });
|
|
235
237
|
const d = T(), h = T(0), b = T();
|
|
236
|
-
let
|
|
238
|
+
let v = !1, w = 0, S;
|
|
237
239
|
function I() {
|
|
238
|
-
var n,
|
|
239
|
-
|
|
240
|
+
var n, o;
|
|
241
|
+
v = !1, w += 1, S = t.options, (o = (n = d.value) == null ? void 0 : n.contentWindow) == null || o.postMessage(
|
|
240
242
|
{
|
|
241
243
|
type: "stripe:init",
|
|
242
|
-
initId:
|
|
244
|
+
initId: w,
|
|
243
245
|
publicKey: t.publicKey,
|
|
244
246
|
options: t.options,
|
|
245
247
|
countryCode: t.countryCode,
|
|
246
248
|
email: t.email,
|
|
247
|
-
name: t.name
|
|
249
|
+
name: t.name,
|
|
250
|
+
collapsed: t.collapsed === !0
|
|
248
251
|
},
|
|
249
|
-
|
|
252
|
+
z(window.origin)
|
|
250
253
|
);
|
|
251
254
|
}
|
|
252
|
-
function u(n,
|
|
253
|
-
var _,
|
|
254
|
-
S = n, (
|
|
255
|
-
{ type: "stripe:update", options:
|
|
256
|
-
|
|
255
|
+
function u(n, o) {
|
|
256
|
+
var _, p;
|
|
257
|
+
S = n, (p = (_ = d.value) == null ? void 0 : _.contentWindow) == null || p.postMessage(
|
|
258
|
+
{ type: "stripe:update", options: o },
|
|
259
|
+
z(window.origin)
|
|
257
260
|
);
|
|
258
261
|
}
|
|
259
|
-
function
|
|
260
|
-
var
|
|
261
|
-
const n = (
|
|
262
|
-
return !
|
|
262
|
+
function F() {
|
|
263
|
+
var o;
|
|
264
|
+
const n = (o = d.value) == null ? void 0 : o.contentWindow;
|
|
265
|
+
return !v || !n ? !1 : (n.postMessage(
|
|
263
266
|
{
|
|
264
267
|
type: "stripe:submit",
|
|
265
268
|
countryCode: t.countryCode,
|
|
266
269
|
email: t.email,
|
|
267
270
|
name: t.name
|
|
268
271
|
},
|
|
269
|
-
|
|
272
|
+
z(window.origin)
|
|
270
273
|
), !0);
|
|
271
274
|
}
|
|
272
|
-
function
|
|
275
|
+
function P(n) {
|
|
273
276
|
return typeof n == "object" && n !== null;
|
|
274
277
|
}
|
|
275
|
-
function
|
|
276
|
-
if (!d.value || n.source !== d.value.contentWindow || !
|
|
277
|
-
const
|
|
278
|
+
function A(n) {
|
|
279
|
+
if (!d.value || n.source !== d.value.contentWindow || !P(n.data)) return;
|
|
280
|
+
const o = n.data, _ = o.type;
|
|
278
281
|
if (!(typeof _ != "string" || !_.startsWith("stripe:")))
|
|
279
282
|
switch (_) {
|
|
280
283
|
case "stripe:ready":
|
|
281
|
-
|
|
284
|
+
o.initId === w && (v = !0), c("ready");
|
|
282
285
|
break;
|
|
283
286
|
case "stripe:change":
|
|
284
287
|
c(
|
|
285
288
|
"change",
|
|
286
|
-
typeof
|
|
289
|
+
typeof o.paymentMethodType == "string" ? o.paymentMethodType : "card",
|
|
290
|
+
o.empty === !0,
|
|
291
|
+
o.collapsed === !0
|
|
287
292
|
);
|
|
288
293
|
break;
|
|
289
294
|
case "stripe:loaderror": {
|
|
290
|
-
const
|
|
295
|
+
const p = P(o.error) ? o.error : {};
|
|
291
296
|
c("loaderror", {
|
|
292
|
-
message: typeof
|
|
293
|
-
type:
|
|
297
|
+
message: typeof p.message == "string" ? p.message : void 0,
|
|
298
|
+
type: H(p.type) ? p.type : void 0
|
|
294
299
|
});
|
|
295
300
|
break;
|
|
296
301
|
}
|
|
@@ -298,51 +303,51 @@ const Ce = ["src", "height", "title"], De = /* @__PURE__ */ V({
|
|
|
298
303
|
I();
|
|
299
304
|
break;
|
|
300
305
|
case "stripe:resize":
|
|
301
|
-
typeof
|
|
306
|
+
typeof o.height == "number" && (h.value = o.height);
|
|
302
307
|
break;
|
|
303
308
|
case "stripe:submit:success":
|
|
304
|
-
typeof
|
|
309
|
+
typeof o.confirmationTokenId == "string" ? c("submit-success", o.confirmationTokenId) : c("submit-error", { message: "Stripe returned no confirmation token" });
|
|
305
310
|
break;
|
|
306
311
|
case "stripe:submit:error": {
|
|
307
|
-
const
|
|
312
|
+
const p = P(o.error) ? o.error : {};
|
|
308
313
|
c("submit-error", {
|
|
309
|
-
message: typeof
|
|
310
|
-
type:
|
|
311
|
-
code: typeof
|
|
314
|
+
message: typeof p.message == "string" ? p.message : void 0,
|
|
315
|
+
type: H(p.type) ? p.type : void 0,
|
|
316
|
+
code: typeof p.code == "string" ? p.code : void 0
|
|
312
317
|
});
|
|
313
318
|
break;
|
|
314
319
|
}
|
|
315
320
|
}
|
|
316
321
|
}
|
|
317
|
-
return
|
|
318
|
-
const n = new Blob([
|
|
319
|
-
b.value = URL.createObjectURL(n), window.addEventListener("message",
|
|
320
|
-
}),
|
|
321
|
-
window.removeEventListener("message",
|
|
322
|
-
}),
|
|
322
|
+
return X(() => {
|
|
323
|
+
const n = new Blob([Ne], { type: "text/html" });
|
|
324
|
+
b.value = URL.createObjectURL(n), window.addEventListener("message", A);
|
|
325
|
+
}), Q(() => {
|
|
326
|
+
window.removeEventListener("message", A), b.value && URL.revokeObjectURL(b.value);
|
|
327
|
+
}), me(
|
|
323
328
|
() => t.options,
|
|
324
329
|
(n) => {
|
|
325
|
-
if (!S ||
|
|
326
|
-
const
|
|
327
|
-
|
|
330
|
+
if (!S || K(n, S)) return;
|
|
331
|
+
const o = Ce(S, n);
|
|
332
|
+
o ? u(n, o) : I();
|
|
328
333
|
},
|
|
329
334
|
{ deep: !0 }
|
|
330
|
-
), (n,
|
|
335
|
+
), (n, o) => (M(), pe("iframe", {
|
|
331
336
|
ref_key: "iframeRef",
|
|
332
337
|
ref: d,
|
|
333
338
|
src: b.value,
|
|
334
339
|
height: h.value || void 0,
|
|
335
340
|
frameborder: "0",
|
|
336
341
|
style: { width: "100%", display: "block", border: "none" },
|
|
337
|
-
title:
|
|
342
|
+
title: de(R)({
|
|
338
343
|
defaultMessage: "Payment form",
|
|
339
344
|
id: "payment_integration_form_stripe.frame_title",
|
|
340
345
|
description: "Accessible name of the frame that holds the Stripe payment fields"
|
|
341
346
|
}),
|
|
342
347
|
onLoad: I
|
|
343
|
-
}, null, 40,
|
|
348
|
+
}, null, 40, Me));
|
|
344
349
|
}
|
|
345
|
-
}),
|
|
350
|
+
}), N = "STRIPE", Be = /* @__PURE__ */ q({
|
|
346
351
|
__name: "PaymentIntegrationFormStripe",
|
|
347
352
|
props: {
|
|
348
353
|
email: { type: String },
|
|
@@ -359,33 +364,34 @@ const Ce = ["src", "height", "title"], De = /* @__PURE__ */ V({
|
|
|
359
364
|
forceStorePaymentMethod: { type: Boolean },
|
|
360
365
|
storePaymentMethod: { type: Boolean },
|
|
361
366
|
redirectsOnSuccess: { type: Boolean },
|
|
362
|
-
billingEntityName: { type: String }
|
|
367
|
+
billingEntityName: { type: String },
|
|
368
|
+
collapsed: { type: Boolean }
|
|
363
369
|
},
|
|
364
370
|
emits: ["select", "payment-failed", "payment-success", "invalid", "submitting", "action-required", "ready"],
|
|
365
371
|
setup(a, { expose: s, emit: f }) {
|
|
366
372
|
const t = a, c = f;
|
|
367
|
-
s({ submit:
|
|
368
|
-
const R = T(!1), d = T(), h =
|
|
373
|
+
s({ submit: o });
|
|
374
|
+
const R = T(!1), d = T(), h = Re(
|
|
369
375
|
t.paymentMethodOptionResponseEntry.payment_acceptor.id
|
|
370
|
-
), b = T(!!h),
|
|
376
|
+
), b = T(!!h), v = T(), w = x(
|
|
371
377
|
() => t.storePaymentMethod ?? t.forceStorePaymentMethod ?? !1
|
|
372
|
-
), S =
|
|
373
|
-
() =>
|
|
378
|
+
), S = x(
|
|
379
|
+
() => Pe({
|
|
374
380
|
amount: t.amount,
|
|
375
381
|
email: t.email,
|
|
376
382
|
name: t.name,
|
|
377
383
|
variant: t.variant,
|
|
378
|
-
storePaymentMethod:
|
|
384
|
+
storePaymentMethod: w.value
|
|
379
385
|
})
|
|
380
|
-
), I = T(null), u =
|
|
386
|
+
), I = T(null), u = Ee(), { authorizePayment: F } = ge(), { tokenizePaymentMethod: P } = Te(), A = x(
|
|
381
387
|
() => {
|
|
382
388
|
var e, r;
|
|
383
389
|
return (r = (e = t.paymentMethodOptionResponseEntry.integration.payment_gateway) == null ? void 0 : e.stripe) == null ? void 0 : r.public_key;
|
|
384
390
|
}
|
|
385
391
|
);
|
|
386
392
|
function n(e) {
|
|
387
|
-
return
|
|
388
|
-
gateway:
|
|
393
|
+
return Se({
|
|
394
|
+
gateway: N,
|
|
389
395
|
paymentAcceptorId: t.paymentMethodOptionResponseEntry.payment_acceptor.id,
|
|
390
396
|
variant: t.variant,
|
|
391
397
|
invoiceId: t.invoiceId,
|
|
@@ -393,7 +399,7 @@ const Ce = ["src", "height", "title"], De = /* @__PURE__ */ V({
|
|
|
393
399
|
...e
|
|
394
400
|
});
|
|
395
401
|
}
|
|
396
|
-
function
|
|
402
|
+
function o() {
|
|
397
403
|
_().catch((e) => {
|
|
398
404
|
u.error(
|
|
399
405
|
"STRIPE_SUBMIT_FAILED",
|
|
@@ -405,9 +411,9 @@ const Ce = ["src", "height", "title"], De = /* @__PURE__ */ V({
|
|
|
405
411
|
}
|
|
406
412
|
async function _() {
|
|
407
413
|
var r;
|
|
408
|
-
(!await t.validateOnSubmit() || !((r =
|
|
414
|
+
(!await t.validateOnSubmit() || !((r = v.value) != null && r.triggerSubmit())) && c("invalid");
|
|
409
415
|
}
|
|
410
|
-
function
|
|
416
|
+
function p(e) {
|
|
411
417
|
if (e.type === "validation_error") {
|
|
412
418
|
c("invalid");
|
|
413
419
|
return;
|
|
@@ -423,59 +429,59 @@ const Ce = ["src", "height", "title"], De = /* @__PURE__ */ V({
|
|
|
423
429
|
error: e
|
|
424
430
|
});
|
|
425
431
|
}
|
|
426
|
-
function
|
|
427
|
-
return new Promise((r,
|
|
432
|
+
function ee(e) {
|
|
433
|
+
return new Promise((r, m) => {
|
|
428
434
|
if (window.Stripe) {
|
|
429
435
|
r(window.Stripe(e));
|
|
430
436
|
return;
|
|
431
437
|
}
|
|
432
|
-
const
|
|
433
|
-
|
|
438
|
+
const i = document.createElement("script");
|
|
439
|
+
i.src = J, i.onload = () => {
|
|
434
440
|
if (!window.Stripe) {
|
|
435
|
-
|
|
441
|
+
m(new Error("Stripe not available after script load"));
|
|
436
442
|
return;
|
|
437
443
|
}
|
|
438
444
|
r(window.Stripe(e));
|
|
439
|
-
},
|
|
445
|
+
}, i.onerror = () => m(new Error("Failed to load Stripe.js")), document.head.appendChild(i);
|
|
440
446
|
});
|
|
441
447
|
}
|
|
442
|
-
async function
|
|
448
|
+
async function Y() {
|
|
443
449
|
if (I.value)
|
|
444
450
|
return I.value;
|
|
445
|
-
const e =
|
|
451
|
+
const e = A.value;
|
|
446
452
|
if (!e)
|
|
447
453
|
throw new Error("Missing Stripe public key");
|
|
448
|
-
const r = await
|
|
454
|
+
const r = await ee(e);
|
|
449
455
|
return I.value = r, r;
|
|
450
456
|
}
|
|
451
|
-
async function
|
|
457
|
+
async function te(e) {
|
|
452
458
|
c("submitting");
|
|
453
|
-
const r = t.paymentMethodOptionResponseEntry.payment_acceptor.id,
|
|
459
|
+
const r = t.paymentMethodOptionResponseEntry.payment_acceptor.id, m = he({
|
|
454
460
|
paymentAcceptorId: r,
|
|
455
461
|
redirectUrl: window.location.href
|
|
456
462
|
});
|
|
457
463
|
if (t.variant === "AUTHORIZE") {
|
|
458
464
|
try {
|
|
459
|
-
const
|
|
465
|
+
const i = await F({
|
|
460
466
|
payment_acceptor_id: r,
|
|
461
467
|
...t.customerId ? { customer_id: t.customerId } : {},
|
|
462
|
-
payment_gateway_variant:
|
|
468
|
+
payment_gateway_variant: N,
|
|
463
469
|
stripe: { confirmation_token_id: e },
|
|
464
470
|
amount: t.amount,
|
|
465
471
|
...t.context && t.context.type !== "CHARGE_ON_DEMAND" ? { context: t.context } : {},
|
|
466
|
-
return_url:
|
|
472
|
+
return_url: m
|
|
467
473
|
});
|
|
468
|
-
await
|
|
469
|
-
} catch (
|
|
474
|
+
await j(i);
|
|
475
|
+
} catch (i) {
|
|
470
476
|
u.error(
|
|
471
477
|
"PAYMENT_AUTHORIZATION_FAILED",
|
|
472
478
|
`Failed payment authorization for payment acceptor with id ${r}`,
|
|
473
|
-
n({ reason: "PAYMENT_AUTHORIZATION_FAILED", cause:
|
|
474
|
-
|
|
479
|
+
n({ reason: "PAYMENT_AUTHORIZATION_FAILED", cause: i }),
|
|
480
|
+
i
|
|
475
481
|
), l({
|
|
476
|
-
code:
|
|
482
|
+
code: ve(i) ? "PAYMENT_OUTCOME_UNCONFIRMED" : "AUTHORIZATION_FAILED",
|
|
477
483
|
message: "Payment authorization failed",
|
|
478
|
-
error:
|
|
484
|
+
error: i
|
|
479
485
|
});
|
|
480
486
|
}
|
|
481
487
|
return;
|
|
@@ -490,28 +496,28 @@ const Ce = ["src", "height", "title"], De = /* @__PURE__ */ V({
|
|
|
490
496
|
return;
|
|
491
497
|
}
|
|
492
498
|
try {
|
|
493
|
-
const
|
|
499
|
+
const i = await P({
|
|
494
500
|
customer_id: t.customerId,
|
|
495
501
|
payment_acceptor_id: r,
|
|
496
|
-
payment_gateway_variant:
|
|
502
|
+
payment_gateway_variant: N,
|
|
497
503
|
stripe: { confirmation_token_id: e },
|
|
498
|
-
return_url:
|
|
504
|
+
return_url: m
|
|
499
505
|
});
|
|
500
|
-
await
|
|
501
|
-
} catch (
|
|
506
|
+
await j(i);
|
|
507
|
+
} catch (i) {
|
|
502
508
|
u.error(
|
|
503
509
|
"TOKENIZATION_FAILED",
|
|
504
510
|
`Tokenization failed for payment acceptor with id ${r}`,
|
|
505
|
-
n({ reason: "TOKENIZATION_FAILED", cause:
|
|
506
|
-
|
|
507
|
-
), l({ code: "TOKENIZE_FAILED", message: "Tokenization failed", error:
|
|
511
|
+
n({ reason: "TOKENIZATION_FAILED", cause: i }),
|
|
512
|
+
i
|
|
513
|
+
), l({ code: "TOKENIZE_FAILED", message: "Tokenization failed", error: i });
|
|
508
514
|
}
|
|
509
515
|
}
|
|
510
516
|
}
|
|
511
|
-
async function
|
|
512
|
-
var
|
|
513
|
-
if (e.status === "ACTION_REQUIRED" && e.action.payment_gateway_variant ===
|
|
514
|
-
const g = e.action.client_secret || ((
|
|
517
|
+
async function j(e) {
|
|
518
|
+
var m, i, y;
|
|
519
|
+
if (e.status === "ACTION_REQUIRED" && e.action.payment_gateway_variant === N) {
|
|
520
|
+
const g = e.action.client_secret || ((m = e.action.data) == null ? void 0 : m.client_secret);
|
|
515
521
|
if (!g) {
|
|
516
522
|
u.error(
|
|
517
523
|
"STRIPE_ACTION_FAILED",
|
|
@@ -527,9 +533,9 @@ const Ce = ["src", "height", "title"], De = /* @__PURE__ */ V({
|
|
|
527
533
|
});
|
|
528
534
|
return;
|
|
529
535
|
}
|
|
530
|
-
let
|
|
536
|
+
let B;
|
|
531
537
|
try {
|
|
532
|
-
|
|
538
|
+
B = await Y();
|
|
533
539
|
} catch (E) {
|
|
534
540
|
u.error(
|
|
535
541
|
"STRIPE_ACTION_FAILED",
|
|
@@ -539,18 +545,18 @@ const Ce = ["src", "height", "title"], De = /* @__PURE__ */ V({
|
|
|
539
545
|
), l({ code: "AUTHORIZATION_FAILED", message: "Payment action failed", error: E });
|
|
540
546
|
return;
|
|
541
547
|
}
|
|
542
|
-
const { error:
|
|
543
|
-
throw
|
|
548
|
+
const { error: D, paymentIntent: ce, setupIntent: ue } = await B.handleNextAction({ clientSecret: g }).catch((E) => {
|
|
549
|
+
throw C(E);
|
|
544
550
|
});
|
|
545
|
-
if (
|
|
546
|
-
const E =
|
|
551
|
+
if (D) {
|
|
552
|
+
const E = C(D);
|
|
547
553
|
u.error(
|
|
548
554
|
"STRIPE_ACTION_FAILED",
|
|
549
555
|
"Stripe handleNextAction failed",
|
|
550
556
|
n({
|
|
551
557
|
reason: "STRIPE_NEXT_ACTION_FAILED",
|
|
552
558
|
cause: E,
|
|
553
|
-
extra: { stripeErrorCode:
|
|
559
|
+
extra: { stripeErrorCode: D.code, stripeErrorType: D.type }
|
|
554
560
|
}),
|
|
555
561
|
E
|
|
556
562
|
), l({
|
|
@@ -560,24 +566,24 @@ const Ce = ["src", "height", "title"], De = /* @__PURE__ */ V({
|
|
|
560
566
|
});
|
|
561
567
|
return;
|
|
562
568
|
}
|
|
563
|
-
const
|
|
564
|
-
|
|
569
|
+
const k = (i = ce ?? ue) == null ? void 0 : i.status, W = $(k);
|
|
570
|
+
W === "SUCCEEDED" ? L() : W === "UNCONFIRMED" ? U("STRIPE_NEXT_ACTION_UNCONFIRMED", { intentStatus: k }) : (u.error(
|
|
565
571
|
"STRIPE_ACTION_FAILED",
|
|
566
572
|
"Stripe handleNextAction left the payment incomplete",
|
|
567
573
|
n({
|
|
568
574
|
reason: "STRIPE_NEXT_ACTION_INCOMPLETE",
|
|
569
|
-
extra: { intentStatus:
|
|
575
|
+
extra: { intentStatus: k }
|
|
570
576
|
})
|
|
571
577
|
), l({ code: "AUTHORIZATION_FAILED", message: "Payment action failed" }));
|
|
572
578
|
return;
|
|
573
579
|
}
|
|
574
|
-
const r =
|
|
580
|
+
const r = Ae(e);
|
|
575
581
|
if (r === "SUCCEEDED") {
|
|
576
|
-
|
|
582
|
+
L();
|
|
577
583
|
return;
|
|
578
584
|
}
|
|
579
585
|
if (r === "UNCONFIRMED") {
|
|
580
|
-
|
|
586
|
+
U("PAYMENT_PENDING", {
|
|
581
587
|
paymentStatus: e.status,
|
|
582
588
|
paymentResult: (y = e.payment) == null ? void 0 : y.result
|
|
583
589
|
});
|
|
@@ -592,28 +598,28 @@ const Ce = ["src", "height", "title"], De = /* @__PURE__ */ V({
|
|
|
592
598
|
})
|
|
593
599
|
), l({ code: "AUTHORIZATION_FAILED", message: "Payment failed", error: e });
|
|
594
600
|
}
|
|
595
|
-
async function
|
|
601
|
+
async function re({
|
|
596
602
|
intent: e,
|
|
597
603
|
clientSecret: r
|
|
598
604
|
}) {
|
|
599
|
-
const
|
|
600
|
-
throw
|
|
605
|
+
const m = await Y(), i = (g) => {
|
|
606
|
+
throw C(g);
|
|
601
607
|
};
|
|
602
608
|
if (e === "PAYMENT") {
|
|
603
|
-
const g = await
|
|
604
|
-
if (g.error) throw
|
|
609
|
+
const g = await m.retrievePaymentIntent(r).catch(i);
|
|
610
|
+
if (g.error) throw C(g.error);
|
|
605
611
|
return g.paymentIntent.status;
|
|
606
612
|
}
|
|
607
|
-
const y = await
|
|
608
|
-
if (y.error) throw
|
|
613
|
+
const y = await m.retrieveSetupIntent(r).catch(i);
|
|
614
|
+
if (y.error) throw C(y.error);
|
|
609
615
|
return y.setupIntent.status;
|
|
610
616
|
}
|
|
611
|
-
async function
|
|
617
|
+
async function ne() {
|
|
612
618
|
if (!h) return;
|
|
613
619
|
const { redirectStatus: e } = h;
|
|
614
620
|
let r;
|
|
615
621
|
try {
|
|
616
|
-
r = await
|
|
622
|
+
r = await re(h);
|
|
617
623
|
} catch (y) {
|
|
618
624
|
u.error(
|
|
619
625
|
"STRIPE_REDIRECT_RETURN_FAILED",
|
|
@@ -631,17 +637,17 @@ const Ce = ["src", "height", "title"], De = /* @__PURE__ */ V({
|
|
|
631
637
|
});
|
|
632
638
|
return;
|
|
633
639
|
}
|
|
634
|
-
|
|
635
|
-
const
|
|
636
|
-
if (
|
|
637
|
-
|
|
640
|
+
be();
|
|
641
|
+
const m = $(r);
|
|
642
|
+
if (m === "SUCCEEDED") {
|
|
643
|
+
L();
|
|
638
644
|
return;
|
|
639
645
|
}
|
|
640
|
-
if (
|
|
641
|
-
|
|
646
|
+
if (m === "UNCONFIRMED") {
|
|
647
|
+
U("STRIPE_REDIRECT_UNCONFIRMED", { redirectStatus: e, intentStatus: r });
|
|
642
648
|
return;
|
|
643
649
|
}
|
|
644
|
-
const
|
|
650
|
+
const i = new globalThis.Error(
|
|
645
651
|
`Stripe redirect returned a payment with status: ${r}`
|
|
646
652
|
);
|
|
647
653
|
u.error(
|
|
@@ -651,23 +657,33 @@ const Ce = ["src", "height", "title"], De = /* @__PURE__ */ V({
|
|
|
651
657
|
reason: "STRIPE_REDIRECT_RETURN_FAILED",
|
|
652
658
|
extra: { redirectStatus: e, intentStatus: r }
|
|
653
659
|
}),
|
|
654
|
-
|
|
660
|
+
i
|
|
655
661
|
), l({
|
|
656
662
|
code: "AUTHORIZATION_FAILED",
|
|
657
663
|
message: "Payment failed",
|
|
658
|
-
error:
|
|
664
|
+
error: i
|
|
659
665
|
});
|
|
660
666
|
}
|
|
661
|
-
function
|
|
667
|
+
function ae() {
|
|
662
668
|
d.value = void 0;
|
|
663
669
|
}
|
|
664
|
-
|
|
670
|
+
let O;
|
|
671
|
+
function oe(e, r, m) {
|
|
672
|
+
const i = r && m === ((O == null ? void 0 : O.isCollapsed) ?? t.collapsed === !0) && (O === void 0 || e === O.type);
|
|
673
|
+
O = { type: e, isCollapsed: m }, c("select", {
|
|
674
|
+
paymentMethodType: e,
|
|
675
|
+
paymentGatewayVariant: N,
|
|
676
|
+
...i && { isAutomatic: !0 }
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
function ie() {
|
|
665
680
|
c("select", {
|
|
666
681
|
paymentMethodType: "card",
|
|
667
|
-
paymentGatewayVariant:
|
|
682
|
+
paymentGatewayVariant: N,
|
|
683
|
+
isAutomatic: !0
|
|
668
684
|
}), c("ready");
|
|
669
685
|
}
|
|
670
|
-
function
|
|
686
|
+
function se(e) {
|
|
671
687
|
u.error(
|
|
672
688
|
"PAYMENT_INTEGRATION_INITIALIZATION_FAILED",
|
|
673
689
|
"Failed to load the Stripe payment form",
|
|
@@ -687,18 +703,18 @@ const Ce = ["src", "height", "title"], De = /* @__PURE__ */ V({
|
|
|
687
703
|
const r = Oe(e);
|
|
688
704
|
d.value = r, c("payment-failed", r);
|
|
689
705
|
}
|
|
690
|
-
function
|
|
706
|
+
function L() {
|
|
691
707
|
R.value = !0, c("payment-success");
|
|
692
708
|
}
|
|
693
|
-
function
|
|
709
|
+
function U(e, r) {
|
|
694
710
|
u.warn(
|
|
695
711
|
"PAYMENT_OUTCOME_UNCONFIRMED",
|
|
696
712
|
"The payment outcome could not be confirmed yet",
|
|
697
713
|
n({ reason: e, extra: r })
|
|
698
714
|
), l({ code: "PAYMENT_OUTCOME_UNCONFIRMED", message: "Payment could not be confirmed" });
|
|
699
715
|
}
|
|
700
|
-
return
|
|
701
|
-
|
|
716
|
+
return X(() => {
|
|
717
|
+
ne().catch((e) => {
|
|
702
718
|
u.error(
|
|
703
719
|
"STRIPE_REDIRECT_RETURN_FAILED",
|
|
704
720
|
"handleRedirectReturn threw unexpectedly",
|
|
@@ -708,36 +724,34 @@ const Ce = ["src", "height", "title"], De = /* @__PURE__ */ V({
|
|
|
708
724
|
}).finally(() => {
|
|
709
725
|
b.value = !1;
|
|
710
726
|
});
|
|
711
|
-
}),
|
|
727
|
+
}), Q(() => {
|
|
712
728
|
I.value = null;
|
|
713
|
-
}), (e, r) => R.value ? (
|
|
729
|
+
}), (e, r) => R.value ? (M(), Z(Ie, {
|
|
714
730
|
key: 0,
|
|
715
731
|
variant: a.variant,
|
|
716
732
|
redirecting: a.redirectsOnSuccess
|
|
717
|
-
}, null, 8, ["variant", "redirecting"])) : d.value ? (
|
|
733
|
+
}, null, 8, ["variant", "redirecting"])) : d.value ? (M(), Z(_e, {
|
|
718
734
|
key: 1,
|
|
719
735
|
error: d.value,
|
|
720
|
-
onRetry:
|
|
721
|
-
}, null, 8, ["error"])) :
|
|
736
|
+
onRetry: ae
|
|
737
|
+
}, null, 8, ["error"])) : A.value && !b.value ? (M(), Z(Fe, {
|
|
722
738
|
key: 2,
|
|
723
739
|
ref_key: "frameRef",
|
|
724
|
-
ref:
|
|
725
|
-
"public-key":
|
|
740
|
+
ref: v,
|
|
741
|
+
"public-key": A.value,
|
|
726
742
|
options: S.value,
|
|
727
743
|
"country-code": a.countryCode,
|
|
728
744
|
email: a.email,
|
|
729
745
|
name: a.name,
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
onSubmitError: m
|
|
738
|
-
}, null, 8, ["public-key", "options", "country-code", "email", "name"])) : pe("", !0);
|
|
746
|
+
collapsed: a.collapsed,
|
|
747
|
+
onReady: ie,
|
|
748
|
+
onChange: oe,
|
|
749
|
+
onLoaderror: se,
|
|
750
|
+
onSubmitSuccess: te,
|
|
751
|
+
onSubmitError: p
|
|
752
|
+
}, null, 8, ["public-key", "options", "country-code", "email", "name", "collapsed"])) : le("", !0);
|
|
739
753
|
}
|
|
740
754
|
});
|
|
741
755
|
export {
|
|
742
|
-
|
|
756
|
+
Be as default
|
|
743
757
|
};
|