@agent-cards/sdk 0.23.21 → 0.23.23

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 (56) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/PREFLIGHT.md +4 -0
  3. package/README.md +53 -4
  4. package/dist/aci.generated.js +3 -3
  5. package/dist/agent-amount.generated.d.ts +7 -0
  6. package/dist/agent-amount.generated.js +3 -0
  7. package/dist/amadeus-checkout.generated.d.ts +6 -1
  8. package/dist/amadeus-checkout.generated.js +26 -2
  9. package/dist/capabilities.generated.d.ts +2 -0
  10. package/dist/capabilities.generated.js +3 -0
  11. package/dist/card-fields.generated.js +2574 -186
  12. package/dist/cdp.js +103 -29
  13. package/dist/client.d.ts +130 -9
  14. package/dist/client.js +304 -115
  15. package/dist/creditguard.generated.js +4 -2
  16. package/dist/cse-body.js +11 -0
  17. package/dist/ebanx.d.ts +1 -1
  18. package/dist/ebanx.js +1 -1
  19. package/dist/eximbay.d.ts +46 -0
  20. package/dist/eximbay.js +69 -0
  21. package/dist/hosted-entry.js +2 -1
  22. package/dist/hosted-form.d.ts +5 -0
  23. package/dist/hosted-form.js +5 -0
  24. package/dist/lifecycle.d.ts +9 -4
  25. package/dist/lifecycle.js +16 -4
  26. package/dist/paygent.generated.d.ts +60 -0
  27. package/dist/paygent.generated.js +425 -0
  28. package/dist/payrexx.d.ts +91 -0
  29. package/dist/payrexx.generated.d.ts +91 -0
  30. package/dist/payrexx.generated.js +536 -0
  31. package/dist/payrexx.js +141 -0
  32. package/dist/paytrail.d.ts +58 -0
  33. package/dist/paytrail.js +98 -0
  34. package/dist/pre-claim.d.ts +27 -0
  35. package/dist/pre-claim.js +175 -20
  36. package/dist/prepared-processor.d.ts +7 -2
  37. package/dist/prepared-processor.js +16 -2
  38. package/dist/primer.generated.js +2709 -321
  39. package/dist/registry.d.ts +4 -3
  40. package/dist/registry.js +12 -4
  41. package/dist/sbps.d.ts +57 -0
  42. package/dist/sbps.generated.d.ts +96 -0
  43. package/dist/sbps.generated.js +427 -0
  44. package/dist/sbps.js +90 -0
  45. package/dist/stripe-checkout.generated.js +744 -27
  46. package/dist/toast-seal.generated.d.ts +37 -0
  47. package/dist/toast-seal.generated.js +625 -0
  48. package/dist/toast.generated.d.ts +41 -0
  49. package/dist/toast.generated.js +113 -0
  50. package/dist/transbank.d.ts +33 -0
  51. package/dist/transbank.js +62 -0
  52. package/dist/url-mask-parts.d.ts +24 -0
  53. package/dist/url-mask-parts.js +22 -0
  54. package/dist/url-masks.generated.d.ts +3 -0
  55. package/dist/url-masks.generated.js +2 -0
  56. package/package.json +4 -4
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
2
  // Generated from @agent-cards/payment-core. Do not edit.
3
- // artifact-sha256: 7544ef9813a4b2b55031179301878be4c74d1f1363eacca7552d7ba0f5bb4843
3
+ // artifact-sha256: 7d433d016a6cb47bb9d1cf22ab63bf41d3d67091d68a23e2d3c8885dbfa98b43
4
4
  // src/deep-freeze.js
