@miden-npm/react 2.0.8 → 2.1.0

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/index.js CHANGED
@@ -109,7 +109,7 @@ var getBaseUrl = (mode, caller) => {
109
109
  if (mode === "sandbox") {
110
110
  return caller === "buzapay" ? "https://sandbox-api.buzapay.com/payment-gateway-api" : "https://sandbox-api.midencards.io/miden-web";
111
111
  } else if (mode === "prod") {
112
- return caller === "buzapay" ? "https://merchant.buzapay.com/payment-gateway-api" : "https://sandbox-api.midencards.io/miden-web";
112
+ return caller === "buzapay" ? "https://api.buzapay.com/payment-gateway-api" : "https://sandbox-api.midencards.io/miden-web";
113
113
  }
114
114
  return "";
115
115
  };
@@ -1943,6 +1943,7 @@ var BaseSuccess = ({
1943
1943
  value: successObject.paymentId
1944
1944
  }
1945
1945
  ) }),
1946
+ successObject.paymentDate,
1946
1947
  /* @__PURE__ */ jsx27("div", { className: "py-4", children: /* @__PURE__ */ jsx27(
1947
1948
  BaseLabelInfo,
1948
1949
  {
@@ -2969,7 +2970,7 @@ function PayByCard({
2969
2970
  if (response.transactionReference?.trim()) {
2970
2971
  onPaymentAuthorized?.({
2971
2972
  paymentId: response.transactionReference,
2972
- paymentDate: response?.data?.updatedAt,
2973
+ paymentDate: response?.data?.updatedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
2973
2974
  // optional if present
2974
2975
  paymentStatus: "authorized",
2975
2976
  message
@@ -4192,6 +4193,8 @@ function BzpCheckoutCard({
4192
4193
  setSuccessObject({ ...event });
4193
4194
  if (event.paymentStatus === "authorized") {
4194
4195
  setCheckoutState("SUCCESS");
4196
+ console.log("checkout state", checkoutState);
4197
+ debugger;
4195
4198
  toast.success("Payment authorization successful.", toastConfig);
4196
4199
  } else if (event.paymentStatus === "confirmed") {
4197
4200
  setCheckoutState("SUCCESS");
@@ -4308,7 +4311,7 @@ function BzpCheckoutCard({
4308
4311
  onError: onErrorHandler
4309
4312
  }
4310
4313
  ) }),
4311
- checkoutState === "SUCCESS" || checkoutState === "USED" && paymentType === "BANK_TRANSFER" && /* @__PURE__ */ jsx39(
4314
+ (checkoutState === "SUCCESS" || checkoutState === "USED" && paymentType === "BANK_TRANSFER") && /* @__PURE__ */ jsx39(
4312
4315
  BaseSuccess,
4313
4316
  {
4314
4317
  amount: paymentObject.amount,
@@ -4658,7 +4661,7 @@ function MidenCheckoutCard({
4658
4661
  }
4659
4662
  ) })
4660
4663
  ] }),
4661
- checkoutState === "SUCCESS" || checkoutState === "USED" && paymentType === "BANK_TRANSFER" && /* @__PURE__ */ jsx42(
4664
+ (checkoutState === "SUCCESS" || checkoutState === "USED" && paymentType === "BANK_TRANSFER") && /* @__PURE__ */ jsx42(
4662
4665
  BaseSuccess,
4663
4666
  {
4664
4667
  amount: paymentObject.amount,