@pelcro/react-pelcro-js 3.26.0-beta.6 → 3.26.0-beta.8
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 +27 -25
- package/dist/index.esm.js +27 -25
- 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");
|
|
@@ -21165,7 +21165,7 @@ const DonationEmail = props => /*#__PURE__*/React__default['default'].createElem
|
|
|
21165
21165
|
* @return {JSX}
|
|
21166
21166
|
*/
|
|
21167
21167
|
const ApplePayButton = _ref => {
|
|
21168
|
-
var _ref2, _ref3, _state$updatedPrice, _props$plan;
|
|
21168
|
+
var _window$Pelcro$site$r, _ref2, _ref3, _state$updatedPrice, _props$plan;
|
|
21169
21169
|
let {
|
|
21170
21170
|
onClick,
|
|
21171
21171
|
props,
|
|
@@ -21179,16 +21179,20 @@ const ApplePayButton = _ref => {
|
|
|
21179
21179
|
plan,
|
|
21180
21180
|
invoice
|
|
21181
21181
|
} = usePelcro();
|
|
21182
|
+
const {
|
|
21183
|
+
payPageId,
|
|
21184
|
+
reportGroup,
|
|
21185
|
+
apple_pay_merchant_id: ApplePayMerchantId,
|
|
21186
|
+
apple_pay_enabled: ApplePayEnabled,
|
|
21187
|
+
apple_pay_billing_agreement: ApplePayBillingAgreement
|
|
21188
|
+
} = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_gateway_settings;
|
|
21182
21189
|
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;
|
|
21183
21190
|
React.useEffect(() => {
|
|
21184
21191
|
if (window.ApplePaySession) {
|
|
21185
|
-
// TODO: Should not be hardcoded
|
|
21186
|
-
const merchantIdentifier = "merchant.pelcro.prelive";
|
|
21187
|
-
|
|
21188
21192
|
// Indicates whether the device supports Apple Pay and whether the user has an active card in Wallet.
|
|
21189
|
-
const promise = ApplePaySession.canMakePaymentsWithActiveCard(
|
|
21193
|
+
const promise = ApplePaySession.canMakePaymentsWithActiveCard(ApplePayMerchantId);
|
|
21190
21194
|
promise.then(function (canMakePayments) {
|
|
21191
|
-
if (canMakePayments) {
|
|
21195
|
+
if (canMakePayments && ApplePayEnabled) {
|
|
21192
21196
|
// Display Apple Pay Buttons here…
|
|
21193
21197
|
const pelcroApplyPayButton = document.getElementById("pelcro-apple-pay-button");
|
|
21194
21198
|
if (pelcroApplyPayButton) {
|
|
@@ -21227,8 +21231,8 @@ const ApplePayButton = _ref => {
|
|
|
21227
21231
|
amount: updatedPrice / 100,
|
|
21228
21232
|
paymentTiming: "recurring",
|
|
21229
21233
|
recurringPaymentStartDate: new Date().toISOString(),
|
|
21230
|
-
recurringPaymentIntervalUnit: plan === null || plan === void 0 ? void 0 : plan.interval,
|
|
21231
|
-
recurringPaymentIntervalCount: plan === null || plan === void 0 ? void 0 : plan.interval_count
|
|
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
|
|
21232
21236
|
} : {
|
|
21233
21237
|
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21234
21238
|
amount: updatedPrice / 100
|
|
@@ -21241,16 +21245,16 @@ const ApplePayButton = _ref => {
|
|
|
21241
21245
|
amount: updatedPrice / 100,
|
|
21242
21246
|
paymentTiming: "recurring",
|
|
21243
21247
|
recurringPaymentStartDate: new Date().toISOString(),
|
|
21244
|
-
recurringPaymentIntervalUnit: plan === null || plan === void 0 ? void 0 : plan.interval,
|
|
21245
|
-
recurringPaymentIntervalCount: plan === null || plan === void 0 ? void 0 : plan.interval_count
|
|
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
|
|
21246
21250
|
},
|
|
21247
|
-
billingAgreement:
|
|
21251
|
+
billingAgreement: ApplePayBillingAgreement !== null && ApplePayBillingAgreement !== void 0 ? ApplePayBillingAgreement : "",
|
|
21248
21252
|
managementURL: "https://applepaydemo.apple.com",
|
|
21249
21253
|
tokenNotificationURL: "https://applepaydemo.apple.com"
|
|
21250
21254
|
}
|
|
21251
21255
|
})
|
|
21252
21256
|
};
|
|
21253
|
-
|
|
21257
|
+
console.log(ApplePayPaymentRequest);
|
|
21254
21258
|
// Create ApplePaySession
|
|
21255
21259
|
// @todo - Clarify supported version parameter
|
|
21256
21260
|
// @odo - Apple Pay demo uses version 6 (https://applepaydemo.apple.com/)
|
|
@@ -21301,8 +21305,8 @@ const ApplePayButton = _ref => {
|
|
|
21301
21305
|
amount: updatedPrice / 100,
|
|
21302
21306
|
paymentTiming: "recurring",
|
|
21303
21307
|
recurringPaymentStartDate: new Date().toISOString(),
|
|
21304
|
-
recurringPaymentIntervalUnit: plan === null || plan === void 0 ? void 0 : plan.interval,
|
|
21305
|
-
recurringPaymentIntervalCount: plan === null || plan === void 0 ? void 0 : plan.interval_count
|
|
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
|
|
21306
21310
|
} : {
|
|
21307
21311
|
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21308
21312
|
amount: updatedPrice / 100
|
|
@@ -21348,7 +21352,6 @@ const ApplePayButton = _ref => {
|
|
|
21348
21352
|
// };
|
|
21349
21353
|
|
|
21350
21354
|
session.onpaymentauthorized = event => {
|
|
21351
|
-
var _window$Pelcro$site$r, _window$Pelcro$site$r2;
|
|
21352
21355
|
console.log("on payment authorized step", event);
|
|
21353
21356
|
// Define ApplePayPaymentAuthorizationResult
|
|
21354
21357
|
const result = {
|
|
@@ -21378,8 +21381,6 @@ const ApplePayButton = _ref => {
|
|
|
21378
21381
|
}
|
|
21379
21382
|
};
|
|
21380
21383
|
console.log(applePayToken);
|
|
21381
|
-
const payPageId = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_gateway_settings.pay_page_id;
|
|
21382
|
-
const reportGroup = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.vantiv_gateway_settings.report_group;
|
|
21383
21384
|
const orderId = `pelcro-${new Date().getTime()}`;
|
|
21384
21385
|
const eProtectRequest = {
|
|
21385
21386
|
paypageId: payPageId,
|
|
@@ -21592,11 +21593,11 @@ const SubscriptionRenewView = _ref => {
|
|
|
21592
21593
|
const getPricingText = plan => {
|
|
21593
21594
|
const autoRenewed = plan.auto_renew;
|
|
21594
21595
|
const {
|
|
21595
|
-
|
|
21596
|
+
interval_translated,
|
|
21596
21597
|
interval_count
|
|
21597
21598
|
} = plan;
|
|
21598
21599
|
const intervalText = t("labels.interval", {
|
|
21599
|
-
interval,
|
|
21600
|
+
interval: interval_translated,
|
|
21600
21601
|
count: interval_count
|
|
21601
21602
|
});
|
|
21602
21603
|
return /*#__PURE__*/React__default['default'].createElement("p", {
|
|
@@ -21926,6 +21927,7 @@ const SubscriptionCancelButton = _ref => {
|
|
|
21926
21927
|
}, t("labels.cancel"));
|
|
21927
21928
|
};
|
|
21928
21929
|
|
|
21930
|
+
// New cancellation option modal
|
|
21929
21931
|
const SubscriptionCancelOptions = _ref => {
|
|
21930
21932
|
var _subscription$schedul;
|
|
21931
21933
|
let {
|
|
@@ -22964,11 +22966,11 @@ const SubscriptionCreateView = _ref => {
|
|
|
22964
22966
|
var _plan$quantity, _plan$quantity2, _plan$quantity3;
|
|
22965
22967
|
const autoRenewed = plan.auto_renew;
|
|
22966
22968
|
const {
|
|
22967
|
-
|
|
22969
|
+
interval_translated,
|
|
22968
22970
|
interval_count
|
|
22969
22971
|
} = plan;
|
|
22970
22972
|
const intervalText = t("labels.interval", {
|
|
22971
|
-
interval,
|
|
22973
|
+
interval: interval_translated,
|
|
22972
22974
|
count: interval_count
|
|
22973
22975
|
});
|
|
22974
22976
|
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");
|
|
@@ -21135,7 +21135,7 @@ const DonationEmail = props => /*#__PURE__*/React__default.createElement(Email,
|
|
|
21135
21135
|
* @return {JSX}
|
|
21136
21136
|
*/
|
|
21137
21137
|
const ApplePayButton = _ref => {
|
|
21138
|
-
var _ref2, _ref3, _state$updatedPrice, _props$plan;
|
|
21138
|
+
var _window$Pelcro$site$r, _ref2, _ref3, _state$updatedPrice, _props$plan;
|
|
21139
21139
|
let {
|
|
21140
21140
|
onClick,
|
|
21141
21141
|
props,
|
|
@@ -21149,16 +21149,20 @@ const ApplePayButton = _ref => {
|
|
|
21149
21149
|
plan,
|
|
21150
21150
|
invoice
|
|
21151
21151
|
} = usePelcro();
|
|
21152
|
+
const {
|
|
21153
|
+
payPageId,
|
|
21154
|
+
reportGroup,
|
|
21155
|
+
apple_pay_merchant_id: ApplePayMerchantId,
|
|
21156
|
+
apple_pay_enabled: ApplePayEnabled,
|
|
21157
|
+
apple_pay_billing_agreement: ApplePayBillingAgreement
|
|
21158
|
+
} = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_gateway_settings;
|
|
21152
21159
|
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;
|
|
21153
21160
|
useEffect(() => {
|
|
21154
21161
|
if (window.ApplePaySession) {
|
|
21155
|
-
// TODO: Should not be hardcoded
|
|
21156
|
-
const merchantIdentifier = "merchant.pelcro.prelive";
|
|
21157
|
-
|
|
21158
21162
|
// Indicates whether the device supports Apple Pay and whether the user has an active card in Wallet.
|
|
21159
|
-
const promise = ApplePaySession.canMakePaymentsWithActiveCard(
|
|
21163
|
+
const promise = ApplePaySession.canMakePaymentsWithActiveCard(ApplePayMerchantId);
|
|
21160
21164
|
promise.then(function (canMakePayments) {
|
|
21161
|
-
if (canMakePayments) {
|
|
21165
|
+
if (canMakePayments && ApplePayEnabled) {
|
|
21162
21166
|
// Display Apple Pay Buttons here…
|
|
21163
21167
|
const pelcroApplyPayButton = document.getElementById("pelcro-apple-pay-button");
|
|
21164
21168
|
if (pelcroApplyPayButton) {
|
|
@@ -21197,8 +21201,8 @@ const ApplePayButton = _ref => {
|
|
|
21197
21201
|
amount: updatedPrice / 100,
|
|
21198
21202
|
paymentTiming: "recurring",
|
|
21199
21203
|
recurringPaymentStartDate: new Date().toISOString(),
|
|
21200
|
-
recurringPaymentIntervalUnit: plan === null || plan === void 0 ? void 0 : plan.interval,
|
|
21201
|
-
recurringPaymentIntervalCount: plan === null || plan === void 0 ? void 0 : plan.interval_count
|
|
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
|
|
21202
21206
|
} : {
|
|
21203
21207
|
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21204
21208
|
amount: updatedPrice / 100
|
|
@@ -21211,16 +21215,16 @@ const ApplePayButton = _ref => {
|
|
|
21211
21215
|
amount: updatedPrice / 100,
|
|
21212
21216
|
paymentTiming: "recurring",
|
|
21213
21217
|
recurringPaymentStartDate: new Date().toISOString(),
|
|
21214
|
-
recurringPaymentIntervalUnit: plan === null || plan === void 0 ? void 0 : plan.interval,
|
|
21215
|
-
recurringPaymentIntervalCount: plan === null || plan === void 0 ? void 0 : plan.interval_count
|
|
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
|
|
21216
21220
|
},
|
|
21217
|
-
billingAgreement:
|
|
21221
|
+
billingAgreement: ApplePayBillingAgreement !== null && ApplePayBillingAgreement !== void 0 ? ApplePayBillingAgreement : "",
|
|
21218
21222
|
managementURL: "https://applepaydemo.apple.com",
|
|
21219
21223
|
tokenNotificationURL: "https://applepaydemo.apple.com"
|
|
21220
21224
|
}
|
|
21221
21225
|
})
|
|
21222
21226
|
};
|
|
21223
|
-
|
|
21227
|
+
console.log(ApplePayPaymentRequest);
|
|
21224
21228
|
// Create ApplePaySession
|
|
21225
21229
|
// @todo - Clarify supported version parameter
|
|
21226
21230
|
// @odo - Apple Pay demo uses version 6 (https://applepaydemo.apple.com/)
|
|
@@ -21271,8 +21275,8 @@ const ApplePayButton = _ref => {
|
|
|
21271
21275
|
amount: updatedPrice / 100,
|
|
21272
21276
|
paymentTiming: "recurring",
|
|
21273
21277
|
recurringPaymentStartDate: new Date().toISOString(),
|
|
21274
|
-
recurringPaymentIntervalUnit: plan === null || plan === void 0 ? void 0 : plan.interval,
|
|
21275
|
-
recurringPaymentIntervalCount: plan === null || plan === void 0 ? void 0 : plan.interval_count
|
|
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
|
|
21276
21280
|
} : {
|
|
21277
21281
|
label: (plan === null || plan === void 0 ? void 0 : plan.nickname) || `invoice #${invoice.id}`,
|
|
21278
21282
|
amount: updatedPrice / 100
|
|
@@ -21318,7 +21322,6 @@ const ApplePayButton = _ref => {
|
|
|
21318
21322
|
// };
|
|
21319
21323
|
|
|
21320
21324
|
session.onpaymentauthorized = event => {
|
|
21321
|
-
var _window$Pelcro$site$r, _window$Pelcro$site$r2;
|
|
21322
21325
|
console.log("on payment authorized step", event);
|
|
21323
21326
|
// Define ApplePayPaymentAuthorizationResult
|
|
21324
21327
|
const result = {
|
|
@@ -21348,8 +21351,6 @@ const ApplePayButton = _ref => {
|
|
|
21348
21351
|
}
|
|
21349
21352
|
};
|
|
21350
21353
|
console.log(applePayToken);
|
|
21351
|
-
const payPageId = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.vantiv_gateway_settings.pay_page_id;
|
|
21352
|
-
const reportGroup = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.vantiv_gateway_settings.report_group;
|
|
21353
21354
|
const orderId = `pelcro-${new Date().getTime()}`;
|
|
21354
21355
|
const eProtectRequest = {
|
|
21355
21356
|
paypageId: payPageId,
|
|
@@ -21562,11 +21563,11 @@ const SubscriptionRenewView = _ref => {
|
|
|
21562
21563
|
const getPricingText = plan => {
|
|
21563
21564
|
const autoRenewed = plan.auto_renew;
|
|
21564
21565
|
const {
|
|
21565
|
-
|
|
21566
|
+
interval_translated,
|
|
21566
21567
|
interval_count
|
|
21567
21568
|
} = plan;
|
|
21568
21569
|
const intervalText = t("labels.interval", {
|
|
21569
|
-
interval,
|
|
21570
|
+
interval: interval_translated,
|
|
21570
21571
|
count: interval_count
|
|
21571
21572
|
});
|
|
21572
21573
|
return /*#__PURE__*/React__default.createElement("p", {
|
|
@@ -21896,6 +21897,7 @@ const SubscriptionCancelButton = _ref => {
|
|
|
21896
21897
|
}, t("labels.cancel"));
|
|
21897
21898
|
};
|
|
21898
21899
|
|
|
21900
|
+
// New cancellation option modal
|
|
21899
21901
|
const SubscriptionCancelOptions = _ref => {
|
|
21900
21902
|
var _subscription$schedul;
|
|
21901
21903
|
let {
|
|
@@ -22934,11 +22936,11 @@ const SubscriptionCreateView = _ref => {
|
|
|
22934
22936
|
var _plan$quantity, _plan$quantity2, _plan$quantity3;
|
|
22935
22937
|
const autoRenewed = plan.auto_renew;
|
|
22936
22938
|
const {
|
|
22937
|
-
|
|
22939
|
+
interval_translated,
|
|
22938
22940
|
interval_count
|
|
22939
22941
|
} = plan;
|
|
22940
22942
|
const intervalText = t("labels.interval", {
|
|
22941
|
-
interval,
|
|
22943
|
+
interval: interval_translated,
|
|
22942
22944
|
count: interval_count
|
|
22943
22945
|
});
|
|
22944
22946
|
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());
|