@fractalpay/fractalpay-next-test 0.0.27 → 0.0.29
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 +40 -34
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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-test",
|
|
42
|
-
version: "0.0.
|
|
42
|
+
version: "0.0.29",
|
|
43
43
|
private: false,
|
|
44
44
|
type: "module",
|
|
45
45
|
scripts: {
|
|
@@ -3247,10 +3247,7 @@ import { useEffect as useEffect6 } from "react";
|
|
|
3247
3247
|
var scriptLoaded = false;
|
|
3248
3248
|
var DataCapScriptLoader = () => {
|
|
3249
3249
|
useEffect6(() => {
|
|
3250
|
-
console.log("\u{1F535} DataCapScriptLoader mounted");
|
|
3251
|
-
console.log("\u{1F535} scriptLoaded flag:", scriptLoaded);
|
|
3252
3250
|
if (scriptLoaded) {
|
|
3253
|
-
console.log("\u{1F7E1} Script already marked as loaded. Skipping injection.");
|
|
3254
3251
|
return;
|
|
3255
3252
|
}
|
|
3256
3253
|
const existingScript = document.querySelector(
|
|
@@ -3258,25 +3255,19 @@ var DataCapScriptLoader = () => {
|
|
|
3258
3255
|
);
|
|
3259
3256
|
console.log("\u{1F535} existingScript found:", !!existingScript);
|
|
3260
3257
|
if (!existingScript) {
|
|
3261
|
-
console.log("\u{1F7E2} Injecting DataCap hosted script...");
|
|
3262
3258
|
const script2 = document.createElement("script");
|
|
3263
3259
|
script2.src = `${datacapUrl}/hosted`;
|
|
3264
3260
|
script2.async = true;
|
|
3265
3261
|
script2.onload = () => {
|
|
3266
3262
|
console.log("\u2705 DataCap script loaded successfully");
|
|
3267
3263
|
scriptLoaded = true;
|
|
3268
|
-
console.log("\u{1F535} scriptLoaded flag updated to:", scriptLoaded);
|
|
3269
|
-
console.log("\u{1F535} window.dcap:", window.DatacapHostedWebToken);
|
|
3270
3264
|
};
|
|
3271
3265
|
script2.onerror = (err) => {
|
|
3272
3266
|
console.error("\u274C DataCap script failed to load", err);
|
|
3273
3267
|
};
|
|
3274
3268
|
document.head.appendChild(script2);
|
|
3275
3269
|
} else {
|
|
3276
|
-
console.log("\u{1F7E1} Script already exists in DOM.");
|
|
3277
3270
|
scriptLoaded = true;
|
|
3278
|
-
console.log("\u{1F535} scriptLoaded flag updated to:", scriptLoaded);
|
|
3279
|
-
console.log("\u{1F535} window.dcap:", window.dcap);
|
|
3280
3271
|
}
|
|
3281
3272
|
}, []);
|
|
3282
3273
|
return null;
|
|
@@ -3295,7 +3286,7 @@ var customCSS = `
|
|
|
3295
3286
|
|
|
3296
3287
|
input {
|
|
3297
3288
|
display: block;
|
|
3298
|
-
width:
|
|
3289
|
+
width: 100%;
|
|
3299
3290
|
padding: .375rem .75rem;
|
|
3300
3291
|
font-size: 1rem;
|
|
3301
3292
|
font-weight: 400;
|
|
@@ -3310,6 +3301,7 @@ var customCSS = `
|
|
|
3310
3301
|
border-radius: 0.375rem;
|
|
3311
3302
|
transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
|
3312
3303
|
margin-bottom: 10px;
|
|
3304
|
+
box-sizing: border-box;
|
|
3313
3305
|
}
|
|
3314
3306
|
|
|
3315
3307
|
input:focus {
|
|
@@ -3355,7 +3347,11 @@ var customCSS = `
|
|
|
3355
3347
|
input.card-data.card-data-cvv{
|
|
3356
3348
|
margin-bottom: 0px;
|
|
3357
3349
|
}
|
|
3358
|
-
|
|
3350
|
+
|
|
3351
|
+
right-col{
|
|
3352
|
+
width : 10px !important;
|
|
3353
|
+
}
|
|
3354
|
+
|
|
3359
3355
|
`;
|
|
3360
3356
|
var DataCapFields = ({
|
|
3361
3357
|
isOpen,
|
|
@@ -3384,9 +3380,9 @@ var DataCapFields = ({
|
|
|
3384
3380
|
font-weight: 400 !important;
|
|
3385
3381
|
font-size: 14px !important;
|
|
3386
3382
|
}
|
|
3383
|
+
|
|
3387
3384
|
`;
|
|
3388
3385
|
}
|
|
3389
|
-
console.log(customCSS, "customcss");
|
|
3390
3386
|
const initialize = async () => {
|
|
3391
3387
|
setLoader == null ? void 0 : setLoader(true);
|
|
3392
3388
|
setIframeReady(false);
|
|
@@ -5546,7 +5542,7 @@ function AddCardStyle() {
|
|
|
5546
5542
|
padding: 0 20px
|
|
5547
5543
|
}
|
|
5548
5544
|
.add-card .form-group {
|
|
5549
|
-
margin-bottom: 5px;
|
|
5545
|
+
// margin-bottom: 5px;
|
|
5550
5546
|
}
|
|
5551
5547
|
|
|
5552
5548
|
.add-card .idle-green-btn {
|
|
@@ -6313,8 +6309,8 @@ function AddCardEasyPay(props) {
|
|
|
6313
6309
|
e.stopPropagation();
|
|
6314
6310
|
}
|
|
6315
6311
|
}, children: [
|
|
6316
|
-
/* @__PURE__ */ jsxs14("div", { style: { maxHeight: "
|
|
6317
|
-
/* @__PURE__ */ jsx24("div", { className: "form-group", style: { marginTop: "0", marginBottom: "
|
|
6312
|
+
/* @__PURE__ */ jsxs14("div", { style: { maxHeight: "450px", minHeight: "0" }, className: "card-scrl", children: [
|
|
6313
|
+
/* @__PURE__ */ jsx24("div", { className: "form-group", style: { marginTop: "0", marginBottom: "0" }, children: /* @__PURE__ */ jsx24(
|
|
6318
6314
|
DataCapFields,
|
|
6319
6315
|
{
|
|
6320
6316
|
isOpen: true,
|
|
@@ -6353,7 +6349,7 @@ function AddCardEasyPay(props) {
|
|
|
6353
6349
|
"input",
|
|
6354
6350
|
{
|
|
6355
6351
|
type: "text",
|
|
6356
|
-
id: "
|
|
6352
|
+
id: "",
|
|
6357
6353
|
name: "zipcode",
|
|
6358
6354
|
placeholder: "Zip",
|
|
6359
6355
|
value: (_b = cardData == null ? void 0 : cardData.zipCode) != null ? _b : "",
|
|
@@ -8573,7 +8569,6 @@ function SkyChargewidgetstyles() {
|
|
|
8573
8569
|
font-family: 'Inter', sans-serif !important;
|
|
8574
8570
|
}
|
|
8575
8571
|
.frac-form .form-group-frac{
|
|
8576
|
-
margin:0 !important;
|
|
8577
8572
|
padding: 5px 0;
|
|
8578
8573
|
}
|
|
8579
8574
|
.frac-form .mb-4{
|
|
@@ -8897,7 +8892,6 @@ function SkyChargewidgetstyles() {
|
|
|
8897
8892
|
.form-control-frac{box-sizing: border-box ;}
|
|
8898
8893
|
#PaymentForm .form-group-frac{
|
|
8899
8894
|
padding:5px 0 ;
|
|
8900
|
-
matgin: 0 !important
|
|
8901
8895
|
}
|
|
8902
8896
|
|
|
8903
8897
|
.toggle-label {
|
|
@@ -9531,6 +9525,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9531
9525
|
const [remainingAmount, setRemainingAmount] = useState10("");
|
|
9532
9526
|
const [paymentGateway, setPaymentGateway] = useState10();
|
|
9533
9527
|
const [dcToken, setDCToken] = useState10();
|
|
9528
|
+
console.log(show, "show");
|
|
9534
9529
|
let mastercard2 = S3Url + "widget/mc-img.svg";
|
|
9535
9530
|
let visa2 = S3Url + "widget/visa-img.svg";
|
|
9536
9531
|
let americanexp2 = S3Url + "widget/ae-img.svg";
|
|
@@ -9767,11 +9762,12 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9767
9762
|
public_key_pem: ((_b2 = (_a2 = sesionResult == null ? void 0 : sesionResult.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.publicKeyPem) || ((_d2 = (_c2 = sesionResult == null ? void 0 : sesionResult.data) == null ? void 0 : _c2.data) == null ? void 0 : _d2.public_key_pem),
|
|
9768
9763
|
session_key: (_f2 = (_e2 = sesionResult == null ? void 0 : sesionResult.data) == null ? void 0 : _e2.data) == null ? void 0 : _f2.session_key
|
|
9769
9764
|
};
|
|
9765
|
+
let three_ds_data = null;
|
|
9770
9766
|
if (require3ds) {
|
|
9771
9767
|
if (typeof window !== "undefined" && typeof navigator !== "undefined") {
|
|
9772
9768
|
const languages = (_g2 = navigator.languages) != null ? _g2 : [navigator.language];
|
|
9773
9769
|
const language = Array.isArray(languages) ? languages[0] : languages;
|
|
9774
|
-
|
|
9770
|
+
three_ds_data = {
|
|
9775
9771
|
amount: partialAmount ? Math.round(parseFloat(partialAmount) * 100) : Math.round(parseFloat(amount) * 100),
|
|
9776
9772
|
// convert dollars → cents
|
|
9777
9773
|
currency: "usd",
|
|
@@ -9791,7 +9787,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
9791
9787
|
}
|
|
9792
9788
|
let tokenizeData;
|
|
9793
9789
|
try {
|
|
9794
|
-
tokenizeData = await tokenizerRef.current.createToken(
|
|
9790
|
+
tokenizeData = await tokenizerRef.current.createToken(
|
|
9791
|
+
objtokenize,
|
|
9792
|
+
three_ds_data
|
|
9793
|
+
);
|
|
9795
9794
|
} catch (error2) {
|
|
9796
9795
|
setErrorIframe(error2);
|
|
9797
9796
|
hideLoader();
|
|
@@ -10120,6 +10119,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10120
10119
|
setActive("card");
|
|
10121
10120
|
setActiveinCard("list");
|
|
10122
10121
|
setCardList(cardlists);
|
|
10122
|
+
setLoadingIframe(false);
|
|
10123
10123
|
} else {
|
|
10124
10124
|
setActive("card");
|
|
10125
10125
|
setCardList([]);
|
|
@@ -10319,7 +10319,12 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10319
10319
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2, _o2;
|
|
10320
10320
|
try {
|
|
10321
10321
|
showLoader();
|
|
10322
|
-
const res = await axios9.get(`${masterBaseUrl}api/v1/gateway/get-payment-details/${session_token}
|
|
10322
|
+
const res = await axios9.get(`${masterBaseUrl}api/v1/gateway/get-payment-details/${session_token}`, {
|
|
10323
|
+
params: {
|
|
10324
|
+
require3ds,
|
|
10325
|
+
pass_fee
|
|
10326
|
+
}
|
|
10327
|
+
});
|
|
10323
10328
|
if ((res == null ? void 0 : res.status) == 200) {
|
|
10324
10329
|
setIsBankActive((_b2 = (_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.isBankActive);
|
|
10325
10330
|
setProcessingFee(Number((_d2 = (_c2 = res == null ? void 0 : res.data) == null ? void 0 : _c2.data) == null ? void 0 : _d2.fee) || 0);
|
|
@@ -10464,6 +10469,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10464
10469
|
styles: {}
|
|
10465
10470
|
});
|
|
10466
10471
|
}, []);
|
|
10472
|
+
console.log(activeinCard === "list", "activeinCard", activeList);
|
|
10467
10473
|
return /* @__PURE__ */ jsxs19(Fragment18, { children: [
|
|
10468
10474
|
initialLoader && /* @__PURE__ */ jsx32(Loader_default, { loading: initialLoader }),
|
|
10469
10475
|
error && /* @__PURE__ */ jsx32("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx32(ErrorCardMessage_default, { error, onClose: handleClose }) }),
|
|
@@ -10590,7 +10596,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10590
10596
|
] }),
|
|
10591
10597
|
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10592
10598
|
/* @__PURE__ */ jsx32("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
|
|
10593
|
-
/* @__PURE__ */ jsx32("div", { className: "toggle-num-wrapper", children: show && paymentGateway === 32 && /* @__PURE__ */ jsx32(
|
|
10599
|
+
/* @__PURE__ */ jsx32("div", { className: "toggle-num-wrapper", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx32(
|
|
10594
10600
|
FractalFields_default,
|
|
10595
10601
|
{
|
|
10596
10602
|
fractalStyles,
|
|
@@ -10667,9 +10673,9 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10667
10673
|
/* @__PURE__ */ jsx32("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx32(
|
|
10668
10674
|
DataCapFields,
|
|
10669
10675
|
{
|
|
10670
|
-
isOpen: show,
|
|
10676
|
+
isOpen: show || autoTrigger,
|
|
10671
10677
|
tokenKey: dcToken,
|
|
10672
|
-
setLoader: setLoadingIframe
|
|
10678
|
+
setLoader: activeinCard === "form" ? setLoadingIframe : null
|
|
10673
10679
|
}
|
|
10674
10680
|
) }),
|
|
10675
10681
|
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
@@ -10745,12 +10751,12 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10745
10751
|
minHeight: "444px",
|
|
10746
10752
|
maxHeight: "444px"
|
|
10747
10753
|
}, children: [
|
|
10748
|
-
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac
|
|
10754
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10749
10755
|
/* @__PURE__ */ jsx32("label", { htmlFor: "nameonaccount", children: "Name on account" }),
|
|
10750
10756
|
/* @__PURE__ */ jsx32("input", { type: "text", id: "nameonaccount", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", name: "name", value: (_l = achData == null ? void 0 : achData.name) != null ? _l : "", onChange: handleChangeAch }),
|
|
10751
10757
|
(achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
|
|
10752
10758
|
] }),
|
|
10753
|
-
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac
|
|
10759
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10754
10760
|
/* @__PURE__ */ jsx32("label", { htmlFor: "routingnumber", children: "Routing number" }),
|
|
10755
10761
|
/* @__PURE__ */ jsx32(
|
|
10756
10762
|
"input",
|
|
@@ -10767,7 +10773,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10767
10773
|
),
|
|
10768
10774
|
(achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
|
|
10769
10775
|
] }),
|
|
10770
|
-
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac
|
|
10776
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10771
10777
|
/* @__PURE__ */ jsx32("label", { htmlFor: "accountnumber", children: "Account number" }),
|
|
10772
10778
|
/* @__PURE__ */ jsx32(
|
|
10773
10779
|
"input",
|
|
@@ -10784,7 +10790,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10784
10790
|
),
|
|
10785
10791
|
(achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
|
|
10786
10792
|
] }),
|
|
10787
|
-
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac
|
|
10793
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10788
10794
|
/* @__PURE__ */ jsx32("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
|
|
10789
10795
|
/* @__PURE__ */ jsx32(
|
|
10790
10796
|
"input",
|
|
@@ -10801,7 +10807,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10801
10807
|
),
|
|
10802
10808
|
(achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
|
|
10803
10809
|
] }),
|
|
10804
|
-
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac
|
|
10810
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10805
10811
|
/* @__PURE__ */ jsx32("label", { htmlFor: "bankname", children: "Bank name" }),
|
|
10806
10812
|
/* @__PURE__ */ jsx32(
|
|
10807
10813
|
"input",
|
|
@@ -10818,7 +10824,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10818
10824
|
),
|
|
10819
10825
|
(achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
|
|
10820
10826
|
] }),
|
|
10821
|
-
((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac
|
|
10827
|
+
((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10822
10828
|
/* @__PURE__ */ jsx32("label", { htmlFor: "companyName", children: "Company name" }),
|
|
10823
10829
|
/* @__PURE__ */ jsx32(
|
|
10824
10830
|
"input",
|
|
@@ -10835,18 +10841,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
|
|
|
10835
10841
|
),
|
|
10836
10842
|
(achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx32("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
|
|
10837
10843
|
] }),
|
|
10838
|
-
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac
|
|
10844
|
+
/* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
|
|
10839
10845
|
/* @__PURE__ */ jsx32("label", { htmlFor: "accounttype", children: "Select account type" }),
|
|
10840
10846
|
/* @__PURE__ */ jsxs19("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_r = achData == null ? void 0 : achData.accountType) != null ? _r : "", onChange: handleChangeAch, children: [
|
|
10841
10847
|
/* @__PURE__ */ jsx32("option", { value: "", children: "Select account" }),
|
|
10842
10848
|
accountTypes.map((type) => /* @__PURE__ */ jsx32("option", { value: type.value, children: type.label }, type.value))
|
|
10843
10849
|
] })
|
|
10844
10850
|
] }),
|
|
10845
|
-
customerId && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac
|
|
10851
|
+
customerId && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
|
|
10846
10852
|
/* @__PURE__ */ jsx32("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => setSaveACHinfo(e.target.checked) }),
|
|
10847
10853
|
/* @__PURE__ */ jsx32("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save ACH" })
|
|
10848
10854
|
] }),
|
|
10849
|
-
saveACHinfo && /* @__PURE__ */ jsx32("div", { className: "form-group-frac
|
|
10855
|
+
saveACHinfo && /* @__PURE__ */ jsx32("div", { className: "form-group-frac saveachtext", children: /* @__PURE__ */ jsxs19("p", { children: [
|
|
10850
10856
|
"If checked, I agree to give the ",
|
|
10851
10857
|
/* @__PURE__ */ jsx32("b", { children: merchantName || "merchant" }),
|
|
10852
10858
|
" permission to charge this bank account for agreed-upon purchases in the future."
|