tf-checkout-react 1.3.48-beta.27 → 1.3.48-beta.28

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.
@@ -8690,6 +8690,7 @@ var IDVerification = function IDVerification(props) {
8690
8690
  }, []);
8691
8691
  React.useEffect(function () {
8692
8692
  var intervalId = null;
8693
+ var orderHash = getQueryVariable('order_hash') || '';
8693
8694
  var getUrl = /*#__PURE__*/function () {
8694
8695
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
8695
8696
  var urlResponse;
@@ -8762,26 +8763,25 @@ var IDVerification = function IDVerification(props) {
8762
8763
  }();
8763
8764
  var getCustomerOrderStatus = /*#__PURE__*/function () {
8764
8765
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
8765
- var orderHash, customerOrderResponse;
8766
+ var customerOrderResponse;
8766
8767
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
8767
8768
  while (1) switch (_context4.prev = _context4.next) {
8768
8769
  case 0:
8769
8770
  _context4.prev = 0;
8770
- orderHash = getQueryVariable('order_hash') || '';
8771
- _context4.next = 4;
8771
+ _context4.next = 3;
8772
8772
  return checkCustomerOrder(orderHash);
8773
- case 4:
8773
+ case 3:
8774
8774
  customerOrderResponse = _context4.sent;
8775
8775
  return _context4.abrupt("return", customerOrderResponse);
8776
- case 8:
8777
- _context4.prev = 8;
8776
+ case 7:
8777
+ _context4.prev = 7;
8778
8778
  _context4.t0 = _context4["catch"](0);
8779
8779
  throw _context4.t0;
8780
- case 11:
8780
+ case 10:
8781
8781
  case "end":
8782
8782
  return _context4.stop();
8783
8783
  }
8784
- }, _callee4, null, [[0, 8]]);
8784
+ }, _callee4, null, [[0, 7]]);
8785
8785
  }));
8786
8786
  return function getCustomerOrderStatus() {
8787
8787
  return _ref4.apply(this, arguments);
@@ -8794,19 +8794,23 @@ var IDVerification = function IDVerification(props) {
8794
8794
  while (1) switch (_context5.prev = _context5.next) {
8795
8795
  case 0:
8796
8796
  _context5.prev = 0;
8797
- _context5.next = 3;
8797
+ if (!orderHash) {
8798
+ _context5.next = 4;
8799
+ break;
8800
+ }
8801
+ _context5.next = 4;
8798
8802
  return getCustomerOrderStatus();
8799
- case 3:
8803
+ case 4:
8800
8804
  getUrl();
8801
8805
  getVerificationStatus();
8802
8806
  // Check the verification status every 30 seconds
8803
8807
  intervalId = setInterval(function () {
8804
8808
  getVerificationStatus();
8805
8809
  }, 10000);
8806
- _context5.next = 11;
8810
+ _context5.next = 12;
8807
8811
  break;
8808
- case 8:
8809
- _context5.prev = 8;
8812
+ case 9:
8813
+ _context5.prev = 9;
8810
8814
  _context5.t0 = _context5["catch"](0);
8811
8815
  if (((_error$response = _context5.t0.response) == null ? void 0 : (_error$response$data = _error$response.data) == null ? void 0 : _error$response$data.message) === VERIFICATION_MESSAGES.WRONG_CUSTOMER) {
8812
8816
  setVerificationStatus(VERIFICATION_STATUSES.WRONG_CUSTOMER);
@@ -8816,11 +8820,11 @@ var IDVerification = function IDVerification(props) {
8816
8820
  message: VERIFICATION_MESSAGES.WRONG_CUSTOMER
8817
8821
  });
8818
8822
  }
8819
- case 11:
8823
+ case 12:
8820
8824
  case "end":
8821
8825
  return _context5.stop();
8822
8826
  }
8823
- }, _callee5, null, [[0, 8]]);
8827
+ }, _callee5, null, [[0, 9]]);
8824
8828
  }));
8825
8829
  return function makeRequests() {
8826
8830
  return _ref5.apply(this, arguments);
@@ -8831,7 +8835,7 @@ var IDVerification = function IDVerification(props) {
8831
8835
  return function () {
8832
8836
  return clearInterval(intervalId);
8833
8837
  };
8834
- }, [verificationStatus]);
8838
+ }, []);
8835
8839
  var iframe = function iframe(netverifyUrl) {
8836
8840
  // eslint-disable-next-line max-len
8837
8841
  var iframe = "<iframe allowFullScreen id=\"verificationIframe\" frameBorder=\"0\" width=\"100%\" height=\"570px\" allow=\"camera;fullscreen;accelerometer;gyroscope;magnetometer\" src=\"" + netverifyUrl + "\"></iframe>";