5
5
  function deepFreeze(value) {
6
6
  if (value && typeof value === "object" && !Object.isFrozen(value)) {
@@ -10,6 +10,158 @@ function deepFreeze(value) {
10
10
  }
11
11
  return value;
12
12
  }
13
+ // src/registration.js
14
+ var PARTS = { psp: "id", definitions: "list", refusedOperations: "list", settlementReadback: "any", exactUrl: "rule", bodyGate: "rule", amount: "rule" };
15
+ var PSP_ID = /^[a-z][a-z0-9_]*$/;
16
+ var registrationProblems = (spec) => problemsOf(spec, PARTS);
17
+ function problemsOf(spec, parts) {
18
+ if (!spec || typeof spec !== "object")
19
+ return ["a registration is an object"];
20
+ const psp = spec.psp;
21
+ if (typeof psp !== "string" || !PSP_ID.test(psp))
22
+ return [`${JSON.stringify(psp)} is not a processor id`];
23
+ const problems2 = Object.keys(spec).filter((key) => !(key in parts)).map((key) => `${psp}: ${key} is no registration part`);
24
+ for (const [key, kind] of Object.entries(parts)) {
25
+ const value = spec[key];
26
+ if (value === void 0)
27
+ continue;
28
+ if (kind === "rule" && typeof value !== "function")
29
+ problems2.push(`${psp}: ${key} is not a function`);
30
+ if (kind === "numbers" && !((Array.isArray(value) || value instanceof Set) && [...value].every((n) => typeof n === "string" && /^\d{12,19}$/.test(n)))) {
31
+ problems2.push(`${psp}: ${key} is not a list of card numbers`);
32
+ }
33
+ }
34
+ if ("definitions" in parts) {
35
+ if (!Array.isArray(spec.definitions) || spec.definitions.length === 0)
36
+ problems2.push(`${psp}: names no definition`);
37
+ else if (spec.definitions.some((definition) => definition?.psp !== psp))
38
+ problems2.push(`${psp}: a definition names another processor`);
39
+ for (const id of spec.refusedOperations ?? []) {
40
+ if (typeof id !== "string" || !id.startsWith(`${psp}.`))
41
+ problems2.push(`${psp}: ${JSON.stringify(id)} is not one of its operations`);
42
+ }
43
+ }
44
+ return problems2;
45
+ }
46
+ function registered(spec, parts) {
47
+ const problems2 = problemsOf(spec, parts);
48
+ if (problems2.length)
49
+ throw new Error(`payment-core registration refused: ${problems2.join("; ")}`);
50
+ return deepFreeze({ ...spec });
51
+ }
52
+ function registerProcessor(spec) {
53
+ return registered(spec, PARTS);
54
+ }
55
+ // src/processors/midtrans.js
56
+ var MIDTRANS_PSP = "midtrans";
57
+ var MIDTRANS_OPERATION = "midtrans.card_request";
58
+ var MIDTRANS_TOKEN_URL = "https://api.midtrans.com/v2/token";
59
+ var MIDTRANS_SANDBOX_TOKEN_URL = "https://api.sandbox.midtrans.com/v2/token";
60
+ var MIDTRANS_TOKEN_KEYS = /* @__PURE__ */ Object.freeze(["card_cvv", "card_number", "card_exp_month", "card_exp_year", "installment_term"]);
61
+ var BODY_LIMIT = 4096;
62
+ var CARD_NUMBER = /^[0-9]{12,19}$/;
63
+ var SECURITY_CODE = /^[0-9]{3,4}$/;
64
+ var MONTH = /^(?:0[1-9]|1[0-2])$/;
65
+ var YEAR = /^20[0-9]{2}$/;
66
+ var TERM = /^[0-9]{1,3}$/;
67
+ var record = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
68
+ var own = (value, key) => Object.prototype.hasOwnProperty.call(value, key);
69
+ var inOrder = (value, keys) => {
70
+ let at = 0;
71
+ for (const name of Object.keys(value)) {
72
+ while (at < keys.length && keys[at] !== name)
73
+ at += 1;
74
+ if (at === keys.length)
75
+ return false;
76
+ at += 1;
77
+ }
78
+ return true;
79
+ };
80
+ var refuse = (code) => Object.freeze({ verdict: "refuse", code });
81
+ var CARD = /* @__PURE__ */ Object.freeze({ verdict: "card" });
82
+ function isMidtransTokenUrl(url) {
83
+ return url === MIDTRANS_TOKEN_URL || url === MIDTRANS_SANDBOX_TOKEN_URL;
84
+ }
85
+ function readBody(body) {
86
+ if (typeof body !== "string" || body === "" || body.length > BODY_LIMIT)
87
+ return null;
88
+ let value;
89
+ try {
90
+ value = JSON.parse(body);
91
+ if (!record(value) || JSON.stringify(value) !== body)
92
+ return null;
93
+ }
94
+ catch {
95
+ return null;
96
+ }
97
+ return value;
98
+ }
99
+ function midtransBodyVerdict(body) {
100
+ const value = readBody(body);
101
+ if (value === null || !inOrder(value, MIDTRANS_TOKEN_KEYS)) {
102
+ if (record(value) && (own(value, "token_id") || own(value, "two_click")) && !own(value, "card_number"))
103
+ return refuse("midtrans_saved_card");
104
+ return refuse("midtrans_body_unsupported");
105
+ }
106
+ if (!own(value, "card_cvv") || !own(value, "card_number") || !own(value, "card_exp_month") || !own(value, "card_exp_year")) {
107
+ return refuse("midtrans_body_unsupported");
108
+ }
109
+ if (typeof value.card_cvv !== "string" || !SECURITY_CODE.test(value.card_cvv) || typeof value.card_number !== "string" || !CARD_NUMBER.test(value.card_number) || typeof value.card_exp_month !== "string" || !MONTH.test(value.card_exp_month) || typeof value.card_exp_year !== "string" || !YEAR.test(value.card_exp_year))
110
+ return refuse("midtrans_body_unsupported");
111
+ if (own(value, "installment_term") && (typeof value.installment_term !== "string" || !TERM.test(value.installment_term)))
112
+ return refuse("midtrans_body_unsupported");
113
+ return CARD;
114
+ }
115
+ var midtrans_default = /* @__PURE__ */ registerProcessor({
116
+ psp: MIDTRANS_PSP,
117
+ definitions: [
118
+ {
119
+ psp: "midtrans",
120
+ // Snap's token request, as the header above reads it. Sandbox has its own host, so the device sends a
121
+ // test-mode request only Midtrans' documented test cards (hostEnvironmentPinned, device-replay.js S7).
122
+ // Ships dark: served only to a client that declares `midtrans_card_token`, gated off for every org until an
123
+ // operator lists one (`midtrans:<org>`), and the backend's gate serves only Agentcard's own company until the
124
+ // token's publishable key is bound to the merchant (backend config.ts MIDTRANS_KEY_BOUND_TO_MERCHANT).
125
+ capability: "midtrans_card_token",
126
+ match: "api\\.(?:sandbox\\.)?midtrans\\.com/v2/token",
127
+ hosts: ["^api\\.midtrans\\.com$", "^api\\.sandbox\\.midtrans\\.com$"],
128
+ sandboxHosts: ["^api\\.sandbox\\.midtrans\\.com$"],
129
+ hostEnvironmentPinned: true,
130
+ encoding: "json",
131
+ // Snap's own headers: the publishable client key (Authorization Basic) and X-Service. Origin, Referer and
132
+ // cookies never ride.
133
+ passthroughHeaders: ["^authorization$", "^x-service$"],
134
+ jsonCardFields: [["card_number"]]
135
+ }
136
+ ],
137
+ // Only the cardholder's device sends a token, after a person approves; no reviewed list names midtrans.
138
+ refusedOperations: [MIDTRANS_OPERATION],
139
+ // Not surveyed: the token moves no money, and the merchant's own charge names its status by the order id alone.
140
+ settlementReadback: "not_surveyed",
141
+ exactUrl: isMidtransTokenUrl,
142
+ bodyGate: (url, body) => url !== void 0 && !isMidtransTokenUrl(url) ? { verdict: "refuse", code: "midtrans_url_refused" } : midtransBodyVerdict(body)
143
+ });
144
+ // src/processors/index.generated.js
145
+ var REGISTERED_MODULES = Object.freeze({
146
+ midtrans: midtrans_default
147
+ });
148
+ // src/registry.js
149
+ var REGISTERED_PROCESSORS = Object.values(REGISTERED_MODULES);
150
+ var ids = REGISTERED_PROCESSORS.map((processor) => processor.psp);
151
+ var problems = REGISTERED_PROCESSORS.flatMap(registrationProblems);
152
+ for (const [name, processor] of Object.entries(REGISTERED_MODULES)) {
153
+ if (processor.psp !== name)
154
+ problems.push(`processors/${name}.js registers ${JSON.stringify(processor.psp)}`);
155
+ }
156
+ if (ids.some((id, i) => i > 0 && ids[i - 1] >= id))
157
+ problems.push(`registered processors out of id order: ${ids.join(", ")}`);
158
+ if (problems.length)
159
+ throw new Error(`payment-core registry refused: ${problems.join("; ")}`);
160
+ var BY_PSP = new Map(REGISTERED_PROCESSORS.map((processor) => [processor.psp, processor]));
161
+ var REGISTERED_IDS = Object.freeze(ids);
162
+ var REGISTERED_DEFINITIONS = Object.freeze(REGISTERED_PROCESSORS.flatMap((processor) => processor.definitions));
163
+ var REGISTERED_REFUSED_OPERATIONS = Object.freeze(REGISTERED_PROCESSORS.flatMap((processor) => processor.refusedOperations ?? []));
164
+ var REGISTERED_SETTLEMENT_READBACK = Object.freeze(REGISTERED_PROCESSORS.filter((processor) => processor.settlementReadback !== void 0).map((processor) => [processor.psp, processor.settlementReadback]));
13
165
  // src/definitions.js
14
166
  var PROCESSOR_DEFINITIONS = deepFreeze([
15
167
  {
@@ -563,8 +715,9 @@ var PROCESSOR_DEFINITIONS = deepFreeze([
563
715
  // posts the card there in that same session, and the runtime resolves the paused navigation with the
564
716
  // hosted_form notice. Only the entry path is matched, exactly (processors/paytrail.js isPaytrailEntryUrl:
565
717
  // a query would reach Paytrail's server beside the signed body). The card page and its card, wallet and
566
- // card-number lookups live on Payment Highway's host, which no recognizer takes; the SDK's pause, a later
567
- // change, refuses them in the agent's browser, so no dummy card reaches Payment Highway. The entry names no amount: Paytrail
718
+ // card-number lookups live on Payment Highway's host, which no recognizer takes: it is an abort host, armed in
719
+ // the SDK's adapters so the SDK's Paytrail gate refuses every card request the agent's browser sends there,
720
+ // and no dummy card reaches Payment Highway. The entry names no amount: Paytrail
568
721
  // holds it, so the cardholder approves the agent's amount and the device holds it to the amount the card
569
722
  // page names. Paytrail's public test merchant shares this host, so the host marks no environment. Dark:
570
723
  // served only to a client that declares the capability, and gated off for every org the operator has not
@@ -572,6 +725,9 @@ var PROCESSOR_DEFINITIONS = deepFreeze([
572
725
  capability: "paytrail_hosted_payment_page",
573
726
  match: "services\\.paytrail\\.com/payments/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/click-to-pay/loading-and-redirect",
574
727
  hosts: ["^services\\.paytrail\\.com$"],
728
+ // Payment Highway's live host (processors/paytrail.js PAYMENT_HIGHWAY_HOSTS), which no recognizer takes: an SDK that
729
+ // declares the capability arms it so its gate can refuse the card posts the agent's browser sends there.
730
+ abortHosts: ["^v1\\.api\\.paymenthighway\\.io$"],
575
731
  encoding: "form",
576
732
  passthroughHeaders: [],
577
733
  mode: "hosted_form",
@@ -615,12 +771,12 @@ var PROCESSOR_DEFINITIONS = deepFreeze([
615
771
  // navigation with the hosted_form notice. Only the entry path is matched, exactly (processors/eximbay.js
616
772
  // isEximbayEntryUrl: a query would reach Eximbay's servlet as fields beside the signed body). The window's
617
773
  // card lookup (checkCardBin.do) and its card post (checkApprv.jsp) carry a card and are never paused, and
618
- // the agent's browser never loads the window while the entry waits. No SDK gate refuses those two posts
619
- // in the agent's browser yet (checkout/src/pre-claim.ts holds Redsys's and NMI's, none for Eximbay), and
620
- // until one does the SDK does not declare this capability. Eximbay's test host serves the same window
621
- // for test merchants, so a live row reaches the live host only and a test row the test host only. Dark:
622
- // served only to a client that declares the capability, and gated off for every org the operator has not
623
- // allowlisted.
774
+ // the agent's browser never loads the window while the entry waits. The SDK's Eximbay gate refuses those
775
+ // two posts in the agent's browser, with every other post to these hosts but the entry
776
+ // (checkout/src/pre-claim.ts eximbayPreClaim), so no dummy card reaches Eximbay. Eximbay's test host serves
777
+ // the same window for test merchants, so a live row reaches the live host only and a test row the test host
778
+ // only. Dark: served only to a client that declares the capability, and gated off for every org the operator
779
+ // has not allowlisted.
624
780
  capability: "eximbay_hosted_payment_page",
625
781
  match: "secureapi\\.(?:test\\.)?eximbay\\.com/Gateway/BasicProcessor\\.krp",
626
782
  hosts: ["^secureapi\\.eximbay\\.com$", "^secureapi\\.test\\.eximbay\\.com$"],
@@ -2120,13 +2276,14 @@ var PROCESSOR_DEFINITIONS = deepFreeze([
2120
2276
  // approves. paygent.js holds the rule the pause decision and the device read: the exact URL, the
2121
2277
  // script's content type, and createToken's seven keys in its order and spelling with the token key
2122
2278
  // held to the host's environment; createCvcToken (a stored card's code) is refused. The script
2123
- // abandons the XHR after 35 s; the preparation that moves the approval before the press comes with
2124
- // the API's Paygent change, which sets `preparationRequired` with it.
2279
+ // abandons the XHR after 35 s, too soon for an approval after the press that sends it, so the
2280
+ // lane is prepared only (`preparationRequired`): the cardholder approves before the press, and the
2281
+ // press's request binds that approval (paygent.js isPreparedPaygentRequest). On the live host it
2282
+ // binds only the merchant_id a reviewed pin lists for the approved origin and merchant
2283
+ // (PAYGENT_MERCHANT_PINS), and one approval binds one request, so a second card request is sent nowhere.
2125
2284
  // Paygent's hosted payment page (link.paygent.co.jp) carries the card on other paths and is not paused.
2126
2285
  // Paygent answers a refused card inside HTTP 200, so its own judge reads every answer by its body
2127
- // (paygent.js paygentAnswerOutcome), never the shared status rule. No operator lists an org before the
2128
- // API's Paygent change lands: the amount the request does not name, the merchant pin per checkout
2129
- // origin, the refusal of a second card request on one checkout, and the preparation for the 35 s window.
2286
+ // (paygent.js paygentAnswerOutcome), never the shared status rule.
2130
2287
  // Ships dark: served only to a client that declares `paygent_token`, gated off for every org until an
2131
2288
  // operator lists one (`paygent:<org>`), and autopilot never sends this request (autopilot.js
2132
2289
  // DEVICE_REPLAY_REFUSED_OPERATIONS). The environment is pinned (S7): sandbox.paygent.co.jp only on
@@ -2136,6 +2293,7 @@ var PROCESSOR_DEFINITIONS = deepFreeze([
2136
2293
  hosts: ["^token\\.paygent\\.co\\.jp$", "^sandbox\\.paygent\\.co\\.jp$"],
2137
2294
  sandboxHosts: ["^sandbox\\.paygent\\.co\\.jp$"],
2138
2295
  hostEnvironmentPinned: true,
2296
+ preparationRequired: true,
2139
2297
  // The body's shape is a form's (key=value pairs); its wire type stays the script's text/plain
2140
2298
  // (request-policy.js contentTypeFor). No header but the content type rides.
2141
2299
  encoding: "form",
@@ -2544,7 +2702,333 @@ var PROCESSOR_DEFINITIONS = deepFreeze([
2544
2702
  "^recaptcha-token$",
2545
2703
  "^recaptcha-type$"
2546
2704
  ]
2547
- }
2705
+ },
2706
+ {
2707
+ psp: "cardcom",
2708
+ // Cardcom (Israel), whose own payment page (https://secure.cardcom.solutions/EA/EA5/<page id>, Cardcom's Vue app)
2709
+ // posts the whole page state on Process, as same-origin JSON, to https://secure.cardcom.solutions/api/EA5/SubmitPayment:
2710
+ // the bot check's token, the page's seven stores and a 3-D Secure block. The card sits in clear text twice,
2711
+ // Store.PaymentStore.{CardNumberField, MonthsField, YearsField, CvvField, CardOwnerNameField}.Value and
2712
+ // _3DSecureReq.{CardNumber, CardExpireMonth, CardExpireYear, CVV, CardholderFullName}; the page id, the terminal and
2713
+ // the amount ride beside it. cardcom.js holds the request rule the pause decision, the API's create and the device
2714
+ // all read: exactly that URL, the page's one JSON Content-Type, and the page's own body for a one-time charge of one
2715
+ // product, its two copies of the card the same; a standing order, installments, a kept card, 3-D Secure, an
2716
+ // Israeli ID and a Turnstile or reCAPTCHA v2 page are refused by name. The endpoint answers any browser origin, so
2717
+ // the device sends it by a direct fetch, with no cookie, and the bot check's token rides inside the paused body as
2718
+ // the person's press minted it. Cardcom's test terminal shares the live host, so no sandbox host is marked and the
2719
+ // lane takes live rows alone, each under a reviewed page pin (cardcom.js cardcomMerchantRefusal). Cardcom answers
2720
+ // inside HTTP 200 whether it charged or not, so its own judge reads every answer (cardcom.js cardcomAnswerOutcome).
2721
+ // The LowProfile pages' /api/LPC6/SubmitPayment, the wallets' posts and the legacy EA4 pages are not this lane's.
2722
+ // Ships dark: served only to a client that declares `cardcom_payment_page`, gated off for every org until an
2723
+ // operator lists one (`cardcom:<org>`), and autopilot never sends this request (autopilot.js
2724
+ // DEVICE_REPLAY_REFUSED_OPERATIONS). `(?![\w/.%-])` ends the path for a consumer that tests `match` unanchored.
2725
+ capability: "cardcom_payment_page",
2726
+ match: "secure\\.cardcom\\.solutions/api/EA5/SubmitPayment(?![\\w/.%-])",
2727
+ hosts: ["^secure\\.cardcom\\.solutions$"],
2728
+ encoding: "json",
2729
+ // The device writes the JSON Content-Type itself; Origin, Referer and the page's cookies never ride.
2730
+ passthroughHeaders: [],
2731
+ jsonCardFields: [["Store", "PaymentStore", "CardNumberField", "Value"], ["_3DSecureReq", "CardNumber"]]
2732
+ },
2733
+ {
2734
+ psp: "nexi_checkout",
2735
+ // Nexi Checkout (formerly Nets Easy; Denmark, Norway, Sweden, Finland), which takes the card in its own card frame,
2736
+ // https://checkout.dibspayment.eu/v1/, embedded in the merchant's page by checkout.js or mounted by Nexi's hosted
2737
+ // payment page. On Pay the frame posts the card in clear JSON to its own origin, https://checkout.dibspayment.eu/
2738
+ // api/v1/pay, with the merchant's checkout key and the payment's id as headers: paymentType.card.cardNumber,
2739
+ // expiryMonth (MM), expiryYear (YY), cardVerificationCode and cardholderName, beside the payment's amount in minor
2740
+ // units, the card fee and the "save my card" and "remember me" flags. nexi-checkout.js holds the request rule the
2741
+ // pause decision, the API's create and the device all read: exactly the pay endpoint URL, the JSON type, the frame's
2742
+ // session headers and the card form's body byte for byte, with "save my card", "remember me" or a card fee refused
2743
+ // by name. The endpoint answers no browser origin, so the card leaves the cardholder's device only through the
2744
+ // checkout relay, and only the frame's four session headers ride beside the card. test.checkout.dibspayment.eu is
2745
+ // Nexi's test environment: pinned (S7) to test rows, which send only Nexi's published test cards.
2746
+ // Ships dark: served only to a client that declares `nexi_checkout_pay`, gated off for every org until an operator
2747
+ // lists one (`nexi_checkout:<org>`), and autopilot never sends this request (autopilot.js
2748
+ // DEVICE_REPLAY_REFUSED_OPERATIONS). `(?![\w/.%-])` ends the path for a consumer that tests `match` unanchored.
2749
+ capability: "nexi_checkout_pay",
2750
+ match: "(?:test\\.)?checkout\\.dibspayment\\.eu/api/v1/pay(?![\\w/.%-])",
2751
+ hosts: ["^checkout\\.dibspayment\\.eu$", "^test\\.checkout\\.dibspayment\\.eu$"],
2752
+ sandboxHosts: ["^test\\.checkout\\.dibspayment\\.eu$"],
2753
+ hostEnvironmentPinned: true,
2754
+ encoding: "json",
2755
+ // The frame's checkout key, payment id, partner merchant number and API version. Origin, Referer and cookies never ride.
2756
+ passthroughHeaders: ["^checkoutkey$", "^paymentid$", "^partnermerchantnumber$", "^api-version$"],
2757
+ jsonCardFields: [["paymentType", "card", "cardNumber"]]
2758
+ },
2759
+ {
2760
+ psp: "openpay_bbva",
2761
+ // Openpay (BBVA México's online acquiring platform; Openpay Colombia and Openpay Perú) through openpay.js, the
2762
+ // tokenizer a merchant's own page loads: on Pay it posts the card with one XHR, in clear JSON, to
2763
+ // https://api.openpay.mx/v1/<merchant id>/tokens (api.openpay.co, api.openpay.pe) under the merchant's public key
2764
+ // (Basic authorization), as {card_number, holder_name, cvv2, expiration_month, expiration_year[, address]} in the
2765
+ // caller's own order and types. The answer is a single-use token the merchant's server charges later; the request
2766
+ // names no amount, so the agent's amount is the price the cardholder approves. openpay.js holds the rules the pause
2767
+ // decision, the API's create, the prepared bind and the device read: the exact token URL, openpay.js's three
2768
+ // headers and the caller's body member by member. openpay.js abandons the request 40 s after Pay, so the lane is
2769
+ // prepared only (preparationRequired). Openpay's API answers any browser origin, so the card leaves the
2770
+ // cardholder's device by a direct fetch. A production request pays only an origin whose reviewed pin names its
2771
+ // host, merchant id and key (openpay.js openpayMerchantRefusal). sandbox-api.openpay.<tld> is Openpay's sandbox:
2772
+ // pinned (S7) to test rows, which send only Openpay's documented test cards. Openpay can answer a refusal inside a
2773
+ // 2xx, so its own judge reads every answer (openpay.js openpayAnswerOutcome), never the shared status rule.
2774
+ // Ships dark: served only to a client that declares `openpay_tokenizer`, gated off for every org until an operator
2775
+ // lists `openpay_bbva:<org>`, and autopilot never sends it (autopilot.js DEVICE_REPLAY_REFUSED_OPERATIONS).
2776
+ // `(?![\w/.%-])` ends the path for a consumer that tests `match` unanchored.
2777
+ capability: "openpay_tokenizer",
2778
+ match: "(?:sandbox-)?api\\.openpay\\.(?:mx|co|pe)/v1/[a-z0-9]{10,40}/tokens(?![\\w/.%-])",
2779
+ hosts: [
2780
+ "^api\\.openpay\\.mx$",
2781
+ "^api\\.openpay\\.co$",
2782
+ "^api\\.openpay\\.pe$",
2783
+ "^sandbox-api\\.openpay\\.mx$",
2784
+ "^sandbox-api\\.openpay\\.co$",
2785
+ "^sandbox-api\\.openpay\\.pe$"
2786
+ ],
2787
+ sandboxHosts: ["^sandbox-api\\.openpay\\.mx$", "^sandbox-api\\.openpay\\.co$", "^sandbox-api\\.openpay\\.pe$"],
2788
+ hostEnvironmentPinned: true,
2789
+ preparationRequired: true,
2790
+ encoding: "json",
2791
+ // openpay.js's public key and its JSON Accept. Origin, Referer and cookies never ride.
2792
+ passthroughHeaders: ["^authorization$", "^accept$"],
2793
+ jsonCardFields: [["card_number"]]
2794
+ },
2795
+ {
2796
+ psp: "toast",
2797
+ // Toast's payments frame (payments.toasttab.com), the card leg of every Toast online-ordering and
2798
+ // e-gift checkout: one POST to /v1/payment-methods with the card sealed in card.cardData, RSA-OAEP
2799
+ // with SHA-1 over a JSON object under a 2048-bit key the frame hardcodes. toast.js holds the one
2800
+ // request rule the pause decision, the API's create, the approve leg and the device read: exactly
2801
+ // that URL and the frame's guest card body byte for byte, under the key id toast.js pins. The device
2802
+ // seals the real card under that pinned key (never one from a row, a request or a page), and the
2803
+ // agent's browser continues its own request with only cardData rewritten, so the frame's bearer,
2804
+ // its restaurant and intent headers and the session secret stay the page's and none is stored. Apple
2805
+ // Pay and Google Pay payment methods share the URL, carry no card the Vault holds, and continue
2806
+ // untouched (passWithoutCard); `jsonCardFields` names where the card sits, and toast.js's own gate
2807
+ // answers before it (card-fields.js). Toast's sandbox needs a partner account, so only the live host is
2808
+ // named and a test row is refused at create. Ships dark: served only to a client that declares
2809
+ // `toast_pinned_key`, off for every org until an operator lists `toast:<org>`, and autopilot never
2810
+ // sends it (autopilot.js DEVICE_REPLAY_REFUSED_OPERATIONS). `(?![\w/.-])` ends the path, so a
2811
+ // consumer that tests `match` unanchored never takes /v1/payment-methods/x for a card request.
2812
+ capability: "toast_pinned_key",
2813
+ match: "payments\\.toasttab\\.com/v1/payment-methods(?![\\w/.-])",
2814
+ hosts: ["^payments\\.toasttab\\.com$"],
2815
+ encoding: "json",
2816
+ passthroughHeaders: [],
2817
+ jsonCardFields: [["card", "cardData"]],
2818
+ passWithoutCard: "payments\\.toasttab\\.com/v1/payment-methods",
2819
+ clientSideEncrypted: true,
2820
+ mode: "cse",
2821
+ cse: { scheme: "rsa-oaep-sha1-json", at: "card", fields: ["cardData"] }
2822
+ },
2823
+ {
2824
+ psp: "fastspring",
2825
+ // FastSpring's checkout, the merchant of record for every FastSpring store: the popup (Store Builder
2826
+ // Library), embedded and web storefronts all run FastSpring's one checkout app, and its Pay posts the
2827
+ // card as one JSON XHR to <store>.onfastspring.com[/popup-<name>|/embedded-<name>]/session/<id>/payment
2828
+ // (<store>.test.onfastspring.com in a store's test mode) under the session's X-Session-Token. PAN@
2829
+ // card.number, in FastSpring's groups of four or as digits, with card.month, card.year and
2830
+ // card.security beside it. fastspring.js holds the request rule the pause decision, the API's create and
2831
+ // the device all read: exactly a session's /payment URL, a JSON Content-Type, the token, and the card
2832
+ // body (a card FastSpring saved, a renewal, a gift, a tax id's EBANX route and a CAPTCHA answer each
2833
+ // refused by name). The request names no amount and no seller: the store in the host is the payee,
2834
+ // so a live payment goes only to a store fastspring.js pins, and the session's own document names
2835
+ // the total. PayPal, wallets and bank methods post the same URL with no card and continue untouched
2836
+ // (passWithoutCard). The checkout answers no other origin's preflight, so the card leaves the
2837
+ // cardholder's device only through the checkout relay. Ships dark: served only to a client that
2838
+ // declares `fastspring_card_payment`, gated off for every org until an operator lists one
2839
+ // (`fastspring:<org>`), and autopilot never sends this request (autopilot.js
2840
+ // DEVICE_REPLAY_REFUSED_OPERATIONS). The environment is pinned (S7): a test store's host only on test
2841
+ // rows and only with documented test cards. `(?![\w/.%;-])` ends the path for a consumer that tests
2842
+ // `match` unanchored. Not here: FastSpring Classic (sites.fastspring.com), a separate application
2843
+ // whose card step is a session-bound form navigation.
2844
+ capability: "fastspring_card_payment",
2845
+ match: "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.test)?\\.onfastspring\\.com(?:/(?:popup|embedded)-[A-Za-z0-9_-]{1,64})?/session/[A-Za-z0-9_-]{16,64}/payment(?![\\w/.%;-])",
2846
+ hosts: ["^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.onfastspring\\.com$", "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.test\\.onfastspring\\.com$"],
2847
+ sandboxHosts: ["^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.test\\.onfastspring\\.com$"],
2848
+ hostEnvironmentPinned: true,
2849
+ encoding: "json",
2850
+ // The session's token, which FastSpring's interceptor writes on every call of the page. Origin,
2851
+ // Referer and cookies never ride: the session id and the token are the whole binding.
2852
+ passthroughHeaders: ["^x-session-token$"],
2853
+ jsonCardFields: [["card", "number"]],
2854
+ passWithoutCard: "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.test)?\\.onfastspring\\.com(?:/(?:popup|embedded)-[A-Za-z0-9_-]{1,64})?/session/[A-Za-z0-9_-]{16,64}/payment"
2855
+ },
2856
+ {
2857
+ psp: "omise",
2858
+ // Omise's card token (Opn Payments; Thailand, Japan, Singapore and Malaysia): every Omise card form, the card
2859
+ // frame cdn.omise.co/pay.html that the official WooCommerce plugin, Omise's hosted checkout page and Payment
2860
+ // Links+ load, and a merchant's own form calling Omise.js 2.16.0, posts the card in one JSON body to Omise's
2861
+ // vault under the merchant's public key (Basic): PAN@ card.number, the expiry @ card.expiration_month and
2862
+ // .expiration_year in the form's own spelling, the code @ card.security_code, beside the holder's name and
2863
+ // address. Unencrypted, and it names no amount: the merchant's server charges the token for its own order
2864
+ // afterwards. omise.js holds the rule the pause decision, the API's create and the device all read: exactly
2865
+ // this URL, a public key and Omise.js's own headers, and the card form's token body as JSON.stringify writes
2866
+ // it, with a wallet's tokenization on the same URL refused. vault.omise.co answers the Vault's origin
2867
+ // (Access-Control-Allow-Origin *), so the cardholder's device sends it itself. Test mode shares the host
2868
+ // under a pkey_test_ key, so no sandbox host is marked: the device sends a test key only Omise's documented
2869
+ // test cards (omise.js OMISE_TEST_CARDS). 3-D Secure, where the merchant's account runs it, follows the
2870
+ // merchant's charge on 3dsms.omise.co with no card.
2871
+ // Ships dark: served only to a client that declares `omise_card_token`, gated off for every org until an
2872
+ // operator lists one (`omise:<org>`), and the backend's gate serves only Agentcard's own company until the
2873
+ // token's public key is bound to the merchant (backend config.ts OMISE_KEY_BOUND_TO_MERCHANT). Autopilot never
2874
+ // sends this request (autopilot.js DEVICE_REPLAY_REFUSED_OPERATIONS).
2875
+ capability: "omise_card_token",
2876
+ match: "vault\\.omise\\.co/tokens",
2877
+ hosts: ["^vault\\.omise\\.co$"],
2878
+ encoding: "json",
2879
+ // Omise.js's own headers: the public key and its client's name. Origin, Referer and cookies never ride.
2880
+ passthroughHeaders: ["^authorization$", "^x-user-agent$"],
2881
+ jsonCardFields: [["card", "number"]]
2882
+ },
2883
+ {
2884
+ psp: "xendit",
2885
+ // Xendit's hosted invoice checkout (checkout.xendit.co/web/<invoice id>), which every Xendit Invoice API
2886
+ // merchant, dashboard payment link and donation link, Shopify's Xendit app and the older WooCommerce plugin
2887
+ // open: its Pay Now hands the card to Xendit.js 2.6.1, which posts it as one JSON body to Xendit's own API
2888
+ // under the business's publishable key (Basic). PAN@ card_data.account_number, the expiry as "MM" and
2889
+ // "YYYY" @ card_data.exp_month and .exp_year, the code @ card_data.cvn and again @ card_cvn, beside the
2890
+ // invoice's amount and currency. Unencrypted. xendit.js holds the rule the pause decision, the API's create
2891
+ // and the device all read: exactly this URL, the publishable key and Xendit.js's own headers, and the card
2892
+ // form's single-use token body byte for byte, with a multi-use token (the card kept on file, and the
2893
+ // checkout's Safe Acceptance mode) refused by its own code, and a token that skips 3-D Secure or names a
2894
+ // xenPlatform sub-account refused too. storeCVN posts a code alone to the same URL
2895
+ // and is refused like any other body. api.xendit.co answers the Vault's origin (Access-Control-Allow-Origin
2896
+ // *), so the cardholder's device sends it itself. Test mode shares the host under an xnd_public_development_
2897
+ // key, so no sandbox host is marked: the device sends a test-mode key only Xendit's documented test cards
2898
+ // (xendit.js XENDIT_TEST_CARDS). 3-D Secure follows the answer on redirect.xendit.co with no card.
2899
+ // Ships dark: served only to a client that declares `xendit_card_token`, gated off for every org until an
2900
+ // operator lists one (`xendit:<org>`), and the backend's gate serves only Agentcard's own company until the
2901
+ // token's publishable key is bound to the merchant (backend config.ts XENDIT_KEY_BOUND_TO_MERCHANT). Autopilot
2902
+ // never sends this request (autopilot.js DEVICE_REPLAY_REFUSED_OPERATIONS).
2903
+ capability: "xendit_card_token",
2904
+ match: "api\\.xendit\\.co/v2/credit_card_tokens",
2905
+ hosts: ["^api\\.xendit\\.co$"],
2906
+ encoding: "json",
2907
+ // Xendit.js's own headers: the publishable key, and the client's type, version and id (the invoice). Origin,
2908
+ // Referer and cookies never ride.
2909
+ passthroughHeaders: ["^authorization$", "^client-type$", "^client-version$", "^client-id$"],
2910
+ jsonCardFields: [["card_data", "account_number"]]
2911
+ },
2912
+ {
2913
+ psp: "sb_payment_service",
2914
+ // SB Payment Service (SBPS), SoftBank's card gateway: its one-time token script on the merchant's
2915
+ // page (com_sbps_system_token.js) encrypts the card in the page and sends it as ONE JSONP <script>
2916
+ // GET to /token/generateToken on token.sps-system.com (stbtoken.sps-system.com for SBPS's test
2917
+ // environment), the card in the query: val is AES-256-CBC of "number:YYYYMM:code" under a PBKDF2 key
2918
+ // over the merchant and service ids, and key is the salt and iv RSA-wrapped under SBPS's key in the
2919
+ // script. sbps.js holds the request rule the pause decision, the API's create and the device all
2920
+ // read: the exact URL the browser writes for the script's <script>, so the 3-D Secure info request
2921
+ // on the same host (/token/generateTds2Token, the buyer's details and no card) is never recognized.
2922
+ // Nothing can be written into the paused ciphertext: the cardholder's device rebuilds key and val
2923
+ // with the real card under the key payment-core pins, and sends the GET through the checkout relay,
2924
+ // since the host answers no browser origin and answers with JavaScript.
2925
+ // Ships dark: served only to a client that declares `sbps_token_jsonp`, gated off for every org until
2926
+ // an operator lists one (`sb_payment_service:<org>`), held to the merchants sbps.js pins per checkout
2927
+ // origin, and autopilot never sends this request (autopilot.js DEVICE_REPLAY_REFUSED_OPERATIONS). The
2928
+ // environment is pinned (S7): stbtoken only on test rows and only with documented test cards.
2929
+ capability: "sbps_token_jsonp",
2930
+ // The path has a right-edge guard for the SDK's unanchored test.
2931
+ match: "(?:stb)?token\\.sps-system\\.com/token/generateToken(?![\\w/.-])",
2932
+ hosts: ["^token\\.sps-system\\.com$", "^stbtoken\\.sps-system\\.com$"],
2933
+ sandboxHosts: ["^stbtoken\\.sps-system\\.com$"],
2934
+ hostEnvironmentPinned: true,
2935
+ // `encoding` describes the query, since the request has no body. No captured header is ever
2936
+ // replayed, and the card rides in the query of one GET whose answer is JSONP.
2937
+ encoding: "form",
2938
+ passthroughHeaders: [],
2939
+ request: { method: "GET", cardIn: "query", response: "jsonp" }
2940
+ },
2941
+ {
2942
+ psp: "tappay",
2943
+ // TapPay (Cherri Tech, Taiwan): TapPay Fields, the card iframes every TPDirect integration mounts from
2944
+ // js.tappaysdk.com (confirmed live 2026-10-17). TPDirect.card.getPrime makes TapPay's own api iframe
2945
+ // (js.tappaysdk.com/sdk/tpdirect/api/html/<version>) read the three field iframes and POST one request:
2946
+ // POST https://js.tappaysdk.com/payment/tpdirect/production/getprime
2947
+ // Content-Type: application/x-www-form-urlencoded, x-api-key: <the merchant's TapPay app key>
2948
+ // jsonString={"cardnumber":...,"cardduedate":"<YYYYMM>","appid":...,"appkey":...,"appname":...,
2949
+ // "url":...,"port":...,"protocol":...,"tappay_sdk_version":...,"cardholder_info":{...}[,"cardccv":...][,"device_id":...]}
2950
+ // The one form field jsonString holds the whole card request as the SDK's JSON.stringify. tappay.js
2951
+ // holds the request rule, the pause decision, the device fill and the answer judge; the card sits at
2952
+ // cardnumber, cardduedate (TapPay's "20"+YY+MM, so YYYYMM) and the optional cardccv. The request names no
2953
+ // amount and mints a prime (one-time token, 90-second TTL) the merchant's server charges with Pay by
2954
+ // Prime, where 3-D Secure runs (three_domain_secure), never in this request. The api iframe posts same
2955
+ // origin, so a replay from the Vault's origin is cross-origin and its x-api-key preflight is refused
2956
+ // (OPTIONS to getprime drew 403 with no Access-Control-Allow-Origin, 2026-10-17), so the card leaves the
2957
+ // cardholder's device only through the checkout relay, and tappayAnswerOutcome judges the answer, since
2958
+ // TapPay reports a refusal inside HTTP 200 with a non-zero status. One host serves every merchant, so a
2959
+ // live card is tokenized only for a checkout origin a reviewed pin lists (tappay.js tappayMerchantRefusal)
2960
+ // and the approval names that merchant. TapPay's sandbox is the same host with the /sandbox/ path and so
2961
+ // cannot be told from production by host (hostEnvironment is host based): this lane recognizes production
2962
+ // only, as Wix Payments does, and a sandbox test run is a later change.
2963
+ // Ships dark: served only to a client that declares `tappay_prime`, gated off for every org until an
2964
+ // operator lists one (`tappay:<org>`), and autopilot never sends this request (autopilot.js
2965
+ // DEVICE_REPLAY_REFUSED_OPERATIONS).
2966
+ capability: "tappay_prime",
2967
+ match: "js\\.tappaysdk\\.com/payment/tpdirect/production/getprime",
2968
+ hosts: ["^js\\.tappaysdk\\.com$"],
2969
+ encoding: "form",
2970
+ passthroughHeaders: ["^x-api-key$"]
2971
+ },
2972
+ {
2973
+ psp: "paymob",
2974
+ // Paymob's own checkout (Egypt, the UAE, Saudi Arabia, Oman): Unified Checkout, the hosted page every
2975
+ // Paymob payment link, PayMe handle, WooCommerce plugin and Shopify redirect app opens, and Pixel, the
2976
+ // card frame a merchant's own page embeds. Pay sends the card in one JSON POST to the Paymob API of the
2977
+ // merchant's country, /api/acceptance/payments/pay on accept., uae., ksa. or oman.paymob.com (and
2978
+ // accept.paymobsolutions.com, Paymob Egypt's older name for the same API): {source: {identifier,
2979
+ // sourceholder_name, subtype: "CARD", expiry_month, expiry_year, cvn, ...}, payment_token, ...}.
2980
+ // Unencrypted. The request names no amount of its own: its payment key, Paymob's signed JWT for the
2981
+ // merchant's intention, names the amount and currency Paymob charges. paymob.js holds the rule the
2982
+ // pause decision reads: the exact URL, a JSON content type, and the card form's payment, key by key,
2983
+ // with a saved Paymob card, a payment that keeps the card, pays in installments, splits, converts or
2984
+ // names a Paymob account, and any other card shape refused. Every other method of the checkout
2985
+ // (wallets, Apple Pay, Google Pay, KNET, valU, cash) carries no card on the same URL and continues
2986
+ // untouched (passWithoutCard). The API answers any origin's preflight, so the cardholder's device
2987
+ // sends the card itself; no header is needed beside the content type. 3-D Secure follows the answer,
2988
+ // with no card. Test and live modes share the hosts (test keys and integrations separate them), so no
2989
+ // sandbox host is marked.
2990
+ // Ships dark: served only to a client that declares `paymob_checkout_pay`, gated off for every org
2991
+ // until an operator lists one (`paymob:<org>`), and autopilot never sends this request
2992
+ // (autopilot.js DEVICE_REPLAY_REFUSED_OPERATIONS).
2993
+ capability: "paymob_checkout_pay",
2994
+ match: "(?:accept|uae|ksa|oman)\\.paymob\\.com/api/acceptance/payments/pay|accept\\.paymobsolutions\\.com/api/acceptance/payments/pay",
2995
+ hosts: ["^accept\\.paymob\\.com$", "^uae\\.paymob\\.com$", "^ksa\\.paymob\\.com$", "^oman\\.paymob\\.com$", "^accept\\.paymobsolutions\\.com$"],
2996
+ encoding: "json",
2997
+ passthroughHeaders: [],
2998
+ jsonCardFields: [["source", "identifier"]],
2999
+ passWithoutCard: "(?:accept|uae|ksa|oman)\\.paymob\\.com/api/acceptance/payments/pay|accept\\.paymobsolutions\\.com/api/acceptance/payments/pay"
3000
+ },
3001
+ {
3002
+ psp: "payu_latam",
3003
+ // PayU Latam's WebCheckout (Colombia, Mexico, Chile, Peru, Panama), the hosted page a PayU Latam
3004
+ // merchant's payment form, button, link or cart plugin opens at checkout.payulatam.com. Its card form
3005
+ // posts the whole checkout transaction as JSON to /ppp-web-gateway-payu/checkout/submit/<country>
3006
+ // /credit_card/<session key> on the page's own host, the card in checkoutCreditCard: the number as the
3007
+ // field's mask spells it, the code, and the month and two-digit year as numbers. The body copies the
3008
+ // order PayU holds for the session, but PayU charges its own, so the amount is the agent's (no request
3009
+ // amount in backend.js). payu-latam.js holds the rule the
3010
+ // pause decision reads: the exact URL with a country this lane read, and the card form's own body, with
3011
+ // the box that has PayU keep the card, a card PayU saved, a wallet, installments and a test order on
3012
+ // the live host refused. The page's BIN lookup (checkout/card_info/) and its 3-D Secure redirect use
3013
+ // other paths, which `match` leaves out; `(?![\w/;.%-])` ends the key for a consumer that tests `match`
3014
+ // unanchored. The submit answers a CORS preflight from any origin, so the cardholder's device can send
3015
+ // the card itself. Ships dark: served only to a client that declares
3016
+ // `payu_latam_webcheckout_card`, gated off for every org until an operator lists one
3017
+ // (`payu_latam:<org>`), and autopilot never sends this request (autopilot.js
3018
+ // DEVICE_REPLAY_REFUSED_OPERATIONS). The environment is pinned (S7): sandbox.checkout.payulatam.com
3019
+ // only on test rows and only with documented test cards.
3020
+ capability: "payu_latam_webcheckout_card",
3021
+ match: "(?:sandbox\\.)?checkout\\.payulatam\\.com/ppp-web-gateway-payu/checkout/submit/(?:ar|br|cl|co|mx|pa|pe)/credit_card/[0-9a-f]{32}(?![\\w/;.%-])",
3022
+ hosts: ["^checkout\\.payulatam\\.com$", "^sandbox\\.checkout\\.payulatam\\.com$"],
3023
+ sandboxHosts: ["^sandbox\\.checkout\\.payulatam\\.com$"],
3024
+ hostEnvironmentPinned: true,
3025
+ encoding: "json",
3026
+ // AngularJS's Accept, which the page sends on every $http call. Cookies, Origin and Referer never ride.
3027
+ passthroughHeaders: ["^accept$"],
3028
+ jsonCardFields: [["checkoutCreditCard", "number"]]
3029
+ },
3030
+ // Every processor registered since this list froze, in id order (registry.js).
3031
+ ...REGISTERED_DEFINITIONS
2548
3032
  ]);
2549
3033
  var PSP_RECOGNIZERS = deepFreeze(PROCESSOR_DEFINITIONS.map(({ compose, encryptedCardFields, deviceSteps, deviceEncrypt, ...definition }) => definition));
2550
3034
  var PSP_CLIENT_TABLE = deepFreeze(PROCESSOR_DEFINITIONS.map((definition) => ({
@@ -2739,6 +3223,17 @@ var PAYGENT_TOKEN_HOSTS = /* @__PURE__ */ Object.freeze({
2739
3223
  sandbox: Object.freeze(["sandbox.paygent.co.jp"])
2740
3224
  });
2741
3225
  var PAYGENT_CONTENT_TYPE = "text/plain;charset=UTF-8";
3226
+ var pin4 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]) });
3227
+ var PAYGENT_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
3228
+ pin4({
3229
+ id: "fundex_tcs_eng",
3230
+ merchant: "Tokyo Chinese School",
3231
+ merchantId: "60362",
3232
+ keySha256: "6073dee112b1e4089025d1c1f3c4cfad818c314a81943ffa55b839cb2df51018",
3233
+ origins: ["https://fundexapp.jp"],
3234
+ currency: "jpy"
3235
+ })
3236
+ ]);
2742
3237
  // src/multipart-form.js
2743
3238
  var BOUNDARY_CHARACTERS = "[A-Za-z0-9'+_.-]{1,70}";
2744
3239
  var BOUNDARY = new RegExp(`^${BOUNDARY_CHARACTERS}$`);
@@ -2748,9 +3243,9 @@ function multipartBoundary(contentType) {
2748
3243
  return match ? match[1] : null;
2749
3244
  }
2750
3245
  // src/pay-nl.js
2751
- var pin4 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]), serviceIds: Object.freeze([...fields.serviceIds]) });
3246
+ var pin5 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]), serviceIds: Object.freeze([...fields.serviceIds]) });
2752
3247
  var PAY_NL_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
2753
- pin4({ id: "weeztix", merchant: "Weeztix", origins: ["https://shop.weeztix.com"], serviceIds: ["SL-6399-2740"] })
3248
+ pin5({ id: "weeztix", merchant: "Weeztix", origins: ["https://shop.weeztix.com"], serviceIds: ["SL-6399-2740"] })
2754
3249
  ]);
