@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.
@@ -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 (i.success) {
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: i.paymentId ?? i.orderId,
532
+ entityId: a.paymentId ?? a.orderId,
533
533
  source: "checkout",
534
- amount: i.total || r,
535
- currency: i.currency || F.selectedCurrency
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: i.orderId,
539
+ entityId: a.orderId,
540
540
  source: "checkout",
541
- amount: r,
541
+ amount: i,
542
542
  currency: "CREDITS"
543
543
  }), wt({
544
544
  items: n,
545
- total: r,
545
+ total: i,
546
546
  billingAccountName: F.billingAccount.name,
547
547
  billingAccountId: F.billingAccount.id,
548
548
  previousBalance: t,
549
- newBalance: t - r,
549
+ newBalance: t - i,
550
550
  paymentMethod: "credits",
551
551
  currency: "Credits",
552
- transactionId: i.orderId
553
- }), Et("credits"), St({ paymentId: i.orderId }), k("processing");
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: i.total || r,
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: i.currency || F.selectedCurrency,
565
- transactionId: i.paymentId
564
+ currency: a.currency || F.selectedCurrency,
565
+ transactionId: a.paymentId
566
566
  }), Et("card"), St({
567
- clientSecret: i.clientSecret,
568
- orderId: i.orderId,
569
- razorpayKeyId: i.razorpayKeyId,
570
- razorpayCustomerId: i.razorpayCustomerId,
571
- paymentId: i.paymentId,
572
- paymentComplete: i.paymentComplete,
573
- prefillName: i.prefillName,
574
- prefillEmail: i.prefillEmail,
575
- prefillContact: i.prefillContact,
576
- total: i.total,
577
- currency: i.currency
578
- }), i.paymentComplete ? k("processing") : k("payment");
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: i.error || "Payment initiation failed"
583
- }), j(i.error || "Payment initiation failed"), k("error");
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,