logix-payment-shift4 1.1.7 → 1.1.8
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 +6 -0
- package/dist/index.esm.js +6 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -287,6 +287,7 @@ 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();
|
|
290
291
|
return _context2.a(2);
|
|
291
292
|
case 3:
|
|
292
293
|
setIsSubmitting(true);
|
|
@@ -297,6 +298,7 @@ function PaymentForm(_ref) {
|
|
|
297
298
|
token = _context2.v;
|
|
298
299
|
if (!(token !== null && token !== void 0 && token.id)) {
|
|
299
300
|
errorPage("Card tokenization failed. Please check your details and try again.");
|
|
301
|
+
if (componentsRef.current) componentsRef.current.clear();
|
|
300
302
|
}
|
|
301
303
|
request = {
|
|
302
304
|
amount: amount,
|
|
@@ -310,6 +312,7 @@ function PaymentForm(_ref) {
|
|
|
310
312
|
threeDSecureToken = _context2.v;
|
|
311
313
|
if (!(threeDSecureToken !== null && threeDSecureToken !== void 0 && threeDSecureToken.id)) {
|
|
312
314
|
errorPage("3D Secure verification failed. Please try again.");
|
|
315
|
+
if (componentsRef.current) componentsRef.current.clear();
|
|
313
316
|
}
|
|
314
317
|
apiBase = baseUrl + "charge/" + userId;
|
|
315
318
|
_context2.n = 7;
|
|
@@ -336,15 +339,18 @@ function PaymentForm(_ref) {
|
|
|
336
339
|
break;
|
|
337
340
|
}
|
|
338
341
|
if (typeof errorPage === "function") errorPage(result);
|
|
342
|
+
if (componentsRef.current) componentsRef.current.clear();
|
|
339
343
|
return _context2.a(2);
|
|
340
344
|
case 9:
|
|
341
345
|
if (typeof successPage === "function") successPage(result.message);
|
|
346
|
+
if (componentsRef.current) componentsRef.current.clear();
|
|
342
347
|
_context2.n = 11;
|
|
343
348
|
break;
|
|
344
349
|
case 10:
|
|
345
350
|
_context2.p = 10;
|
|
346
351
|
_t2 = _context2.v;
|
|
347
352
|
if (typeof errorPage === "function") errorPage(_t2.message);
|
|
353
|
+
if (componentsRef.current) componentsRef.current.clear();
|
|
348
354
|
case 11:
|
|
349
355
|
_context2.p = 11;
|
|
350
356
|
setIsSubmitting(false);
|
package/dist/index.esm.js
CHANGED
|
@@ -285,6 +285,7 @@ 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();
|
|
288
289
|
return _context2.a(2);
|
|
289
290
|
case 3:
|
|
290
291
|
setIsSubmitting(true);
|
|
@@ -295,6 +296,7 @@ function PaymentForm(_ref) {
|
|
|
295
296
|
token = _context2.v;
|
|
296
297
|
if (!(token !== null && token !== void 0 && token.id)) {
|
|
297
298
|
errorPage("Card tokenization failed. Please check your details and try again.");
|
|
299
|
+
if (componentsRef.current) componentsRef.current.clear();
|
|
298
300
|
}
|
|
299
301
|
request = {
|
|
300
302
|
amount: amount,
|
|
@@ -308,6 +310,7 @@ function PaymentForm(_ref) {
|
|
|
308
310
|
threeDSecureToken = _context2.v;
|
|
309
311
|
if (!(threeDSecureToken !== null && threeDSecureToken !== void 0 && threeDSecureToken.id)) {
|
|
310
312
|
errorPage("3D Secure verification failed. Please try again.");
|
|
313
|
+
if (componentsRef.current) componentsRef.current.clear();
|
|
311
314
|
}
|
|
312
315
|
apiBase = baseUrl + "charge/" + userId;
|
|
313
316
|
_context2.n = 7;
|
|
@@ -334,15 +337,18 @@ function PaymentForm(_ref) {
|
|
|
334
337
|
break;
|
|
335
338
|
}
|
|
336
339
|
if (typeof errorPage === "function") errorPage(result);
|
|
340
|
+
if (componentsRef.current) componentsRef.current.clear();
|
|
337
341
|
return _context2.a(2);
|
|
338
342
|
case 9:
|
|
339
343
|
if (typeof successPage === "function") successPage(result.message);
|
|
344
|
+
if (componentsRef.current) componentsRef.current.clear();
|
|
340
345
|
_context2.n = 11;
|
|
341
346
|
break;
|
|
342
347
|
case 10:
|
|
343
348
|
_context2.p = 10;
|
|
344
349
|
_t2 = _context2.v;
|
|
345
350
|
if (typeof errorPage === "function") errorPage(_t2.message);
|
|
351
|
+
if (componentsRef.current) componentsRef.current.clear();
|
|
346
352
|
case 11:
|
|
347
353
|
_context2.p = 11;
|
|
348
354
|
setIsSubmitting(false);
|