2755
3250
  var ERROR_KEYS = /* @__PURE__ */ Object.freeze(["errorId", "errorTag", "errorMessage", "errorFieldName"]);
2756
3251
  var REQUEST_KEYS = /* @__PURE__ */ Object.freeze(["result", ...ERROR_KEYS]);
@@ -2768,26 +3263,26 @@ var TWOC2P_KEYS = /* @__PURE__ */ Object.freeze({
2768
3263
  })
2769
3264
  });
2770
3265
  // src/hipay.js
2771
- var pin5 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]), usernames: Object.freeze([...fields.usernames]) });
3266
+ var pin6 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]), usernames: Object.freeze([...fields.usernames]) });
2772
3267
  var HIPAY_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
2773
- pin5({ id: "happybulle", merchant: "HappyBulle", origins: ["https://www.happybulle.com"], usernames: ["94683309.secure-gateway.hipay-tpp.com"] })
3268
+ pin6({ id: "happybulle", merchant: "HappyBulle", origins: ["https://www.happybulle.com"], usernames: ["94683309.secure-gateway.hipay-tpp.com"] })
2774
3269
  ]);
2775
3270
  // src/amazon-payment-services.js
2776
- var BODY_LIMIT = 32 * 1024;
3271
+ var BODY_LIMIT2 = 32 * 1024;
2777
3272
  var ANSWER_LIMIT = 64 * 1024;
