logix-payment-shift4 1.1.9 → 1.2.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/index.cjs.js +9 -2
- package/dist/index.esm.js +9 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -239,7 +239,6 @@ function PaymentForm(_ref) {
|
|
|
239
239
|
if (!window.Shift4) return;
|
|
240
240
|
shift4Ref.current = window.Shift4(publicKeys);
|
|
241
241
|
componentsRef.current = shift4Ref.current.createComponentGroup().automount("#payment-form");
|
|
242
|
-
componentsRef.current = componentGroup;
|
|
243
242
|
setIsReady(true);
|
|
244
243
|
};
|
|
245
244
|
script.onerror = function () {
|
|
@@ -339,13 +338,21 @@ function PaymentForm(_ref) {
|
|
|
339
338
|
if (typeof errorPage === "function") errorPage(result);
|
|
340
339
|
return _context2.a(2);
|
|
341
340
|
case 9:
|
|
342
|
-
if (typeof successPage === "function")
|
|
341
|
+
if (typeof successPage === "function") {
|
|
342
|
+
successPage(result.message);
|
|
343
|
+
if (formRef.current) {
|
|
344
|
+
formRef.current.clear();
|
|
345
|
+
}
|
|
346
|
+
}
|
|
343
347
|
_context2.n = 11;
|
|
344
348
|
break;
|
|
345
349
|
case 10:
|
|
346
350
|
_context2.p = 10;
|
|
347
351
|
_t2 = _context2.v;
|
|
348
352
|
if (typeof errorPage === "function") errorPage(_t2.message);
|
|
353
|
+
if (formRef.current) {
|
|
354
|
+
formRef.current.clear();
|
|
355
|
+
}
|
|
349
356
|
case 11:
|
|
350
357
|
_context2.p = 11;
|
|
351
358
|
setIsSubmitting(false);
|
package/dist/index.esm.js
CHANGED
|
@@ -237,7 +237,6 @@ function PaymentForm(_ref) {
|
|
|
237
237
|
if (!window.Shift4) return;
|
|
238
238
|
shift4Ref.current = window.Shift4(publicKeys);
|
|
239
239
|
componentsRef.current = shift4Ref.current.createComponentGroup().automount("#payment-form");
|
|
240
|
-
componentsRef.current = componentGroup;
|
|
241
240
|
setIsReady(true);
|
|
242
241
|
};
|
|
243
242
|
script.onerror = function () {
|
|
@@ -337,13 +336,21 @@ function PaymentForm(_ref) {
|
|
|
337
336
|
if (typeof errorPage === "function") errorPage(result);
|
|
338
337
|
return _context2.a(2);
|
|
339
338
|
case 9:
|
|
340
|
-
if (typeof successPage === "function")
|
|
339
|
+
if (typeof successPage === "function") {
|
|
340
|
+
successPage(result.message);
|
|
341
|
+
if (formRef.current) {
|
|
342
|
+
formRef.current.clear();
|
|
343
|
+
}
|
|
344
|
+
}
|
|
341
345
|
_context2.n = 11;
|
|
342
346
|
break;
|
|
343
347
|
case 10:
|
|
344
348
|
_context2.p = 10;
|
|
345
349
|
_t2 = _context2.v;
|
|
346
350
|
if (typeof errorPage === "function") errorPage(_t2.message);
|
|
351
|
+
if (formRef.current) {
|
|
352
|
+
formRef.current.clear();
|
|
353
|
+
}
|
|
347
354
|
case 11:
|
|
348
355
|
_context2.p = 11;
|
|
349
356
|
setIsSubmitting(false);
|