logix-payment-shift4 1.1.8 → 1.2.0

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
@@ -287,7 +287,6 @@ function PaymentForm(_ref) {
287
287
  break;
288
288
  }
289
289
  errorPage("Payment form is not ready yet. Please try again.");
290
- if (componentsRef.current) componentsRef.current.clear();
291
290
  return _context2.a(2);
292
291
  case 3:
293
292
  setIsSubmitting(true);
@@ -298,7 +297,6 @@ function PaymentForm(_ref) {
298
297
  token = _context2.v;
299
298
  if (!(token !== null && token !== void 0 && token.id)) {
300
299
  errorPage("Card tokenization failed. Please check your details and try again.");
301
- if (componentsRef.current) componentsRef.current.clear();
302
300
  }
303
301
  request = {
304
302
  amount: amount,
@@ -312,7 +310,6 @@ function PaymentForm(_ref) {
312
310
  threeDSecureToken = _context2.v;
313
311
  if (!(threeDSecureToken !== null && threeDSecureToken !== void 0 && threeDSecureToken.id)) {
314
312
  errorPage("3D Secure verification failed. Please try again.");
315
- if (componentsRef.current) componentsRef.current.clear();
316
313
  }
317
314
  apiBase = baseUrl + "charge/" + userId;
318
315
  _context2.n = 7;
@@ -339,18 +336,18 @@ function PaymentForm(_ref) {
339
336
  break;
340
337
  }
341
338
  if (typeof errorPage === "function") errorPage(result);
342
- if (componentsRef.current) componentsRef.current.clear();
343
339
  return _context2.a(2);
344
340
  case 9:
345
- if (typeof successPage === "function") successPage(result.message);
346
- if (componentsRef.current) componentsRef.current.clear();
341
+ if (typeof successPage === "function") {
342
+ successPage(result.message);
343
+ e.target.reset();
344
+ }
347
345
  _context2.n = 11;
348
346
  break;
349
347
  case 10:
350
348
  _context2.p = 10;
351
349
  _t2 = _context2.v;
352
350
  if (typeof errorPage === "function") errorPage(_t2.message);
353
- if (componentsRef.current) componentsRef.current.clear();
354
351
  case 11:
355
352
  _context2.p = 11;
356
353
  setIsSubmitting(false);
package/dist/index.esm.js CHANGED
@@ -285,7 +285,6 @@ function PaymentForm(_ref) {
285
285
  break;
286
286
  }
287
287
  errorPage("Payment form is not ready yet. Please try again.");
288
- if (componentsRef.current) componentsRef.current.clear();
289
288
  return _context2.a(2);
290
289
  case 3:
291
290
  setIsSubmitting(true);
@@ -296,7 +295,6 @@ function PaymentForm(_ref) {
296
295
  token = _context2.v;
297
296
  if (!(token !== null && token !== void 0 && token.id)) {
298
297
  errorPage("Card tokenization failed. Please check your details and try again.");
299
- if (componentsRef.current) componentsRef.current.clear();
300
298
  }
301
299
  request = {
302
300
  amount: amount,
@@ -310,7 +308,6 @@ function PaymentForm(_ref) {
310
308
  threeDSecureToken = _context2.v;
311
309
  if (!(threeDSecureToken !== null && threeDSecureToken !== void 0 && threeDSecureToken.id)) {
312
310
  errorPage("3D Secure verification failed. Please try again.");
313
- if (componentsRef.current) componentsRef.current.clear();
314
311
  }
315
312
  apiBase = baseUrl + "charge/" + userId;
316
313
  _context2.n = 7;
@@ -337,18 +334,18 @@ function PaymentForm(_ref) {
337
334
  break;
338
335
  }
339
336
  if (typeof errorPage === "function") errorPage(result);
340
- if (componentsRef.current) componentsRef.current.clear();
341
337
  return _context2.a(2);
342
338
  case 9:
343
- if (typeof successPage === "function") successPage(result.message);
344
- if (componentsRef.current) componentsRef.current.clear();
339
+ if (typeof successPage === "function") {
340
+ successPage(result.message);
341
+ e.target.reset();
342
+ }
345
343
  _context2.n = 11;
346
344
  break;
347
345
  case 10:
348
346
  _context2.p = 10;
349
347
  _t2 = _context2.v;
350
348
  if (typeof errorPage === "function") errorPage(_t2.message);
351
- if (componentsRef.current) componentsRef.current.clear();
352
349
  case 11:
353
350
  _context2.p = 11;
354
351
  setIsSubmitting(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "logix-payment-shift4",
3
- "version": "1.1.8",
3
+ "version": "1.2.0",
4
4
  "description": "A React component library for integrating Shift4 payments with Logix applications.",
5
5
  "author": "Yusif Atababayev",
6
6
  "license": "ISC",