@xuda.io/account_module 1.2.92 → 1.2.94

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.
Files changed (2) hide show
  1. package/index.js +12 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1454,13 +1454,20 @@ exports.validate_account_topup = async function (uid, items = []) {
1454
1454
  throw new Error("no card on file");
1455
1455
  }
1456
1456
 
1457
- if (data?.balance?.past_due) {
1457
+ if (data?.open_invoices?.length) {
1458
1458
  let err = new Error(`past_due ${data?.balance?.past_due}`);
1459
1459
  err.code = -91;
1460
1460
  err.billing_problem = true;
1461
1461
  err.topup = topup;
1462
1462
  throw err;
1463
1463
  }
1464
+ // if (data?.balance?.past_due) {
1465
+ // let err = new Error(`past_due ${data?.balance?.past_due}`);
1466
+ // err.code = -91;
1467
+ // err.billing_problem = true;
1468
+ // err.topup = topup;
1469
+ // throw err;
1470
+ // }
1464
1471
 
1465
1472
  const balance = data?.balance?.account || 0; // minus balance represents positive balance
1466
1473
 
@@ -1525,6 +1532,10 @@ const get_prices = function (uid, item) {
1525
1532
  price = _conf.PRICE_OBJ.branding_per_month;
1526
1533
  break;
1527
1534
 
1535
+ case "utility_screen":
1536
+ price = _conf.PRICE_OBJ.utility_screen_per_month;
1537
+ break;
1538
+
1528
1539
  default:
1529
1540
  price = 0;
1530
1541
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.92",
3
+ "version": "1.2.94",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {