@pelcro/react-pelcro-js 3.10.1-beta.13 → 3.10.1-beta.14
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 +21 -13
- package/dist/index.esm.js +21 -13
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -15405,9 +15405,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
15405
15405
|
selectedPaymentMethodId,
|
|
15406
15406
|
couponCode
|
|
15407
15407
|
} = usePelcro();
|
|
15408
|
-
|
|
15409
|
-
whenUserReady
|
|
15410
|
-
} = usePelcro.getStore();
|
|
15408
|
+
usePelcro.getStore();
|
|
15411
15409
|
const product = (_props$product = props.product) !== null && _props$product !== void 0 ? _props$product : pelcroStore.product;
|
|
15412
15410
|
const plan = (_props$plan = props.plan) !== null && _props$plan !== void 0 ? _props$plan : pelcroStore.plan;
|
|
15413
15411
|
const subscriptionIdToRenew = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : pelcroStore.subscriptionIdToRenew;
|
|
@@ -15417,16 +15415,22 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
15417
15415
|
const isRenewingGift = (_props$isRenewingGift = props.isRenewingGift) !== null && _props$isRenewingGift !== void 0 ? _props$isRenewingGift : pelcroStore.isRenewingGift;
|
|
15418
15416
|
const invoice = (_props$invoice = props.invoice) !== null && _props$invoice !== void 0 ? _props$invoice : pelcroStore.invoice;
|
|
15419
15417
|
const cardProcessor = getSiteCardProcessor();
|
|
15420
|
-
const [isTapLoaded, setIsTapLoaded] = React.useState(Boolean(window.Tapjsli));
|
|
15421
|
-
|
|
15422
|
-
|
|
15423
|
-
|
|
15424
|
-
|
|
15425
|
-
|
|
15426
|
-
|
|
15427
|
-
|
|
15428
|
-
|
|
15429
|
-
|
|
15418
|
+
const [isTapLoaded, setIsTapLoaded] = React.useState(Boolean(window.Tapjsli)); // useEffect(() => {
|
|
15419
|
+
// whenUserReady(() => {
|
|
15420
|
+
// if (cardProcessor === "tap" && !window.Tapjsli) {
|
|
15421
|
+
// window.Pelcro.helpers.loadSDK(
|
|
15422
|
+
// "https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js",
|
|
15423
|
+
// "tap-bluebird"
|
|
15424
|
+
// );
|
|
15425
|
+
// window.Pelcro.helpers.loadSDK(
|
|
15426
|
+
// "https://secure.gosell.io/js/sdk/tap.min.js",
|
|
15427
|
+
// "tap-sdk"
|
|
15428
|
+
// );
|
|
15429
|
+
// setIsTapLoaded(true);
|
|
15430
|
+
// }
|
|
15431
|
+
// });
|
|
15432
|
+
// }, []);
|
|
15433
|
+
|
|
15430
15434
|
React.useEffect(() => {
|
|
15431
15435
|
if (window.Pelcro.coupon.getFromUrl()) {
|
|
15432
15436
|
dispatch({
|
|
@@ -15975,6 +15979,10 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
15975
15979
|
});
|
|
15976
15980
|
tapInstanceRef.current = tapKey;
|
|
15977
15981
|
tapInstanceCard.current = card;
|
|
15982
|
+
} else if (cardProcessor === "tap" && !window.Tapjsli) {
|
|
15983
|
+
window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
|
|
15984
|
+
window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
|
|
15985
|
+
setIsTapLoaded(true);
|
|
15978
15986
|
}
|
|
15979
15987
|
}, [selectedPaymentMethodId, isTapLoaded]);
|
|
15980
15988
|
|
package/dist/index.esm.js
CHANGED
|
@@ -15375,9 +15375,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
15375
15375
|
selectedPaymentMethodId,
|
|
15376
15376
|
couponCode
|
|
15377
15377
|
} = usePelcro();
|
|
15378
|
-
|
|
15379
|
-
whenUserReady
|
|
15380
|
-
} = usePelcro.getStore();
|
|
15378
|
+
usePelcro.getStore();
|
|
15381
15379
|
const product = (_props$product = props.product) !== null && _props$product !== void 0 ? _props$product : pelcroStore.product;
|
|
15382
15380
|
const plan = (_props$plan = props.plan) !== null && _props$plan !== void 0 ? _props$plan : pelcroStore.plan;
|
|
15383
15381
|
const subscriptionIdToRenew = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : pelcroStore.subscriptionIdToRenew;
|
|
@@ -15387,16 +15385,22 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
15387
15385
|
const isRenewingGift = (_props$isRenewingGift = props.isRenewingGift) !== null && _props$isRenewingGift !== void 0 ? _props$isRenewingGift : pelcroStore.isRenewingGift;
|
|
15388
15386
|
const invoice = (_props$invoice = props.invoice) !== null && _props$invoice !== void 0 ? _props$invoice : pelcroStore.invoice;
|
|
15389
15387
|
const cardProcessor = getSiteCardProcessor();
|
|
15390
|
-
const [isTapLoaded, setIsTapLoaded] = useState(Boolean(window.Tapjsli));
|
|
15391
|
-
|
|
15392
|
-
|
|
15393
|
-
|
|
15394
|
-
|
|
15395
|
-
|
|
15396
|
-
|
|
15397
|
-
|
|
15398
|
-
|
|
15399
|
-
|
|
15388
|
+
const [isTapLoaded, setIsTapLoaded] = useState(Boolean(window.Tapjsli)); // useEffect(() => {
|
|
15389
|
+
// whenUserReady(() => {
|
|
15390
|
+
// if (cardProcessor === "tap" && !window.Tapjsli) {
|
|
15391
|
+
// window.Pelcro.helpers.loadSDK(
|
|
15392
|
+
// "https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js",
|
|
15393
|
+
// "tap-bluebird"
|
|
15394
|
+
// );
|
|
15395
|
+
// window.Pelcro.helpers.loadSDK(
|
|
15396
|
+
// "https://secure.gosell.io/js/sdk/tap.min.js",
|
|
15397
|
+
// "tap-sdk"
|
|
15398
|
+
// );
|
|
15399
|
+
// setIsTapLoaded(true);
|
|
15400
|
+
// }
|
|
15401
|
+
// });
|
|
15402
|
+
// }, []);
|
|
15403
|
+
|
|
15400
15404
|
useEffect(() => {
|
|
15401
15405
|
if (window.Pelcro.coupon.getFromUrl()) {
|
|
15402
15406
|
dispatch({
|
|
@@ -15945,6 +15949,10 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
15945
15949
|
});
|
|
15946
15950
|
tapInstanceRef.current = tapKey;
|
|
15947
15951
|
tapInstanceCard.current = card;
|
|
15952
|
+
} else if (cardProcessor === "tap" && !window.Tapjsli) {
|
|
15953
|
+
window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
|
|
15954
|
+
window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
|
|
15955
|
+
setIsTapLoaded(true);
|
|
15948
15956
|
}
|
|
15949
15957
|
}, [selectedPaymentMethodId, isTapLoaded]);
|
|
15950
15958
|
|