2778
3273
  // src/clover.js
2779
3274
  var REQUIRED_KEYS = /* @__PURE__ */ Object.freeze(["encrypted_pan", "exp_month", "exp_year", "cvv", "first6", "last4", "brand"]);
2780
3275
  var OPTIONAL_KEYS = /* @__PURE__ */ Object.freeze(["address_line1", "phone_numbers", "email_address", "name", "address_zip"]);
2781
3276
  var CARD_ORDER = /* @__PURE__ */ Object.freeze([...REQUIRED_KEYS, ...OPTIONAL_KEYS]);
2782
3277
  // src/tap-payments.js
2783
- var pin6 = (fields) => Object.freeze({
3278
+ var pin7 = (fields) => Object.freeze({
2784
3279
  ...fields,
2785
3280
  origins: Object.freeze([...fields.origins]),
2786
3281
  sessions: Object.freeze({ ...fields.sessions }),
2787
3282
  key: Object.freeze({ ...fields.key })
2788
3283
  });
2789
3284
  var TAP_PAYMENTS_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
2790
- pin6({
3285
+ pin7({
2791
3286
  id: "casefilegame",
2792
3287
  merchant: "Casefilegame",
2793
3288
  tapMerchantId: "67977048",
@@ -2930,20 +3425,37 @@ var SUCCESS_RULES = {
2930
3425
  cvvIncluded: (value) => typeof value === "boolean"
2931
3426
  };
2932
3427
  var SUCCESS_KEYS = Object.keys(SUCCESS_RULES);
3428
+ // src/openpay.js
3429
+ var LETTERS2 = "A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u017F";
3430
+ var PAGE_NAME2 = new RegExp(`^[${LETTERS2} .'-]{1,64}$`);
3431
+ var HAS_LETTER2 = new RegExp(`[${LETTERS2}]`);
3432
+ var ADDRESS_VALUE2 = new RegExp(`^[\\x20-\\x7e\\u00a0-\\u017f]{0,128}$`);
3433
+ var PAN_LIKE2 = new RegExp(`(?:[0-9][^0-9${LETTERS2}]*){12,}`);
3434
+ var pin8 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]), publicKeys: Object.freeze([...fields.publicKeys]) });
3435
+ var OPENPAY_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
3436
+ pin8({
3437
+ id: "diario_de_yucatan",
3438
+ merchant: "Diario de Yucatán",
3439
+ origins: ["https://www.yucatan.com.mx"],
3440
+ host: "api.openpay.mx",
3441
+ merchantId: "mqyloyrm8tsvtsgcrj0d",
3442
+ publicKeys: ["pk_260aa43616a445bb98472e6ca51da968"]
3443
+ })
3444
+ ]);
2933
3445
  // src/poynt.js
