@agent-cards/sdk 0.23.21 → 0.23.22

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.
@@ -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: 360d9805357acc5244c3beafbb16a6da782e933b506db49c2d63df06ac23f7b4
4
4
  // src/deep-freeze.js
5
5
  function deepFreeze(value) {
6
6
  if (value && typeof value === "object" && !Object.isFrozen(value)) {
@@ -615,12 +615,12 @@ var PROCESSOR_DEFINITIONS = deepFreeze([
615
615
  // navigation with the hosted_form notice. Only the entry path is matched, exactly (processors/eximbay.js
616
616
  // isEximbayEntryUrl: a query would reach Eximbay's servlet as fields beside the signed body). The window's
617
617
  // 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.
618
+ // the agent's browser never loads the window while the entry waits. The SDK's Eximbay gate refuses those
619
+ // two posts in the agent's browser, with every other post to these hosts but the entry
620
+ // (checkout/src/pre-claim.ts eximbayPreClaim), so no dummy card reaches Eximbay. Eximbay's test host serves
621
+ // the same window for test merchants, so a live row reaches the live host only and a test row the test host
622
+ // only. Dark: served only to a client that declares the capability, and gated off for every org the operator
623
+ // has not allowlisted.
624
624
  capability: "eximbay_hosted_payment_page",
625
625
  match: "secureapi\\.(?:test\\.)?eximbay\\.com/Gateway/BasicProcessor\\.krp",
626
626
  hosts: ["^secureapi\\.eximbay\\.com$", "^secureapi\\.test\\.eximbay\\.com$"],
@@ -2120,13 +2120,14 @@ var PROCESSOR_DEFINITIONS = deepFreeze([
2120
2120
  // approves. paygent.js holds the rule the pause decision and the device read: the exact URL, the
2121
2121
  // script's content type, and createToken's seven keys in its order and spelling with the token key
2122
2122
  // 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.
2123
+ // abandons the XHR after 35 s, too soon for an approval after the press that sends it, so the
2124
+ // lane is prepared only (`preparationRequired`): the cardholder approves before the press, and the
2125
+ // press's request binds that approval (paygent.js isPreparedPaygentRequest). On the live host it
2126
+ // binds only the merchant_id a reviewed pin lists for the approved origin and merchant
2127
+ // (PAYGENT_MERCHANT_PINS), and one approval binds one request, so a second card request is sent nowhere.
2125
2128
  // Paygent's hosted payment page (link.paygent.co.jp) carries the card on other paths and is not paused.
2126
2129
  // 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.
2130
+ // (paygent.js paygentAnswerOutcome), never the shared status rule.
2130
2131
  // Ships dark: served only to a client that declares `paygent_token`, gated off for every org until an
2131
2132
  // operator lists one (`paygent:<org>`), and autopilot never sends this request (autopilot.js
2132
2133
  // DEVICE_REPLAY_REFUSED_OPERATIONS). The environment is pinned (S7): sandbox.paygent.co.jp only on
@@ -2136,6 +2137,7 @@ var PROCESSOR_DEFINITIONS = deepFreeze([
2136
2137
  hosts: ["^token\\.paygent\\.co\\.jp$", "^sandbox\\.paygent\\.co\\.jp$"],
2137
2138
  sandboxHosts: ["^sandbox\\.paygent\\.co\\.jp$"],
2138
2139
  hostEnvironmentPinned: true,
2140
+ preparationRequired: true,
2139
2141
  // The body's shape is a form's (key=value pairs); its wire type stays the script's text/plain
2140
2142
  // (request-policy.js contentTypeFor). No header but the content type rides.
2141
2143
  encoding: "form",
@@ -2544,6 +2546,212 @@ var PROCESSOR_DEFINITIONS = deepFreeze([
2544
2546
  "^recaptcha-token$",
2545
2547
  "^recaptcha-type$"
2546
2548
  ]
2549
+ },
2550
+ {
2551
+ psp: "cardcom",
2552
+ // Cardcom (Israel), whose own payment page (https://secure.cardcom.solutions/EA/EA5/<page id>, Cardcom's Vue app)
2553
+ // posts the whole page state on Process, as same-origin JSON, to https://secure.cardcom.solutions/api/EA5/SubmitPayment:
2554
+ // the bot check's token, the page's seven stores and a 3-D Secure block. The card sits in clear text twice,
2555
+ // Store.PaymentStore.{CardNumberField, MonthsField, YearsField, CvvField, CardOwnerNameField}.Value and
2556
+ // _3DSecureReq.{CardNumber, CardExpireMonth, CardExpireYear, CVV, CardholderFullName}; the page id, the terminal and
2557
+ // the amount ride beside it. cardcom.js holds the request rule the pause decision, the API's create and the device
2558
+ // 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
2559
+ // product, its two copies of the card the same; a standing order, installments, a kept card, 3-D Secure, an
2560
+ // Israeli ID and a Turnstile or reCAPTCHA v2 page are refused by name. The endpoint answers any browser origin, so
2561
+ // the device sends it by a direct fetch, with no cookie, and the bot check's token rides inside the paused body as
2562
+ // the person's press minted it. Cardcom's test terminal shares the live host, so no sandbox host is marked and the
2563
+ // lane takes live rows alone, each under a reviewed page pin (cardcom.js cardcomMerchantRefusal). Cardcom answers
2564
+ // inside HTTP 200 whether it charged or not, so its own judge reads every answer (cardcom.js cardcomAnswerOutcome).
2565
+ // The LowProfile pages' /api/LPC6/SubmitPayment, the wallets' posts and the legacy EA4 pages are not this lane's.
2566
+ // Ships dark: served only to a client that declares `cardcom_payment_page`, gated off for every org until an
2567
+ // operator lists one (`cardcom:<org>`), and autopilot never sends this request (autopilot.js
2568
+ // DEVICE_REPLAY_REFUSED_OPERATIONS). `(?![\w/.%-])` ends the path for a consumer that tests `match` unanchored.
2569
+ capability: "cardcom_payment_page",
2570
+ match: "secure\\.cardcom\\.solutions/api/EA5/SubmitPayment(?![\\w/.%-])",
2571
+ hosts: ["^secure\\.cardcom\\.solutions$"],
2572
+ encoding: "json",
2573
+ // The device writes the JSON Content-Type itself; Origin, Referer and the page's cookies never ride.
2574
+ passthroughHeaders: [],
2575
+ jsonCardFields: [["Store", "PaymentStore", "CardNumberField", "Value"], ["_3DSecureReq", "CardNumber"]]
2576
+ },
2577
+ {
2578
+ psp: "nexi_checkout",
2579
+ // Nexi Checkout (formerly Nets Easy; Denmark, Norway, Sweden, Finland), which takes the card in its own card frame,
2580
+ // https://checkout.dibspayment.eu/v1/, embedded in the merchant's page by checkout.js or mounted by Nexi's hosted
2581
+ // payment page. On Pay the frame posts the card in clear JSON to its own origin, https://checkout.dibspayment.eu/
2582
+ // api/v1/pay, with the merchant's checkout key and the payment's id as headers: paymentType.card.cardNumber,
2583
+ // expiryMonth (MM), expiryYear (YY), cardVerificationCode and cardholderName, beside the payment's amount in minor
2584
+ // units, the card fee and the "save my card" and "remember me" flags. nexi-checkout.js holds the request rule the
2585
+ // pause decision, the API's create and the device all read: exactly the pay endpoint URL, the JSON type, the frame's
2586
+ // session headers and the card form's body byte for byte, with "save my card", "remember me" or a card fee refused
2587
+ // by name. The endpoint answers no browser origin, so the card leaves the cardholder's device only through the
2588
+ // checkout relay, and only the frame's four session headers ride beside the card. test.checkout.dibspayment.eu is
2589
+ // Nexi's test environment: pinned (S7) to test rows, which send only Nexi's published test cards.
2590
+ // Ships dark: served only to a client that declares `nexi_checkout_pay`, gated off for every org until an operator
2591
+ // lists one (`nexi_checkout:<org>`), and autopilot never sends this request (autopilot.js
2592
+ // DEVICE_REPLAY_REFUSED_OPERATIONS). `(?![\w/.%-])` ends the path for a consumer that tests `match` unanchored.
2593
+ capability: "nexi_checkout_pay",
2594
+ match: "(?:test\\.)?checkout\\.dibspayment\\.eu/api/v1/pay(?![\\w/.%-])",
2595
+ hosts: ["^checkout\\.dibspayment\\.eu$", "^test\\.checkout\\.dibspayment\\.eu$"],
2596
+ sandboxHosts: ["^test\\.checkout\\.dibspayment\\.eu$"],
2597
+ hostEnvironmentPinned: true,
2598
+ encoding: "json",
2599
+ // The frame's checkout key, payment id, partner merchant number and API version. Origin, Referer and cookies never ride.
2600
+ passthroughHeaders: ["^checkoutkey$", "^paymentid$", "^partnermerchantnumber$", "^api-version$"],
2601
+ jsonCardFields: [["paymentType", "card", "cardNumber"]]
2602
+ },
2603
+ {
2604
+ psp: "openpay_bbva",
2605
+ // Openpay (BBVA México's online acquiring platform; Openpay Colombia and Openpay Perú) through openpay.js, the
2606
+ // tokenizer a merchant's own page loads: on Pay it posts the card with one XHR, in clear JSON, to
2607
+ // https://api.openpay.mx/v1/<merchant id>/tokens (api.openpay.co, api.openpay.pe) under the merchant's public key
2608
+ // (Basic authorization), as {card_number, holder_name, cvv2, expiration_month, expiration_year[, address]} in the
2609
+ // caller's own order and types. The answer is a single-use token the merchant's server charges later; the request
2610
+ // names no amount, so the agent's amount is the price the cardholder approves. openpay.js holds the rules the pause
2611
+ // decision, the API's create, the prepared bind and the device read: the exact token URL, openpay.js's three
2612
+ // headers and the caller's body member by member. openpay.js abandons the request 40 s after Pay, so the lane is
2613
+ // prepared only (preparationRequired). Openpay's API answers any browser origin, so the card leaves the
2614
+ // cardholder's device by a direct fetch. A production request pays only an origin whose reviewed pin names its
2615
+ // host, merchant id and key (openpay.js openpayMerchantRefusal). sandbox-api.openpay.<tld> is Openpay's sandbox:
2616
+ // pinned (S7) to test rows, which send only Openpay's documented test cards. Openpay can answer a refusal inside a
2617
+ // 2xx, so its own judge reads every answer (openpay.js openpayAnswerOutcome), never the shared status rule.
2618
+ // Ships dark: served only to a client that declares `openpay_tokenizer`, gated off for every org until an operator
2619
+ // lists `openpay_bbva:<org>`, and autopilot never sends it (autopilot.js DEVICE_REPLAY_REFUSED_OPERATIONS).
2620
+ // `(?![\w/.%-])` ends the path for a consumer that tests `match` unanchored.
2621
+ capability: "openpay_tokenizer",
2622
+ match: "(?:sandbox-)?api\\.openpay\\.(?:mx|co|pe)/v1/[a-z0-9]{10,40}/tokens(?![\\w/.%-])",
2623
+ hosts: [
2624
+ "^api\\.openpay\\.mx$",
2625
+ "^api\\.openpay\\.co$",
2626
+ "^api\\.openpay\\.pe$",
2627
+ "^sandbox-api\\.openpay\\.mx$",
2628
+ "^sandbox-api\\.openpay\\.co$",
2629
+ "^sandbox-api\\.openpay\\.pe$"
2630
+ ],
2631
+ sandboxHosts: ["^sandbox-api\\.openpay\\.mx$", "^sandbox-api\\.openpay\\.co$", "^sandbox-api\\.openpay\\.pe$"],
2632
+ hostEnvironmentPinned: true,
2633
+ preparationRequired: true,
2634
+ encoding: "json",
2635
+ // openpay.js's public key and its JSON Accept. Origin, Referer and cookies never ride.
2636
+ passthroughHeaders: ["^authorization$", "^accept$"],
2637
+ jsonCardFields: [["card_number"]]
2638
+ },
2639
+ {
2640
+ psp: "toast",
2641
+ // Toast's payments frame (payments.toasttab.com), the card leg of every Toast online-ordering and
2642
+ // e-gift checkout: one POST to /v1/payment-methods with the card sealed in card.cardData, RSA-OAEP
2643
+ // with SHA-1 over a JSON object under a 2048-bit key the frame hardcodes. toast.js holds the one
2644
+ // request rule the pause decision, the API's create, the approve leg and the device read: exactly
2645
+ // that URL and the frame's guest card body byte for byte, under the key id toast.js pins. The device
2646
+ // seals the real card under that pinned key (never one from a row, a request or a page), and the
2647
+ // agent's browser continues its own request with only cardData rewritten, so the frame's bearer,
2648
+ // its restaurant and intent headers and the session secret stay the page's and none is stored. Apple
2649
+ // Pay and Google Pay payment methods share the URL, carry no card the Vault holds, and continue
2650
+ // untouched (passWithoutCard); `jsonCardFields` names where the card sits, and toast.js's own gate
2651
+ // answers before it (card-fields.js). Toast's sandbox needs a partner account, so only the live host is
2652
+ // named and a test row is refused at create. Ships dark: served only to a client that declares
2653
+ // `toast_pinned_key`, off for every org until an operator lists `toast:<org>`, and autopilot never
2654
+ // sends it (autopilot.js DEVICE_REPLAY_REFUSED_OPERATIONS). `(?![\w/.-])` ends the path, so a
2655
+ // consumer that tests `match` unanchored never takes /v1/payment-methods/x for a card request.
2656
+ capability: "toast_pinned_key",
2657
+ match: "payments\\.toasttab\\.com/v1/payment-methods(?![\\w/.-])",
2658
+ hosts: ["^payments\\.toasttab\\.com$"],
2659
+ encoding: "json",
2660
+ passthroughHeaders: [],
2661
+ jsonCardFields: [["card", "cardData"]],
2662
+ passWithoutCard: "payments\\.toasttab\\.com/v1/payment-methods",
2663
+ clientSideEncrypted: true,
2664
+ mode: "cse",
2665
+ cse: { scheme: "rsa-oaep-sha1-json", at: "card", fields: ["cardData"] }
2666
+ },
2667
+ {
2668
+ psp: "fastspring",
2669
+ // FastSpring's checkout, the merchant of record for every FastSpring store: the popup (Store Builder
2670
+ // Library), embedded and web storefronts all run FastSpring's one checkout app, and its Pay posts the
2671
+ // card as one JSON XHR to <store>.onfastspring.com[/popup-<name>|/embedded-<name>]/session/<id>/payment
2672
+ // (<store>.test.onfastspring.com in a store's test mode) under the session's X-Session-Token. PAN@
2673
+ // card.number, in FastSpring's groups of four or as digits, with card.month, card.year and
2674
+ // card.security beside it. fastspring.js holds the request rule the pause decision, the API's create and
2675
+ // the device all read: exactly a session's /payment URL, a JSON Content-Type, the token, and the card
2676
+ // body (a card FastSpring saved, a renewal, a gift, a tax id's EBANX route and a CAPTCHA answer each
2677
+ // refused by name). The request names no amount and no seller: the store in the host is the payee,
2678
+ // so a live payment goes only to a store fastspring.js pins, and the session's own document names
2679
+ // the total. PayPal, wallets and bank methods post the same URL with no card and continue untouched
2680
+ // (passWithoutCard). The checkout answers no other origin's preflight, so the card leaves the
2681
+ // cardholder's device only through the checkout relay. Ships dark: served only to a client that
2682
+ // declares `fastspring_card_payment`, gated off for every org until an operator lists one
2683
+ // (`fastspring:<org>`), and autopilot never sends this request (autopilot.js
2684
+ // DEVICE_REPLAY_REFUSED_OPERATIONS). The environment is pinned (S7): a test store's host only on test
2685
+ // rows and only with documented test cards. `(?![\w/.%;-])` ends the path for a consumer that tests
2686
+ // `match` unanchored. Not here: FastSpring Classic (sites.fastspring.com), a separate application
2687
+ // whose card step is a session-bound form navigation.
2688
+ capability: "fastspring_card_payment",
2689
+ 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/.%;-])",
2690
+ 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$"],
2691
+ sandboxHosts: ["^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.test\\.onfastspring\\.com$"],
2692
+ hostEnvironmentPinned: true,
2693
+ encoding: "json",
2694
+ // The session's token, which FastSpring's interceptor writes on every call of the page. Origin,
2695
+ // Referer and cookies never ride: the session id and the token are the whole binding.
2696
+ passthroughHeaders: ["^x-session-token$"],
2697
+ jsonCardFields: [["card", "number"]],
2698
+ 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"
2699
+ },
2700
+ {
2701
+ psp: "omise",
2702
+ // Omise's card token (Opn Payments; Thailand, Japan, Singapore and Malaysia): every Omise card form, the card
2703
+ // frame cdn.omise.co/pay.html that the official WooCommerce plugin, Omise's hosted checkout page and Payment
2704
+ // Links+ load, and a merchant's own form calling Omise.js 2.16.0, posts the card in one JSON body to Omise's
2705
+ // vault under the merchant's public key (Basic): PAN@ card.number, the expiry @ card.expiration_month and
2706
+ // .expiration_year in the form's own spelling, the code @ card.security_code, beside the holder's name and
2707
+ // address. Unencrypted, and it names no amount: the merchant's server charges the token for its own order
2708
+ // afterwards. omise.js holds the rule the pause decision, the API's create and the device all read: exactly
2709
+ // this URL, a public key and Omise.js's own headers, and the card form's token body as JSON.stringify writes
2710
+ // it, with a wallet's tokenization on the same URL refused. vault.omise.co answers the Vault's origin
2711
+ // (Access-Control-Allow-Origin *), so the cardholder's device sends it itself. Test mode shares the host
2712
+ // under a pkey_test_ key, so no sandbox host is marked: the device sends a test key only Omise's documented
2713
+ // test cards (omise.js OMISE_TEST_CARDS). 3-D Secure, where the merchant's account runs it, follows the
2714
+ // merchant's charge on 3dsms.omise.co with no card.
2715
+ // Ships dark: served only to a client that declares `omise_card_token`, gated off for every org until an
2716
+ // operator lists one (`omise:<org>`), and the backend's gate serves only Agentcard's own company until the
2717
+ // token's public key is bound to the merchant (backend config.ts OMISE_KEY_BOUND_TO_MERCHANT). Autopilot never
2718
+ // sends this request (autopilot.js DEVICE_REPLAY_REFUSED_OPERATIONS).
2719
+ capability: "omise_card_token",
2720
+ match: "vault\\.omise\\.co/tokens",
2721
+ hosts: ["^vault\\.omise\\.co$"],
2722
+ encoding: "json",
2723
+ // Omise.js's own headers: the public key and its client's name. Origin, Referer and cookies never ride.
2724
+ passthroughHeaders: ["^authorization$", "^x-user-agent$"],
2725
+ jsonCardFields: [["card", "number"]]
2726
+ },
2727
+ {
2728
+ psp: "xendit",
2729
+ // Xendit's hosted invoice checkout (checkout.xendit.co/web/<invoice id>), which every Xendit Invoice API
2730
+ // merchant, dashboard payment link and donation link, Shopify's Xendit app and the older WooCommerce plugin
2731
+ // 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
2732
+ // under the business's publishable key (Basic). PAN@ card_data.account_number, the expiry as "MM" and
2733
+ // "YYYY" @ card_data.exp_month and .exp_year, the code @ card_data.cvn and again @ card_cvn, beside the
2734
+ // invoice's amount and currency. Unencrypted. xendit.js holds the rule the pause decision, the API's create
2735
+ // and the device all read: exactly this URL, the publishable key and Xendit.js's own headers, and the card
2736
+ // form's single-use token body byte for byte, with a multi-use token (the card kept on file, and the
2737
+ // checkout's Safe Acceptance mode) refused by its own code, and a token that skips 3-D Secure or names a
2738
+ // xenPlatform sub-account refused too. storeCVN posts a code alone to the same URL
2739
+ // and is refused like any other body. api.xendit.co answers the Vault's origin (Access-Control-Allow-Origin
2740
+ // *), so the cardholder's device sends it itself. Test mode shares the host under an xnd_public_development_
2741
+ // key, so no sandbox host is marked: the device sends a test-mode key only Xendit's documented test cards
2742
+ // (xendit.js XENDIT_TEST_CARDS). 3-D Secure follows the answer on redirect.xendit.co with no card.
2743
+ // Ships dark: served only to a client that declares `xendit_card_token`, gated off for every org until an
2744
+ // operator lists one (`xendit:<org>`), and the backend's gate serves only Agentcard's own company until the
2745
+ // token's publishable key is bound to the merchant (backend config.ts XENDIT_KEY_BOUND_TO_MERCHANT). Autopilot
2746
+ // never sends this request (autopilot.js DEVICE_REPLAY_REFUSED_OPERATIONS).
2747
+ capability: "xendit_card_token",
2748
+ match: "api\\.xendit\\.co/v2/credit_card_tokens",
2749
+ hosts: ["^api\\.xendit\\.co$"],
2750
+ encoding: "json",
2751
+ // Xendit.js's own headers: the publishable key, and the client's type, version and id (the invoice). Origin,
2752
+ // Referer and cookies never ride.
2753
+ passthroughHeaders: ["^authorization$", "^client-type$", "^client-version$", "^client-id$"],
2754
+ jsonCardFields: [["card_data", "account_number"]]
2547
2755
  }
2548
2756
  ]);
2549
2757
  var PSP_RECOGNIZERS = deepFreeze(PROCESSOR_DEFINITIONS.map(({ compose, encryptedCardFields, deviceSteps, deviceEncrypt, ...definition }) => definition));
@@ -2739,6 +2947,17 @@ var PAYGENT_TOKEN_HOSTS = /* @__PURE__ */ Object.freeze({
2739
2947
  sandbox: Object.freeze(["sandbox.paygent.co.jp"])
2740
2948
  });
2741
2949
  var PAYGENT_CONTENT_TYPE = "text/plain;charset=UTF-8";
2950
+ var pin4 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]) });
2951
+ var PAYGENT_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
2952
+ pin4({
2953
+ id: "fundex_tcs_eng",
2954
+ merchant: "Tokyo Chinese School",
2955
+ merchantId: "60362",
2956
+ keySha256: "6073dee112b1e4089025d1c1f3c4cfad818c314a81943ffa55b839cb2df51018",
2957
+ origins: ["https://fundexapp.jp"],
2958
+ currency: "jpy"
2959
+ })
2960
+ ]);
2742
2961
  // src/multipart-form.js
