@pelcro/react-pelcro-js 3.10.1-beta.18 → 3.10.1-beta.19
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 +5 -12
- package/dist/index.esm.js +5 -12
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -15417,13 +15417,15 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
15417
15417
|
const isRenewingGift = (_props$isRenewingGift = props.isRenewingGift) !== null && _props$isRenewingGift !== void 0 ? _props$isRenewingGift : pelcroStore.isRenewingGift;
|
|
15418
15418
|
const invoice = (_props$invoice = props.invoice) !== null && _props$invoice !== void 0 ? _props$invoice : pelcroStore.invoice;
|
|
15419
15419
|
const cardProcessor = getSiteCardProcessor();
|
|
15420
|
-
const [isTapLoaded, setIsTapLoaded] = React.useState(
|
|
15420
|
+
const [isTapLoaded, setIsTapLoaded] = React.useState(Boolean(window.Tapjsli));
|
|
15421
15421
|
React.useEffect(() => {
|
|
15422
15422
|
whenUserReady(() => {
|
|
15423
15423
|
if (cardProcessor === "tap" && !window.Tapjsli) {
|
|
15424
15424
|
window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
|
|
15425
15425
|
window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
|
|
15426
|
-
|
|
15426
|
+
document.querySelector('script[src="https://secure.gosell.io/js/sdk/tap.min.js"]').addEventListener("load", () => {
|
|
15427
|
+
setIsTapLoaded(true);
|
|
15428
|
+
});
|
|
15427
15429
|
}
|
|
15428
15430
|
});
|
|
15429
15431
|
}, [isTapLoaded]);
|
|
@@ -17108,28 +17110,19 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
17108
17110
|
const UnwrappedForm = es_12(PaymentMethodContainerWithoutStripe);
|
|
17109
17111
|
|
|
17110
17112
|
const PaymentMethodContainer = props => {
|
|
17111
|
-
console.log("Inside Payment Method Container");
|
|
17112
17113
|
const [isStripeLoaded, setIsStripeLoaded] = React.useState(Boolean(window.Stripe));
|
|
17113
17114
|
const {
|
|
17114
17115
|
whenUserReady
|
|
17115
17116
|
} = usePelcro.getStore();
|
|
17116
|
-
|
|
17117
|
+
getSiteCardProcessor();
|
|
17117
17118
|
React.useEffect(() => {
|
|
17118
17119
|
whenUserReady(() => {
|
|
17119
17120
|
if (!window.Stripe) {
|
|
17120
|
-
console.log("Inside Payment Method Container and window.Stripe is not loaded");
|
|
17121
17121
|
document.querySelector('script[src="https://js.stripe.com/v3"]').addEventListener("load", () => {
|
|
17122
17122
|
setIsStripeLoaded(true);
|
|
17123
17123
|
});
|
|
17124
17124
|
}
|
|
17125
17125
|
});
|
|
17126
|
-
|
|
17127
|
-
if (cardProcessor === "tap" && !window.Tapjsli) {
|
|
17128
|
-
console.log("Inside Payment Method Container and window.Tapjsli is not loaded");
|
|
17129
|
-
window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
|
|
17130
|
-
window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
|
|
17131
|
-
console.log("After loading the Tap JS script from within PaymentMethodContainer");
|
|
17132
|
-
}
|
|
17133
17126
|
}, []);
|
|
17134
17127
|
|
|
17135
17128
|
if (isStripeLoaded) {
|
package/dist/index.esm.js
CHANGED
|
@@ -15387,13 +15387,15 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
15387
15387
|
const isRenewingGift = (_props$isRenewingGift = props.isRenewingGift) !== null && _props$isRenewingGift !== void 0 ? _props$isRenewingGift : pelcroStore.isRenewingGift;
|
|
15388
15388
|
const invoice = (_props$invoice = props.invoice) !== null && _props$invoice !== void 0 ? _props$invoice : pelcroStore.invoice;
|
|
15389
15389
|
const cardProcessor = getSiteCardProcessor();
|
|
15390
|
-
const [isTapLoaded, setIsTapLoaded] = useState(
|
|
15390
|
+
const [isTapLoaded, setIsTapLoaded] = useState(Boolean(window.Tapjsli));
|
|
15391
15391
|
useEffect(() => {
|
|
15392
15392
|
whenUserReady(() => {
|
|
15393
15393
|
if (cardProcessor === "tap" && !window.Tapjsli) {
|
|
15394
15394
|
window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
|
|
15395
15395
|
window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
|
|
15396
|
-
|
|
15396
|
+
document.querySelector('script[src="https://secure.gosell.io/js/sdk/tap.min.js"]').addEventListener("load", () => {
|
|
15397
|
+
setIsTapLoaded(true);
|
|
15398
|
+
});
|
|
15397
15399
|
}
|
|
15398
15400
|
});
|
|
15399
15401
|
}, [isTapLoaded]);
|
|
@@ -17078,28 +17080,19 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
17078
17080
|
const UnwrappedForm = es_12(PaymentMethodContainerWithoutStripe);
|
|
17079
17081
|
|
|
17080
17082
|
const PaymentMethodContainer = props => {
|
|
17081
|
-
console.log("Inside Payment Method Container");
|
|
17082
17083
|
const [isStripeLoaded, setIsStripeLoaded] = useState(Boolean(window.Stripe));
|
|
17083
17084
|
const {
|
|
17084
17085
|
whenUserReady
|
|
17085
17086
|
} = usePelcro.getStore();
|
|
17086
|
-
|
|
17087
|
+
getSiteCardProcessor();
|
|
17087
17088
|
useEffect(() => {
|
|
17088
17089
|
whenUserReady(() => {
|
|
17089
17090
|
if (!window.Stripe) {
|
|
17090
|
-
console.log("Inside Payment Method Container and window.Stripe is not loaded");
|
|
17091
17091
|
document.querySelector('script[src="https://js.stripe.com/v3"]').addEventListener("load", () => {
|
|
17092
17092
|
setIsStripeLoaded(true);
|
|
17093
17093
|
});
|
|
17094
17094
|
}
|
|
17095
17095
|
});
|
|
17096
|
-
|
|
17097
|
-
if (cardProcessor === "tap" && !window.Tapjsli) {
|
|
17098
|
-
console.log("Inside Payment Method Container and window.Tapjsli is not loaded");
|
|
17099
|
-
window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
|
|
17100
|
-
window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
|
|
17101
|
-
console.log("After loading the Tap JS script from within PaymentMethodContainer");
|
|
17102
|
-
}
|
|
17103
17096
|
}, []);
|
|
17104
17097
|
|
|
17105
17098
|
if (isStripeLoaded) {
|