2934
3446
  var UUID = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";
2935
3447
  var NONCE_URL = new RegExp(`^https://services\\.poynt\\.net/v1/commerce/stores/(${UUID})/payment-tokens/generate-nonce$`);
2936
3448
  var STORE_ID = new RegExp(`^${UUID}$`);
2937
3449
  var APPLICATION_ID = new RegExp(`^urn:aid:${UUID}$`);
2938
- var pin7 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]), storeIds: Object.freeze([...fields.storeIds]) });
3450
+ var pin9 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]), storeIds: Object.freeze([...fields.storeIds]) });
2939
3451
  var POYNT_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
2940
- pin7({
3452
+ pin9({
2941
3453
  id: "yearning_for_learning",
2942
3454
  merchant: "Yearning for Learning Publishing & Coaching",
2943
3455
  origins: ["https://ff305485-ba6c-423a-87b0-cebe3f83ffe9.mysimplestore.com"],
2944
3456
  storeIds: ["71ac12ed-e61f-4318-95db-db0e7c649d6f"]
2945
3457
  }),
2946
- pin7({
3458
+ pin9({
2947
3459
  id: "timber_ridge_bookkeeping",
2948
3460
  merchant: "Timber Ridge Bookkeeping",
2949
3461
  origins: ["https://d7d64ac3-0352-4e53-af9a-f6d8e7b5fb71.mysimplestore.com"],
@@ -2951,6 +3463,187 @@ var POYNT_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
2951
3463
  })
2952
3464
  ]);
2953
3465
  var MAX_ANSWER_CHARS = 16 * 1024;
3466
+ // src/cardcom.js
3467
+ var CARDCOM_ORIGIN = "https://secure.cardcom.solutions";
3468
+ var CARDCOM_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
3469
+ Object.freeze({
3470
+ id: "machon_alte_usd",
3471
+ merchant: "Machon Alte",
3472
+ origins: Object.freeze([CARDCOM_ORIGIN]),
3473
+ page: "kzR5pTyr0kC3oqjpGbCMiQ",
3474
+ terminal: 162226,
3475
+ products: Object.freeze([Object.freeze({ uid: "JoQrlcuGCUWYM4I66eX7pw", currency: "usd", price: null })]),
3476
+ settings: "e38d7c7abce83a3a994a707e345595cf6ec2a15d77794a8eea70c0d5ce4773ab"
3477
+ })
3478
+ ]);
3479
+ // src/toast.js
3480
+ var TOAST_SUBSTITUTION = /* @__PURE__ */ Object.freeze({ at: "card", fields: Object.freeze(["cardData"]) });
3481
+ // src/fastspring.js
3482
+ var FASTSPRING_STORE_PINS = /* @__PURE__ */ Object.freeze([
3483
+ Object.freeze({ environment: "production", store: "daisydisk", storefront: "", merchant: "DaisyDisk" })
3484
+ ]);
3485
+ var STORE = "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?";
3486
+ var CARD_URL = new RegExp(`^https://(${STORE})(\\.test)?\\.onfastspring\\.com((?:/(?:popup|embedded)-[A-Za-z0-9_-]{1,64})?)/session/([A-Za-z0-9_-]{16,64})/payment$`);
3487
+ // src/omise.js
3488
+ var pin10 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]), keys: Object.freeze([...fields.keys]) });
3489
+ var OMISE_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
3490
+ pin10({ id: "taejai", merchant: "Taejai", origins: ["https://taejai.com"], keys: ["pkey_53q6mm66esjr563ob0h"] }),
3491
+ pin10({ id: "socialgiver", merchant: "Socialgiver", origins: ["https://www.socialgiver.com"], keys: ["pkey_5d5o2iahksmyrkybemg"] }),
3492
+ pin10({ id: "thireq_pecko_links", merchant: "Thireq Pecko", origins: ["https://linksplus.omise.co"], keys: ["pkey_65w70xniwsinf0gm680"] })
3493
+ ]);
3494
+ // src/payu-latam.js
3495
+ var PAYU_LATAM_HOSTS = /* @__PURE__ */ Object.freeze({
3496
+ production: Object.freeze(["checkout.payulatam.com"]),
3497
+ sandbox: Object.freeze(["sandbox.checkout.payulatam.com"])
3498
+ });
3499
+ var ADDRESS = ["street1", "street2", "street3", "city", "state", "country", "postalCode", "phone"];
3500
+ var PERSON = [
3501
+ "fullName",
3502
+ "emailAddress",
3503
+ "contactPhone",
3504
+ "phoneCountryCode",
3505
+ "dniNumber",
3506
+ "isDniNumberEncrypt",
3507
+ "dniType",
3508
+ "personType",
3509
+ "businessName",
3510
+ "cnpj",
3511
+ "gender"
3512
+ ];
3513
+ var MONEY = ["value", "symbol", "currency"];
3514
+ var RECORD_MEMBERS = /* @__PURE__ */ Object.freeze({
3515
+ payer: [...PERSON, "merchantBuyerId", "billingAddress", "birthDate", "identificationNumber", "identificationType"],
3516
+ "payer.billingAddress": ADDRESS,
3517
+ order: [
3518
+ "id",
3519
+ "referenceCode",
3520
+ "airlineCode",
3521
+ "description",
3522
+ "isTest",
3523
+ "signature",
3524
+ "language",
3525
+ "buyer",
3526
+ "shipment",
3527
+ "state",
3528
+ "status",
3529
+ "paymentApprovalDate",
3530
+ "creationDate",
3531
+ "accountId",
3532
+ "amount",
3533
+ "tax",
3534
+ "totalPurchase",
3535
+ "currency",
3536
+ "amountConvertedValue",
3537
+ "taxConvertedValue",
3538
+ "taxReturnBase",
3539
+ "taxReturnBaseConvertedValue",
3540
+ "additionalValue",
3541
+ "administrativeFee",
3542
+ "taxAdministrativeFee",
3543
+ "taxAdministrativeFeeReturnBase",
3544
+ "enabledPaymentMethods",
3545
+ "enabledInstallments",
3546
+ "enabledPaymentMethodTypes",
3547
+ "enabledIin",
3548
+ "enabledPseBanks",
3549
+ "enabledKhipuBanks",
3550
+ "paymentMethodsDescription",
3551
+ "urlEncodedId",
3552
+ "shippingValue",
3553
+ "paymentRequestLinkId",
3554
+ "airlineDescription",
3555
+ "displayShipping",
3556
+ "displayBuyerComments",
3557
+ "buyerCommentsLabel",
3558
+ "extraParameters",
3559
+ "dispersion"
3560
+ ],
3561
+ "order.buyer": [...PERSON, "merchantBuyerId", "buyerAddress", "comments"],
3562
+ "order.buyer.buyerAddress": ADDRESS,
3563
+ "order.shipment": [...PERSON, "merchantShipmentId", "shippingAddress", "comments"],
3564
+ "order.shipment.shippingAddress": ADDRESS,
3565
+ "order.amount": MONEY,
3566
+ "order.tax": MONEY,
3567
+ "order.totalPurchase": MONEY,
3568
+ "order.amountConvertedValue": MONEY,
3569
+ "order.taxConvertedValue": MONEY,
3570
+ "order.taxReturnBase": MONEY,
3571
+ "order.taxReturnBaseConvertedValue": MONEY,
3572
+ shippingInfo: [
3573
+ "userLogin",
3574
+ "id",
3575
+ "reference",
3576
+ "description",
3577
+ "currency",
3578
+ "deliveryCity",
3579
+ "deliveryCityName",
3580
+ "deliveryAddress1",
3581
+ "deliveryAddress2",
3582
+ "deliveryAddress3",
3583
+ "postalCode",
3584
+ "fullName",
3585
+ "documentType",
3586
+ "document",
3587
+ "phoneNumber",
3588
+ "observationsReceivingShipment",
3589
+ "destinationState",
3590
+ "destinationStateName",
3591
+ "destinationCountry",
3592
+ "destinationEmail",
3593
+ "originFullName",
3594
+ "originIdentificationType",
3595
+ "originIdentification",
3596
+ "originCity",
3597
+ "originState",
3598
+ "originCountry",
3599
+ "originAddress",
3600
+ "originZipCode",
3601
+ "originPhone",
3602
+ "originEmail",
3603
+ "kilogramWeight",
3604
+ "volumetricWeight",
3605
+ "totalValue",
3606
+ "declaredValue",
3607
+ "shippingValue",
3608
+ "guideNumber",
3609
+ "enlistmentApplies",
3610
+ "deliveryDate",
3611
+ "deliveryDays",
3612
+ "minDeliveryDays",
3613
+ "packageHeight",
3614
+ "packageWidth",
3615
+ "packageLength",
3616
+ "shippingProvider",
3617
+ "shippingState",
3618
+ "creationDate",
3619
+ "lastUpdateDate",
3620
+ "expirationDate",
3621
+ "signature",
3622
+ "strCreationDate",
3623
+ "comment",
3624
+ "warehouseId",
3625
+ "additionalDeliveryDays",
3626
+ "shippingMerchantValue"
3627
+ ],
3628
+ // PayU's own ten, as transaction/create names them, and the merchant's extra1 to extra4 (the payment form's
3629
+ // optional fields), each text or nothing.
3630
+ "order.extraParameters": [
3631
+ "CURRENCY",
3632
+ "LANGUAGE",
3633
+ "ACCOUNT_ID",
3634
+ "ALGORITHM_SIGNATURE",
3635
+ "CHECKOUT_VERSION",
3636
+ "RESPONSE_URL",
3637
+ "IS_TEST",
3638
+ "SIGNATURE",
3639
+ "NOTIFY_URL",
3640
+ "IP_COUNTRY",
3641
+ "EXTRA1",
3642
+ "EXTRA2",
3643
+ "EXTRA3",
3644
+ "EXTRA4"
3645
+ ]
3646
+ });
2954
3647
  // src/cybersource-secure-acceptance.js