2743
2962
  var BOUNDARY_CHARACTERS = "[A-Za-z0-9'+_.-]{1,70}";
2744
2963
  var BOUNDARY = new RegExp(`^${BOUNDARY_CHARACTERS}$`);
@@ -2748,9 +2967,9 @@ function multipartBoundary(contentType) {
2748
2967
  return match ? match[1] : null;
2749
2968
  }
2750
2969
  // src/pay-nl.js
2751
- var pin4 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]), serviceIds: Object.freeze([...fields.serviceIds]) });
2970
+ var pin5 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]), serviceIds: Object.freeze([...fields.serviceIds]) });
2752
2971
  var PAY_NL_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
2753
- pin4({ id: "weeztix", merchant: "Weeztix", origins: ["https://shop.weeztix.com"], serviceIds: ["SL-6399-2740"] })
2972
+ pin5({ id: "weeztix", merchant: "Weeztix", origins: ["https://shop.weeztix.com"], serviceIds: ["SL-6399-2740"] })
2754
2973
  ]);
2755
2974
  var ERROR_KEYS = /* @__PURE__ */ Object.freeze(["errorId", "errorTag", "errorMessage", "errorFieldName"]);
2756
2975
  var REQUEST_KEYS = /* @__PURE__ */ Object.freeze(["result", ...ERROR_KEYS]);
