@retinalabsllc/zairusjs 0.5.4 → 0.5.5
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.js +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2404,8 +2404,10 @@ var UniversalBillingPage = ({
|
|
|
2404
2404
|
if (!selectedInvoice || isReadOnly || !onPayInvoice || isPaying) return;
|
|
2405
2405
|
setIsPaying(true);
|
|
2406
2406
|
try {
|
|
2407
|
-
await onPayInvoice(selectedInvoice.id);
|
|
2408
|
-
|
|
2407
|
+
const res = await onPayInvoice(selectedInvoice.id);
|
|
2408
|
+
if (res && res.success) {
|
|
2409
|
+
setSelectedInvoice({ ...selectedInvoice, status: "PAID" });
|
|
2410
|
+
}
|
|
2409
2411
|
} finally {
|
|
2410
2412
|
setIsPaying(false);
|
|
2411
2413
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -2346,8 +2346,10 @@ var UniversalBillingPage = ({
|
|
|
2346
2346
|
if (!selectedInvoice || isReadOnly || !onPayInvoice || isPaying) return;
|
|
2347
2347
|
setIsPaying(true);
|
|
2348
2348
|
try {
|
|
2349
|
-
await onPayInvoice(selectedInvoice.id);
|
|
2350
|
-
|
|
2349
|
+
const res = await onPayInvoice(selectedInvoice.id);
|
|
2350
|
+
if (res && res.success) {
|
|
2351
|
+
setSelectedInvoice({ ...selectedInvoice, status: "PAID" });
|
|
2352
|
+
}
|
|
2351
2353
|
} finally {
|
|
2352
2354
|
setIsPaying(false);
|
|
2353
2355
|
}
|