tf-checkout-react 1.5.9-beta.0 → 1.5.9-beta.1
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 +1 -1
- package/dist/tf-checkout-react.cjs.development.js +7 -3
- 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 -3
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/utils/adaptStripeErrors.d.ts +7 -1
- package/package.json +1 -1
- package/src/components/paymentContainer/index.tsx +8 -5
- package/src/types/api/payment.d.ts +7 -2
- package/src/utils/adaptStripeErrors.ts +9 -1
|
@@ -14,7 +14,7 @@ export interface IPaymentPage {
|
|
|
14
14
|
onErrorClose?: () => void;
|
|
15
15
|
onGetPaymentDataSuccess: (value: any) => void;
|
|
16
16
|
onGetPaymentDataError: (value: AxiosError) => void;
|
|
17
|
-
onPaymentError: (value: AxiosError) => void;
|
|
17
|
+
onPaymentError: (value: AxiosError, slug?: string) => void;
|
|
18
18
|
stripeCardOptions?: StripeCardNumberElementOptions;
|
|
19
19
|
disableZipSection: boolean;
|
|
20
20
|
themeOptions?: ThemeOptions & {
|
|
@@ -4365,6 +4365,7 @@ var adaptStripeError = function adaptStripeError(error) {
|
|
|
4365
4365
|
case 'payment_intent_unexpected_state':
|
|
4366
4366
|
if ((error == null ? void 0 : (_error$payment_intent = error.payment_intent) == null ? void 0 : _error$payment_intent.status) === 'succeeded') {
|
|
4367
4367
|
return _extends({}, adaptedError, {
|
|
4368
|
+
errorReason: 'PAYMENT_ALREADY_CONFIRMED',
|
|
4368
4369
|
message: 'You cannot confirm this PaymentIntent because it has already succeeded after being previously confirmed.'
|
|
4369
4370
|
});
|
|
4370
4371
|
}
|
|
@@ -4801,7 +4802,10 @@ var initialReviewValues = {
|
|
|
4801
4802
|
stripe_payment_plan_configuration: {}
|
|
4802
4803
|
},
|
|
4803
4804
|
billing_info: {},
|
|
4804
|
-
|
|
4805
|
+
event_details: {
|
|
4806
|
+
flagSeatMapAllowed: false,
|
|
4807
|
+
slug: ''
|
|
4808
|
+
}
|
|
4805
4809
|
};
|
|
4806
4810
|
var PaymentContainer = function PaymentContainer(_ref) {
|
|
4807
4811
|
var _ref$paymentFields = _ref.paymentFields,
|
|
@@ -5073,7 +5077,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
5073
5077
|
_context3.t0 = _context3["catch"](0);
|
|
5074
5078
|
setError(_get(_context3.t0, 'response.data.message'));
|
|
5075
5079
|
setPaymentIsLoading(false);
|
|
5076
|
-
onPaymentError(_context3.t0.response || _context3.t0);
|
|
5080
|
+
onPaymentError(_context3.t0.response || _context3.t0, reviewData.event_details.slug);
|
|
5077
5081
|
case 27:
|
|
5078
5082
|
case "end":
|
|
5079
5083
|
return _context3.stop();
|
|
@@ -5247,7 +5251,7 @@ var PaymentContainer = function PaymentContainer(_ref) {
|
|
|
5247
5251
|
options: elementsOptions
|
|
5248
5252
|
}, React__default.createElement(CheckoutForm, {
|
|
5249
5253
|
stripe_client_secret: paymentPlanIsAvailable && showPaymentPlanSection ? paymentPlanConfig.stripe_setup_intent_secret : _get(reviewData, 'payment_method.stripe_client_secret'),
|
|
5250
|
-
hasSeatMapActions: reviewData.flagSeatMapAllowed,
|
|
5254
|
+
hasSeatMapActions: reviewData.event_details.flagSeatMapAllowed,
|
|
5251
5255
|
total: orderData.guest_count ? orderData.pay_now : orderData.total,
|
|
5252
5256
|
onSubmit: handlePaymentMiddleWare,
|
|
5253
5257
|
error: error,
|