@pelcro/react-pelcro-js 3.10.1-beta.6 → 3.10.1-beta.8
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.js +74 -75
- package/dist/index.esm.js +74 -75
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -10117,18 +10117,15 @@ const loadPaymentSDKs = () => {
|
|
|
10117
10117
|
const scriptUrlToUse = window.Pelcro.site.read().vantiv_gateway_settings.environment === "production" ? PRODUCTION_URL : PRELIVE_URL;
|
|
10118
10118
|
window.Pelcro.helpers.loadSDK(scriptUrlToUse, "vantiv-eprotect-sdk");
|
|
10119
10119
|
}
|
|
10120
|
-
} //
|
|
10120
|
+
} // Load Tap SDKs
|
|
10121
10121
|
|
|
10122
10122
|
|
|
10123
|
-
|
|
10124
|
-
// Load Tap SDKs
|
|
10125
|
-
const supportsTap = Boolean(window.Pelcro.site.read().tap_gateway_settings);
|
|
10123
|
+
const supportsTap = Boolean(window.Pelcro.site.read().tap_gateway_settings);
|
|
10126
10124
|
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
});
|
|
10125
|
+
if (supportsTap) {
|
|
10126
|
+
window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
|
|
10127
|
+
window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
|
|
10128
|
+
}
|
|
10132
10129
|
};
|
|
10133
10130
|
const loadAuth0SDK = () => {
|
|
10134
10131
|
const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url);
|
|
@@ -15900,73 +15897,75 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
15900
15897
|
});
|
|
15901
15898
|
}
|
|
15902
15899
|
|
|
15903
|
-
if (cardProcessor === "tap" && !selectedPaymentMethodId
|
|
15904
|
-
|
|
15905
|
-
|
|
15906
|
-
|
|
15907
|
-
|
|
15908
|
-
|
|
15909
|
-
|
|
15910
|
-
|
|
15911
|
-
|
|
15912
|
-
|
|
15913
|
-
|
|
15914
|
-
|
|
15915
|
-
|
|
15916
|
-
|
|
15917
|
-
|
|
15918
|
-
|
|
15900
|
+
if (cardProcessor === "tap" && !selectedPaymentMethodId) {
|
|
15901
|
+
if (window.Tapjsli) {
|
|
15902
|
+
var _window$Pelcro$site$r3;
|
|
15903
|
+
|
|
15904
|
+
console.log("Yes Tap JSLI is enabled");
|
|
15905
|
+
const tapKey = Tapjsli((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.tap_gateway_settings.publishable_key);
|
|
15906
|
+
let elements = tapKey.elements({});
|
|
15907
|
+
let style = {
|
|
15908
|
+
base: {
|
|
15909
|
+
color: "#535353",
|
|
15910
|
+
lineHeight: "18px",
|
|
15911
|
+
fontFamily: "sans-serif",
|
|
15912
|
+
fontSmoothing: "antialiased",
|
|
15913
|
+
fontSize: "16px",
|
|
15914
|
+
"::placeholder": {
|
|
15915
|
+
color: "rgba(0, 0, 0, 0.26)",
|
|
15916
|
+
fontSize: "15px"
|
|
15917
|
+
}
|
|
15918
|
+
},
|
|
15919
|
+
invalid: {
|
|
15920
|
+
color: "red"
|
|
15919
15921
|
}
|
|
15920
|
-
}
|
|
15921
|
-
|
|
15922
|
-
|
|
15923
|
-
|
|
15924
|
-
|
|
15925
|
-
|
|
15926
|
-
|
|
15927
|
-
|
|
15928
|
-
|
|
15929
|
-
|
|
15930
|
-
|
|
15931
|
-
|
|
15932
|
-
|
|
15933
|
-
|
|
15934
|
-
|
|
15935
|
-
|
|
15936
|
-
|
|
15937
|
-
|
|
15938
|
-
|
|
15939
|
-
|
|
15940
|
-
|
|
15941
|
-
|
|
15942
|
-
|
|
15943
|
-
|
|
15944
|
-
|
|
15945
|
-
|
|
15946
|
-
|
|
15947
|
-
|
|
15948
|
-
|
|
15949
|
-
|
|
15950
|
-
|
|
15951
|
-
|
|
15952
|
-
|
|
15953
|
-
|
|
15954
|
-
|
|
15955
|
-
|
|
15956
|
-
|
|
15957
|
-
|
|
15958
|
-
|
|
15959
|
-
|
|
15960
|
-
|
|
15961
|
-
|
|
15962
|
-
|
|
15963
|
-
|
|
15964
|
-
|
|
15965
|
-
|
|
15966
|
-
|
|
15967
|
-
tapInstanceCard.current = card;
|
|
15968
|
-
}
|
|
15969
|
-
}, [selectedPaymentMethodId, Tapjsli]);
|
|
15922
|
+
}; // input labels/placeholders
|
|
15923
|
+
|
|
15924
|
+
let labels = {
|
|
15925
|
+
cardNumber: "Card Number",
|
|
15926
|
+
expirationDate: "MM/YY",
|
|
15927
|
+
cvv: "CVV",
|
|
15928
|
+
cardHolder: "Card Holder Name"
|
|
15929
|
+
}; //payment options
|
|
15930
|
+
|
|
15931
|
+
let paymentOptions = {
|
|
15932
|
+
labels: labels,
|
|
15933
|
+
TextDirection: "ltr"
|
|
15934
|
+
}; //create element, pass style and payment options
|
|
15935
|
+
|
|
15936
|
+
let card = elements.create("card", {
|
|
15937
|
+
style: style
|
|
15938
|
+
}, paymentOptions); //mount element
|
|
15939
|
+
|
|
15940
|
+
card.mount("#tapPaymentIframe"); //card change event listener
|
|
15941
|
+
|
|
15942
|
+
card.addEventListener("change", function (event) {// if (event.error_interactive) {
|
|
15943
|
+
// onFailure(event.error_interactive);
|
|
15944
|
+
// return dispatch({
|
|
15945
|
+
// type: SHOW_ALERT,
|
|
15946
|
+
// payload: {
|
|
15947
|
+
// type: "error",
|
|
15948
|
+
// content: getErrorMessages(event.error_interactive)
|
|
15949
|
+
// }
|
|
15950
|
+
// });
|
|
15951
|
+
// } else {
|
|
15952
|
+
// dispatch({
|
|
15953
|
+
// type: SHOW_ALERT,
|
|
15954
|
+
// payload: { type: "error", content: "" }
|
|
15955
|
+
// });
|
|
15956
|
+
// }
|
|
15957
|
+
// let displayError = document.getElementById("error-handler");
|
|
15958
|
+
// if (event.error) {
|
|
15959
|
+
// displayError.textContent = event.error.message;
|
|
15960
|
+
// } else {
|
|
15961
|
+
// displayError.textContent = "";
|
|
15962
|
+
// }
|
|
15963
|
+
});
|
|
15964
|
+
tapInstanceRef.current = tapKey;
|
|
15965
|
+
tapInstanceCard.current = card;
|
|
15966
|
+
}
|
|
15967
|
+
}
|
|
15968
|
+
}, [selectedPaymentMethodId]);
|
|
15970
15969
|
|
|
15971
15970
|
const initPaymentRequest = (state, dispatch) => {
|
|
15972
15971
|
try {
|
package/dist/index.esm.js
CHANGED
|
@@ -10087,18 +10087,15 @@ const loadPaymentSDKs = () => {
|
|
|
10087
10087
|
const scriptUrlToUse = window.Pelcro.site.read().vantiv_gateway_settings.environment === "production" ? PRODUCTION_URL : PRELIVE_URL;
|
|
10088
10088
|
window.Pelcro.helpers.loadSDK(scriptUrlToUse, "vantiv-eprotect-sdk");
|
|
10089
10089
|
}
|
|
10090
|
-
} //
|
|
10090
|
+
} // Load Tap SDKs
|
|
10091
10091
|
|
|
10092
10092
|
|
|
10093
|
-
|
|
10094
|
-
// Load Tap SDKs
|
|
10095
|
-
const supportsTap = Boolean(window.Pelcro.site.read().tap_gateway_settings);
|
|
10093
|
+
const supportsTap = Boolean(window.Pelcro.site.read().tap_gateway_settings);
|
|
10096
10094
|
|
|
10097
|
-
|
|
10098
|
-
|
|
10099
|
-
|
|
10100
|
-
|
|
10101
|
-
});
|
|
10095
|
+
if (supportsTap) {
|
|
10096
|
+
window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
|
|
10097
|
+
window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
|
|
10098
|
+
}
|
|
10102
10099
|
};
|
|
10103
10100
|
const loadAuth0SDK = () => {
|
|
10104
10101
|
const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url);
|
|
@@ -15870,73 +15867,75 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
15870
15867
|
});
|
|
15871
15868
|
}
|
|
15872
15869
|
|
|
15873
|
-
if (cardProcessor === "tap" && !selectedPaymentMethodId
|
|
15874
|
-
|
|
15875
|
-
|
|
15876
|
-
|
|
15877
|
-
|
|
15878
|
-
|
|
15879
|
-
|
|
15880
|
-
|
|
15881
|
-
|
|
15882
|
-
|
|
15883
|
-
|
|
15884
|
-
|
|
15885
|
-
|
|
15886
|
-
|
|
15887
|
-
|
|
15888
|
-
|
|
15870
|
+
if (cardProcessor === "tap" && !selectedPaymentMethodId) {
|
|
15871
|
+
if (window.Tapjsli) {
|
|
15872
|
+
var _window$Pelcro$site$r3;
|
|
15873
|
+
|
|
15874
|
+
console.log("Yes Tap JSLI is enabled");
|
|
15875
|
+
const tapKey = Tapjsli((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.tap_gateway_settings.publishable_key);
|
|
15876
|
+
let elements = tapKey.elements({});
|
|
15877
|
+
let style = {
|
|
15878
|
+
base: {
|
|
15879
|
+
color: "#535353",
|
|
15880
|
+
lineHeight: "18px",
|
|
15881
|
+
fontFamily: "sans-serif",
|
|
15882
|
+
fontSmoothing: "antialiased",
|
|
15883
|
+
fontSize: "16px",
|
|
15884
|
+
"::placeholder": {
|
|
15885
|
+
color: "rgba(0, 0, 0, 0.26)",
|
|
15886
|
+
fontSize: "15px"
|
|
15887
|
+
}
|
|
15888
|
+
},
|
|
15889
|
+
invalid: {
|
|
15890
|
+
color: "red"
|
|
15889
15891
|
}
|
|
15890
|
-
}
|
|
15891
|
-
|
|
15892
|
-
|
|
15893
|
-
|
|
15894
|
-
|
|
15895
|
-
|
|
15896
|
-
|
|
15897
|
-
|
|
15898
|
-
|
|
15899
|
-
|
|
15900
|
-
|
|
15901
|
-
|
|
15902
|
-
|
|
15903
|
-
|
|
15904
|
-
|
|
15905
|
-
|
|
15906
|
-
|
|
15907
|
-
|
|
15908
|
-
|
|
15909
|
-
|
|
15910
|
-
|
|
15911
|
-
|
|
15912
|
-
|
|
15913
|
-
|
|
15914
|
-
|
|
15915
|
-
|
|
15916
|
-
|
|
15917
|
-
|
|
15918
|
-
|
|
15919
|
-
|
|
15920
|
-
|
|
15921
|
-
|
|
15922
|
-
|
|
15923
|
-
|
|
15924
|
-
|
|
15925
|
-
|
|
15926
|
-
|
|
15927
|
-
|
|
15928
|
-
|
|
15929
|
-
|
|
15930
|
-
|
|
15931
|
-
|
|
15932
|
-
|
|
15933
|
-
|
|
15934
|
-
|
|
15935
|
-
|
|
15936
|
-
|
|
15937
|
-
tapInstanceCard.current = card;
|
|
15938
|
-
}
|
|
15939
|
-
}, [selectedPaymentMethodId, Tapjsli]);
|
|
15892
|
+
}; // input labels/placeholders
|
|
15893
|
+
|
|
15894
|
+
let labels = {
|
|
15895
|
+
cardNumber: "Card Number",
|
|
15896
|
+
expirationDate: "MM/YY",
|
|
15897
|
+
cvv: "CVV",
|
|
15898
|
+
cardHolder: "Card Holder Name"
|
|
15899
|
+
}; //payment options
|
|
15900
|
+
|
|
15901
|
+
let paymentOptions = {
|
|
15902
|
+
labels: labels,
|
|
15903
|
+
TextDirection: "ltr"
|
|
15904
|
+
}; //create element, pass style and payment options
|
|
15905
|
+
|
|
15906
|
+
let card = elements.create("card", {
|
|
15907
|
+
style: style
|
|
15908
|
+
}, paymentOptions); //mount element
|
|
15909
|
+
|
|
15910
|
+
card.mount("#tapPaymentIframe"); //card change event listener
|
|
15911
|
+
|
|
15912
|
+
card.addEventListener("change", function (event) {// if (event.error_interactive) {
|
|
15913
|
+
// onFailure(event.error_interactive);
|
|
15914
|
+
// return dispatch({
|
|
15915
|
+
// type: SHOW_ALERT,
|
|
15916
|
+
// payload: {
|
|
15917
|
+
// type: "error",
|
|
15918
|
+
// content: getErrorMessages(event.error_interactive)
|
|
15919
|
+
// }
|
|
15920
|
+
// });
|
|
15921
|
+
// } else {
|
|
15922
|
+
// dispatch({
|
|
15923
|
+
// type: SHOW_ALERT,
|
|
15924
|
+
// payload: { type: "error", content: "" }
|
|
15925
|
+
// });
|
|
15926
|
+
// }
|
|
15927
|
+
// let displayError = document.getElementById("error-handler");
|
|
15928
|
+
// if (event.error) {
|
|
15929
|
+
// displayError.textContent = event.error.message;
|
|
15930
|
+
// } else {
|
|
15931
|
+
// displayError.textContent = "";
|
|
15932
|
+
// }
|
|
15933
|
+
});
|
|
15934
|
+
tapInstanceRef.current = tapKey;
|
|
15935
|
+
tapInstanceCard.current = card;
|
|
15936
|
+
}
|
|
15937
|
+
}
|
|
15938
|
+
}, [selectedPaymentMethodId]);
|
|
15940
15939
|
|
|
15941
15940
|
const initPaymentRequest = (state, dispatch) => {
|
|
15942
15941
|
try {
|