@miden-npm/react 2.0.2 → 2.0.3
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 +12 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2563,7 +2563,7 @@ function PayByCard({
|
|
|
2563
2563
|
setIsMakingPayment(true);
|
|
2564
2564
|
setMessage("");
|
|
2565
2565
|
const cardDetails = {
|
|
2566
|
-
pan: payForm.cardNo
|
|
2566
|
+
pan: payForm.cardNo ? payForm.cardNo.replace(/ /g, "") : "",
|
|
2567
2567
|
expiryDate: payForm.expireDate ?? "",
|
|
2568
2568
|
cvv: payForm.cvv ?? "",
|
|
2569
2569
|
cardScheme: cardType,
|
|
@@ -2614,7 +2614,6 @@ function PayByCard({
|
|
|
2614
2614
|
}
|
|
2615
2615
|
const request = caller === "buzapay" ? { ...payload, merchantId: secretKey } : { ...payloadMiden, merchantId: secretKey };
|
|
2616
2616
|
let response = await authorizeCardPayment(environment, request, caller);
|
|
2617
|
-
debugger;
|
|
2618
2617
|
if (response?.responseParam) {
|
|
2619
2618
|
response = decryptPayload(environment, response.responseParam);
|
|
2620
2619
|
}
|
|
@@ -3812,7 +3811,6 @@ var PayByStableCoin = ({
|
|
|
3812
3811
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3813
3812
|
function BzpCheckoutCard({
|
|
3814
3813
|
secretKey,
|
|
3815
|
-
options,
|
|
3816
3814
|
environment = "sandbox",
|
|
3817
3815
|
paymentObject = {
|
|
3818
3816
|
merchantName: "",
|
|
@@ -3820,8 +3818,7 @@ function BzpCheckoutCard({
|
|
|
3820
3818
|
currency: "",
|
|
3821
3819
|
email: "",
|
|
3822
3820
|
phoneNumber: "",
|
|
3823
|
-
narration: ""
|
|
3824
|
-
redirectUrl: ""
|
|
3821
|
+
narration: ""
|
|
3825
3822
|
},
|
|
3826
3823
|
onPaymentAuthorized,
|
|
3827
3824
|
onError
|
|
@@ -3856,23 +3853,23 @@ function BzpCheckoutCard({
|
|
|
3856
3853
|
onPaymentAuthorized?.(event);
|
|
3857
3854
|
};
|
|
3858
3855
|
(0, import_react12.useEffect)(() => {
|
|
3859
|
-
let
|
|
3856
|
+
let options = [];
|
|
3860
3857
|
if (paymentObject.currency === "USD") {
|
|
3861
3858
|
if (paymentObject.amount < 50) {
|
|
3862
|
-
|
|
3859
|
+
options = paymentTypeOptions.filter(
|
|
3863
3860
|
(option) => option.value !== "BANK_TRANSFER" && option.value !== "STABLE_COIN"
|
|
3864
3861
|
);
|
|
3865
3862
|
} else {
|
|
3866
|
-
|
|
3863
|
+
options = paymentTypeOptions.filter(
|
|
3867
3864
|
(option) => option.value !== "BANK_TRANSFER"
|
|
3868
3865
|
);
|
|
3869
3866
|
}
|
|
3870
3867
|
} else {
|
|
3871
|
-
|
|
3868
|
+
options = paymentTypeOptions.filter(
|
|
3872
3869
|
(option) => option.value !== "STABLE_COIN"
|
|
3873
3870
|
);
|
|
3874
3871
|
}
|
|
3875
|
-
setFilteredPaymentTypeOptions(
|
|
3872
|
+
setFilteredPaymentTypeOptions(options);
|
|
3876
3873
|
}, [paymentObject.currency, paymentObject.amount]);
|
|
3877
3874
|
(0, import_react12.useEffect)(() => {
|
|
3878
3875
|
if (filteredPaymentTypeOptions.length) {
|
|
@@ -3896,14 +3893,14 @@ function BzpCheckoutCard({
|
|
|
3896
3893
|
className: checkoutState === "SUCCESS" ? "col-span-3" : "col-span-2",
|
|
3897
3894
|
children: [
|
|
3898
3895
|
checkoutState === "PENDING" && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center justify-between px-12 py-8", children: [
|
|
3899
|
-
|
|
3896
|
+
paymentObject.logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3900
3897
|
BaseImage,
|
|
3901
3898
|
{
|
|
3902
|
-
src:
|
|
3899
|
+
src: paymentObject.logoUrl ?? "",
|
|
3903
3900
|
alt: "Merchant Logo",
|
|
3904
3901
|
width: 52,
|
|
3905
3902
|
height: 52,
|
|
3906
|
-
customClass: "rounded-lg"
|
|
3903
|
+
customClass: "rounded-lg object-fit"
|
|
3907
3904
|
}
|
|
3908
3905
|
) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3909
3906
|
"div",
|
|
@@ -3922,7 +3919,7 @@ function BzpCheckoutCard({
|
|
|
3922
3919
|
] })
|
|
3923
3920
|
] })
|
|
3924
3921
|
] }),
|
|
3925
|
-
checkoutState === "PENDING" && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "overflow-y-scroll px-10 pb-10 pt-2", children: paymentType === "CARD" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3922
|
+
checkoutState === "PENDING" && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "max-h-[32rem] overflow-y-scroll px-10 pb-10 pt-2", children: paymentType === "CARD" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3926
3923
|
PayByCard,
|
|
3927
3924
|
{
|
|
3928
3925
|
secretKey,
|
|
@@ -4158,8 +4155,7 @@ function MidenCheckoutCard({
|
|
|
4158
4155
|
currency: "",
|
|
4159
4156
|
email: "",
|
|
4160
4157
|
phoneNumber: "",
|
|
4161
|
-
narration: ""
|
|
4162
|
-
redirectUrl: ""
|
|
4158
|
+
narration: ""
|
|
4163
4159
|
},
|
|
4164
4160
|
onPaymentAuthorized,
|
|
4165
4161
|
onError
|