@pelcro/react-pelcro-js 3.20.1-beta.1 → 3.20.1-beta.3
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 +3 -3
- package/dist/index.esm.js +3 -3
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -16710,9 +16710,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
16710
16710
|
const renewSubscription = !isGift && subscriptionIdToRenew;
|
|
16711
16711
|
const giftSubscriprition = isGift && !subscriptionIdToRenew;
|
|
16712
16712
|
const renewGift = isRenewingGift;
|
|
16713
|
-
const
|
|
16714
|
-
couponCode
|
|
16715
|
-
} = state;
|
|
16713
|
+
const couponCode = state.couponCode || window.Pelcro.coupon.getFromUrl() || "";
|
|
16716
16714
|
if (renewGift) {
|
|
16717
16715
|
return payment.execute({
|
|
16718
16716
|
type: PAYMENT_TYPES.RENEW_GIFTED_SUBSCRIPTION,
|
|
@@ -16786,6 +16784,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
16786
16784
|
const tapInstanceRef = React__default['default'].useRef(null);
|
|
16787
16785
|
const tapInstanceCard = React__default['default'].useRef(null);
|
|
16788
16786
|
React.useEffect(() => {
|
|
16787
|
+
if (skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0) return;
|
|
16789
16788
|
if (cardProcessor === "vantiv" && !selectedPaymentMethodId) {
|
|
16790
16789
|
var _window$Pelcro$site$r2, _window$Pelcro$site$r3;
|
|
16791
16790
|
const payPageId = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.vantiv_gateway_settings.pay_page_id;
|
|
@@ -16814,6 +16813,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
16814
16813
|
}, [selectedPaymentMethodId]);
|
|
16815
16814
|
React.useEffect(() => {
|
|
16816
16815
|
whenUserReady(() => {
|
|
16816
|
+
if (skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0) return;
|
|
16817
16817
|
if (cardProcessor === "tap" && !window.Tapjsli) {
|
|
16818
16818
|
window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
|
|
16819
16819
|
window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
|
package/dist/index.esm.js
CHANGED
|
@@ -16680,9 +16680,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
16680
16680
|
const renewSubscription = !isGift && subscriptionIdToRenew;
|
|
16681
16681
|
const giftSubscriprition = isGift && !subscriptionIdToRenew;
|
|
16682
16682
|
const renewGift = isRenewingGift;
|
|
16683
|
-
const
|
|
16684
|
-
couponCode
|
|
16685
|
-
} = state;
|
|
16683
|
+
const couponCode = state.couponCode || window.Pelcro.coupon.getFromUrl() || "";
|
|
16686
16684
|
if (renewGift) {
|
|
16687
16685
|
return payment.execute({
|
|
16688
16686
|
type: PAYMENT_TYPES.RENEW_GIFTED_SUBSCRIPTION,
|
|
@@ -16756,6 +16754,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
16756
16754
|
const tapInstanceRef = React__default.useRef(null);
|
|
16757
16755
|
const tapInstanceCard = React__default.useRef(null);
|
|
16758
16756
|
useEffect(() => {
|
|
16757
|
+
if (skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0) return;
|
|
16759
16758
|
if (cardProcessor === "vantiv" && !selectedPaymentMethodId) {
|
|
16760
16759
|
var _window$Pelcro$site$r2, _window$Pelcro$site$r3;
|
|
16761
16760
|
const payPageId = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.vantiv_gateway_settings.pay_page_id;
|
|
@@ -16784,6 +16783,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
16784
16783
|
}, [selectedPaymentMethodId]);
|
|
16785
16784
|
useEffect(() => {
|
|
16786
16785
|
whenUserReady(() => {
|
|
16786
|
+
if (skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0) return;
|
|
16787
16787
|
if (cardProcessor === "tap" && !window.Tapjsli) {
|
|
16788
16788
|
window.Pelcro.helpers.loadSDK("https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js", "tap-bluebird");
|
|
16789
16789
|
window.Pelcro.helpers.loadSDK("https://secure.gosell.io/js/sdk/tap.min.js", "tap-sdk");
|