@xuda.io/account_module 1.2.123 → 1.2.125
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/index.js +4 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -434,6 +434,7 @@ exports.get_account_data = async function (req) {
|
|
|
434
434
|
// ret.data.stripe_membership_subscription_id = subscription_ret.data.id;
|
|
435
435
|
// }
|
|
436
436
|
// }
|
|
437
|
+
|
|
437
438
|
return ret;
|
|
438
439
|
} catch (error) {
|
|
439
440
|
return { code: -1, data: error };
|
|
@@ -1260,10 +1261,11 @@ exports.validate_account_topup = async function (uid, items = []) {
|
|
|
1260
1261
|
}
|
|
1261
1262
|
|
|
1262
1263
|
if (!data?.customer_obj?.default_source) {
|
|
1264
|
+
let err = new Error('no card on file');
|
|
1263
1265
|
err.code = -90;
|
|
1264
1266
|
err.billing_problem = true;
|
|
1265
|
-
|
|
1266
|
-
throw new Error('no card on file');
|
|
1267
|
+
throw err;
|
|
1268
|
+
// throw new Error('no card on file');
|
|
1267
1269
|
}
|
|
1268
1270
|
|
|
1269
1271
|
if (data?.balance?.past_due) {
|