@@ -2768,9 +2987,9 @@ var TWOC2P_KEYS = /* @__PURE__ */ Object.freeze({
2768
2987
  })
2769
2988
  });
2770
2989
  // src/hipay.js
2771
- var pin5 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]), usernames: Object.freeze([...fields.usernames]) });
2990
+ var pin6 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]), usernames: Object.freeze([...fields.usernames]) });
2772
2991
  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"] })
2992
+ pin6({ id: "happybulle", merchant: "HappyBulle", origins: ["https://www.happybulle.com"], usernames: ["94683309.secure-gateway.hipay-tpp.com"] })
2774
2993
  ]);
2775
2994
  // src/amazon-payment-services.js
2776
2995
  var BODY_LIMIT = 32 * 1024;
@@ -2780,14 +2999,14 @@ var REQUIRED_KEYS = /* @__PURE__ */ Object.freeze(["encrypted_pan", "exp_month",
2780
2999
  var OPTIONAL_KEYS = /* @__PURE__ */ Object.freeze(["address_line1", "phone_numbers", "email_address", "name", "address_zip"]);
2781
3000
  var CARD_ORDER = /* @__PURE__ */ Object.freeze([...REQUIRED_KEYS, ...OPTIONAL_KEYS]);
2782
3001
  // src/tap-payments.js
2783
- var pin6 = (fields) => Object.freeze({
3002
+ var pin7 = (fields) => Object.freeze({
2784
3003
  ...fields,
2785
3004
  origins: Object.freeze([...fields.origins]),
2786
3005
  sessions: Object.freeze({ ...fields.sessions }),
2787
3006
  key: Object.freeze({ ...fields.key })
2788
3007
  });
2789
3008
  var TAP_PAYMENTS_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
2790
- pin6({
3009
+ pin7({
2791
3010
  id: "casefilegame",
2792
3011
  merchant: "Casefilegame",
2793
3012
  tapMerchantId: "67977048",
@@ -2930,20 +3149,37 @@ var SUCCESS_RULES = {
2930
3149
  cvvIncluded: (value) => typeof value === "boolean"
2931
3150
  };
2932
3151
  var SUCCESS_KEYS = Object.keys(SUCCESS_RULES);
3152
+ // src/openpay.js
3153
+ var LETTERS2 = "A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u017F";
3154
+ var PAGE_NAME2 = new RegExp(`^[${LETTERS2} .'-]{1,64}$`);
3155
+ var HAS_LETTER2 = new RegExp(`[${LETTERS2}]`);
3156
+ var ADDRESS_VALUE2 = new RegExp(`^[\\x20-\\x7e\\u00a0-\\u017f]{0,128}$`);
3157
+ var PAN_LIKE2 = new RegExp(`(?:[0-9][^0-9${LETTERS2}]*){12,}`);
3158
+ var pin8 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]), publicKeys: Object.freeze([...fields.publicKeys]) });
3159
+ var OPENPAY_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
3160
+ pin8({
3161
+ id: "diario_de_yucatan",
3162
+ merchant: "Diario de Yucatán",
3163
+ origins: ["https://www.yucatan.com.mx"],
3164
+ host: "api.openpay.mx",
3165
+ merchantId: "mqyloyrm8tsvtsgcrj0d",
3166
+ publicKeys: ["pk_260aa43616a445bb98472e6ca51da968"]
3167
+ })
3168
+ ]);
2933
3169
  // src/poynt.js
2934
3170
  var UUID = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";
2935
3171
  var NONCE_URL = new RegExp(`^https://services\\.poynt\\.net/v1/commerce/stores/(${UUID})/payment-tokens/generate-nonce$`);
2936
3172
  var STORE_ID = new RegExp(`^${UUID}$`);
2937
3173
  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]) });
