@miden-npm/react 0.0.13 → 0.0.14

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
@@ -1822,6 +1822,7 @@ function BzpCheckoutButton({
1822
1822
  }) {
1823
1823
  const [message, setMessage] = useState3("");
1824
1824
  const [launchUrl, setLaunchUrl] = useState3("");
1825
+ const [urlLaunchUrl, setUrlLaunchUrl] = useState3("");
1825
1826
  const [loading, setLoading] = useState3(false);
1826
1827
  const generatePaymentLinkHandler = async () => {
1827
1828
  if (!secretKey) {
@@ -1842,6 +1843,7 @@ function BzpCheckoutButton({
1842
1843
  );
1843
1844
  if (response?.isSuccessful && response.launchUrl) {
1844
1845
  setLaunchUrl(response.launchUrl);
1846
+ setUrlLaunchUrl(`${response.launchUrl}&merchantId=${btoa(secretKey)}`);
1845
1847
  setMessage("Payment link created successfully");
1846
1848
  if (mode === "redirect") {
1847
1849
  window.open(response.launchUrl, "_blank", "noopener,noreferrer");
@@ -1855,10 +1857,10 @@ function BzpCheckoutButton({
1855
1857
  setLoading(false);
1856
1858
  }
1857
1859
  };
1858
- return launchUrl && mode === "iframe" ? /* @__PURE__ */ jsx26(
1860
+ return urlLaunchUrl && mode === "iframe" ? /* @__PURE__ */ jsx26(
1859
1861
  BzpCheckoutIframe,
1860
1862
  {
1861
- url: launchUrl,
1863
+ url: urlLaunchUrl,
1862
1864
  secretKey,
1863
1865
  environment
1864
1866
  }