tf-checkout-react 1.2.9 → 1.2.10
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/components/paymentContainer/index.d.ts +4 -5
- package/dist/tf-checkout-react.cjs.development.js +7 -6
- package/dist/tf-checkout-react.cjs.development.js.map +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
- package/dist/tf-checkout-react.esm.js +7 -6
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/paymentContainer/index.tsx +53 -49
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AxiosError } from 'axios';
|
|
3
|
-
import { StripeElementsOptions } from '@stripe/stripe-js';
|
|
4
2
|
import './style.css';
|
|
5
|
-
import { IPaymentField } from '../../types';
|
|
6
|
-
import { StripeCardNumberElementOptions } from '@stripe/stripe-js';
|
|
7
3
|
import { ThemeOptions } from '@mui/material';
|
|
8
4
|
import { CSSProperties } from '@mui/styles';
|
|
5
|
+
import { StripeCardNumberElementOptions, StripeElementsOptions } from '@stripe/stripe-js';
|
|
6
|
+
import { AxiosError } from 'axios';
|
|
7
|
+
import { IPaymentField } from '../../types';
|
|
9
8
|
export interface IPaymentPage {
|
|
10
9
|
paymentFields: IPaymentField[];
|
|
11
10
|
handlePayment: any;
|
|
@@ -28,4 +27,4 @@ export interface IPaymentPage {
|
|
|
28
27
|
enablePaymentPlan?: boolean;
|
|
29
28
|
paymentButtonText?: string;
|
|
30
29
|
}
|
|
31
|
-
export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions, disableZipSection, themeOptions, elementsOptions, onCountdownFinish, enableTimer, enablePaymentPlan, paymentButtonText }: IPaymentPage) => JSX.Element;
|
|
30
|
+
export declare const PaymentContainer: ({ paymentFields, handlePayment, formTitle, errorText, checkoutData, onErrorClose, onGetPaymentDataSuccess, onGetPaymentDataError, onPaymentError, stripeCardOptions, disableZipSection, themeOptions, elementsOptions, onCountdownFinish, enableTimer, enablePaymentPlan, paymentButtonText, }: IPaymentPage) => JSX.Element;
|
|
@@ -40,8 +40,8 @@ var _isNumber = _interopDefault(require('lodash/isNumber'));
|
|
|
40
40
|
var SVG = _interopDefault(require('react-inlinesvg'));
|
|
41
41
|
var _flatMapDeep = _interopDefault(require('lodash/flatMapDeep'));
|
|
42
42
|
var _isArray = _interopDefault(require('lodash/isArray'));
|
|
43
|
-
var Container = _interopDefault(require('@mui/material/Container'));
|
|
44
43
|
var Alert = _interopDefault(require('@mui/material/Alert'));
|
|
44
|
+
var Container = _interopDefault(require('@mui/material/Container'));
|
|
45
45
|
var reactStripeJs = require('@stripe/react-stripe-js');
|
|
46
46
|
var stripeJs = require('@stripe/stripe-js');
|
|
47
47
|
var reactShare = require('react-share');
|
|
@@ -3957,11 +3957,11 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3957
3957
|
_ref$onErrorClose = _ref.onErrorClose,
|
|
3958
3958
|
onErrorClose = _ref$onErrorClose === void 0 ? _identity : _ref$onErrorClose,
|
|
3959
3959
|
_ref$onGetPaymentData = _ref.onGetPaymentDataSuccess,
|
|
3960
|
-
onGetPaymentDataSuccess = _ref$onGetPaymentData === void 0 ?
|
|
3960
|
+
onGetPaymentDataSuccess = _ref$onGetPaymentData === void 0 ? _identity : _ref$onGetPaymentData,
|
|
3961
3961
|
_ref$onGetPaymentData2 = _ref.onGetPaymentDataError,
|
|
3962
|
-
onGetPaymentDataError = _ref$onGetPaymentData2 === void 0 ?
|
|
3962
|
+
onGetPaymentDataError = _ref$onGetPaymentData2 === void 0 ? _identity : _ref$onGetPaymentData2,
|
|
3963
3963
|
_ref$onPaymentError = _ref.onPaymentError,
|
|
3964
|
-
onPaymentError = _ref$onPaymentError === void 0 ?
|
|
3964
|
+
onPaymentError = _ref$onPaymentError === void 0 ? _identity : _ref$onPaymentError,
|
|
3965
3965
|
_ref$stripeCardOption = _ref.stripeCardOptions,
|
|
3966
3966
|
stripeCardOptions = _ref$stripeCardOption === void 0 ? {} : _ref$stripeCardOption,
|
|
3967
3967
|
_ref$disableZipSectio = _ref.disableZipSection,
|
|
@@ -3969,7 +3969,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
3969
3969
|
themeOptions = _ref.themeOptions,
|
|
3970
3970
|
elementsOptions = _ref.elementsOptions,
|
|
3971
3971
|
_ref$onCountdownFinis = _ref.onCountdownFinish,
|
|
3972
|
-
onCountdownFinish = _ref$onCountdownFinis === void 0 ?
|
|
3972
|
+
onCountdownFinish = _ref$onCountdownFinis === void 0 ? _identity : _ref$onCountdownFinis,
|
|
3973
3973
|
_ref$enableTimer = _ref.enableTimer,
|
|
3974
3974
|
enableTimer = _ref$enableTimer === void 0 ? false : _ref$enableTimer,
|
|
3975
3975
|
_ref$enablePaymentPla = _ref.enablePaymentPlan,
|
|
@@ -4009,6 +4009,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
4009
4009
|
var eventId = getQueryVariable('event_id');
|
|
4010
4010
|
var hash = checkoutData.hash,
|
|
4011
4011
|
total = checkoutData.total;
|
|
4012
|
+
var isFreeTickets = !Number(total) && !Number(orderData.total);
|
|
4012
4013
|
React.useEffect(function () {
|
|
4013
4014
|
_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
|
|
4014
4015
|
var response, _cart$, attributes, cart, order_details, _order_details$ticket, ticket, _orderData;
|
|
@@ -4236,7 +4237,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
4236
4237
|
className: "plan_block"
|
|
4237
4238
|
}, React__default.createElement("h3", null, "Mbrand Payment Plan Terms"), React__default.createElement("p", null, "By clicking on the \u201CConfirm Payment Plan\u201D button, you are starting your payment plan of 2 payments of $115.00, which will be drawn from your account every 2 weeks, with the first payment taken later today."), React__default.createElement("p", null, "This includes a non-refundable admin fee of $3.00 per payment."), React__default.createElement("p", {
|
|
4238
4239
|
className: "payment_note"
|
|
4239
|
-
}, "NOTE: If today\u2019s payment fails, your payment plan will not activate, and your tickets will not be issued until you complete your final payment."), React__default.createElement("p", null, "If you do not complete your payements, your order will be canceled. Your first payment of $115.00, plus the non-refundable admin fee of $3.00 will not be refunded."), React__default.createElement("p", null, "Your payment will proceed with the card ending in **** 4242."))),
|
|
4240
|
+
}, "NOTE: If today\u2019s payment fails, your payment plan will not activate, and your tickets will not be issued until you complete your final payment."), React__default.createElement("p", null, "If you do not complete your payements, your order will be canceled. Your first payment of $115.00, plus the non-refundable admin fee of $3.00 will not be refunded."), React__default.createElement("p", null, "Your payment will proceed with the card ending in **** 4242."))), !isFreeTickets ? React__default.createElement("div", {
|
|
4240
4241
|
className: "payment_info"
|
|
4241
4242
|
}, React__default.createElement("div", {
|
|
4242
4243
|
className: "payment_info_label"
|