@pelcro/react-pelcro-js 3.26.0-beta.7 → 3.26.0-beta.9
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 +23 -61
- package/dist/index.esm.js +23 -61
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3452,7 +3452,7 @@ var labels$15 = {
|
|
|
3452
3452
|
code: "Coupon code",
|
|
3453
3453
|
"for": "for",
|
|
3454
3454
|
interval: "{{count}} {{interval}}",
|
|
3455
|
-
interval_plural: "{{count}} {{interval}}
|
|
3455
|
+
interval_plural: "{{count}} {{interval}}",
|
|
3456
3456
|
tax: "Tax",
|
|
3457
3457
|
removeCoupon: "REMOVE",
|
|
3458
3458
|
firstName: "First name",
|
|
@@ -4378,7 +4378,7 @@ var labels$P = {
|
|
|
4378
4378
|
code: "Code promo",
|
|
4379
4379
|
"for": "pour",
|
|
4380
4380
|
interval: "{{count}} {{interval}}",
|
|
4381
|
-
interval_plural: "{{count}} {{interval}}
|
|
4381
|
+
interval_plural: "{{count}} {{interval}}",
|
|
4382
4382
|
tax: "Taxe",
|
|
4383
4383
|
removeCoupon: "RETIRER",
|
|
4384
4384
|
firstName: "Prénom",
|
|
@@ -6333,7 +6333,7 @@ var labels$f = {
|
|
|
6333
6333
|
code: "Código de cupón",
|
|
6334
6334
|
"for": "por",
|
|
6335
6335
|
interval: "{{count}} {{interval}}",
|
|
6336
|
-
interval_plural: "{{count}} {{interval}}
|
|
6336
|
+
interval_plural: "{{count}} {{interval}}",
|
|
6337
6337
|
tax: "Impuesto",
|
|
6338
6338
|
removeCoupon: "ELIMINAR",
|
|
6339
6339
|
firstName: "Nombre",
|
|
@@ -15166,7 +15166,7 @@ class SelectModal extends React.Component {
|
|
|
15166
15166
|
startingPlan = plan;
|
|
15167
15167
|
}
|
|
15168
15168
|
}
|
|
15169
|
-
return `${startingPlan.amount_formatted}/${startingPlan.interval_count > 1 ? `${startingPlan.interval_count} ${startingPlan.
|
|
15169
|
+
return `${startingPlan.amount_formatted}/${startingPlan.interval_count > 1 ? `${startingPlan.interval_count} ${startingPlan.interval_translated}` : `${startingPlan.interval_translated}`}`;
|
|
15170
15170
|
});
|
|
15171
15171
|
_defineProperty$3(this, "renderOneProduct", (product, index, options) => {
|
|
15172
15172
|
const isPlanMode = Boolean(this.state.mode === "plan");
|
|
@@ -21180,11 +21180,10 @@ const ApplePayButton = _ref => {
|
|
|
21180
21180
|
invoice
|
|
21181
21181
|
} = usePelcro();
|
|
21182
21182
|
const {
|
|
21183
|
-
payPageId,
|
|
21184
|
-
reportGroup,
|
|
21183
|
+
pay_page_id: payPageId,
|
|
21184
|
+
report_group: reportGroup,
|
|
21185
21185
|
apple_pay_merchant_id: ApplePayMerchantId,
|
|
21186
|
-
apple_pay_enabled: ApplePayEnabled
|
|
21187
|
-
apple_pay_billing_agreement: ApplePayBillingAgreement
|
|
21186
|
+
apple_pay_enabled: ApplePayEnabled
|
|
21188
21187
|
} = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_gateway_settings;
|
|
21189
21188
|
const updatedPrice = (_ref2 = (_ref3 = (_state$updatedPrice = state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : props === null || props === void 0 ? void 0 : (_props$plan = props.plan) === null || _props$plan === void 0 ? void 0 : _props$plan.amount) !== null && _ref3 !== void 0 ? _ref3 : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref2 !== void 0 ? _ref2 : invoice.amount_remaining;
|
|
21190
21189
|
React.useEffect(() => {
|
|
@@ -21224,35 +21223,9 @@ const ApplePayButton = _ref => {
|
|
|
21224
21223
|
supportedNetworks: ["visa", "masterCard", "amex", "discover"],
|
|
21225
21224
|
total: {
|
|
21226
21225
|
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21226
|
+
type: "final",
|
|
21227
21227
|
amount: updatedPrice / 100
|
|
21228
|
-
}
|
|
21229
|
-
lineItems: [plan !== null && plan !== void 0 && plan.auto_renew ? {
|
|
21230
|
-
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21231
|
-
amount: updatedPrice / 100,
|
|
21232
|
-
paymentTiming: "recurring",
|
|
21233
|
-
recurringPaymentStartDate: new Date().toISOString(),
|
|
21234
|
-
recurringPaymentIntervalUnit: (plan === null || plan === void 0 ? void 0 : plan.interval) === "week" ? "day" : plan === null || plan === void 0 ? void 0 : plan.interval,
|
|
21235
|
-
recurringPaymentIntervalCount: (plan === null || plan === void 0 ? void 0 : plan.interval) === "week" ? (plan === null || plan === void 0 ? void 0 : plan.interval_count) * 7 : plan === null || plan === void 0 ? void 0 : plan.interval_count
|
|
21236
|
-
} : {
|
|
21237
|
-
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21238
|
-
amount: updatedPrice / 100
|
|
21239
|
-
}],
|
|
21240
|
-
...((plan === null || plan === void 0 ? void 0 : plan.auto_renew) && {
|
|
21241
|
-
recurringPaymentRequest: {
|
|
21242
|
-
paymentDescription: "A description of the recurring payment to display to the user in the payment sheet.",
|
|
21243
|
-
regularBilling: {
|
|
21244
|
-
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21245
|
-
amount: updatedPrice / 100,
|
|
21246
|
-
paymentTiming: "recurring",
|
|
21247
|
-
recurringPaymentStartDate: new Date().toISOString(),
|
|
21248
|
-
recurringPaymentIntervalUnit: (plan === null || plan === void 0 ? void 0 : plan.interval) === "week" ? "day" : plan === null || plan === void 0 ? void 0 : plan.interval,
|
|
21249
|
-
recurringPaymentIntervalCount: (plan === null || plan === void 0 ? void 0 : plan.interval) === "week" ? (plan === null || plan === void 0 ? void 0 : plan.interval_count) * 7 : plan === null || plan === void 0 ? void 0 : plan.interval_count
|
|
21250
|
-
},
|
|
21251
|
-
billingAgreement: ApplePayBillingAgreement !== null && ApplePayBillingAgreement !== void 0 ? ApplePayBillingAgreement : "",
|
|
21252
|
-
managementURL: "https://applepaydemo.apple.com",
|
|
21253
|
-
tokenNotificationURL: "https://applepaydemo.apple.com"
|
|
21254
|
-
}
|
|
21255
|
-
})
|
|
21228
|
+
}
|
|
21256
21229
|
};
|
|
21257
21230
|
console.log(ApplePayPaymentRequest);
|
|
21258
21231
|
// Create ApplePaySession
|
|
@@ -21298,17 +21271,12 @@ const ApplePayButton = _ref => {
|
|
|
21298
21271
|
// No updates or errors are needed, pass an empty object.
|
|
21299
21272
|
const newTotal = {
|
|
21300
21273
|
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21274
|
+
type: "final",
|
|
21301
21275
|
amount: updatedPrice / 100
|
|
21302
21276
|
};
|
|
21303
|
-
const newLineItems = [
|
|
21304
|
-
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21305
|
-
amount: updatedPrice / 100,
|
|
21306
|
-
paymentTiming: "recurring",
|
|
21307
|
-
recurringPaymentStartDate: new Date().toISOString(),
|
|
21308
|
-
recurringPaymentIntervalUnit: (plan === null || plan === void 0 ? void 0 : plan.interval) === "week" ? "day" : plan === null || plan === void 0 ? void 0 : plan.interval,
|
|
21309
|
-
recurringPaymentIntervalCount: (plan === null || plan === void 0 ? void 0 : plan.interval) === "week" ? (plan === null || plan === void 0 ? void 0 : plan.interval_count) * 7 : plan === null || plan === void 0 ? void 0 : plan.interval_count
|
|
21310
|
-
} : {
|
|
21277
|
+
const newLineItems = [{
|
|
21311
21278
|
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21279
|
+
type: "final",
|
|
21312
21280
|
amount: updatedPrice / 100
|
|
21313
21281
|
}];
|
|
21314
21282
|
session.completePaymentMethodSelection(newTotal, newLineItems);
|
|
@@ -21321,23 +21289,16 @@ const ApplePayButton = _ref => {
|
|
|
21321
21289
|
// // No updates or errors are needed, pass an empty object.
|
|
21322
21290
|
// const newTotal = {
|
|
21323
21291
|
// label: plan?.nickname || `invoice #${invoice.id}`,
|
|
21292
|
+
// type: "final",
|
|
21324
21293
|
// amount: updatedPrice / 100
|
|
21325
21294
|
// };
|
|
21326
21295
|
|
|
21327
21296
|
// const newLineItems = [
|
|
21328
|
-
//
|
|
21329
|
-
//
|
|
21330
|
-
//
|
|
21331
|
-
//
|
|
21332
|
-
//
|
|
21333
|
-
// recurringPaymentStartDate: new Date().toISOString(),
|
|
21334
|
-
// recurringPaymentIntervalUnit: plan?.interval,
|
|
21335
|
-
// recurringPaymentIntervalCount: plan?.interval_count
|
|
21336
|
-
// }
|
|
21337
|
-
// : {
|
|
21338
|
-
// label: plan?.nickname || `invoice #${invoice.id}`,
|
|
21339
|
-
// amount: updatedPrice / 100
|
|
21340
|
-
// }
|
|
21297
|
+
// {
|
|
21298
|
+
// label: plan?.nickname || `invoice #${invoice.id}`,
|
|
21299
|
+
// type: "final",
|
|
21300
|
+
// amount: updatedPrice / 100
|
|
21301
|
+
// }
|
|
21341
21302
|
// ];
|
|
21342
21303
|
|
|
21343
21304
|
// session.completeShippingMethodSelection(newTotal, newLineItems);
|
|
@@ -21593,11 +21554,11 @@ const SubscriptionRenewView = _ref => {
|
|
|
21593
21554
|
const getPricingText = plan => {
|
|
21594
21555
|
const autoRenewed = plan.auto_renew;
|
|
21595
21556
|
const {
|
|
21596
|
-
|
|
21557
|
+
interval_translated,
|
|
21597
21558
|
interval_count
|
|
21598
21559
|
} = plan;
|
|
21599
21560
|
const intervalText = t("labels.interval", {
|
|
21600
|
-
interval,
|
|
21561
|
+
interval: interval_translated,
|
|
21601
21562
|
count: interval_count
|
|
21602
21563
|
});
|
|
21603
21564
|
return /*#__PURE__*/React__default['default'].createElement("p", {
|
|
@@ -21927,6 +21888,7 @@ const SubscriptionCancelButton = _ref => {
|
|
|
21927
21888
|
}, t("labels.cancel"));
|
|
21928
21889
|
};
|
|
21929
21890
|
|
|
21891
|
+
// New cancellation option modal
|
|
21930
21892
|
const SubscriptionCancelOptions = _ref => {
|
|
21931
21893
|
var _subscription$schedul;
|
|
21932
21894
|
let {
|
|
@@ -22965,11 +22927,11 @@ const SubscriptionCreateView = _ref => {
|
|
|
22965
22927
|
var _plan$quantity, _plan$quantity2, _plan$quantity3;
|
|
22966
22928
|
const autoRenewed = plan.auto_renew;
|
|
22967
22929
|
const {
|
|
22968
|
-
|
|
22930
|
+
interval_translated,
|
|
22969
22931
|
interval_count
|
|
22970
22932
|
} = plan;
|
|
22971
22933
|
const intervalText = t("labels.interval", {
|
|
22972
|
-
interval,
|
|
22934
|
+
interval: interval_translated,
|
|
22973
22935
|
count: interval_count
|
|
22974
22936
|
});
|
|
22975
22937
|
const priceFormatted = plan.type === "donation" && (selectedDonationAmount || customDonationAmount) ? getFormattedPriceByLocal(selectedDonationAmount ? selectedDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1) : customDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity2 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity2 !== void 0 ? _plan$quantity2 : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage()) : getFormattedPriceByLocal((plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity3 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity3 !== void 0 ? _plan$quantity3 : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
package/dist/index.esm.js
CHANGED
|
@@ -3422,7 +3422,7 @@ var labels$15 = {
|
|
|
3422
3422
|
code: "Coupon code",
|
|
3423
3423
|
"for": "for",
|
|
3424
3424
|
interval: "{{count}} {{interval}}",
|
|
3425
|
-
interval_plural: "{{count}} {{interval}}
|
|
3425
|
+
interval_plural: "{{count}} {{interval}}",
|
|
3426
3426
|
tax: "Tax",
|
|
3427
3427
|
removeCoupon: "REMOVE",
|
|
3428
3428
|
firstName: "First name",
|
|
@@ -4348,7 +4348,7 @@ var labels$P = {
|
|
|
4348
4348
|
code: "Code promo",
|
|
4349
4349
|
"for": "pour",
|
|
4350
4350
|
interval: "{{count}} {{interval}}",
|
|
4351
|
-
interval_plural: "{{count}} {{interval}}
|
|
4351
|
+
interval_plural: "{{count}} {{interval}}",
|
|
4352
4352
|
tax: "Taxe",
|
|
4353
4353
|
removeCoupon: "RETIRER",
|
|
4354
4354
|
firstName: "Prénom",
|
|
@@ -6303,7 +6303,7 @@ var labels$f = {
|
|
|
6303
6303
|
code: "Código de cupón",
|
|
6304
6304
|
"for": "por",
|
|
6305
6305
|
interval: "{{count}} {{interval}}",
|
|
6306
|
-
interval_plural: "{{count}} {{interval}}
|
|
6306
|
+
interval_plural: "{{count}} {{interval}}",
|
|
6307
6307
|
tax: "Impuesto",
|
|
6308
6308
|
removeCoupon: "ELIMINAR",
|
|
6309
6309
|
firstName: "Nombre",
|
|
@@ -15136,7 +15136,7 @@ class SelectModal extends Component {
|
|
|
15136
15136
|
startingPlan = plan;
|
|
15137
15137
|
}
|
|
15138
15138
|
}
|
|
15139
|
-
return `${startingPlan.amount_formatted}/${startingPlan.interval_count > 1 ? `${startingPlan.interval_count} ${startingPlan.
|
|
15139
|
+
return `${startingPlan.amount_formatted}/${startingPlan.interval_count > 1 ? `${startingPlan.interval_count} ${startingPlan.interval_translated}` : `${startingPlan.interval_translated}`}`;
|
|
15140
15140
|
});
|
|
15141
15141
|
_defineProperty$3(this, "renderOneProduct", (product, index, options) => {
|
|
15142
15142
|
const isPlanMode = Boolean(this.state.mode === "plan");
|
|
@@ -21150,11 +21150,10 @@ const ApplePayButton = _ref => {
|
|
|
21150
21150
|
invoice
|
|
21151
21151
|
} = usePelcro();
|
|
21152
21152
|
const {
|
|
21153
|
-
payPageId,
|
|
21154
|
-
reportGroup,
|
|
21153
|
+
pay_page_id: payPageId,
|
|
21154
|
+
report_group: reportGroup,
|
|
21155
21155
|
apple_pay_merchant_id: ApplePayMerchantId,
|
|
21156
|
-
apple_pay_enabled: ApplePayEnabled
|
|
21157
|
-
apple_pay_billing_agreement: ApplePayBillingAgreement
|
|
21156
|
+
apple_pay_enabled: ApplePayEnabled
|
|
21158
21157
|
} = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_gateway_settings;
|
|
21159
21158
|
const updatedPrice = (_ref2 = (_ref3 = (_state$updatedPrice = state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : props === null || props === void 0 ? void 0 : (_props$plan = props.plan) === null || _props$plan === void 0 ? void 0 : _props$plan.amount) !== null && _ref3 !== void 0 ? _ref3 : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref2 !== void 0 ? _ref2 : invoice.amount_remaining;
|
|
21160
21159
|
useEffect(() => {
|
|
@@ -21194,35 +21193,9 @@ const ApplePayButton = _ref => {
|
|
|
21194
21193
|
supportedNetworks: ["visa", "masterCard", "amex", "discover"],
|
|
21195
21194
|
total: {
|
|
21196
21195
|
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21196
|
+
type: "final",
|
|
21197
21197
|
amount: updatedPrice / 100
|
|
21198
|
-
}
|
|
21199
|
-
lineItems: [plan !== null && plan !== void 0 && plan.auto_renew ? {
|
|
21200
|
-
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21201
|
-
amount: updatedPrice / 100,
|
|
21202
|
-
paymentTiming: "recurring",
|
|
21203
|
-
recurringPaymentStartDate: new Date().toISOString(),
|
|
21204
|
-
recurringPaymentIntervalUnit: (plan === null || plan === void 0 ? void 0 : plan.interval) === "week" ? "day" : plan === null || plan === void 0 ? void 0 : plan.interval,
|
|
21205
|
-
recurringPaymentIntervalCount: (plan === null || plan === void 0 ? void 0 : plan.interval) === "week" ? (plan === null || plan === void 0 ? void 0 : plan.interval_count) * 7 : plan === null || plan === void 0 ? void 0 : plan.interval_count
|
|
21206
|
-
} : {
|
|
21207
|
-
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21208
|
-
amount: updatedPrice / 100
|
|
21209
|
-
}],
|
|
21210
|
-
...((plan === null || plan === void 0 ? void 0 : plan.auto_renew) && {
|
|
21211
|
-
recurringPaymentRequest: {
|
|
21212
|
-
paymentDescription: "A description of the recurring payment to display to the user in the payment sheet.",
|
|
21213
|
-
regularBilling: {
|
|
21214
|
-
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21215
|
-
amount: updatedPrice / 100,
|
|
21216
|
-
paymentTiming: "recurring",
|
|
21217
|
-
recurringPaymentStartDate: new Date().toISOString(),
|
|
21218
|
-
recurringPaymentIntervalUnit: (plan === null || plan === void 0 ? void 0 : plan.interval) === "week" ? "day" : plan === null || plan === void 0 ? void 0 : plan.interval,
|
|
21219
|
-
recurringPaymentIntervalCount: (plan === null || plan === void 0 ? void 0 : plan.interval) === "week" ? (plan === null || plan === void 0 ? void 0 : plan.interval_count) * 7 : plan === null || plan === void 0 ? void 0 : plan.interval_count
|
|
21220
|
-
},
|
|
21221
|
-
billingAgreement: ApplePayBillingAgreement !== null && ApplePayBillingAgreement !== void 0 ? ApplePayBillingAgreement : "",
|
|
21222
|
-
managementURL: "https://applepaydemo.apple.com",
|
|
21223
|
-
tokenNotificationURL: "https://applepaydemo.apple.com"
|
|
21224
|
-
}
|
|
21225
|
-
})
|
|
21198
|
+
}
|
|
21226
21199
|
};
|
|
21227
21200
|
console.log(ApplePayPaymentRequest);
|
|
21228
21201
|
// Create ApplePaySession
|
|
@@ -21268,17 +21241,12 @@ const ApplePayButton = _ref => {
|
|
|
21268
21241
|
// No updates or errors are needed, pass an empty object.
|
|
21269
21242
|
const newTotal = {
|
|
21270
21243
|
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21244
|
+
type: "final",
|
|
21271
21245
|
amount: updatedPrice / 100
|
|
21272
21246
|
};
|
|
21273
|
-
const newLineItems = [
|
|
21274
|
-
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21275
|
-
amount: updatedPrice / 100,
|
|
21276
|
-
paymentTiming: "recurring",
|
|
21277
|
-
recurringPaymentStartDate: new Date().toISOString(),
|
|
21278
|
-
recurringPaymentIntervalUnit: (plan === null || plan === void 0 ? void 0 : plan.interval) === "week" ? "day" : plan === null || plan === void 0 ? void 0 : plan.interval,
|
|
21279
|
-
recurringPaymentIntervalCount: (plan === null || plan === void 0 ? void 0 : plan.interval) === "week" ? (plan === null || plan === void 0 ? void 0 : plan.interval_count) * 7 : plan === null || plan === void 0 ? void 0 : plan.interval_count
|
|
21280
|
-
} : {
|
|
21247
|
+
const newLineItems = [{
|
|
21281
21248
|
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21249
|
+
type: "final",
|
|
21282
21250
|
amount: updatedPrice / 100
|
|
21283
21251
|
}];
|
|
21284
21252
|
session.completePaymentMethodSelection(newTotal, newLineItems);
|
|
@@ -21291,23 +21259,16 @@ const ApplePayButton = _ref => {
|
|
|
21291
21259
|
// // No updates or errors are needed, pass an empty object.
|
|
21292
21260
|
// const newTotal = {
|
|
21293
21261
|
// label: plan?.nickname || `invoice #${invoice.id}`,
|
|
21262
|
+
// type: "final",
|
|
21294
21263
|
// amount: updatedPrice / 100
|
|
21295
21264
|
// };
|
|
21296
21265
|
|
|
21297
21266
|
// const newLineItems = [
|
|
21298
|
-
//
|
|
21299
|
-
//
|
|
21300
|
-
//
|
|
21301
|
-
//
|
|
21302
|
-
//
|
|
21303
|
-
// recurringPaymentStartDate: new Date().toISOString(),
|
|
21304
|
-
// recurringPaymentIntervalUnit: plan?.interval,
|
|
21305
|
-
// recurringPaymentIntervalCount: plan?.interval_count
|
|
21306
|
-
// }
|
|
21307
|
-
// : {
|
|
21308
|
-
// label: plan?.nickname || `invoice #${invoice.id}`,
|
|
21309
|
-
// amount: updatedPrice / 100
|
|
21310
|
-
// }
|
|
21267
|
+
// {
|
|
21268
|
+
// label: plan?.nickname || `invoice #${invoice.id}`,
|
|
21269
|
+
// type: "final",
|
|
21270
|
+
// amount: updatedPrice / 100
|
|
21271
|
+
// }
|
|
21311
21272
|
// ];
|
|
21312
21273
|
|
|
21313
21274
|
// session.completeShippingMethodSelection(newTotal, newLineItems);
|
|
@@ -21563,11 +21524,11 @@ const SubscriptionRenewView = _ref => {
|
|
|
21563
21524
|
const getPricingText = plan => {
|
|
21564
21525
|
const autoRenewed = plan.auto_renew;
|
|
21565
21526
|
const {
|
|
21566
|
-
|
|
21527
|
+
interval_translated,
|
|
21567
21528
|
interval_count
|
|
21568
21529
|
} = plan;
|
|
21569
21530
|
const intervalText = t("labels.interval", {
|
|
21570
|
-
interval,
|
|
21531
|
+
interval: interval_translated,
|
|
21571
21532
|
count: interval_count
|
|
21572
21533
|
});
|
|
21573
21534
|
return /*#__PURE__*/React__default.createElement("p", {
|
|
@@ -21897,6 +21858,7 @@ const SubscriptionCancelButton = _ref => {
|
|
|
21897
21858
|
}, t("labels.cancel"));
|
|
21898
21859
|
};
|
|
21899
21860
|
|
|
21861
|
+
// New cancellation option modal
|
|
21900
21862
|
const SubscriptionCancelOptions = _ref => {
|
|
21901
21863
|
var _subscription$schedul;
|
|
21902
21864
|
let {
|
|
@@ -22935,11 +22897,11 @@ const SubscriptionCreateView = _ref => {
|
|
|
22935
22897
|
var _plan$quantity, _plan$quantity2, _plan$quantity3;
|
|
22936
22898
|
const autoRenewed = plan.auto_renew;
|
|
22937
22899
|
const {
|
|
22938
|
-
|
|
22900
|
+
interval_translated,
|
|
22939
22901
|
interval_count
|
|
22940
22902
|
} = plan;
|
|
22941
22903
|
const intervalText = t("labels.interval", {
|
|
22942
|
-
interval,
|
|
22904
|
+
interval: interval_translated,
|
|
22943
22905
|
count: interval_count
|
|
22944
22906
|
});
|
|
22945
22907
|
const priceFormatted = plan.type === "donation" && (selectedDonationAmount || customDonationAmount) ? getFormattedPriceByLocal(selectedDonationAmount ? selectedDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1) : customDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity2 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity2 !== void 0 ? _plan$quantity2 : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage()) : getFormattedPriceByLocal((plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity3 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity3 !== void 0 ? _plan$quantity3 : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|