@agent-cards/sdk 0.23.14 → 0.23.16
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/CHANGELOG.md +6 -0
- package/LICENSE +1 -1
- package/PREFLIGHT.md +2 -0
- package/README.md +2 -0
- package/dist/amadeus.d.ts +5 -2
- package/dist/amadeus.js +17 -3
- package/dist/card-fields.generated.js +237 -17
- package/dist/cdp.js +16 -8
- package/dist/client.d.ts +11 -0
- package/dist/client.js +58 -8
- package/dist/lifecycle.d.ts +5 -1
- package/dist/lifecycle.js +3 -0
- package/dist/paypal-card-forms.d.ts +73 -0
- package/dist/paypal-card-forms.js +126 -0
- package/dist/pre-claim.d.ts +1 -0
- package/dist/pre-claim.js +59 -3
- package/dist/prepared-processor.d.ts +5 -1
- package/dist/prepared-processor.js +11 -0
- package/dist/primer.generated.js +248 -28
- package/dist/stripe-checkout.generated.js +79 -1
- package/dist/wix-payments.generated.d.ts +42 -0
- package/dist/wix-payments.generated.js +241 -0
- package/package.json +3 -3
package/dist/primer.generated.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// Generated from @agent-cards/payment-core. Do not edit.
|
|
3
|
-
// artifact-sha256:
|
|
3
|
+
// artifact-sha256: 833d97716c57df725c942d14494012032a87b561ac7734676fe9dcb1d6be4819
|
|
4
4
|
// src/card-number-key.js
|
|
5
5
|
var CARD_NUMBER_KEY = /^(number|card_number|cardnumber|cardNum|card_num|pan)$/i;
|
|
6
6
|
// src/json-path.js
|
|
@@ -365,8 +365,8 @@ var CONTROL = /[\u0000-\u001f\u007f]/;
|
|
|
365
365
|
var cardLikeName = (name) => (name.match(/[0-9]/g) ?? []).length >= 12;
|
|
366
366
|
var record3 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
367
367
|
var sameKeys = (value, keys) => {
|
|
368
|
-
const
|
|
369
|
-
return
|
|
368
|
+
const own2 = Object.keys(value);
|
|
369
|
+
return own2.length === keys.length && own2.every((key, at) => key === keys[at]);
|
|
370
370
|
};
|
|
371
371
|
var refuse4 = (code) => Object.freeze({ verdict: "refuse", code });
|
|
372
372
|
var CARD4 = /* @__PURE__ */ Object.freeze({ verdict: "card" });
|
|
@@ -433,6 +433,9 @@ var PAYFAST_BODY_KEYS = /* @__PURE__ */ Object.freeze([
|
|
|
433
433
|
"captcha_version",
|
|
434
434
|
"captcha_action"
|
|
435
435
|
]);
|
|
436
|
+
var CAPTCHA_ANSWER = "g-recaptcha-response";
|
|
437
|
+
var UNANSWERED_KEYS = /* @__PURE__ */ Object.freeze(PAYFAST_BODY_KEYS.filter((key) => key !== CAPTCHA_ANSWER));
|
|
438
|
+
var UNANSWERED_VERSIONS = /* @__PURE__ */ Object.freeze(["v0", "v1"]);
|
|
436
439
|
var BODY_LIMIT3 = 8192;
|
|
437
440
|
var URL_LIMIT = 256;
|
|
438
441
|
var PAY_PATH = /^\/eng\/method\/CreditCard\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\/pay$/;
|
|
@@ -495,18 +498,20 @@ function cardNetwork(number) {
|
|
|
495
498
|
return "mastercard";
|
|
496
499
|
return AMEX.test(number) ? "amex" : null;
|
|
497
500
|
}
|
|
501
|
+
var namesKeys = (pairs, keys) => pairs.length === keys.length && pairs.every(([key], at) => key === keys[at]);
|
|
498
502
|
function judgeBody(body) {
|
|
499
503
|
const pairs = readForm(body);
|
|
500
504
|
if (pairs === null)
|
|
501
505
|
return { code: "payfast_body_unsupported", pairs: null };
|
|
502
506
|
if (pairs.some(([key]) => key === "cc_key"))
|
|
503
507
|
return { code: "payfast_saved_card", pairs: null };
|
|
504
|
-
|
|
508
|
+
const answered = namesKeys(pairs, PAYFAST_BODY_KEYS);
|
|
509
|
+
if (!answered && !namesKeys(pairs, UNANSWERED_KEYS))
|
|
505
510
|
return { code: "payfast_body_unsupported", pairs: null };
|
|
506
|
-
}
|
|
507
511
|
const value = Object.fromEntries(pairs);
|
|
508
|
-
const answer = value[
|
|
509
|
-
|
|
512
|
+
const answer = value[CAPTCHA_ANSWER];
|
|
513
|
+
const captcha = answered ? answer === "" || SOLVED_CAPTCHA2.test(answer) : UNANSWERED_VERSIONS.includes(value.captcha_version);
|
|
514
|
+
if (cardNetwork(value.card_number) === null || !SECURITY_CODE3.test(value.cvv) || !MONTH.test(value.expiry_month) || !YEAR.test(value.expiry_year) || value.cardholder_name.length > HOLDER_LIMIT || !HOLDER.test(value.cardholder_name) || !captcha || !CAPTCHA_VERSIONS.includes(value.captcha_version) || value.captcha_action !== "checkout") {
|
|
510
515
|
return { code: "payfast_body_unsupported", pairs: null };
|
|
511
516
|
}
|
|
512
517
|
if (value.consent_check === "1")
|
|
@@ -666,10 +671,10 @@ var TYPED_ARRAY = Object.getPrototypeOf(Uint8Array.prototype);
|
|
|
666
671
|
var typedArrayName = Object.getOwnPropertyDescriptor(TYPED_ARRAY, Symbol.toStringTag).get;
|
|
667
672
|
function parseRsaPublicKey(key) {
|
|
668
673
|
const spki = key && typeof key === "object" ? key.spki : void 0;
|
|
669
|
-
const
|
|
674
|
+
const pin4 = key && typeof key === "object" ? key.sha256 : void 0;
|
|
670
675
|
if (typeof spki !== "string" || spki.length > 1024 || spki.length % 4 !== 0 || !BASE64.test(spki))
|
|
671
676
|
throw refuse6("key");
|
|
672
|
-
if (typeof
|
|
677
|
+
if (typeof pin4 !== "string" || !SHA256_HEX.test(pin4))
|
|
673
678
|
throw refuse6("key");
|
|
674
679
|
let binary;
|
|
675
680
|
try {
|
|
@@ -681,7 +686,7 @@ function parseRsaPublicKey(key) {
|
|
|
681
686
|
if (btoa(binary) !== spki)
|
|
682
687
|
throw refuse6("key");
|
|
683
688
|
const der = Uint8Array.from(binary, (c) => c.charCodeAt(0));
|
|
684
|
-
if (sha256Hex(der) !==
|
|
689
|
+
if (sha256Hex(der) !== pin4)
|
|
685
690
|
throw refuse6("key");
|
|
686
691
|
const outer = readElement(der, 0, 48);
|
|
687
692
|
if (outer.end !== der.length || outer.start + RSA_ALGORITHM.length > der.length)
|
|
@@ -770,8 +775,8 @@ var PADDLE_TOKENEX_PSP = "paddle_tokenex";
|
|
|
770
775
|
var PADDLE_TOKENEX_FACT_KEYS = /* @__PURE__ */ Object.freeze(["card_first_six", "card_last_four", "expiry_month", "expiry_year", "card_brand"]);
|
|
771
776
|
var record4 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
772
777
|
var sameKeys2 = (value, keys) => {
|
|
773
|
-
const
|
|
774
|
-
return
|
|
778
|
+
const own2 = Object.keys(value);
|
|
779
|
+
return own2.length === keys.length && own2.every((key, at) => key === keys[at]);
|
|
775
780
|
};
|
|
776
781
|
var refuse7 = (code) => Object.freeze({ verdict: "refuse", code });
|
|
777
782
|
var CARD6 = /* @__PURE__ */ Object.freeze({ verdict: "card" });
|
|
@@ -1241,10 +1246,219 @@ var LYRA_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
|
|
|
1241
1246
|
hosts: Object.freeze(["api.systempay.fr"])
|
|
1242
1247
|
})
|
|
1243
1248
|
]);
|
|
1249
|
+
// src/wix-payments.js
|
|
1250
|
+
var WIX_PAYMENTS_PSP = "wix_payments";
|
|
1251
|
+
var WIX_PAYMENTS_TOKENIZE_URL = "https://cashier-pci.wixapps.net/_api/payment-gateway-web/tokenize/v2/tokens";
|
|
1252
|
+
var BODY_LIMIT5 = 8192;
|
|
1253
|
+
var ROOT_KEYS3 = /* @__PURE__ */ Object.freeze(["cvv", "creditCard"]);
|
|
1254
|
+
var CARD_KEYS5 = /* @__PURE__ */ Object.freeze(["number", "expiration", "additionalInformation", "billingAddress"]);
|
|
1255
|
+
var EXPIRATION_KEYS = /* @__PURE__ */ Object.freeze(["month", "year"]);
|
|
1256
|
+
var HOLDER_KEYS = /* @__PURE__ */ Object.freeze(["holderName"]);
|
|
1257
|
+
var CARD_NUMBER6 = /^[0-9]{12,19}$/;
|
|
1258
|
+
var SECURITY_CODE5 = /^[0-9]{3,4}$/;
|
|
1259
|
+
var FIRST_YEAR = 2e3;
|
|
1260
|
+
var LAST_YEAR = 2099;
|
|
1261
|
+
var FIELD_NAME = /^[A-Za-z][A-Za-z0-9]{0,63}$/;
|
|
1262
|
+
var MAX_FIELDS = 32;
|
|
1263
|
+
var MAX_NESTED_FIELDS = 8;
|
|
1264
|
+
var TEXT_LIMIT = 256;
|
|
1265
|
+
var CONTROL4 = /[\u0000-\u001f\u007f]/;
|
|
1266
|
+
var record6 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
1267
|
+
var sameKeys3 = (value, keys) => {
|
|
1268
|
+
const own2 = Object.keys(value);
|
|
1269
|
+
return own2.length === keys.length && own2.every((key, at) => key === keys[at]);
|
|
1270
|
+
};
|
|
1271
|
+
var plainText = (value) => typeof value === "string" && value.length <= TEXT_LIMIT && !CONTROL4.test(value) && (value.match(/[0-9]/g) ?? []).length < 12;
|
|
1272
|
+
var refuse9 = (code) => Object.freeze({ verdict: "refuse", code });
|
|
1273
|
+
var CARD8 = /* @__PURE__ */ Object.freeze({ verdict: "card" });
|
|
1274
|
+
function isWixPaymentsTokenizeUrl(url) {
|
|
1275
|
+
return url === WIX_PAYMENTS_TOKENIZE_URL;
|
|
1276
|
+
}
|
|
1277
|
+
function readBody3(body) {
|
|
1278
|
+
if (typeof body !== "string" || body === "" || body.length > BODY_LIMIT5)
|
|
1279
|
+
return null;
|
|
1280
|
+
let value;
|
|
1281
|
+
try {
|
|
1282
|
+
value = JSON.parse(body);
|
|
1283
|
+
if (!record6(value) || JSON.stringify(value) !== body)
|
|
1284
|
+
return null;
|
|
1285
|
+
}
|
|
1286
|
+
catch {
|
|
1287
|
+
return null;
|
|
1288
|
+
}
|
|
1289
|
+
return value;
|
|
1290
|
+
}
|
|
1291
|
+
var billingText = (value) => value === null || plainText(value);
|
|
1292
|
+
function billingFields(value) {
|
|
1293
|
+
if (!record6(value))
|
|
1294
|
+
return false;
|
|
1295
|
+
const names = Object.keys(value);
|
|
1296
|
+
if (names.length > MAX_FIELDS)
|
|
1297
|
+
return false;
|
|
1298
|
+
return names.every((name) => {
|
|
1299
|
+
const field = value[name];
|
|
1300
|
+
if (!FIELD_NAME.test(name))
|
|
1301
|
+
return false;
|
|
1302
|
+
if (!record6(field))
|
|
1303
|
+
return billingText(field);
|
|
1304
|
+
const nested = Object.keys(field);
|
|
1305
|
+
return nested.length <= MAX_NESTED_FIELDS && nested.every((key) => FIELD_NAME.test(key) && billingText(field[key]));
|
|
1306
|
+
});
|
|
1307
|
+
}
|
|
1308
|
+
function wixPaymentsBodyVerdict(body) {
|
|
1309
|
+
const value = readBody3(body);
|
|
1310
|
+
if (value === null || !sameKeys3(value, ROOT_KEYS3) || !record6(value.creditCard) || !sameKeys3(value.creditCard, CARD_KEYS5)) {
|
|
1311
|
+
return refuse9("wix_payments_body_unsupported");
|
|
1312
|
+
}
|
|
1313
|
+
const card = value.creditCard;
|
|
1314
|
+
const expiration = card.expiration;
|
|
1315
|
+
const holder = card.additionalInformation;
|
|
1316
|
+
if (typeof value.cvv !== "string" || !SECURITY_CODE5.test(value.cvv) || typeof card.number !== "string" || !CARD_NUMBER6.test(card.number) || !record6(expiration) || !sameKeys3(expiration, EXPIRATION_KEYS) || !Number.isInteger(expiration.month) || expiration.month < 1 || expiration.month > 12 || !Number.isInteger(expiration.year) || expiration.year < FIRST_YEAR || expiration.year > LAST_YEAR || !record6(holder) || !sameKeys3(holder, HOLDER_KEYS) || !plainText(holder.holderName) || !billingFields(card.billingAddress)) {
|
|
1317
|
+
return refuse9("wix_payments_body_unsupported");
|
|
1318
|
+
}
|
|
1319
|
+
return CARD8;
|
|
1320
|
+
}
|
|
1321
|
+
var pin3 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]) });
|
|
1322
|
+
var WIX_PAYMENTS_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
|
|
1323
|
+
pin3({ id: "parahouse_magazine", merchant: "ParaHouse Magazine", origins: ["https://www.parahousemagazine.com"] }),
|
|
1324
|
+
pin3({ id: "psalms_and_potions", merchant: "Psalms & Potions", origins: ["https://www.psalmsandpotions.com"] }),
|
|
1325
|
+
pin3({ id: "alexandra_hagel", merchant: "Alexandra Hagel, LLC", origins: ["https://www.alexandrahagel.com"] })
|
|
1326
|
+
]);
|
|
1327
|
+
// src/paymongo.js
|
|
1328
|
+
var PAYMONGO_PSP = "paymongo";
|
|
1329
|
+
var PAYMONGO_CHECKOUT_HOST = "checkout.paymongo.com";
|
|
1330
|
+
var PAYMONGO_ATTRIBUTE_KEYS = /* @__PURE__ */ Object.freeze(["payment_method_type", "details", "billing", "return_url"]);
|
|
1331
|
+
var PAYMONGO_CARD_KEYS = /* @__PURE__ */ Object.freeze(["card_number", "exp_month", "exp_year", "cvc"]);
|
|
1332
|
+
var PAYMONGO_BILLING_KEYS = /* @__PURE__ */ Object.freeze(["name", "email", "phone", "address"]);
|
|
1333
|
+
var PAYMONGO_ADDRESS_KEYS = /* @__PURE__ */ Object.freeze(["line1", "line2", "city", "state", "country", "postal_code"]);
|
|
1334
|
+
var CLICK_TO_PAY_KEYS = /* @__PURE__ */ Object.freeze(["merchant_transaction_id", "correlation_id", "x_src_cx_flow_id"]);
|
|
1335
|
+
var URL_LIMIT2 = 128;
|
|
1336
|
+
var BODY_LIMIT6 = 16384;
|
|
1337
|
+
var ORIGIN = `https://${PAYMONGO_CHECKOUT_HOST}/`;
|
|
1338
|
+
var SESSION2 = /^[A-Za-z0-9]{24}$/;
|
|
1339
|
+
var CHECKOUT_PATH = /^\/(?:cs_)?([A-Za-z0-9]{24})$/;
|
|
1340
|
+
var NUMBER = /^[0-9]{12,19}$/;
|
|
1341
|
+
var SECURITY_CODE6 = /^[0-9]{3,4}$/;
|
|
1342
|
+
var TEXT = /^[^\x00-\x1f\x7f]{1,256}$/;
|
|
1343
|
+
var UNDEFINED = "$undefined";
|
|
1344
|
+
var CARD_MEMBER = /^(?:card_?number|pan|cvc|cvv)$/i;
|
|
1345
|
+
var record7 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
1346
|
+
var own = (value, key) => Object.prototype.hasOwnProperty.call(value, key);
|
|
1347
|
+
var keysAre = (value, keys) => {
|
|
1348
|
+
const names = Object.keys(value);
|
|
1349
|
+
return names.length === keys.length && names.every((name, at) => name === keys[at]);
|
|
1350
|
+
};
|
|
1351
|
+
var refuse10 = (code) => Object.freeze({ verdict: "refuse", code });
|
|
1352
|
+
var CARD9 = /* @__PURE__ */ Object.freeze({ verdict: "card" });
|
|
1353
|
+
var CONTINUE4 = /* @__PURE__ */ Object.freeze({ verdict: "continue" });
|
|
1354
|
+
function paymongoCheckoutSession(url) {
|
|
1355
|
+
if (typeof url !== "string" || url.length > URL_LIMIT2 || url.includes("?") || url.includes("#"))
|
|
1356
|
+
return null;
|
|
1357
|
+
let parsed;
|
|
1358
|
+
try {
|
|
1359
|
+
parsed = new URL(url);
|
|
1360
|
+
}
|
|
1361
|
+
catch {
|
|
1362
|
+
return null;
|
|
1363
|
+
}
|
|
1364
|
+
if (parsed.href !== url || parsed.protocol !== "https:" || parsed.port || parsed.username || parsed.password || parsed.hostname !== PAYMONGO_CHECKOUT_HOST)
|
|
1365
|
+
return null;
|
|
1366
|
+
const match = CHECKOUT_PATH.exec(parsed.pathname);
|
|
1367
|
+
return match ? match[1] : null;
|
|
1368
|
+
}
|
|
1369
|
+
function readJson2(body) {
|
|
1370
|
+
if (typeof body !== "string" || body === "")
|
|
1371
|
+
return { parsed: null, exact: false };
|
|
1372
|
+
let parsed;
|
|
1373
|
+
try {
|
|
1374
|
+
parsed = JSON.parse(body);
|
|
1375
|
+
}
|
|
1376
|
+
catch {
|
|
1377
|
+
return { parsed: null, exact: false };
|
|
1378
|
+
}
|
|
1379
|
+
let exact2 = false;
|
|
1380
|
+
try {
|
|
1381
|
+
exact2 = body.length <= BODY_LIMIT6 && JSON.stringify(parsed) === body;
|
|
1382
|
+
}
|
|
1383
|
+
catch {
|
|
1384
|
+
exact2 = false;
|
|
1385
|
+
}
|
|
1386
|
+
return { parsed, exact: exact2 };
|
|
1387
|
+
}
|
|
1388
|
+
function billingValue(value) {
|
|
1389
|
+
if (value === UNDEFINED)
|
|
1390
|
+
return true;
|
|
1391
|
+
if (typeof value !== "string" || !TEXT.test(value))
|
|
1392
|
+
return false;
|
|
1393
|
+
return value[0] !== "$" || value.startsWith("$$");
|
|
1394
|
+
}
|
|
1395
|
+
function judgeCardAttach(args, session) {
|
|
1396
|
+
if (args.length !== 3 || typeof args[0] !== "string" || !args[0].startsWith("cs_") || !SESSION2.test(args[0].slice(3))) {
|
|
1397
|
+
return "paymongo_body_unsupported";
|
|
1398
|
+
}
|
|
1399
|
+
const id = args[0].slice(3);
|
|
1400
|
+
const attributes = args[1].data.attributes;
|
|
1401
|
+
const details = attributes.details;
|
|
1402
|
+
if (record7(details) && CLICK_TO_PAY_KEYS.some((key) => own(details, key)))
|
|
1403
|
+
return "paymongo_click_to_pay";
|
|
1404
|
+
if (!keysAre(args[1], ["data"]) || !keysAre(args[1].data, ["attributes"]) || !keysAre(attributes, PAYMONGO_ATTRIBUTE_KEYS) || !record7(details) || !keysAre(details, PAYMONGO_CARD_KEYS))
|
|
1405
|
+
return "paymongo_body_unsupported";
|
|
1406
|
+
if (typeof details.card_number !== "string" || !NUMBER.test(details.card_number) || !Number.isSafeInteger(details.exp_month) || details.exp_month < 1 || details.exp_month > 12 || !Number.isSafeInteger(details.exp_year) || details.exp_year < 0 || details.exp_year > 99 || typeof details.cvc !== "string" || !SECURITY_CODE6.test(details.cvc))
|
|
1407
|
+
return "paymongo_body_unsupported";
|
|
1408
|
+
const billing = attributes.billing;
|
|
1409
|
+
if (!record7(billing) || !keysAre(billing, PAYMONGO_BILLING_KEYS) || !record7(billing.address) || !keysAre(billing.address, PAYMONGO_ADDRESS_KEYS))
|
|
1410
|
+
return "paymongo_body_unsupported";
|
|
1411
|
+
if (billing.name === UNDEFINED || !billingValue(billing.name) || !billingValue(billing.email) || !billingValue(billing.phone) || !PAYMONGO_ADDRESS_KEYS.every((key) => billingValue(billing.address[key])))
|
|
1412
|
+
return "paymongo_body_unsupported";
|
|
1413
|
+
const third = args[2];
|
|
1414
|
+
if (!record7(third) || !keysAre(third, ["viewerAccept"]) || !billingValue(third.viewerAccept))
|
|
1415
|
+
return "paymongo_body_unsupported";
|
|
1416
|
+
if (attributes.return_url !== `${ORIGIN}${id}` || session !== void 0 && session !== id)
|
|
1417
|
+
return "paymongo_session_mismatch";
|
|
1418
|
+
return null;
|
|
1419
|
+
}
|
|
1420
|
+
function namesCardValue(parsed) {
|
|
1421
|
+
const pending = parsed !== null && typeof parsed === "object" ? [parsed] : [];
|
|
1422
|
+
while (pending.length > 0) {
|
|
1423
|
+
const node = pending.pop();
|
|
1424
|
+
for (const key of Object.keys(node)) {
|
|
1425
|
+
if (!Array.isArray(node) && CARD_MEMBER.test(key))
|
|
1426
|
+
return true;
|
|
1427
|
+
const value = node[key];
|
|
1428
|
+
if (value !== null && typeof value === "object")
|
|
1429
|
+
pending.push(value);
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
return false;
|
|
1433
|
+
}
|
|
1434
|
+
function attachType(parsed) {
|
|
1435
|
+
if (!Array.isArray(parsed) || parsed.length < 2 || !record7(parsed[1]) || !record7(parsed[1].data) || !record7(parsed[1].data.attributes))
|
|
1436
|
+
return null;
|
|
1437
|
+
const type = parsed[1].data.attributes.payment_method_type;
|
|
1438
|
+
return typeof type === "string" ? type : null;
|
|
1439
|
+
}
|
|
1440
|
+
function paymongoBodyVerdict(body, session) {
|
|
1441
|
+
const { parsed, exact: exact2 } = readJson2(body);
|
|
1442
|
+
const type = parsed === null ? null : attachType(parsed);
|
|
1443
|
+
if (type !== "card") {
|
|
1444
|
+
if (parsed === null)
|
|
1445
|
+
return body === void 0 || body === null || body === "" ? CONTINUE4 : refuse10("paymongo_body_unsupported");
|
|
1446
|
+
return namesCardValue(parsed) ? refuse10("paymongo_body_unsupported") : CONTINUE4;
|
|
1447
|
+
}
|
|
1448
|
+
if (!exact2)
|
|
1449
|
+
return refuse10("paymongo_body_unsupported");
|
|
1450
|
+
const code = judgeCardAttach(parsed, session);
|
|
1451
|
+
return code === null ? CARD9 : refuse10(code);
|
|
1452
|
+
}
|
|
1244
1453
|
// src/card-fields.js
|
|
1245
1454
|
function processorGate(recognizer, url, body) {
|
|
1246
1455
|
if (recognizer && recognizer.psp === LYRA_PSP)
|
|
1247
1456
|
return lyraBodyVerdict(body, url);
|
|
1457
|
+
if (recognizer && recognizer.psp === WIX_PAYMENTS_PSP) {
|
|
1458
|
+
if (url !== void 0 && !isWixPaymentsTokenizeUrl(url))
|
|
1459
|
+
return { verdict: "refuse", code: "wix_payments_url_refused" };
|
|
1460
|
+
return wixPaymentsBodyVerdict(body);
|
|
1461
|
+
}
|
|
1248
1462
|
if (recognizer && recognizer.psp === PADDLE_VGS_PSP) {
|
|
1249
1463
|
if (url !== void 0 && !isPaddleVgsCardsUrl(url))
|
|
1250
1464
|
return { verdict: "refuse", code: "paddle_vgs_url_refused" };
|
|
@@ -1261,6 +1475,12 @@ function processorGate(recognizer, url, body) {
|
|
|
1261
1475
|
return { verdict: "refuse", code: "paddle_tokenex_pay_unsupported" };
|
|
1262
1476
|
return paddleTokenexBodyVerdict(body, target ? target.line : void 0);
|
|
1263
1477
|
}
|
|
1478
|
+
if (recognizer && recognizer.psp === PAYMONGO_PSP) {
|
|
1479
|
+
const session = url !== void 0 ? paymongoCheckoutSession(url) : void 0;
|
|
1480
|
+
if (url !== void 0 && session === null)
|
|
1481
|
+
return { verdict: "refuse", code: "paymongo_url_refused" };
|
|
1482
|
+
return paymongoBodyVerdict(body, session);
|
|
1483
|
+
}
|
|
1264
1484
|
if (recognizer && recognizer.psp === GRAVY_PSP)
|
|
1265
1485
|
return gravyBodyVerdict(body);
|
|
1266
1486
|
if (recognizer && recognizer.psp === MONERIS_PSP) {
|
|
@@ -1381,12 +1601,12 @@ var KEEP_ON_FILE_REFUSAL = "Refusing to pay: this Primer payment would keep the
|
|
|
1381
1601
|
var UNSUPPORTED_SDK_REFUSAL = "Refusing to pay: this checkout uses a Primer SDK Agentcard does not support yet. Nothing was sent.";
|
|
1382
1602
|
var NETWORK_MISMATCH_REFUSAL = "Refusing to pay: this Primer payment names a card network that is not your card's. Nothing was sent.";
|
|
1383
1603
|
var FILL_REFUSAL = "Could not fill the card fields for Primer. Nothing was sent.";
|
|
1384
|
-
var
|
|
1604
|
+
var BODY_LIMIT7 = 16384;
|
|
1385
1605
|
var RESPONSE_LIMIT = 32768;
|
|
1386
|
-
var
|
|
1606
|
+
var ROOT_KEYS4 = ["paymentInstrument", "userDescription", "tokenType", "paymentFlow"];
|
|
1387
1607
|
var INSTRUMENT_KEYS = ["number", "cvv", "expirationMonth", "expirationYear", "cardholderName", "preferredNetwork"];
|
|
1388
1608
|
var REQUIRED_INSTRUMENT_KEYS = ["number", "cvv", "expirationMonth", "expirationYear"];
|
|
1389
|
-
var
|
|
1609
|
+
var record8 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
1390
1610
|
var owns5 = (value, key) => Object.prototype.hasOwnProperty.call(value, key);
|
|
1391
1611
|
var exact = (pattern, value) => typeof value === "string" && pattern.exec(value)?.[0] === value;
|
|
1392
1612
|
var text2 = (value, max) => typeof value === "string" && value.length <= max && !/[\u0000-\u001f\u007f]/.test(value);
|
|
@@ -1409,7 +1629,7 @@ function isPrimerTokenizeUrl(url, method = "POST") {
|
|
|
1409
1629
|
return parsed.href === url && parsed.protocol === "https:" && !parsed.port && !parsed.username && !parsed.password && !parsed.search && !parsed.hash && PRIMER_PCI_HOSTS.includes(parsed.hostname) && parsed.pathname === PRIMER_TOKENIZE_PATH;
|
|
1410
1630
|
}
|
|
1411
1631
|
function judgeBody2(body) {
|
|
1412
|
-
if (typeof body !== "string" || body === "" || body.length >
|
|
1632
|
+
if (typeof body !== "string" || body === "" || body.length > BODY_LIMIT7)
|
|
1413
1633
|
return null;
|
|
1414
1634
|
let value;
|
|
1415
1635
|
try {
|
|
@@ -1418,12 +1638,12 @@ function judgeBody2(body) {
|
|
|
1418
1638
|
catch {
|
|
1419
1639
|
return null;
|
|
1420
1640
|
}
|
|
1421
|
-
if (!
|
|
1641
|
+
if (!record8(value) || !roundTrips(value, body))
|
|
1422
1642
|
return null;
|
|
1423
|
-
if (!Object.keys(value).every((key) =>
|
|
1643
|
+
if (!Object.keys(value).every((key) => ROOT_KEYS4.includes(key)) || !owns5(value, "paymentInstrument"))
|
|
1424
1644
|
return null;
|
|
1425
1645
|
const instrument = value.paymentInstrument;
|
|
1426
|
-
if (!
|
|
1646
|
+
if (!record8(instrument) || !Object.keys(instrument).every((key) => INSTRUMENT_KEYS.includes(key)) || !REQUIRED_INSTRUMENT_KEYS.every((key) => owns5(instrument, key)))
|
|
1427
1647
|
return null;
|
|
1428
1648
|
if (!digits(instrument.number, 12, 19) || !digits(instrument.cvv, 3, 4) || !exact(MONTH3, instrument.expirationMonth) || !exact(YEAR3, instrument.expirationYear))
|
|
1429
1649
|
return null;
|
|
@@ -1451,7 +1671,7 @@ var CLIENT_TOKEN = /^[A-Za-z0-9._~+/=-]{16,4096}$/;
|
|
|
1451
1671
|
var REQUEST_ID = /^[A-Za-z0-9-]{1,64}$/;
|
|
1452
1672
|
var API_VERSION = /^2\.[0-9]{1,2}$/;
|
|
1453
1673
|
function readHeaders(headers) {
|
|
1454
|
-
if (!
|
|
1674
|
+
if (!record8(headers))
|
|
1455
1675
|
return null;
|
|
1456
1676
|
const folded = /* @__PURE__ */ new Map();
|
|
1457
1677
|
for (const [name, value] of Object.entries(headers)) {
|
|
@@ -1498,7 +1718,7 @@ function onTokenizePath(url) {
|
|
|
1498
1718
|
}
|
|
1499
1719
|
}
|
|
1500
1720
|
function primerTokenizeRefusal(request) {
|
|
1501
|
-
if (!
|
|
1721
|
+
if (!record8(request) || request.method !== "POST" || !isPrimerTokenizeUrl(request.url))
|
|
1502
1722
|
return "unsupported";
|
|
1503
1723
|
return headersRefusal(request.headers) ?? primerBodyRefusal(request.body);
|
|
1504
1724
|
}
|
|
@@ -1513,7 +1733,7 @@ function primerCardOnFileRefusal(url, options, policy = PRIMER_SESSION_CARD_ON_F
|
|
|
1513
1733
|
return "unsupported";
|
|
1514
1734
|
if (new URL(url).hostname !== LIVE_PCI_HOST)
|
|
1515
1735
|
return null;
|
|
1516
|
-
return primerCardOnFileDisclosure(url, policy) &&
|
|
1736
|
+
return primerCardOnFileDisclosure(url, policy) && record8(options) && options.keepOnFile === true ? null : "keep_on_file";
|
|
1517
1737
|
}
|
|
1518
1738
|
function primerRefusalMessage(reason) {
|
|
1519
1739
|
if (reason === "keep_on_file")
|
|
@@ -1597,7 +1817,7 @@ function readAnswer(body) {
|
|
|
1597
1817
|
return null;
|
|
1598
1818
|
try {
|
|
1599
1819
|
const value = JSON.parse(body);
|
|
1600
|
-
return
|
|
1820
|
+
return record8(value) ? value : null;
|
|
1601
1821
|
}
|
|
1602
1822
|
catch {
|
|
1603
1823
|
return null;
|
|
@@ -1606,16 +1826,16 @@ function readAnswer(body) {
|
|
|
1606
1826
|
var tokenValue = (value) => exact(TOKEN2, value) && !panLike(value);
|
|
1607
1827
|
var optional = (value, key, check) => !owns5(value, key) || value[key] === null || check(value[key]);
|
|
1608
1828
|
function cardDetails(data) {
|
|
1609
|
-
if (!
|
|
1829
|
+
if (!record8(data) || !exact(/^[0-9]{4}$/, data.last4Digits))
|
|
1610
1830
|
return null;
|
|
1611
|
-
if (!optional(data, "first6Digits", (v) => exact(/^[0-9]{6}$/, v)) || !optional(data, "expirationMonth", (v) => exact(RESPONSE_MONTH, v)) || !optional(data, "expirationYear", (v) => exact(RESPONSE_YEAR, v)) || !optional(data, "cardholderName", (v) => plain(v, 256)) || !optional(data, "network", (v) => exact(NETWORK_NAME, v)) || !optional(data, "isNetworkTokenized", (v) => typeof v === "boolean") || !optional(data, "binData",
|
|
1831
|
+
if (!optional(data, "first6Digits", (v) => exact(/^[0-9]{6}$/, v)) || !optional(data, "expirationMonth", (v) => exact(RESPONSE_MONTH, v)) || !optional(data, "expirationYear", (v) => exact(RESPONSE_YEAR, v)) || !optional(data, "cardholderName", (v) => plain(v, 256)) || !optional(data, "network", (v) => exact(NETWORK_NAME, v)) || !optional(data, "isNetworkTokenized", (v) => typeof v === "boolean") || !optional(data, "binData", record8))
|
|
1612
1832
|
return null;
|
|
1613
1833
|
const safe = { last4Digits: data.last4Digits };
|
|
1614
1834
|
for (const key of ["first6Digits", "expirationMonth", "expirationYear", "cardholderName", "network", "isNetworkTokenized"]) {
|
|
1615
1835
|
if (owns5(data, key) && data[key] !== null)
|
|
1616
1836
|
safe[key] = data[key];
|
|
1617
1837
|
}
|
|
1618
|
-
if (
|
|
1838
|
+
if (record8(data.binData)) {
|
|
1619
1839
|
const bin = {};
|
|
1620
1840
|
for (const key of BIN_KEYS) {
|
|
1621
1841
|
if (!owns5(data.binData, key) || data.binData[key] === null)
|
|
@@ -1631,7 +1851,7 @@ function cardDetails(data) {
|
|
|
1631
1851
|
function threeDsSummary(value) {
|
|
1632
1852
|
if (value === void 0 || value === null)
|
|
1633
1853
|
return null;
|
|
1634
|
-
if (!
|
|
1854
|
+
if (!record8(value) || !exact(CODE, value.responseCode) || !optional(value, "reasonCode", (v) => exact(CODE, v)) || !optional(value, "reasonText", (v) => plain(v, 256)) || !optional(value, "protocolVersion", (v) => v === "" || exact(PROTOCOL, v)) || !optional(value, "challengeIssued", (v) => typeof v === "boolean"))
|
|
1635
1855
|
return void 0;
|
|
1636
1856
|
const safe = { responseCode: value.responseCode };
|
|
1637
1857
|
for (const key of ["reasonCode", "reasonText", "protocolVersion", "challengeIssued"]) {
|
|
@@ -1659,7 +1879,7 @@ function rebuildToken(value) {
|
|
|
1659
1879
|
}
|
|
1660
1880
|
function primerErrorId(body) {
|
|
1661
1881
|
const value = readAnswer(body);
|
|
1662
|
-
const id = value &&
|
|
1882
|
+
const id = value && record8(value.error) ? value.error.errorId : null;
|
|
1663
1883
|
return exact(ERROR_ID, id) && !panLike(id) ? id : null;
|
|
1664
1884
|
}
|
|
1665
1885
|
function matchesCard(details, card) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// Generated from @agent-cards/payment-core. Do not edit.
|
|
3
|
-
// artifact-sha256:
|
|
3
|
+
// artifact-sha256: 3e73afac7d2a16c36e81a7ddca5ea143be4880e056cb31558d31d3d4d72d84b1
|
|
4
4
|
// src/deep-freeze.js
|
|
5
5
|
function deepFreeze(value) {
|
|
6
6
|
if (value && typeof value === "object" && !Object.isFrozen(value)) {
|
|
@@ -1660,6 +1660,61 @@ var PROCESSOR_DEFINITIONS = deepFreeze([
|
|
|
1660
1660
|
passthroughHeaders: [],
|
|
1661
1661
|
jsonCardFields: [["paymentForm", "pan"]],
|
|
1662
1662
|
passWithoutCard: "api(?:\\.payzen\\.eu|\\.systempay\\.fr|-sogecommerce\\.societegenerale\\.eu|\\.lyra\\.com)/api-payment/V4/Charge/Public/ProcessPayment/2(?:;jsessionid=[A-Za-z0-9._-]{1,128})?"
|
|
1663
|
+
},
|
|
1664
|
+
{
|
|
1665
|
+
psp: "wix_payments",
|
|
1666
|
+
// Wix Cashier's card frame (cashier-pci.wixapps.net/card-form), which every Wix checkout mounts: for
|
|
1667
|
+
// Wix Payments and classic Stripe on Wix it posts the card as one JSON body to Wix's own tokenizer,
|
|
1668
|
+
// under the site's signed app instance. PAN@ creditCard.number, CVV@ cvv at the root, the expiry as
|
|
1669
|
+
// creditCard.expiration.month and .year (numbers, the year in four digits). wix-payments.js holds the
|
|
1670
|
+
// request rule the pause decision, the API's create, the prepared bind and the device all read: exactly
|
|
1671
|
+
// this URL (never /v2/credit-cards, which saves a card, or a saved card's token URL), a JSON
|
|
1672
|
+
// Content-Type, the instance, and the frame's body byte for byte. Wix's payment widget fails the
|
|
1673
|
+
// payment 30 seconds after it asks the frame for a token, so the lane is prepared only
|
|
1674
|
+
// (preparationRequired): the cardholder approves before the agent clicks Pay. The tokenizer answers no
|
|
1675
|
+
// browser origin, so the card leaves the cardholder's device only through the checkout relay. Wix's
|
|
1676
|
+
// other headers ride beside the instance, as the frame sends them. No sandbox host: a Wix site in test
|
|
1677
|
+
// mode answers inside the frame with a fake token and sends nothing, so the lane takes production only,
|
|
1678
|
+
// and the API refuses a test-mode client before any row (wix-payments.js wixPaymentsMerchantRefusal).
|
|
1679
|
+
// Ships dark: served only to a client that declares `wix_payments_tokenize`, gated off for every org
|
|
1680
|
+
// until an operator lists one (`wix_payments:<org>`), and autopilot never sends this request
|
|
1681
|
+
// (autopilot.js DEVICE_REPLAY_REFUSED_OPERATIONS).
|
|
1682
|
+
capability: "wix_payments_tokenize",
|
|
1683
|
+
match: "cashier-pci\\.wixapps\\.net/_api/payment-gateway-web/tokenize/v2/tokens",
|
|
1684
|
+
hosts: ["^cashier-pci\\.wixapps\\.net$"],
|
|
1685
|
+
preparationRequired: true,
|
|
1686
|
+
encoding: "json",
|
|
1687
|
+
passthroughHeaders: ["^authorization$", "^x-wix-client-artifact-id$", "^commonconfig$", "^x-wix-brand$", "^consent-policy$", "^x-wix-linguist$"]
|
|
1688
|
+
},
|
|
1689
|
+
{
|
|
1690
|
+
psp: "paymongo",
|
|
1691
|
+
// PayMongo's hosted checkout (Philippines) at checkout.paymongo.com/<session>, which every PayMongo
|
|
1692
|
+
// payment link, Storefront page, Shopify hosted app, WooCommerce hosted plugin and Checkout Session
|
|
1693
|
+
// API opens. The card form's Pay click runs the page's Next.js Server Action attachCheckout: a POST
|
|
1694
|
+
// to the page's own URL under its Next-Action id, Accept text/x-component, the body React's
|
|
1695
|
+
// encodeReply writes as text/plain: [session, {data: {attributes: {payment_method_type: "card",
|
|
1696
|
+
// details: {card_number, exp_month, exp_year, cvc}, billing, return_url}}}, {viewerAccept}].
|
|
1697
|
+
// Unencrypted. The request names no amount: the session bound its line items (always PHP) when the
|
|
1698
|
+
// merchant created it. paymongo.js holds the rule the pause decision reads: the exact URL, the Server
|
|
1699
|
+
// Action's headers, and the card form's attach for that URL's session, key by key, with a Click to Pay
|
|
1700
|
+
// attach and any other card shape refused. Every other action of the page (polling, fees, another
|
|
1701
|
+
// method's attach) carries no card on the same URL and continues untouched (passWithoutCard). Next
|
|
1702
|
+
// refuses an action whose Origin names another host, and the page answers no other origin's preflight,
|
|
1703
|
+
// so the card leaves only through the checkout relay. 3-D Secure follows the answer on
|
|
1704
|
+
// secure-authentication.paymongo.com with no card. Test mode and live mode share the host (a session's
|
|
1705
|
+
// livemode, not its host, separates them), so no sandbox host is marked.
|
|
1706
|
+
// Ships dark: served only to a client that declares `paymongo_checkout_pay`, gated off for every org
|
|
1707
|
+
// until an operator lists one (`paymongo:<org>`), and autopilot never sends this request
|
|
1708
|
+
// (autopilot.js DEVICE_REPLAY_REFUSED_OPERATIONS).
|
|
1709
|
+
capability: "paymongo_checkout_pay",
|
|
1710
|
+
match: "checkout\\.paymongo\\.com/(?:cs_)?[A-Za-z0-9]{24}",
|
|
1711
|
+
hosts: ["^checkout\\.paymongo\\.com$"],
|
|
1712
|
+
encoding: "json",
|
|
1713
|
+
// Next answers a Server Action only under its id, renders with the page's router state, and the page
|
|
1714
|
+
// reads the answer only as an RSC stream. Origin, Referer and cookies never ride (none is needed).
|
|
1715
|
+
passthroughHeaders: ["^next-action$", "^next-router-state-tree$", "^accept$"],
|
|
1716
|
+
jsonCardFields: [[1, "data", "attributes", "details", "card_number"]],
|
|
1717
|
+
passWithoutCard: "checkout\\.paymongo\\.com/(?:cs_)?[A-Za-z0-9]{24}"
|
|
1663
1718
|
}
|
|
1664
1719
|
]);
|
|
1665
1720
|
var PSP_RECOGNIZERS = deepFreeze(PROCESSOR_DEFINITIONS.map(({ compose, encryptedCardFields, deviceSteps, deviceEncrypt, ...definition }) => definition));
|
|
@@ -1782,6 +1837,19 @@ var PAYFAST_PAY_HOSTS = /* @__PURE__ */ Object.freeze({
|
|
|
1782
1837
|
production: Object.freeze(["payment.payfast.io", "www.payfast.co.za"]),
|
|
1783
1838
|
sandbox: Object.freeze(["sandbox.payfast.co.za"])
|
|
1784
1839
|
});
|
|
1840
|
+
var PAYFAST_BODY_KEYS = /* @__PURE__ */ Object.freeze([
|
|
1841
|
+
"card_number",
|
|
1842
|
+
"cardholder_name",
|
|
1843
|
+
"consent_check",
|
|
1844
|
+
"cvv",
|
|
1845
|
+
"expiry_month",
|
|
1846
|
+
"expiry_year",
|
|
1847
|
+
"g-recaptcha-response",
|
|
1848
|
+
"captcha_version",
|
|
1849
|
+
"captcha_action"
|
|
1850
|
+
]);
|
|
1851
|
+
var CAPTCHA_ANSWER = "g-recaptcha-response";
|
|
1852
|
+
var UNANSWERED_KEYS = /* @__PURE__ */ Object.freeze(PAYFAST_BODY_KEYS.filter((key) => key !== CAPTCHA_ANSWER));
|
|
1785
1853
|
// src/rsa-pkcs1v15.js
|
|
1786
1854
|
var TYPED_ARRAY = Object.getPrototypeOf(Uint8Array.prototype);
|
|
1787
1855
|
var typedArrayName = Object.getOwnPropertyDescriptor(TYPED_ARRAY, Symbol.toStringTag).get;
|
|
@@ -1817,6 +1885,16 @@ var LYRA_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
|
|
|
1817
1885
|
hosts: Object.freeze(["api.systempay.fr"])
|
|
1818
1886
|
})
|
|
1819
1887
|
]);
|
|
1888
|
+
// src/wix-payments.js
|
|
1889
|
+
var pin3 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]) });
|
|
1890
|
+
var WIX_PAYMENTS_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
|
|
1891
|
+
pin3({ id: "parahouse_magazine", merchant: "ParaHouse Magazine", origins: ["https://www.parahousemagazine.com"] }),
|
|
1892
|
+
pin3({ id: "psalms_and_potions", merchant: "Psalms & Potions", origins: ["https://www.psalmsandpotions.com"] }),
|
|
1893
|
+
pin3({ id: "alexandra_hagel", merchant: "Alexandra Hagel, LLC", origins: ["https://www.alexandrahagel.com"] })
|
|
1894
|
+
]);
|
|
1895
|
+
// src/paymongo.js
|
|
1896
|
+
var PAYMONGO_CHECKOUT_HOST = "checkout.paymongo.com";
|
|
1897
|
+
var ORIGIN = `https://${PAYMONGO_CHECKOUT_HOST}/`;
|
|
1820
1898
|
// src/cybersource-secure-acceptance.js
|
|
1821
1899
|
var SA_BODY_LIMIT = 32 * 1024;
|
|
1822
1900
|
var SA_REPLY_LIMIT = 64 * 1024;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare var WIX_PAYMENTS_PSP: string;
|
|
2
|
+
declare var WIX_PAYMENTS_CAPABILITY: string;
|
|
3
|
+
declare var WIX_PAYMENTS_OPERATION: string;
|
|
4
|
+
declare var WIX_PAYMENTS_HOST: string;
|
|
5
|
+
declare var WIX_PAYMENTS_TOKENIZE_URL: string;
|
|
6
|
+
declare var WIX_PAYMENTS_REFUSAL_CODES: readonly string[];
|
|
7
|
+
declare function isWixPaymentsTokenizeUrl(url: any): boolean;
|
|
8
|
+
declare function wixPaymentsBodyVerdict(body: any): Readonly<{
|
|
9
|
+
verdict: "refuse";
|
|
10
|
+
code: any;
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
verdict: "card";
|
|
13
|
+
}>;
|
|
14
|
+
declare function wixPaymentsRequestRefusal(request: any): any;
|
|
15
|
+
declare function isPreparedWixPaymentsRequest(url: any, method: any, body: any, environment: any, headers: any): boolean;
|
|
16
|
+
declare var WIX_PAYMENTS_MERCHANT_PINS: readonly any[];
|
|
17
|
+
declare function wixPaymentsMerchantPin(merchantOrigin: any, pins?: readonly any[]): any;
|
|
18
|
+
declare function wixPaymentsMerchantRefusal(environment: any, merchantOrigin: any, pins?: readonly any[]): "unsupported_environment" | "wix_payments_merchant_unreviewed" | null;
|
|
19
|
+
declare function wixPaymentsRefusalMessage(code: any): any;
|
|
20
|
+
declare function injectWixPaymentsCard(body: any, card: any): {
|
|
21
|
+
body: string;
|
|
22
|
+
where: string[];
|
|
23
|
+
};
|
|
24
|
+
declare function isWixPaymentsDeviceRequest(templateBody: any, deviceBody: any): boolean;
|
|
25
|
+
declare function wixPaymentsRefusalCode(text: any): string | null;
|
|
26
|
+
declare function wixPaymentsAnswerOutcome(status: any, text: any, card: any): {
|
|
27
|
+
outcome: string;
|
|
28
|
+
reason: string;
|
|
29
|
+
code?: undefined;
|
|
30
|
+
body?: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
outcome: string;
|
|
33
|
+
code: string;
|
|
34
|
+
reason?: undefined;
|
|
35
|
+
body?: undefined;
|
|
36
|
+
} | {
|
|
37
|
+
outcome: string;
|
|
38
|
+
body: string;
|
|
39
|
+
reason?: undefined;
|
|
40
|
+
code?: undefined;
|
|
41
|
+
};
|
|
42
|
+
export { WIX_PAYMENTS_CAPABILITY, WIX_PAYMENTS_HOST, WIX_PAYMENTS_MERCHANT_PINS, WIX_PAYMENTS_OPERATION, WIX_PAYMENTS_PSP, WIX_PAYMENTS_REFUSAL_CODES, WIX_PAYMENTS_TOKENIZE_URL, injectWixPaymentsCard, isPreparedWixPaymentsRequest, isWixPaymentsDeviceRequest, isWixPaymentsTokenizeUrl, wixPaymentsAnswerOutcome, wixPaymentsBodyVerdict, wixPaymentsMerchantPin, wixPaymentsMerchantRefusal, wixPaymentsRefusalCode, wixPaymentsRefusalMessage, wixPaymentsRequestRefusal };
|