@burdenoff/microfe-billing 2026.910.8 → 2026.911.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/billing/modules/checkout/components/OrderSummary.js +1 -1
- package/dist/billing/modules/checkout/components/OrderSummary.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/useCheckout.js +61 -62
- package/dist/billing/modules/checkout/hooks/useCheckout.js.map +1 -1
- package/dist/billing/modules/checkout/pages/CheckoutPage.js +30 -30
- package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -525,62 +525,62 @@ var $e = () => {
|
|
|
525
525
|
j("Could not save your shipping details. Please review your delivery address and try again."), k("error");
|
|
526
526
|
return;
|
|
527
527
|
}
|
|
528
|
-
let t = F.billingAccount.creditAmount ?? 0, n = [...F.items], r = F.total, i = await F.initiatePayment();
|
|
529
|
-
if (
|
|
528
|
+
let t = F.billingAccount.creditAmount ?? 0, n = [...F.items], r = F.total, i = F.creditsRequired, a = await F.initiatePayment();
|
|
529
|
+
if (a.success) {
|
|
530
530
|
if (y("billing.checkout.initiated", {
|
|
531
531
|
route: "/billing/checkout",
|
|
532
|
-
entityId:
|
|
532
|
+
entityId: a.paymentId ?? a.orderId,
|
|
533
533
|
source: "checkout",
|
|
534
|
-
amount:
|
|
535
|
-
currency:
|
|
534
|
+
amount: a.total || r,
|
|
535
|
+
currency: a.currency || F.selectedCurrency
|
|
536
536
|
}), F.selectedProvider === "CREDITS") {
|
|
537
537
|
y("billing.credits.spent", {
|
|
538
538
|
route: "/billing/checkout",
|
|
539
|
-
entityId:
|
|
539
|
+
entityId: a.orderId,
|
|
540
540
|
source: "checkout",
|
|
541
|
-
amount:
|
|
541
|
+
amount: i,
|
|
542
542
|
currency: "CREDITS"
|
|
543
543
|
}), wt({
|
|
544
544
|
items: n,
|
|
545
|
-
total:
|
|
545
|
+
total: i,
|
|
546
546
|
billingAccountName: F.billingAccount.name,
|
|
547
547
|
billingAccountId: F.billingAccount.id,
|
|
548
548
|
previousBalance: t,
|
|
549
|
-
newBalance: t -
|
|
549
|
+
newBalance: t - i,
|
|
550
550
|
paymentMethod: "credits",
|
|
551
551
|
currency: "Credits",
|
|
552
|
-
transactionId:
|
|
553
|
-
}), Et("credits"), St({ paymentId:
|
|
552
|
+
transactionId: a.orderId
|
|
553
|
+
}), Et("credits"), St({ paymentId: a.orderId }), k("processing");
|
|
554
554
|
return;
|
|
555
555
|
}
|
|
556
556
|
wt({
|
|
557
557
|
items: n,
|
|
558
|
-
total:
|
|
558
|
+
total: a.total || r,
|
|
559
559
|
billingAccountName: F.billingAccount.name,
|
|
560
560
|
billingAccountId: F.billingAccount.id,
|
|
561
561
|
previousBalance: t,
|
|
562
562
|
newBalance: t,
|
|
563
563
|
paymentMethod: "card",
|
|
564
|
-
currency:
|
|
565
|
-
transactionId:
|
|
564
|
+
currency: a.currency || F.selectedCurrency,
|
|
565
|
+
transactionId: a.paymentId
|
|
566
566
|
}), Et("card"), St({
|
|
567
|
-
clientSecret:
|
|
568
|
-
orderId:
|
|
569
|
-
razorpayKeyId:
|
|
570
|
-
razorpayCustomerId:
|
|
571
|
-
paymentId:
|
|
572
|
-
paymentComplete:
|
|
573
|
-
prefillName:
|
|
574
|
-
prefillEmail:
|
|
575
|
-
prefillContact:
|
|
576
|
-
total:
|
|
577
|
-
currency:
|
|
578
|
-
}),
|
|
567
|
+
clientSecret: a.clientSecret,
|
|
568
|
+
orderId: a.orderId,
|
|
569
|
+
razorpayKeyId: a.razorpayKeyId,
|
|
570
|
+
razorpayCustomerId: a.razorpayCustomerId,
|
|
571
|
+
paymentId: a.paymentId,
|
|
572
|
+
paymentComplete: a.paymentComplete,
|
|
573
|
+
prefillName: a.prefillName,
|
|
574
|
+
prefillEmail: a.prefillEmail,
|
|
575
|
+
prefillContact: a.prefillContact,
|
|
576
|
+
total: a.total,
|
|
577
|
+
currency: a.currency
|
|
578
|
+
}), a.paymentComplete ? k("processing") : k("payment");
|
|
579
579
|
} else y("billing.checkout.failed", {
|
|
580
580
|
route: "/billing/checkout",
|
|
581
581
|
source: "checkout",
|
|
582
|
-
reason:
|
|
583
|
-
}), j(
|
|
582
|
+
reason: a.error || "Payment initiation failed"
|
|
583
|
+
}), j(a.error || "Payment initiation failed"), k("error");
|
|
584
584
|
}, [
|
|
585
585
|
F,
|
|
586
586
|
y,
|
|
@@ -709,7 +709,7 @@ var $e = () => {
|
|
|
709
709
|
]
|
|
710
710
|
}), /* @__PURE__ */ p("span", {
|
|
711
711
|
className: "text-text-secondary",
|
|
712
|
-
children: e(t.price * t.quantity)
|
|
712
|
+
children: e(M.paymentMethod === "credits" ? (t.priceUSD ?? t.price) * 100 * t.quantity : t.price * t.quantity)
|
|
713
713
|
})]
|
|
714
714
|
}, t.id))
|
|
715
715
|
})]
|
|
@@ -1343,7 +1343,7 @@ var $e = () => {
|
|
|
1343
1343
|
isEditable: E !== "PLAN" && E !== "ORDER"
|
|
1344
1344
|
})
|
|
1345
1345
|
}),
|
|
1346
|
-
/* @__PURE__ */ p("div", {
|
|
1346
|
+
F.selectedProvider !== "CREDITS" && /* @__PURE__ */ p("div", {
|
|
1347
1347
|
className: "px-4 pb-4 border-t border-border-subtle pt-4",
|
|
1348
1348
|
children: /* @__PURE__ */ p(ve, {
|
|
1349
1349
|
value: F.promoCode,
|