2955
3648
  var SA_BODY_LIMIT = 32 * 1024;
2956
3649
  var SA_REPLY_LIMIT = 64 * 1024;
@@ -2971,6 +3664,10 @@ var AMADEUS_CARD_URLS = Object.freeze({
2971
3664
  dcp: Object.freeze([])
2972
3665
  })
2973
3666
  });
3667
+ var AMADEUS_RELAY_HOSTS = /* @__PURE__ */ Object.freeze({
3668
+ production: Object.freeze(["paypages.payment.amadeus.com"]),
3669
+ sandbox: Object.freeze(["paypages.test.payment.amadeus.com"])
3670
+ });
2974
3671
  var AMADEUS_MERCHANT_EXPIRY_POLICIES = Object.freeze(["refuse", "fill"]);
2975
3672
  var AMADEUS_REFUSAL_REASONS = Object.freeze([
2976
3673
  "unsupported",
@@ -3282,7 +3979,8 @@ var TRANSBANK_MERCHANTS = Object.freeze([
3282
3979
  fantasyName: null,
3283
3980
  merchant: "Teleférico Santiago",
3284
3981
  hosts: Object.freeze(["telefericosantiago.cl"]),
3285
- returnHost: "telefericosantiago.cl"
3982
+ returnHost: "telefericosantiago.cl",
3983
+ returnUrl: null
3286
3984
  })
3287
3985
  ]);
