fix: update API URLs and improve error handling for SUB2API configuration

This commit is contained in:
QLHazyCoder
2026-05-08 09:11:19 +08:00
parent 144b144042
commit 6f9a9913b5
12 changed files with 62 additions and 16 deletions
+1
View File
@@ -28,6 +28,7 @@ test('GoPay utils builds GPC queue task and balance URLs from helper endpoints',
const api = loadGoPayUtils();
assert.equal(api.DEFAULT_GPC_HELPER_API_URL, 'https://gpc.qlhazycoder.top');
assert.equal(api.normalizeGpcHelperBaseUrl(''), 'https://gpc.qlhazycoder.top');
assert.equal(api.normalizeGpcHelperBaseUrl('https://example.com/api/gp/tasks'), 'https://gpc.qlhazycoder.top');
assert.equal(
api.buildGpcHelperApiUrl('', '/api/checkout/start'),
'https://gpc.qlhazycoder.top/api/checkout/start'