@stardeck-customer-apps/testing 0.21.0 → 0.23.0
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/SKILL.md +55 -4
- package/dist/index.d.mts +51 -1
- package/dist/index.d.ts +51 -1
- package/dist/index.js +372 -2
- package/dist/index.mjs +372 -2
- package/dist/next/headers-shim.js +13 -5
- package/dist/next/headers-shim.mjs +13 -5
- package/dist/setup.js +310 -2
- package/dist/setup.mjs +310 -2
- package/package.json +2 -2
package/dist/setup.js
CHANGED
|
@@ -52,6 +52,7 @@ var state = globalSingleton("state", () => ({
|
|
|
52
52
|
db: null,
|
|
53
53
|
lastHarnessDataStoreManifest: null,
|
|
54
54
|
currentUser: null,
|
|
55
|
+
liffId: null,
|
|
55
56
|
sessions: /* @__PURE__ */ new Map(),
|
|
56
57
|
refreshSessions: /* @__PURE__ */ new Map(),
|
|
57
58
|
emails: [],
|
|
@@ -76,6 +77,11 @@ var state = globalSingleton("state", () => ({
|
|
|
76
77
|
boltIntentCounter: 0,
|
|
77
78
|
boltCharges: [],
|
|
78
79
|
boltChargeCounter: 0,
|
|
80
|
+
directCharges: /* @__PURE__ */ new Map(),
|
|
81
|
+
directChargeCounter: 0,
|
|
82
|
+
cardTokens: /* @__PURE__ */ new Map(),
|
|
83
|
+
cardTokenCounter: 0,
|
|
84
|
+
cardTokenizationEnabled: true,
|
|
79
85
|
uploads: [],
|
|
80
86
|
uploadCounter: 0,
|
|
81
87
|
storageFiles: /* @__PURE__ */ new Map(),
|
|
@@ -1225,6 +1231,297 @@ async function handleIdentitiesRequest(request, subPath) {
|
|
|
1225
1231
|
return failure(`No identities simulator for ${method} .../identities${subPath}`, 404);
|
|
1226
1232
|
}
|
|
1227
1233
|
|
|
1234
|
+
// src/simulator/beam-direct-charges.ts
|
|
1235
|
+
var SIM_BEAM_HOST = "beam.stardeck.test";
|
|
1236
|
+
var SIM_BEAM_MERCHANT_ID = "sim_merchant";
|
|
1237
|
+
var SIM_BEAM_PUBLISHABLE_KEY = "pk_test_sim";
|
|
1238
|
+
var DIRECT_CHARGE_METHODS = /* @__PURE__ */ new Set([
|
|
1239
|
+
"CARD",
|
|
1240
|
+
"CARD_INSTALLMENTS",
|
|
1241
|
+
"CARD_TOKEN",
|
|
1242
|
+
"CARD_TOKEN_INSTALLMENTS",
|
|
1243
|
+
"QR_PROMPT_PAY",
|
|
1244
|
+
"ALIPAY",
|
|
1245
|
+
"ALIPAY_PLUS",
|
|
1246
|
+
"WECHAT_PAY",
|
|
1247
|
+
"TRUE_MONEY",
|
|
1248
|
+
"LINE_PAY",
|
|
1249
|
+
"SHOPEE_PAY",
|
|
1250
|
+
"KPLUS",
|
|
1251
|
+
"MAKE",
|
|
1252
|
+
"SCB_EASY",
|
|
1253
|
+
"KRUNGSRI_APP",
|
|
1254
|
+
"BANGKOK_BANK_APP",
|
|
1255
|
+
"SPAY_LATER"
|
|
1256
|
+
]);
|
|
1257
|
+
var TEST_CARDS = {
|
|
1258
|
+
"4111111111111111": { outcome: "SUCCEEDED" },
|
|
1259
|
+
"5372074248113841": { outcome: "SUCCEEDED" },
|
|
1260
|
+
"378282246310005": { outcome: "SUCCEEDED" },
|
|
1261
|
+
"4953261730509988": { outcome: "REDIRECT" },
|
|
1262
|
+
"4389783280144506": { outcome: "REDIRECT" },
|
|
1263
|
+
"4943129900084541": { outcome: "FAILED", failureCode: "CH_INSUFFICIENT_FUNDS" },
|
|
1264
|
+
"4111111111000025": { outcome: "FAILED", failureCode: "CH_CARD_DECLINED" },
|
|
1265
|
+
"4111111111000033": { outcome: "FAILED", failureCode: "CH_CARD_RESTRICTED" }
|
|
1266
|
+
};
|
|
1267
|
+
var SIM_QR_PNG = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==";
|
|
1268
|
+
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
1269
|
+
function invalid(issues) {
|
|
1270
|
+
return json({ error: "Invalid request body", details: issues }, 400);
|
|
1271
|
+
}
|
|
1272
|
+
var DEVICE_TYPES = /* @__PURE__ */ new Set(["ANDROID", "IOS", "WEB"]);
|
|
1273
|
+
function issue(path, message, code = "custom") {
|
|
1274
|
+
return { path, message, code };
|
|
1275
|
+
}
|
|
1276
|
+
function validateChargeFields(body) {
|
|
1277
|
+
const issues = [];
|
|
1278
|
+
const isInt = (v) => typeof v === "number" && Number.isInteger(v);
|
|
1279
|
+
if (!isInt(body.amount) || body.amount < 1) {
|
|
1280
|
+
issues.push(issue(["amount"], "Number must be greater than 0", "too_small"));
|
|
1281
|
+
}
|
|
1282
|
+
if (typeof body.deploymentId !== "string" || !UUID_RE.test(body.deploymentId)) {
|
|
1283
|
+
issues.push(issue(["deploymentId"], "Invalid deployment ID", "invalid_string"));
|
|
1284
|
+
}
|
|
1285
|
+
if (body.referenceId !== void 0 && (typeof body.referenceId !== "string" || body.referenceId.length > 100)) {
|
|
1286
|
+
issues.push(issue(["referenceId"], "Too long", "too_big"));
|
|
1287
|
+
}
|
|
1288
|
+
const expiry = body.expiryDurationInSec;
|
|
1289
|
+
if (expiry !== void 0 && (!isInt(expiry) || expiry < 60 || expiry > 3600)) {
|
|
1290
|
+
issues.push(issue(["expiryDurationInSec"], "Must be an integer from 60 to 3600", "too_big"));
|
|
1291
|
+
}
|
|
1292
|
+
if (body.returnUrl !== void 0 && (typeof body.returnUrl !== "string" || !URL.canParse(body.returnUrl))) {
|
|
1293
|
+
issues.push(issue(["returnUrl"], "Invalid URL", "invalid_format"));
|
|
1294
|
+
}
|
|
1295
|
+
if (body.deviceType !== void 0 && !DEVICE_TYPES.has(String(body.deviceType))) {
|
|
1296
|
+
issues.push(issue(["deviceType"], "Invalid enum value", "invalid_value"));
|
|
1297
|
+
}
|
|
1298
|
+
const key = body.idempotencyKey;
|
|
1299
|
+
if (key !== void 0 && (typeof key !== "string" || key.length < 1 || key.length > 255)) {
|
|
1300
|
+
issues.push(issue(["idempotencyKey"], "Must be 1 to 255 characters", "too_small"));
|
|
1301
|
+
}
|
|
1302
|
+
return issues;
|
|
1303
|
+
}
|
|
1304
|
+
function validateChargeMethod(body) {
|
|
1305
|
+
const method = body.paymentMethod;
|
|
1306
|
+
const type = method?.paymentMethodType;
|
|
1307
|
+
if (typeof type !== "string" || !DIRECT_CHARGE_METHODS.has(type)) {
|
|
1308
|
+
return [issue(["paymentMethod", "paymentMethodType"], "Invalid enum value", "invalid_value")];
|
|
1309
|
+
}
|
|
1310
|
+
const issues = [];
|
|
1311
|
+
const isToken = type === "CARD_TOKEN" || type === "CARD_TOKEN_INSTALLMENTS";
|
|
1312
|
+
const token = method?.cardToken;
|
|
1313
|
+
if (isToken && (typeof token?.cardTokenId !== "string" || token.cardTokenId === "")) {
|
|
1314
|
+
issues.push(
|
|
1315
|
+
issue(["paymentMethod", "cardToken"], `${type} requires paymentMethod.cardToken.cardTokenId`)
|
|
1316
|
+
);
|
|
1317
|
+
}
|
|
1318
|
+
if (token?.securityCode !== void 0 && !/^\d{3,4}$/.test(String(token.securityCode))) {
|
|
1319
|
+
issues.push(
|
|
1320
|
+
issue(
|
|
1321
|
+
["paymentMethod", "cardToken", "securityCode"],
|
|
1322
|
+
"Invalid security code",
|
|
1323
|
+
"invalid_format"
|
|
1324
|
+
)
|
|
1325
|
+
);
|
|
1326
|
+
}
|
|
1327
|
+
if (type === "CARD_TOKEN_INSTALLMENTS" && ![3, 4, 6, 10].includes(method?.installmentPeriod)) {
|
|
1328
|
+
issues.push(
|
|
1329
|
+
issue(
|
|
1330
|
+
["paymentMethod", "installmentPeriod"],
|
|
1331
|
+
"CARD_TOKEN_INSTALLMENTS requires paymentMethod.installmentPeriod (3, 4, 6 or 10)"
|
|
1332
|
+
)
|
|
1333
|
+
);
|
|
1334
|
+
}
|
|
1335
|
+
if (type !== "QR_PROMPT_PAY" && !body.returnUrl) {
|
|
1336
|
+
issues.push(
|
|
1337
|
+
issue(
|
|
1338
|
+
["returnUrl"],
|
|
1339
|
+
`${type} sends the shopper away to pay; returnUrl is required to bring them back`
|
|
1340
|
+
)
|
|
1341
|
+
);
|
|
1342
|
+
}
|
|
1343
|
+
if (type === "CARD" || type === "CARD_INSTALLMENTS") {
|
|
1344
|
+
issues.push(
|
|
1345
|
+
issue(
|
|
1346
|
+
["paymentMethod", "paymentMethodType"],
|
|
1347
|
+
`${type} takes raw card data; tokenize the card in the browser and charge CARD_TOKEN instead`
|
|
1348
|
+
)
|
|
1349
|
+
);
|
|
1350
|
+
}
|
|
1351
|
+
return issues;
|
|
1352
|
+
}
|
|
1353
|
+
function validateDirectCharge(body) {
|
|
1354
|
+
return [...validateChargeFields(body), ...validateChargeMethod(body)];
|
|
1355
|
+
}
|
|
1356
|
+
function chargeResponse(charge) {
|
|
1357
|
+
const response = {
|
|
1358
|
+
chargeId: charge.id,
|
|
1359
|
+
actionRequired: charge.actionRequired,
|
|
1360
|
+
paymentMethodType: charge.paymentMethodType
|
|
1361
|
+
};
|
|
1362
|
+
if (charge.actionRequired === "ENCODED_IMAGE") {
|
|
1363
|
+
response.encodedImage = {
|
|
1364
|
+
imageBase64Encoded: SIM_QR_PNG,
|
|
1365
|
+
rawData: `00020101021230SIM${charge.id}`,
|
|
1366
|
+
expiry: charge.expiresAt
|
|
1367
|
+
};
|
|
1368
|
+
}
|
|
1369
|
+
if (charge.actionRequired === "REDIRECT") {
|
|
1370
|
+
response.redirect = { redirectUrl: charge.redirectUrl };
|
|
1371
|
+
response.redirectUrl = charge.redirectUrl;
|
|
1372
|
+
}
|
|
1373
|
+
return response;
|
|
1374
|
+
}
|
|
1375
|
+
function nextChargeId() {
|
|
1376
|
+
state.directChargeCounter += 1;
|
|
1377
|
+
return `ch_sim_${state.directChargeCounter}`;
|
|
1378
|
+
}
|
|
1379
|
+
function createCharge(body) {
|
|
1380
|
+
const method = body.paymentMethod;
|
|
1381
|
+
const type = method.paymentMethodType;
|
|
1382
|
+
const id = nextChargeId();
|
|
1383
|
+
const now3 = /* @__PURE__ */ new Date();
|
|
1384
|
+
const expirySec = typeof body.expiryDurationInSec === "number" ? body.expiryDurationInSec : 30 * 60;
|
|
1385
|
+
const returnUrl = typeof body.returnUrl === "string" ? body.returnUrl : null;
|
|
1386
|
+
let actionRequired = "REDIRECT";
|
|
1387
|
+
let status = "PENDING";
|
|
1388
|
+
let failureCode = null;
|
|
1389
|
+
let cardLast4 = null;
|
|
1390
|
+
if (type === "QR_PROMPT_PAY") {
|
|
1391
|
+
actionRequired = "ENCODED_IMAGE";
|
|
1392
|
+
} else if (type === "CARD_TOKEN" || type === "CARD_TOKEN_INSTALLMENTS") {
|
|
1393
|
+
const token = state.cardTokens.get(method.cardToken.cardTokenId);
|
|
1394
|
+
if (!token) {
|
|
1395
|
+
return json({ error: "Card token not found", code: "CARD_TOKEN_NOT_FOUND" }, 404);
|
|
1396
|
+
}
|
|
1397
|
+
cardLast4 = token.last4;
|
|
1398
|
+
const card = TEST_CARDS[token.pan] ?? {
|
|
1399
|
+
outcome: "FAILED",
|
|
1400
|
+
failureCode: "CH_PROCESSING_FAILED"
|
|
1401
|
+
};
|
|
1402
|
+
if (card.outcome === "REDIRECT") {
|
|
1403
|
+
actionRequired = "REDIRECT";
|
|
1404
|
+
} else {
|
|
1405
|
+
actionRequired = "NONE";
|
|
1406
|
+
status = card.outcome;
|
|
1407
|
+
failureCode = card.failureCode ?? null;
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
const charge = {
|
|
1411
|
+
id,
|
|
1412
|
+
status,
|
|
1413
|
+
amount: body.amount,
|
|
1414
|
+
currency: String(body.currency ?? "THB"),
|
|
1415
|
+
paymentMethodType: type,
|
|
1416
|
+
referenceId: typeof body.referenceId === "string" ? body.referenceId : null,
|
|
1417
|
+
deviceType: typeof body.deviceType === "string" ? body.deviceType : null,
|
|
1418
|
+
returnUrl,
|
|
1419
|
+
actionRequired,
|
|
1420
|
+
redirectUrl: actionRequired === "REDIRECT" ? `https://${SIM_BEAM_HOST}/pay/${id}${returnUrl ? `?returnUrl=${encodeURIComponent(returnUrl)}` : ""}` : null,
|
|
1421
|
+
expiresAt: new Date(now3.getTime() + expirySec * 1e3).toISOString(),
|
|
1422
|
+
failureCode,
|
|
1423
|
+
cardLast4,
|
|
1424
|
+
idempotencyKey: typeof body.idempotencyKey === "string" ? body.idempotencyKey : null,
|
|
1425
|
+
createdAt: now3.toISOString()
|
|
1426
|
+
};
|
|
1427
|
+
state.directCharges.set(id, charge);
|
|
1428
|
+
return charge;
|
|
1429
|
+
}
|
|
1430
|
+
async function handleDirectChargeRequest(request, pathname) {
|
|
1431
|
+
if (request.method === "POST" && /^\/api\/store\/beam\/[^/]+\/charges$/.test(pathname)) {
|
|
1432
|
+
const body = await readJsonBody(request);
|
|
1433
|
+
const issues = validateDirectCharge(body);
|
|
1434
|
+
if (issues.length > 0) return invalid(issues);
|
|
1435
|
+
const key = typeof body.idempotencyKey === "string" ? body.idempotencyKey : null;
|
|
1436
|
+
if (key) {
|
|
1437
|
+
const existing = [...state.directCharges.values()].find((c) => c.idempotencyKey === key);
|
|
1438
|
+
if (existing) return json(chargeResponse(existing));
|
|
1439
|
+
}
|
|
1440
|
+
const created = createCharge(body);
|
|
1441
|
+
if (created instanceof Response) return created;
|
|
1442
|
+
return json(chargeResponse(created));
|
|
1443
|
+
}
|
|
1444
|
+
const getMatch = pathname.match(/^\/api\/store\/beam\/[^/]+\/charges\/([^/]+)$/);
|
|
1445
|
+
if (request.method === "GET" && getMatch) {
|
|
1446
|
+
const charge = state.directCharges.get(decodeURIComponent(getMatch[1]));
|
|
1447
|
+
if (!charge) return json({ error: "Charge not found", code: "NOT_FOUND" }, 404);
|
|
1448
|
+
return json({ charge: toChargeDetail(charge) });
|
|
1449
|
+
}
|
|
1450
|
+
if (request.method === "GET" && /^\/api\/store\/beam\/[^/]+\/card-tokenization$/.test(pathname)) {
|
|
1451
|
+
if (!state.cardTokenizationEnabled) {
|
|
1452
|
+
return json(
|
|
1453
|
+
{
|
|
1454
|
+
error: "Add the Beam publishable key to this merchant account to take cards in your own checkout",
|
|
1455
|
+
code: "CARD_TOKENIZATION_NOT_CONFIGURED"
|
|
1456
|
+
},
|
|
1457
|
+
409
|
|
1458
|
+
);
|
|
1459
|
+
}
|
|
1460
|
+
return json({
|
|
1461
|
+
merchantId: SIM_BEAM_MERCHANT_ID,
|
|
1462
|
+
publishableKey: SIM_BEAM_PUBLISHABLE_KEY,
|
|
1463
|
+
tokenizeUrl: `https://${SIM_BEAM_HOST}/client/v1/card-tokens`,
|
|
1464
|
+
isSandbox: true
|
|
1465
|
+
});
|
|
1466
|
+
}
|
|
1467
|
+
return null;
|
|
1468
|
+
}
|
|
1469
|
+
function toChargeDetail(charge) {
|
|
1470
|
+
return {
|
|
1471
|
+
id: charge.id,
|
|
1472
|
+
chargeId: charge.id,
|
|
1473
|
+
status: charge.status,
|
|
1474
|
+
amount: charge.amount,
|
|
1475
|
+
currency: charge.currency,
|
|
1476
|
+
paymentMethodType: charge.paymentMethodType,
|
|
1477
|
+
...charge.referenceId !== null ? { referenceId: charge.referenceId } : {},
|
|
1478
|
+
...charge.failureCode ? { failureCode: charge.failureCode } : {},
|
|
1479
|
+
source: "API",
|
|
1480
|
+
createdAt: charge.createdAt
|
|
1481
|
+
};
|
|
1482
|
+
}
|
|
1483
|
+
async function handleCardTokenRequest(request, url) {
|
|
1484
|
+
if (request.method !== "POST" || url.pathname !== "/client/v1/card-tokens") {
|
|
1485
|
+
return json({ error: `No Beam simulator for ${request.method} ${url.pathname}` }, 404);
|
|
1486
|
+
}
|
|
1487
|
+
const expected = `Basic ${btoa(`${SIM_BEAM_MERCHANT_ID}:${SIM_BEAM_PUBLISHABLE_KEY}`)}`;
|
|
1488
|
+
if (request.headers.get("Authorization") !== expected) {
|
|
1489
|
+
return json(
|
|
1490
|
+
{
|
|
1491
|
+
message: "invalid credentials",
|
|
1492
|
+
error: { errorCode: "INVALID_CREDENTIALS_ERROR", errorMessage: "invalid credentials" }
|
|
1493
|
+
},
|
|
1494
|
+
401
|
|
1495
|
+
);
|
|
1496
|
+
}
|
|
1497
|
+
const body = await readJsonBody(request);
|
|
1498
|
+
const pan = typeof body.pan === "string" ? body.pan : "";
|
|
1499
|
+
const month = body.expiryMonth;
|
|
1500
|
+
const year = body.expiryYear;
|
|
1501
|
+
if (!/^\d{12,19}$/.test(pan) || typeof month !== "number" || month < 1 || month > 12 || typeof year !== "number" || year < 0 || year > 99) {
|
|
1502
|
+
return json(
|
|
1503
|
+
{
|
|
1504
|
+
message: "inputs are failing validation",
|
|
1505
|
+
error: {
|
|
1506
|
+
errorCode: "API_VALIDATION_ERROR",
|
|
1507
|
+
errorMessage: "inputs are failing validation"
|
|
1508
|
+
}
|
|
1509
|
+
},
|
|
1510
|
+
400
|
|
1511
|
+
);
|
|
1512
|
+
}
|
|
1513
|
+
state.cardTokenCounter += 1;
|
|
1514
|
+
const token = {
|
|
1515
|
+
id: `ctok_sim_${state.cardTokenCounter}`,
|
|
1516
|
+
pan,
|
|
1517
|
+
last4: pan.slice(-4),
|
|
1518
|
+
expiryMonth: month,
|
|
1519
|
+
expiryYear: year
|
|
1520
|
+
};
|
|
1521
|
+
state.cardTokens.set(token.id, token);
|
|
1522
|
+
return json({ id: token.id });
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1228
1525
|
// src/simulator/payments.ts
|
|
1229
1526
|
var import_node_crypto5 = __toESM(require("crypto"));
|
|
1230
1527
|
|
|
@@ -1252,7 +1549,7 @@ var BEAM_BOLT_PAYMENT_METHODS = [
|
|
|
1252
1549
|
"SPAY_LATER"
|
|
1253
1550
|
];
|
|
1254
1551
|
var BEAM_BOLT_INTENT_STATUSES = ["PENDING", "PAID", "FAILED", "CANCELED", "EXPIRED"];
|
|
1255
|
-
var
|
|
1552
|
+
var UUID_RE2 = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
1256
1553
|
function payErr(error, status = 400, code, details) {
|
|
1257
1554
|
const body = { error };
|
|
1258
1555
|
if (code) body.code = code;
|
|
@@ -1266,6 +1563,12 @@ function paymentOperationForRequest(request, pathname) {
|
|
|
1266
1563
|
if (request.method === "GET" && /^\/api\/store\/beam\/[^/]+\/payment-links\/[^/]+$/.test(pathname)) {
|
|
1267
1564
|
return "beam.getPaymentLinkStatus";
|
|
1268
1565
|
}
|
|
1566
|
+
if (request.method === "POST" && /^\/api\/store\/beam\/[^/]+\/charges$/.test(pathname)) {
|
|
1567
|
+
return "beam.createDirectCharge";
|
|
1568
|
+
}
|
|
1569
|
+
if (request.method === "GET" && /^\/api\/store\/beam\/[^/]+\/charges\/[^/]+$/.test(pathname)) {
|
|
1570
|
+
return "beam.getCharge";
|
|
1571
|
+
}
|
|
1269
1572
|
if (request.method === "POST" && /^\/api\/store\/(?!beam\/)[^/]+\/checkout$/.test(pathname)) {
|
|
1270
1573
|
return "stripe.createCheckout";
|
|
1271
1574
|
}
|
|
@@ -1406,6 +1709,8 @@ async function handlePaymentsRequest(request, url) {
|
|
|
1406
1709
|
const pathname = url.pathname;
|
|
1407
1710
|
const injectedFailure = consumePaymentFailure(request, pathname);
|
|
1408
1711
|
if (injectedFailure) return injectedFailure;
|
|
1712
|
+
const directChargeResponse = await handleDirectChargeRequest(request, pathname);
|
|
1713
|
+
if (directChargeResponse) return directChargeResponse;
|
|
1409
1714
|
if (/\/billing-portal$/.test(pathname)) {
|
|
1410
1715
|
return payErr("Not found", 404, "NOT_FOUND");
|
|
1411
1716
|
}
|
|
@@ -1502,7 +1807,7 @@ async function handlePaymentsRequest(request, url) {
|
|
|
1502
1807
|
code: "too_small"
|
|
1503
1808
|
});
|
|
1504
1809
|
}
|
|
1505
|
-
if (typeof body.deploymentId !== "string" || !
|
|
1810
|
+
if (typeof body.deploymentId !== "string" || !UUID_RE2.test(body.deploymentId)) {
|
|
1506
1811
|
issues.push({
|
|
1507
1812
|
path: ["deploymentId"],
|
|
1508
1813
|
message: "Invalid uuid",
|
|
@@ -2430,6 +2735,9 @@ async function handleSimulatedRequest(request, url) {
|
|
|
2430
2735
|
if (isStorageHost) {
|
|
2431
2736
|
return handleStorageRequest(request, url);
|
|
2432
2737
|
}
|
|
2738
|
+
if (url.hostname === SIM_BEAM_HOST) {
|
|
2739
|
+
return handleCardTokenRequest(request, url);
|
|
2740
|
+
}
|
|
2433
2741
|
if (isEmail && request.method === "POST") {
|
|
2434
2742
|
return handleEmailSend(request);
|
|
2435
2743
|
}
|