3174
+ var pin9 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]), storeIds: Object.freeze([...fields.storeIds]) });
2939
3175
  var POYNT_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
2940
- pin7({
3176
+ pin9({
2941
3177
  id: "yearning_for_learning",
2942
3178
  merchant: "Yearning for Learning Publishing & Coaching",
2943
3179
  origins: ["https://ff305485-ba6c-423a-87b0-cebe3f83ffe9.mysimplestore.com"],
2944
3180
  storeIds: ["71ac12ed-e61f-4318-95db-db0e7c649d6f"]
2945
3181
  }),
2946
- pin7({
3182
+ pin9({
2947
3183
  id: "timber_ridge_bookkeeping",
2948
3184
  merchant: "Timber Ridge Bookkeeping",
2949
3185
  origins: ["https://d7d64ac3-0352-4e53-af9a-f6d8e7b5fb71.mysimplestore.com"],
@@ -2951,6 +3187,34 @@ var POYNT_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
2951
3187
  })
2952
3188
  ]);
2953
3189
  var MAX_ANSWER_CHARS = 16 * 1024;
3190
+ // src/cardcom.js
3191
+ var CARDCOM_ORIGIN = "https://secure.cardcom.solutions";
3192
+ var CARDCOM_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
3193
+ Object.freeze({
3194
+ id: "machon_alte_usd",
3195
+ merchant: "Machon Alte",
3196
+ origins: Object.freeze([CARDCOM_ORIGIN]),
3197
+ page: "kzR5pTyr0kC3oqjpGbCMiQ",
3198
+ terminal: 162226,
3199
+ products: Object.freeze([Object.freeze({ uid: "JoQrlcuGCUWYM4I66eX7pw", currency: "usd", price: null })]),
3200
+ settings: "e38d7c7abce83a3a994a707e345595cf6ec2a15d77794a8eea70c0d5ce4773ab"
3201
+ })
3202
+ ]);
3203
+ // src/toast.js
3204
+ var TOAST_SUBSTITUTION = /* @__PURE__ */ Object.freeze({ at: "card", fields: Object.freeze(["cardData"]) });
3205
+ // src/fastspring.js
3206
+ var FASTSPRING_STORE_PINS = /* @__PURE__ */ Object.freeze([
3207
+ Object.freeze({ environment: "production", store: "daisydisk", storefront: "", merchant: "DaisyDisk" })
3208
+ ]);
3209
+ var STORE = "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?";
3210
+ 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$`);
3211
+ // src/omise.js
3212
+ var pin10 = (fields) => Object.freeze({ ...fields, origins: Object.freeze([...fields.origins]), keys: Object.freeze([...fields.keys]) });
3213
+ var OMISE_MERCHANT_PINS = /* @__PURE__ */ Object.freeze([
3214
+ pin10({ id: "taejai", merchant: "Taejai", origins: ["https://taejai.com"], keys: ["pkey_53q6mm66esjr563ob0h"] }),
3215
+ pin10({ id: "socialgiver", merchant: "Socialgiver", origins: ["https://www.socialgiver.com"], keys: ["pkey_5d5o2iahksmyrkybemg"] }),
3216
+ pin10({ id: "thireq_pecko_links", merchant: "Thireq Pecko", origins: ["https://linksplus.omise.co"], keys: ["pkey_65w70xniwsinf0gm680"] })
3217
+ ]);
2954
3218
  // src/cybersource-secure-acceptance.js
2955
3219
  var SA_BODY_LIMIT = 32 * 1024;
2956
3220
  var SA_REPLY_LIMIT = 64 * 1024;
@@ -2971,6 +3235,10 @@ var AMADEUS_CARD_URLS = Object.freeze({
2971
3235
  dcp: Object.freeze([])
2972
3236
  })
2973
3237
  });
3238
+ var AMADEUS_RELAY_HOSTS = /* @__PURE__ */ Object.freeze({
3239
+ production: Object.freeze(["paypages.payment.amadeus.com"]),
3240
+ sandbox: Object.freeze(["paypages.test.payment.amadeus.com"])
3241
+ });
2974
3242
  var AMADEUS_MERCHANT_EXPIRY_POLICIES = Object.freeze(["refuse", "fill"]);
2975
3243
  var AMADEUS_REFUSAL_REASONS = Object.freeze([
2976
3244
  "unsupported",
@@ -0,0 +1,37 @@
1
+ declare var TOAST_SCHEME: string;
2
+ declare var ToastError: {
3
+ new (reason: any): {
4
+ name: string;
5
+ message: string;
6
+ stack?: string;
7
+ cause?: unknown;
8
+ };
9
+ };
10
+ declare function toastCardPlaintext(card: any, postalCode: any): string;
11
+ declare function encryptToastCard(card: any, request: any, facilities?: {}): Promise<{
12
+ cardData: string;
13
+ }>;
14
+ declare function isToastCiphertextUnderKey(value: any): boolean;
15
+ declare function toastKeyUsable(authorization: any): boolean;
16
+ declare function toastSubstitutionsRefusal(template: any, substitutions: any): {
17
+ code: string;
18
+ message: any;
19
+ } | null;
20
+ declare function substituteToastCardData(url: any, body: any, fields: any): string;
21
+ declare function toastAnswerOutcome(status: any, text: any): {
22
+ outcome: string;
23
+ reason: string;
24
+ code?: undefined;
25
+ body?: undefined;
26
+ } | {
27
+ outcome: string;
28
+ code: string;
29
+ reason?: undefined;
30
+ body?: undefined;
31
+ } | {
32
+ outcome: string;
33
+ body: string;
34
+ reason?: undefined;
35
+ code?: undefined;
36
+ };
37
+ export { TOAST_SCHEME, ToastError, encryptToastCard, isToastCiphertextUnderKey, substituteToastCardData, toastAnswerOutcome, toastCardPlaintext, toastKeyUsable, toastSubstitutionsRefusal };