@miden-npm/react 0.0.13 → 0.0.15
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.cjs +8 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1740,7 +1740,7 @@ function BzpCheckoutIframe({
|
|
|
1740
1740
|
email: "",
|
|
1741
1741
|
phoneNumber: "",
|
|
1742
1742
|
narration: "",
|
|
1743
|
-
redirectUrl: ""
|
|
1743
|
+
redirectUrl: "https://sandbox-merchant.buzapay.com/account/three-ds-status"
|
|
1744
1744
|
}
|
|
1745
1745
|
}) {
|
|
1746
1746
|
const containerRef = useRef(null);
|
|
@@ -1816,12 +1816,13 @@ function BzpCheckoutButton({
|
|
|
1816
1816
|
email: "",
|
|
1817
1817
|
phoneNumber: "",
|
|
1818
1818
|
narration: "",
|
|
1819
|
-
redirectUrl: ""
|
|
1819
|
+
redirectUrl: "https://sandbox-merchant.buzapay.com/account/three-ds-status"
|
|
1820
1820
|
},
|
|
1821
1821
|
mode = "redirect"
|
|
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
|
|
1860
|
+
return urlLaunchUrl && mode === "iframe" ? /* @__PURE__ */ jsx26(
|
|
1859
1861
|
BzpCheckoutIframe,
|
|
1860
1862
|
{
|
|
1861
|
-
url:
|
|
1863
|
+
url: urlLaunchUrl,
|
|
1862
1864
|
secretKey,
|
|
1863
1865
|
environment
|
|
1864
1866
|
}
|
|
@@ -3046,7 +3048,7 @@ function BzpCheckoutCard({
|
|
|
3046
3048
|
email: "",
|
|
3047
3049
|
phoneNumber: "",
|
|
3048
3050
|
narration: "",
|
|
3049
|
-
redirectUrl: ""
|
|
3051
|
+
redirectUrl: "https://sandbox-merchant.buzapay.com/account/three-ds-status"
|
|
3050
3052
|
}
|
|
3051
3053
|
}) {
|
|
3052
3054
|
const [checkoutState, setCheckoutState] = useState7("PENDING");
|
|
@@ -3168,7 +3170,7 @@ function BzpCheckoutCard({
|
|
|
3168
3170
|
{
|
|
3169
3171
|
amount: paymentObject.amount,
|
|
3170
3172
|
currency: paymentObject.currency,
|
|
3171
|
-
redirectUrl: paymentObject.redirectUrl,
|
|
3173
|
+
redirectUrl: paymentObject.redirectUrl ?? "",
|
|
3172
3174
|
successObject
|
|
3173
3175
|
}
|
|
3174
3176
|
)
|