@fractalpay/fractalpay-next-dev 0.0.278 → 0.0.279
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 +33 -32
- package/dist/index.js.map +1 -1
- package/next-env.d.ts +6 -0
- package/package.json +3 -8
package/dist/index.js
CHANGED
|
@@ -39,7 +39,7 @@ var require_package = __commonJS({
|
|
|
39
39
|
"package.json"(exports, module) {
|
|
40
40
|
module.exports = {
|
|
41
41
|
name: "@fractalpay/fractalpay-next-dev",
|
|
42
|
-
version: "0.0.
|
|
42
|
+
version: "0.0.279",
|
|
43
43
|
private: false,
|
|
44
44
|
type: "module",
|
|
45
45
|
scripts: {
|
|
@@ -97,12 +97,7 @@ var require_package = __commonJS({
|
|
|
97
97
|
},
|
|
98
98
|
author: "Mukul",
|
|
99
99
|
license: "MIT",
|
|
100
|
-
keywords: [
|
|
101
|
-
"nextjs",
|
|
102
|
-
"next",
|
|
103
|
-
"typescript",
|
|
104
|
-
"tailwindcss"
|
|
105
|
-
],
|
|
100
|
+
keywords: ["nextjs", "next", "typescript", "tailwindcss"],
|
|
106
101
|
publishConfig: {
|
|
107
102
|
access: "public"
|
|
108
103
|
}
|
|
@@ -3934,7 +3929,6 @@ function GetPaymentPage(props) {
|
|
|
3934
3929
|
} catch (err) {
|
|
3935
3930
|
setErrorIframe(((_h2 = (_g2 = err == null ? void 0 : err.response) == null ? void 0 : _g2.data) == null ? void 0 : _h2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
|
|
3936
3931
|
setLoading2(false);
|
|
3937
|
-
return;
|
|
3938
3932
|
}
|
|
3939
3933
|
console.log(tokenizeData, "tokenizeData");
|
|
3940
3934
|
const reqData = JSON.stringify(__spreadProps(__spreadValues({}, tokenizeData), {
|
|
@@ -9894,9 +9888,7 @@ width: fit-content;
|
|
|
9894
9888
|
top: 50%;
|
|
9895
9889
|
left: 50%;
|
|
9896
9890
|
transform: translate(-50%, -50%);
|
|
9897
|
-
background:
|
|
9898
|
-
backdrop-filter: blur(12px);
|
|
9899
|
-
-webkit-backdrop-filter: blur(12px);
|
|
9891
|
+
background: #fff;
|
|
9900
9892
|
border-radius: 12px;
|
|
9901
9893
|
z-index: 11111;
|
|
9902
9894
|
max-width: 240px;
|
|
@@ -10423,6 +10415,9 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10423
10415
|
name: cardData == null ? void 0 : cardData.cardName
|
|
10424
10416
|
}
|
|
10425
10417
|
} : null);
|
|
10418
|
+
if (require3ds && (data == null ? void 0 : data.stripe_3ds_auth_id)) {
|
|
10419
|
+
dataObj.stripe_3ds_auth_id = data == null ? void 0 : data.stripe_3ds_auth_id;
|
|
10420
|
+
}
|
|
10426
10421
|
const preAuthResponse = await axios9.post(`${masterBaseUrl}api/v1/gateway/preauth/${session_token}`, dataObj);
|
|
10427
10422
|
if ((_a2 = preAuthResponse == null ? void 0 : preAuthResponse.data) == null ? void 0 : _a2.result) {
|
|
10428
10423
|
let addCard;
|
|
@@ -10517,13 +10512,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10517
10512
|
return Object.keys(errors).length > 0;
|
|
10518
10513
|
};
|
|
10519
10514
|
const completeFractalFlow = async (tokenizeData, intentid, typeoftoken) => {
|
|
10520
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
10515
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
10521
10516
|
try {
|
|
10522
|
-
console.log({
|
|
10523
|
-
tokenizeData,
|
|
10524
|
-
intentid,
|
|
10525
|
-
typeoftoken
|
|
10526
|
-
});
|
|
10527
10517
|
if (typeoftoken == "google_pay" || typeoftoken == "apple_pay") {
|
|
10528
10518
|
handleCharge({
|
|
10529
10519
|
Token: tokenizeData,
|
|
@@ -10531,28 +10521,39 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10531
10521
|
typeoftoken
|
|
10532
10522
|
});
|
|
10533
10523
|
return;
|
|
10534
|
-
}
|
|
10524
|
+
}
|
|
10525
|
+
let token = tokenizeData;
|
|
10526
|
+
let verifyandsaveresp = await axios9.post(`${masterBaseUrl}api/v1/gateway/verify-and-save/${session_token}`, {
|
|
10527
|
+
token,
|
|
10528
|
+
require3ds,
|
|
10529
|
+
pass_fee,
|
|
10530
|
+
typeoftoken
|
|
10531
|
+
});
|
|
10532
|
+
if ((verifyandsaveresp == null ? void 0 : verifyandsaveresp.status) == 200) {
|
|
10533
|
+
let responsetemp = (_a2 = verifyandsaveresp == null ? void 0 : verifyandsaveresp.data) == null ? void 0 : _a2.data;
|
|
10534
|
+
let respData = {
|
|
10535
|
+
Token: responsetemp.gateway_token,
|
|
10536
|
+
Brand: responsetemp.card_data.brand,
|
|
10537
|
+
ExpirationMonth: responsetemp.card_data.expire_mm,
|
|
10538
|
+
ExpirationYear: responsetemp.card_data.expire_yy,
|
|
10539
|
+
Last4: responsetemp.card_data.last4,
|
|
10540
|
+
Bin: responsetemp.card_data.bin,
|
|
10541
|
+
postalCode: cardData == null ? void 0 : cardData.zipCode,
|
|
10542
|
+
stripe_3ds_auth_id: intentid
|
|
10543
|
+
};
|
|
10535
10544
|
if (isPreAuth) {
|
|
10536
|
-
handlePreAuth(
|
|
10537
|
-
Token: tokenizeData,
|
|
10538
|
-
postalCode: cardData == null ? void 0 : cardData.zipCode,
|
|
10539
|
-
typeoftoken: "token"
|
|
10540
|
-
});
|
|
10545
|
+
handlePreAuth(respData);
|
|
10541
10546
|
} else {
|
|
10542
|
-
handleCharge(
|
|
10543
|
-
Token: tokenizeData,
|
|
10544
|
-
postalCode: cardData == null ? void 0 : cardData.zipCode,
|
|
10545
|
-
typeoftoken: "token"
|
|
10546
|
-
}, intentid && { stripe_3ds_auth_id: intentid }));
|
|
10547
|
+
handleCharge(respData);
|
|
10547
10548
|
}
|
|
10548
10549
|
}
|
|
10549
10550
|
} catch (error2) {
|
|
10550
10551
|
console.log(error2, "error");
|
|
10551
|
-
setError(((
|
|
10552
|
+
setError(((_c2 = (_b2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _b2.data) == null ? void 0 : _c2.message) || "Something went wrong!");
|
|
10552
10553
|
callback({
|
|
10553
|
-
error: ((
|
|
10554
|
-
result: (
|
|
10555
|
-
statusCode: (
|
|
10554
|
+
error: ((_e2 = (_d2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _d2.data) == null ? void 0 : _e2.message) || "Something went wrong!",
|
|
10555
|
+
result: (_g2 = (_f2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _f2.data) == null ? void 0 : _g2.result,
|
|
10556
|
+
statusCode: (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.status
|
|
10556
10557
|
});
|
|
10557
10558
|
hideLoader();
|
|
10558
10559
|
}
|