3288
3986
  var MAX_PAGE5 = 64 * 1024;
@@ -3300,7 +3998,9 @@ var PAYTRAIL_ENTRY_FIELDS = Object.freeze([
3300
3998
  "checkout-nonce",
3301
3999
  "signature"
3302
4000
  ]);
3303
- var PAYTRAIL_MERCHANTS = Object.freeze([]);
4001
+ var PAYTRAIL_MERCHANTS = Object.freeze([
4002
+ Object.freeze({ account: "1076015", merchant: "DofE Finland", paytrailName: "Avartti-säätiö", returnHost: "dofe.fi" })
4003
+ ]);
3304
4004
  var UUID_SOURCE = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";
3305
4005
  var UUID2 = new RegExp(`^${UUID_SOURCE}$`);
3306
4006
  var ENTRY_PATH = new RegExp(`^/payments/(${UUID_SOURCE})/click-to-pay/loading-and-redirect$`);
@@ -3405,6 +4105,23 @@ var DECLINE_CODES = Object.freeze([
3405
4105
  "AccountSuspended"
3406
4106
  ]);
3407
4107
  var FRICTIONLESS_STATUSES = Object.freeze([0, 5, 7]);
4108
+ // src/sbps.js
4109
+ var pin11 = (fields) => /* @__PURE__ */ Object.freeze({
4110
+ ...fields,
4111
+ origins: Object.freeze([...fields.origins]),
4112
+ accounts: Object.freeze(fields.accounts.map((account) => Object.freeze({ ...account })))
4113
+ });
4114
+ var SBPS_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
4115
+ /* @__PURE__ */ pin11({
4116
+ id: "boss_ezo_fukuoka",
4117
+ merchant: `BOSS E${ /* @__PURE__ */String.fromCharCode(12539)}ZO FUKUOKA`,
4118
+ origins: ["https://ticket.e-zofukuoka.com"],
4119
+ accounts: [{ merchantId: "75082", serviceId: "001" }]
4120
+ })
4121
+ ]);
4122
+ var ERROR_TYPES = /* @__PURE__ */ Object.freeze(["03", "04", "05", "07", "99"]);
4123
+ var ERROR_FIELDS = /* @__PURE__ */ Object.freeze(["001", "002", "003", "004", "005", "999"]);
4124
+ var SBPS_REFUSAL_CODES = /* @__PURE__ */ Object.freeze(ERROR_TYPES.flatMap((type) => ERROR_FIELDS.map((field) => `${type}${field}`)));
3408
4125
  // src/recognition.js
3409
4126
  var PATTERN_WITHOUT_CARD_FIELDS = Object.freeze({
3410
4127
  stripe: "api\\.stripe\\.com/v1/(payment_methods|tokens|setup_intents/seti_\\w+/confirm|payment_intents/pi_\\w+/confirm)"