@pelcro/react-pelcro-js 3.10.1-beta.14 → 3.10.1-beta.15
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 +19 -4
- package/dist/index.esm.js +19 -4
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -15405,7 +15405,9 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
15405
15405
|
selectedPaymentMethodId,
|
|
15406
15406
|
couponCode
|
|
15407
15407
|
} = usePelcro();
|
|
15408
|
-
|
|
15408
|
+
const {
|
|
15409
|
+
whenUserReady
|
|
15410
|
+
} = usePelcro.getStore();
|
|
15409
15411
|
const product = (_props$product = props.product) !== null && _props$product !== void 0 ? _props$product : pelcroStore.product;
|
|
15410
15412
|
const plan = (_props$plan = props.plan) !== null && _props$plan !== void 0 ? _props$plan : pelcroStore.plan;
|
|
15411
15413
|
const subscriptionIdToRenew = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : pelcroStore.subscriptionIdToRenew;
|
|
@@ -15917,7 +15919,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
15917
15919
|
if (cardProcessor === "tap" && !selectedPaymentMethodId && window.Tapjsli) {
|
|
15918
15920
|
var _window$Pelcro$site$r3;
|
|
15919
15921
|
|
|
15920
|
-
console.log("
|
|
15922
|
+
console.log("window.Tapjsli script is loaded");
|
|
15921
15923
|
const tapKey = window.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);
|
|
15922
15924
|
let elements = tapKey.elements({});
|
|
15923
15925
|
let style = {
|
|
@@ -15980,8 +15982,21 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
15980
15982
|
tapInstanceRef.current = tapKey;
|
|
15981
15983
|
tapInstanceCard.current = card;
|
|
15982
15984
|
} else if (cardProcessor === "tap" && !window.Tapjsli) {
|
|
15983
|
-
|
|
15984
|
-
|
|
15985
|
+
console.log("window.Tapjsli script is NOT loaded");
|
|
15986
|
+
whenUserReady(() => {
|
|
15987
|
+
console.log("Site is ready and trying to load window.Tapjsli script");
|
|
15988
|
+
window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
|
|
15989
|
+
window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
|
|
15990
|
+
setIsTapLoaded(true);
|
|
15991
|
+
}); // window.Pelcro.helpers.loadSDK(
|
|
15992
|
+
// "https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js",
|
|
15993
|
+
// "tap-bluebird"
|
|
15994
|
+
// );
|
|
15995
|
+
// window.Pelcro.helpers.loadSDK(
|
|
15996
|
+
// "https://secure.gosell.io/js/sdk/tap.min.js",
|
|
15997
|
+
// "tap-sdk"
|
|
15998
|
+
// );
|
|
15999
|
+
|
|
15985
16000
|
setIsTapLoaded(true);
|
|
15986
16001
|
}
|
|
15987
16002
|
}, [selectedPaymentMethodId, isTapLoaded]);
|
package/dist/index.esm.js
CHANGED
|
@@ -15375,7 +15375,9 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
15375
15375
|
selectedPaymentMethodId,
|
|
15376
15376
|
couponCode
|
|
15377
15377
|
} = usePelcro();
|
|
15378
|
-
|
|
15378
|
+
const {
|
|
15379
|
+
whenUserReady
|
|
15380
|
+
} = usePelcro.getStore();
|
|
15379
15381
|
const product = (_props$product = props.product) !== null && _props$product !== void 0 ? _props$product : pelcroStore.product;
|
|
15380
15382
|
const plan = (_props$plan = props.plan) !== null && _props$plan !== void 0 ? _props$plan : pelcroStore.plan;
|
|
15381
15383
|
const subscriptionIdToRenew = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : pelcroStore.subscriptionIdToRenew;
|
|
@@ -15887,7 +15889,7 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
15887
15889
|
if (cardProcessor === "tap" && !selectedPaymentMethodId && window.Tapjsli) {
|
|
15888
15890
|
var _window$Pelcro$site$r3;
|
|
15889
15891
|
|
|
15890
|
-
console.log("
|
|
15892
|
+
console.log("window.Tapjsli script is loaded");
|
|
15891
15893
|
const tapKey = window.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);
|
|
15892
15894
|
let elements = tapKey.elements({});
|
|
15893
15895
|
let style = {
|
|
@@ -15950,8 +15952,21 @@ const PaymentMethodContainerWithoutStripe = ({
|
|
|
15950
15952
|
tapInstanceRef.current = tapKey;
|
|
15951
15953
|
tapInstanceCard.current = card;
|
|
15952
15954
|
} else if (cardProcessor === "tap" && !window.Tapjsli) {
|
|
15953
|
-
|
|
15954
|
-
|
|
15955
|
+
console.log("window.Tapjsli script is NOT loaded");
|
|
15956
|
+
whenUserReady(() => {
|
|
15957
|
+
console.log("Site is ready and trying to load window.Tapjsli script");
|
|
15958
|
+
window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
|
|
15959
|
+
window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
|
|
15960
|
+
setIsTapLoaded(true);
|
|
15961
|
+
}); // window.Pelcro.helpers.loadSDK(
|
|
15962
|
+
// "https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js",
|
|
15963
|
+
// "tap-bluebird"
|
|
15964
|
+
// );
|
|
15965
|
+
// window.Pelcro.helpers.loadSDK(
|
|
15966
|
+
// "https://secure.gosell.io/js/sdk/tap.min.js",
|
|
15967
|
+
// "tap-sdk"
|
|
15968
|
+
// );
|
|
15969
|
+
|
|
15955
15970
|
setIsTapLoaded(true);
|
|
15956
15971
|
}
|
|
15957
15972
|
}, [selectedPaymentMethodId, isTapLoaded]);
|