@pelcro/react-pelcro-js 3.26.0-beta.37 → 3.26.0-beta.39

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 CHANGED
@@ -18942,15 +18942,15 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18942
18942
  token: paymentRequest,
18943
18943
  gateway: "vantiv"
18944
18944
  }, (err, res) => {
18945
- dispatch({
18946
- type: DISABLE_SUBMIT,
18947
- payload: false
18948
- });
18949
- dispatch({
18950
- type: LOADING,
18951
- payload: false
18952
- });
18953
18945
  if (err) {
18946
+ dispatch({
18947
+ type: DISABLE_SUBMIT,
18948
+ payload: false
18949
+ });
18950
+ dispatch({
18951
+ type: LOADING,
18952
+ payload: false
18953
+ });
18954
18954
  onFailure(err);
18955
18955
  return dispatch({
18956
18956
  type: SHOW_ALERT,
@@ -18960,22 +18960,34 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18960
18960
  }
18961
18961
  });
18962
18962
  }
18963
- window.Pelcro.paymentMethods.deletePaymentMethod({
18964
- auth_token: window.Pelcro.user.read().auth_token,
18965
- payment_method_id: paymentMethodId
18966
- }, (err, res) => {
18967
- if (err) {
18968
- onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
18969
- return dispatch({
18970
- type: SHOW_ALERT,
18971
- payload: {
18972
- type: "error",
18973
- content: getErrorMessages(err)
18963
+ if (res) {
18964
+ setTimeout(() => {
18965
+ window.Pelcro.paymentMethods.deletePaymentMethod({
18966
+ auth_token: window.Pelcro.user.read().auth_token,
18967
+ payment_method_id: paymentMethodId
18968
+ }, (err, res) => {
18969
+ dispatch({
18970
+ type: DISABLE_SUBMIT,
18971
+ payload: false
18972
+ });
18973
+ dispatch({
18974
+ type: LOADING,
18975
+ payload: false
18976
+ });
18977
+ if (err) {
18978
+ onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
18979
+ return dispatch({
18980
+ type: SHOW_ALERT,
18981
+ payload: {
18982
+ type: "error",
18983
+ content: getErrorMessages(err)
18984
+ }
18985
+ });
18974
18986
  }
18987
+ onSuccess(res);
18975
18988
  });
18976
- }
18977
- onSuccess(res);
18978
- });
18989
+ }, 2000);
18990
+ }
18979
18991
  });
18980
18992
  }
18981
18993
  function updateVantivCard() {
@@ -20027,7 +20039,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
20027
20039
  }
20028
20040
  onSuccess(res);
20029
20041
  });
20030
- }, 1000);
20042
+ }, 2000);
20031
20043
  }
20032
20044
  });
20033
20045
  });
@@ -28829,7 +28841,7 @@ const PaymentMethodDeleteContainer = _ref => {
28829
28841
  }
28830
28842
  setTimeout(() => {
28831
28843
  deletePaymentMethod();
28832
- }, 1000);
28844
+ }, 2000);
28833
28845
  });
28834
28846
  };
28835
28847
  const deletePaymentMethod = () => {
package/dist/index.esm.js CHANGED
@@ -18912,15 +18912,15 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18912
18912
  token: paymentRequest,
18913
18913
  gateway: "vantiv"
18914
18914
  }, (err, res) => {
18915
- dispatch({
18916
- type: DISABLE_SUBMIT,
18917
- payload: false
18918
- });
18919
- dispatch({
18920
- type: LOADING,
18921
- payload: false
18922
- });
18923
18915
  if (err) {
18916
+ dispatch({
18917
+ type: DISABLE_SUBMIT,
18918
+ payload: false
18919
+ });
18920
+ dispatch({
18921
+ type: LOADING,
18922
+ payload: false
18923
+ });
18924
18924
  onFailure(err);
18925
18925
  return dispatch({
18926
18926
  type: SHOW_ALERT,
@@ -18930,22 +18930,34 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18930
18930
  }
18931
18931
  });
18932
18932
  }
18933
- window.Pelcro.paymentMethods.deletePaymentMethod({
18934
- auth_token: window.Pelcro.user.read().auth_token,
18935
- payment_method_id: paymentMethodId
18936
- }, (err, res) => {
18937
- if (err) {
18938
- onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
18939
- return dispatch({
18940
- type: SHOW_ALERT,
18941
- payload: {
18942
- type: "error",
18943
- content: getErrorMessages(err)
18933
+ if (res) {
18934
+ setTimeout(() => {
18935
+ window.Pelcro.paymentMethods.deletePaymentMethod({
18936
+ auth_token: window.Pelcro.user.read().auth_token,
18937
+ payment_method_id: paymentMethodId
18938
+ }, (err, res) => {
18939
+ dispatch({
18940
+ type: DISABLE_SUBMIT,
18941
+ payload: false
18942
+ });
18943
+ dispatch({
18944
+ type: LOADING,
18945
+ payload: false
18946
+ });
18947
+ if (err) {
18948
+ onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
18949
+ return dispatch({
18950
+ type: SHOW_ALERT,
18951
+ payload: {
18952
+ type: "error",
18953
+ content: getErrorMessages(err)
18954
+ }
18955
+ });
18944
18956
  }
18957
+ onSuccess(res);
18945
18958
  });
18946
- }
18947
- onSuccess(res);
18948
- });
18959
+ }, 2000);
18960
+ }
18949
18961
  });
18950
18962
  }
18951
18963
  function updateVantivCard() {
@@ -19997,7 +20009,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
19997
20009
  }
19998
20010
  onSuccess(res);
19999
20011
  });
20000
- }, 1000);
20012
+ }, 2000);
20001
20013
  }
20002
20014
  });
20003
20015
  });
@@ -28799,7 +28811,7 @@ const PaymentMethodDeleteContainer = _ref => {
28799
28811
  }
28800
28812
  setTimeout(() => {
28801
28813
  deletePaymentMethod();
28802
- }, 1000);
28814
+ }, 2000);
28803
28815
  });
28804
28816
  };
28805
28817
  const deletePaymentMethod = () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pelcro/react-pelcro-js",
3
3
  "description": "Pelcro's React UI Elements",
4
- "version": "3.26.0-beta.37",
4
+ "version": "3.26.0-beta.39",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",