@agent-cards/sdk 0.23.24 → 0.23.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +6 -1
- package/dist/agent-amount.generated.js +1 -1
- package/dist/barion.d.ts +44 -0
- package/dist/barion.js +84 -0
- package/dist/capabilities.generated.js +1 -1
- package/dist/card-fields.generated.js +3 -3
- package/dist/cdp.js +4 -0
- package/dist/client.d.ts +7 -0
- package/dist/client.js +7 -0
- package/dist/hosted-entry.js +2 -0
- package/dist/pre-claim.d.ts +1 -0
- package/dist/pre-claim.js +18 -1
- package/dist/primer.generated.js +3 -3
- package/dist/stripe-checkout.generated.js +3 -3
- package/dist/tokenex-iframe.generated.d.ts +18 -6
- package/dist/tokenex-iframe.generated.js +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ An unreleased change waits as a file of its own in `changes/` (`changes/README.m
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.23.25
|
|
8
|
+
|
|
9
|
+
- Pause Barion's Smart Gateway (where Hungarian, Czech and Slovak shops send a buyer who pays by card) for the cardholder's device. The sync now also asks for `capabilities=barion_hosted_payment_page`, and the API serves Barion's recognizer only for a company Agentcard turned Barion on for. The SDK pauses the gateway link, `https://secure.barion.com/Pay?Id=<payment id>` (or `secure.test.barion.com` for a test payment), which carries no card, as a `hosted_form` authorization, and answers the paused navigation with the `submitted_on_device` page once the cardholder's device has paid it. The API takes a Barion entry only from the checkout page of a shop Agentcard reviewed, the page the SDK names as `checkout_origin`. The link names no amount, so send the total Barion's gateway shows, with its currency: `authorize()` throws `AmountRequiredError` without it, and the API refuses a create without one (`amount_required`). A merchant's server usually sends the buyer to the gateway with a redirect, and only `attachToCdp` pauses a redirect, so attach to a Barion checkout with `attachToCdp`. Every post a page the SDK watches makes to the gateway, such as its email check and its card posts, leads to a card: the SDK fails each one and reads `unsupported` with reason `processor_card_page`. Matching API and Vault releases are required, and no Barion shop is reviewed yet. Barion stays off for every company Agentcard has not turned it on for.
|
|
10
|
+
|
|
7
11
|
## 0.23.24
|
|
8
12
|
|
|
9
13
|
- Continue Tap Payments' card form with the card the cardholder's device encrypts, for a company Agentcard turned Tap on for (dark launch). Merchants in Kuwait, Saudi Arabia, the UAE, Bahrain, Qatar and Oman take cards on Tap's hosted checkout at `checkout.tap.company`, whose card frame encrypts the card under the merchant's own key and sends it to `https://sdk.tap.company/v2/card/token`. This build declares `tap_card_sdk_token` on every sync, and the API serves Tap's recognizer only for a company Agentcard listed for it, so every other company's Tap payments go through untouched, as for an unsupported processor. The token request does not decide the charge: Tap's checkout charges the order the merchant holds, so `authorize()` refuses a Tap request without `amount` above zero and `currency` (`AmountRequiredError`). Send the total Tap's page shows. Before it creates anything, the API refuses a request that asks Tap to keep the card (`invalid_tap_payments_request`), a merchant Agentcard has not reviewed for the checkout page (`unsupported_checkout`), a live merchant's card form on a test-mode client or the reverse (`tap_payments_environment_mismatch`), and a request whose order names your currency at another total (`amount_mismatch`). After the approval the SDK writes the device's ciphertext over the one your agent's page wrote, in that request alone, moves no other byte, and continues the page's own request. 3-D Secure and the merchant's charge then run in the agent's browser, where a challenge needs a person at that browser. The SDK refuses a request that is not byte for byte the one the cardholder approved, or that names another merchant key. The API serves the device's ciphertext only in the 10 minutes after the approval and deletes it once that window passes. A Tap payment also needs the matching API and Vault releases.
|
|
@@ -14,6 +18,8 @@ An unreleased change waits as a file of its own in `changes/` (`changes/README.m
|
|
|
14
18
|
|
|
15
19
|
- `attachToCdp` and `attachToPlaywright` record the answers Paddle's checkout service gives its frame (`POST /transaction-checkout`, `PATCH /transaction-checkout/<id>/`, `POST .../customer`), read-only and cut to the checkout's terms, and send the newest eight with a Paddle TokenEx create as `paddle_checkout`. The API holds `amount` to the total they state for today, so an agent that reports a free trial's renewal as today's price is refused with `amount_mismatch`. A free trial's create sends `amount: 0` with its currency; the approval then shows the renewal those answers state. A /pay that pauses before the newest answer's text is read waits up to a second for it, and a /pay that leaves while an answer is still loading sends no answers, so the API never reads an older answer's terms in place of the newest. No customer, address or seller detail from those answers leaves the browser. A runtime that intercepts on its own can build the same capture with the exported `PaddleCheckoutWatch`: it reports each answer to the watch as `sent`, `answered`, `finished` and `read`, awaits `capture(pausedAt, payUrl)` when the /pay pauses, and passes the result to `authorize()` as `paddleCheckout`.
|
|
16
20
|
|
|
21
|
+
- Recognize Amazon Payment Services' custom merchant page behind a dark launch. `syncRegistry()` now declares the `aps_custom_merchant_page` capability (`SUPPORTED_CAPABILITIES`), and the API serves the recognizer only to an org Agentcard has enabled, so no other org's APS checkout changes. For an enabled org, the merchant page's own card form, posted top-level to `https://checkout.payfort.com/FortAPI/paymentPage` (`sbcheckout.payfort.com` on APS's sandbox), pauses for the cardholder's approval, and the page navigates on with APS's own answer: APS's page, which posts APS's fields to the form's return page, or APS's redirect to that page. `authorize()` hands over only an answer payment-core's judge reads as a token for the form it paused, and throws `PaymentOutcomeUnknownError` with reason `aps_answer_unconfirmed` for any other. The form names no amount, so `authorize()` throws `AmountRequiredError` unless you pass `amount` and `currency`, above zero. A payment also needs the matching API, checkout relay and Vault releases.
|
|
22
|
+
|
|
17
23
|
## 0.23.23
|
|
18
24
|
|
|
19
25
|
- Pass ACI's ReD Shield device fingerprint through up to 8,192 characters. IKEA US's live payment step posts a fingerprint of 5,953 characters, longer than the 4,096 ACI's API reference names, and ACI takes it. Earlier releases refused any fingerprint over 4,096 characters as `aci_unsupported_request`, so an IKEA purchase still paid, but ACI's fraud screening scored every Agentcard order there without the shopper's device fingerprint. The fingerprint now continues untouched up to 8,192 characters, and a longer one is still refused without failing the checkout. No API or Vault release is needed.
|
package/README.md
CHANGED
|
@@ -301,7 +301,7 @@ so new processors work without you shipping a release. `attachToCdp` derives the
|
|
|
301
301
|
`Fetch.enable` url patterns from that same list rather than a constant, which is
|
|
302
302
|
why the sync call belongs before the attach. `agentcard.checkout.cardUrlPatterns()` returns
|
|
303
303
|
those patterns if you arm a CDP connection yourself. Call
|
|
304
|
-
`GET /v2/checkout/recognizers?modes=token,cse,hosted_form,device_encrypt&capabilities=fiserv_card_capture,gmo_shared_pk,capture_context,juspay_txns.v1,datatrans_secure_fields_tokenize,authorize_net_dpm_form,pelecard_transaction,aci_split_card.v1,creditguard_pps_process,primer_payment_instruments,payrails_device_encrypt,converge_hpp_process,worldpay_eprotect_jsonp,wspay_confirm,shiji_sts_pinned_key,amadeus_checkout_actions.v1,worldline_mycheckout_form,verifone_card_capture,ekashu_hosted_payment_page,cybersource_sa_token_create,gravy_session_fields_put,moneris_hosted_tokenization,paddle_vgs_cards,paddle_tokenex_pay,redsys_hosted_payment_page,lyra_krypton_payment,payfast_card_pay,wix_payments_tokenize,paymongo_checkout_pay,paygent_token,pay_nl_card_token,hipay_vault_token,twoc2p_secure_pay,quickpay_hosted_payment_page,revolut_card_field,paypal_card_fields,gopay_card_form,payrexx_card_frame,comgate_hosted_payment_page,przelewy24_hosted_payment_page,makecommerce_card_frame,poynt_collect_nonce,tokenex_iframe_tokenize,transbank_webpay_hosted_payment_page,sumup_checkout_process,clover_card_token,eximbay_hosted_payment_page,toast_pinned_key,xendit_card_token,omise_card_token,paytrail_hosted_payment_page,fastspring_card_payment,openpay_tokenizer`
|
|
304
|
+
`GET /v2/checkout/recognizers?modes=token,cse,hosted_form,device_encrypt&capabilities=fiserv_card_capture,gmo_shared_pk,capture_context,juspay_txns.v1,datatrans_secure_fields_tokenize,authorize_net_dpm_form,pelecard_transaction,aci_split_card.v1,creditguard_pps_process,primer_payment_instruments,payrails_device_encrypt,converge_hpp_process,worldpay_eprotect_jsonp,wspay_confirm,shiji_sts_pinned_key,amadeus_checkout_actions.v1,worldline_mycheckout_form,verifone_card_capture,ekashu_hosted_payment_page,cybersource_sa_token_create,gravy_session_fields_put,moneris_hosted_tokenization,paddle_vgs_cards,paddle_tokenex_pay,redsys_hosted_payment_page,lyra_krypton_payment,payfast_card_pay,wix_payments_tokenize,paymongo_checkout_pay,paygent_token,pay_nl_card_token,hipay_vault_token,twoc2p_secure_pay,quickpay_hosted_payment_page,revolut_card_field,paypal_card_fields,gopay_card_form,payrexx_card_frame,comgate_hosted_payment_page,przelewy24_hosted_payment_page,makecommerce_card_frame,poynt_collect_nonce,tokenex_iframe_tokenize,transbank_webpay_hosted_payment_page,sumup_checkout_process,clover_card_token,eximbay_hosted_payment_page,toast_pinned_key,xendit_card_token,omise_card_token,paytrail_hosted_payment_page,fastspring_card_payment,openpay_tokenizer,barion_hosted_payment_page`
|
|
305
305
|
for the list this build syncs. The API serves Fiserv's card capture only to a
|
|
306
306
|
build that lists `fiserv_card_capture`, and only for a company Agentcard turned
|
|
307
307
|
Fiserv on for. An older SDK never pauses a Fiserv request it could not finish,
|
|
@@ -375,6 +375,11 @@ Eximbay's window in a new window gets the pause only under `attachToCdp`, and
|
|
|
375
375
|
only once the SDK has armed that window: an entry posted into a window the page
|
|
376
376
|
opens in the same moment can leave first, and the SDK then fails the window's
|
|
377
377
|
next post, so the checkout reads `unsupported` with no card sent.
|
|
378
|
+
Barion's Smart Gateway (`barion_hosted_payment_page`) is served the same way:
|
|
379
|
+
this build pauses the gateway link `secure.barion.com/Pay?Id=<payment id>` for
|
|
380
|
+
the cardholder's device and fails every post a page it watches makes to the
|
|
381
|
+
gateway. A merchant's server often sends the buyer to that link with a
|
|
382
|
+
redirect, and only `attachToCdp` pauses a redirect.
|
|
378
383
|
Revolut Business's card field (`revolut_card_field`) is served on the same
|
|
379
384
|
terms: this build pauses the frame's card payment on `merchant.revolut.com`,
|
|
380
385
|
the cardholder's device sends it to Revolut itself, and the frame gets
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Written by scripts/generate-agent-amount.mjs from agent-amount-processors.json. Do not edit; git ignores it.
|
|
2
2
|
/** agent-amount-processors.json, sorted; client.ts reads its amount tables from it. */
|
|
3
|
-
export const AGENT_AMOUNT = { "processors": ["amazon_payment_services", "clover", "comgate", "cybersource_secure_acceptance", "fastspring", "gmo_pg", "gopay", "hipay", "makecommerce", "midtrans", "moneris", "omise", "openpay_bbva", "paddle_vgs", "pay_nl", "payfast", "paygent", "paymongo", "paypal", "payrexx", "paytrail", "pelecard", "poynt", "przelewy24", "revolut", "sb_payment_service", "sumup", "tap_payments", "toast", "tokenex_iframe", "transbank_webpay", "twoc2p", "wix_payments", "wspay"], "aboveZero": ["amazon_payment_services", "clover", "comgate", "fastspring", "gopay", "hipay", "makecommerce", "midtrans", "moneris", "omise", "openpay_bbva", "pay_nl", "payfast", "paymongo", "paypal", "payrexx", "poynt", "przelewy24", "revolut", "sb_payment_service", "sumup", "tap_payments", "toast", "tokenex_iframe", "transbank_webpay", "twoc2p"], "pageAmount": ["pelecard", "sb_payment_service"], "names": { "amazon_payment_services": "Amazon Payment Services", "clover": "Clover", "comgate": "ComGate", "cybersource_secure_acceptance": "CyberSource Secure Acceptance", "fastspring": "FastSpring", "gmo_pg": "GMO", "gopay": "GoPay", "hipay": "HiPay", "makecommerce": "MakeCommerce", "midtrans": "Midtrans", "moneris": "Moneris", "omise": "Omise", "openpay_bbva": "Openpay", "paddle_vgs": "Paddle", "pay_nl": "Pay.", "payfast": "Payfast", "paygent": "Paygent", "paymongo": "PayMongo", "paypal": "PayPal", "payrexx": "Payrexx", "paytrail": "Paytrail", "pelecard": "Pelecard", "poynt": "GoDaddy Payments", "przelewy24": "Przelewy24", "revolut": "Revolut", "sb_payment_service": "SB Payment Service", "sumup": "SumUp", "tap_payments": "Tap", "toast": "Toast", "tokenex_iframe": "TokenEx", "transbank_webpay": "Webpay", "twoc2p": "2C2P", "wix_payments": "Wix", "wspay": "WSPay" } };
|
|
3
|
+
export const AGENT_AMOUNT = { "processors": ["amazon_payment_services", "barion", "clover", "comgate", "cybersource_secure_acceptance", "fastspring", "gmo_pg", "gopay", "hipay", "makecommerce", "midtrans", "moneris", "omise", "openpay_bbva", "paddle_vgs", "pay_nl", "payfast", "paygent", "paymongo", "paypal", "payrexx", "paytrail", "pelecard", "poynt", "przelewy24", "revolut", "sb_payment_service", "sumup", "tap_payments", "toast", "tokenex_iframe", "transbank_webpay", "twoc2p", "wix_payments", "wspay"], "aboveZero": ["amazon_payment_services", "barion", "clover", "comgate", "fastspring", "gopay", "hipay", "makecommerce", "midtrans", "moneris", "omise", "openpay_bbva", "pay_nl", "payfast", "paymongo", "paypal", "payrexx", "poynt", "przelewy24", "revolut", "sb_payment_service", "sumup", "tap_payments", "toast", "tokenex_iframe", "transbank_webpay", "twoc2p"], "pageAmount": ["pelecard", "sb_payment_service"], "names": { "amazon_payment_services": "Amazon Payment Services", "barion": "Barion", "clover": "Clover", "comgate": "ComGate", "cybersource_secure_acceptance": "CyberSource Secure Acceptance", "fastspring": "FastSpring", "gmo_pg": "GMO", "gopay": "GoPay", "hipay": "HiPay", "makecommerce": "MakeCommerce", "midtrans": "Midtrans", "moneris": "Moneris", "omise": "Omise", "openpay_bbva": "Openpay", "paddle_vgs": "Paddle", "pay_nl": "Pay.", "payfast": "Payfast", "paygent": "Paygent", "paymongo": "PayMongo", "paypal": "PayPal", "payrexx": "Payrexx", "paytrail": "Paytrail", "pelecard": "Pelecard", "poynt": "GoDaddy Payments", "przelewy24": "Przelewy24", "revolut": "Revolut", "sb_payment_service": "SB Payment Service", "sumup": "SumUp", "tap_payments": "Tap", "toast": "Toast", "tokenex_iframe": "TokenEx", "transbank_webpay": "Webpay", "twoc2p": "2C2P", "wix_payments": "Wix", "wspay": "WSPay" } };
|
package/dist/barion.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Barion's Smart Gateway (secure.barion.com, where Hungarian, Czech and Slovak shops send a buyer who pays by card), as
|
|
3
|
+
* this SDK reads it.
|
|
4
|
+
*
|
|
5
|
+
* The merchant's server starts the payment with Barion and sends the buyer's browser to the gateway URL Barion answered
|
|
6
|
+
* with, https://secure.barion.com/Pay?Id=<payment id>, by a redirect or by setting the page's location. That GET carries
|
|
7
|
+
* no card, no amount and no merchant, and it is the one request a build that declares Barion's capability pauses
|
|
8
|
+
* (hosted-entry.ts): the cardholder's device repeats it over the end-to-end TLS relay and makes the gateway's own posts
|
|
9
|
+
* in the session Barion opens (payment-core processors/barion.js). Every post the agent's browser would send the gateway
|
|
10
|
+
* to pay follows that entry and leads to a card: the email check, the card's 3-D Secure version post, the 3-D Secure
|
|
11
|
+
* post and the charge post (/Pay/CheckEmailAddress, /Pay/PrepareCardPaymentForGuest, /ThreeDs/Authenticate,
|
|
12
|
+
* /Pay/CompletePaymentAsGuestWithCard). A build that declares Barion aborts every one of them (pre-claim.ts), so a
|
|
13
|
+
* placeholder card never reaches Barion.
|
|
14
|
+
*
|
|
15
|
+
* BARION_HOSTS is payment-core's BARION_HOSTS, and isBarionEntryUrl is payment-core's isBarionEntryUrl; barion.test.mjs
|
|
16
|
+
* pins both to payment-core on every case payment-core's own tests list.
|
|
17
|
+
*/
|
|
18
|
+
export declare const BARION_PSP = "barion";
|
|
19
|
+
/** The dark-launch capability the API serves Barion's recognizer behind (payment-core definitions.js). */
|
|
20
|
+
export declare const BARION_CAPABILITY = "barion_hosted_payment_page";
|
|
21
|
+
/** The gateway's two hosts: live, and Barion's test gateway, which runs the same gateway for Barion's test shops. */
|
|
22
|
+
export declare const BARION_HOSTS: readonly string[];
|
|
23
|
+
/**
|
|
24
|
+
* Whether a URL is the gateway URL exactly as the merchant's redirect writes it: https, one of the two gateway hosts in
|
|
25
|
+
* lowercase, the default port, no credentials or fragment, the path /Pay, and one query parameter, Id or id, holding the
|
|
26
|
+
* payment's id. The gateway acts on other parameters (its script starts a bank transfer by itself for a DefaultBankId),
|
|
27
|
+
* so a URL carrying any is not the entry, and neither is any other page or post of the gateway's host.
|
|
28
|
+
*/
|
|
29
|
+
export declare function isBarionEntryUrl(raw: unknown): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Whether a request on the gateway's hosts is a step toward paying there: any POST (the email check, the card's two
|
|
32
|
+
* posts, the 3-D Secure post, and any other form the gateway posts). The gateway's own pages, scripts and images, its
|
|
33
|
+
* 3-D Secure frames among them, are GETs of no card and are not one.
|
|
34
|
+
*/
|
|
35
|
+
export declare function isBarionPayStep(url: string, method: string): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Whether an adapter must hand this request to the pre-claim gates: it is on a gateway host and this build's registry
|
|
38
|
+
* serves Barion's entry there. The gateway's posts are not the entry, so the registry's card-request test does not name
|
|
39
|
+
* them; the CDP adapter still pauses them through the recognizer's host pattern, and attachToPlaywright's route
|
|
40
|
+
* predicate asks this, so both adapters show the gates every request to the gateway once Barion is armed.
|
|
41
|
+
*/
|
|
42
|
+
export declare function isArmedBarionUrl(vault: {
|
|
43
|
+
isCardRequest(url: string, method?: string): boolean;
|
|
44
|
+
} | undefined, url: string): boolean;
|
package/dist/barion.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Barion's Smart Gateway (secure.barion.com, where Hungarian, Czech and Slovak shops send a buyer who pays by card), as
|
|
3
|
+
* this SDK reads it.
|
|
4
|
+
*
|
|
5
|
+
* The merchant's server starts the payment with Barion and sends the buyer's browser to the gateway URL Barion answered
|
|
6
|
+
* with, https://secure.barion.com/Pay?Id=<payment id>, by a redirect or by setting the page's location. That GET carries
|
|
7
|
+
* no card, no amount and no merchant, and it is the one request a build that declares Barion's capability pauses
|
|
8
|
+
* (hosted-entry.ts): the cardholder's device repeats it over the end-to-end TLS relay and makes the gateway's own posts
|
|
9
|
+
* in the session Barion opens (payment-core processors/barion.js). Every post the agent's browser would send the gateway
|
|
10
|
+
* to pay follows that entry and leads to a card: the email check, the card's 3-D Secure version post, the 3-D Secure
|
|
11
|
+
* post and the charge post (/Pay/CheckEmailAddress, /Pay/PrepareCardPaymentForGuest, /ThreeDs/Authenticate,
|
|
12
|
+
* /Pay/CompletePaymentAsGuestWithCard). A build that declares Barion aborts every one of them (pre-claim.ts), so a
|
|
13
|
+
* placeholder card never reaches Barion.
|
|
14
|
+
*
|
|
15
|
+
* BARION_HOSTS is payment-core's BARION_HOSTS, and isBarionEntryUrl is payment-core's isBarionEntryUrl; barion.test.mjs
|
|
16
|
+
* pins both to payment-core on every case payment-core's own tests list.
|
|
17
|
+
*/
|
|
18
|
+
export const BARION_PSP = 'barion';
|
|
19
|
+
/** The dark-launch capability the API serves Barion's recognizer behind (payment-core definitions.js). */
|
|
20
|
+
export const BARION_CAPABILITY = 'barion_hosted_payment_page';
|
|
21
|
+
/** The gateway's two hosts: live, and Barion's test gateway, which runs the same gateway for Barion's test shops. */
|
|
22
|
+
export const BARION_HOSTS = Object.freeze(['secure.barion.com', 'secure.test.barion.com']);
|
|
23
|
+
const ENTRY_PATH = '/Pay';
|
|
24
|
+
// The payment's id, a GUID: 32 hexadecimal digits as the gateway URL writes it, or with its four dashes as Barion's PHP
|
|
25
|
+
// library writes it, in either letter case.
|
|
26
|
+
const PAYMENT_ID = /^(?:[0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/i;
|
|
27
|
+
// The entry's whole query: the one parameter Barion's GatewayUrl names (Id) or its PHP library names (id).
|
|
28
|
+
const ENTRY_QUERY = /^\?(?:Id|id)=([^&=]{1,64})$/;
|
|
29
|
+
// An id of that shape, for asking whether this build's registry serves the entry on a host.
|
|
30
|
+
const PROBE_ID = '00000000000000000000000000000000';
|
|
31
|
+
/**
|
|
32
|
+
* Whether a URL is the gateway URL exactly as the merchant's redirect writes it: https, one of the two gateway hosts in
|
|
33
|
+
* lowercase, the default port, no credentials or fragment, the path /Pay, and one query parameter, Id or id, holding the
|
|
34
|
+
* payment's id. The gateway acts on other parameters (its script starts a bank transfer by itself for a DefaultBankId),
|
|
35
|
+
* so a URL carrying any is not the entry, and neither is any other page or post of the gateway's host.
|
|
36
|
+
*/
|
|
37
|
+
export function isBarionEntryUrl(raw) {
|
|
38
|
+
if (typeof raw !== 'string' || raw.length > 256)
|
|
39
|
+
return false;
|
|
40
|
+
let url;
|
|
41
|
+
try {
|
|
42
|
+
url = new URL(raw);
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
if (url.protocol !== 'https:' || !BARION_HOSTS.includes(url.hostname) || url.pathname !== ENTRY_PATH
|
|
48
|
+
|| url.port || url.username || url.password || url.href !== raw || raw.includes('#'))
|
|
49
|
+
return false;
|
|
50
|
+
const match = ENTRY_QUERY.exec(url.search);
|
|
51
|
+
return !!match && PAYMENT_ID.test(match[1]);
|
|
52
|
+
}
|
|
53
|
+
/** The gateway host a URL is on (https, no credentials, any port, any letter case, a trailing dot or not), or null. */
|
|
54
|
+
function barionHost(raw) {
|
|
55
|
+
let url;
|
|
56
|
+
try {
|
|
57
|
+
url = new URL(raw);
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
if (url.protocol !== 'https:' || url.username || url.password)
|
|
63
|
+
return null;
|
|
64
|
+
const host = url.hostname.toLowerCase().replace(/\.$/, '');
|
|
65
|
+
return BARION_HOSTS.includes(host) ? host : null;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Whether a request on the gateway's hosts is a step toward paying there: any POST (the email check, the card's two
|
|
69
|
+
* posts, the 3-D Secure post, and any other form the gateway posts). The gateway's own pages, scripts and images, its
|
|
70
|
+
* 3-D Secure frames among them, are GETs of no card and are not one.
|
|
71
|
+
*/
|
|
72
|
+
export function isBarionPayStep(url, method) {
|
|
73
|
+
return barionHost(url) !== null && String(method).toUpperCase() === 'POST';
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Whether an adapter must hand this request to the pre-claim gates: it is on a gateway host and this build's registry
|
|
77
|
+
* serves Barion's entry there. The gateway's posts are not the entry, so the registry's card-request test does not name
|
|
78
|
+
* them; the CDP adapter still pauses them through the recognizer's host pattern, and attachToPlaywright's route
|
|
79
|
+
* predicate asks this, so both adapters show the gates every request to the gateway once Barion is armed.
|
|
80
|
+
*/
|
|
81
|
+
export function isArmedBarionUrl(vault, url) {
|
|
82
|
+
const host = barionHost(url);
|
|
83
|
+
return host !== null && typeof vault?.isCardRequest === 'function' && vault.isCardRequest(`https://${host}${ENTRY_PATH}?Id=${PROBE_ID}`, 'GET');
|
|
84
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Written by scripts/generate-capabilities.mjs from capabilities.json. Do not edit; git ignores it.
|
|
2
2
|
/** capabilities.json's list, sorted; client.ts exports it as SUPPORTED_CAPABILITIES. */
|
|
3
|
-
export const DECLARED_CAPABILITIES = ["aci_split_card.v1", "amadeus_checkout_actions.v1", "aps_custom_merchant_page", "authorize_net_dpm_form", "capture_context", "clover_card_token", "comgate_hosted_payment_page", "converge_hpp_process", "creditguard_pps_process", "cybersource_sa_token_create", "datatrans_secure_fields_tokenize", "ekashu_hosted_payment_page", "eximbay_hosted_payment_page", "fastspring_card_payment", "fiserv_card_capture", "gmo_shared_pk", "gopay_card_form", "gravy_session_fields_put", "hipay_vault_token", "juspay_txns.v1", "lyra_krypton_payment", "makecommerce_card_frame", "midtrans_card_token", "moneris_hosted_tokenization", "omise_card_token", "openpay_tokenizer", "paddle_tokenex_pay", "paddle_vgs_cards", "pay_nl_card_token", "payfast_card_pay", "paygent_token", "paymongo_checkout_pay", "paypal_card_fields", "payrails_device_encrypt", "payrexx_card_frame", "paytrail_hosted_payment_page", "pelecard_transaction", "poynt_collect_nonce", "primer_payment_instruments", "przelewy24_hosted_payment_page", "quickpay_hosted_payment_page", "redsys_hosted_payment_page", "revolut_card_field", "sbps_token_jsonp", "shiji_sts_pinned_key", "sumup_checkout_process", "tap_card_sdk_token", "toast_pinned_key", "tokenex_iframe_tokenize", "transbank_webpay_hosted_payment_page", "twoc2p_secure_pay", "verifone_card_capture", "wix_payments_tokenize", "worldline_mycheckout_form", "worldpay_eprotect_jsonp", "wspay_confirm", "xendit_card_token"];
|
|
3
|
+
export const DECLARED_CAPABILITIES = ["aci_split_card.v1", "amadeus_checkout_actions.v1", "aps_custom_merchant_page", "authorize_net_dpm_form", "barion_hosted_payment_page", "capture_context", "clover_card_token", "comgate_hosted_payment_page", "converge_hpp_process", "creditguard_pps_process", "cybersource_sa_token_create", "datatrans_secure_fields_tokenize", "ekashu_hosted_payment_page", "eximbay_hosted_payment_page", "fastspring_card_payment", "fiserv_card_capture", "gmo_shared_pk", "gopay_card_form", "gravy_session_fields_put", "hipay_vault_token", "juspay_txns.v1", "lyra_krypton_payment", "makecommerce_card_frame", "midtrans_card_token", "moneris_hosted_tokenization", "omise_card_token", "openpay_tokenizer", "paddle_tokenex_pay", "paddle_vgs_cards", "pay_nl_card_token", "payfast_card_pay", "paygent_token", "paymongo_checkout_pay", "paypal_card_fields", "payrails_device_encrypt", "payrexx_card_frame", "paytrail_hosted_payment_page", "pelecard_transaction", "poynt_collect_nonce", "primer_payment_instruments", "przelewy24_hosted_payment_page", "quickpay_hosted_payment_page", "redsys_hosted_payment_page", "revolut_card_field", "sbps_token_jsonp", "shiji_sts_pinned_key", "sumup_checkout_process", "tap_card_sdk_token", "toast_pinned_key", "tokenex_iframe_tokenize", "transbank_webpay_hosted_payment_page", "twoc2p_secure_pay", "verifone_card_capture", "wix_payments_tokenize", "worldline_mycheckout_form", "worldpay_eprotect_jsonp", "wspay_confirm", "xendit_card_token"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// Generated from @agent-cards/payment-core. Do not edit.
|
|
3
|
-
// artifact-sha256:
|
|
3
|
+
// artifact-sha256: e6f7697efcf41d051189ca331d0d99f5a701e50cb0b7d3a3f967178bf87d7df1
|
|
4
4
|
// src/card-number-key.js
|
|
5
5
|
var CARD_NUMBER_KEY = /^(number|card_number|cardnumber|cardNum|card_num|pan)$/i;
|
|
6
6
|
// src/json-path.js
|
|
@@ -3561,11 +3561,11 @@ var TOKENEX_IFRAME_BODY_KEYS = Object.freeze([
|
|
|
3561
3561
|
]);
|
|
3562
3562
|
var TOKENEX_IFRAME_TOKEN_SCHEMES = Object.freeze(["sixTOKENfour"]);
|
|
3563
3563
|
var TOKENEX_IFRAME_REVIEWED_ACCOUNTS = Object.freeze({
|
|
3564
|
-
"htp.tokenex.com": Object.freeze({}),
|
|
3564
|
+
"htp.tokenex.com": Object.freeze({ "9014311640612780": "https://www.jetblue.com" }),
|
|
3565
3565
|
"test-htp.tokenex.com": Object.freeze({})
|
|
3566
3566
|
});
|
|
3567
3567
|
var TOKENEX_IFRAME_ACCOUNT_NAMES = Object.freeze({
|
|
3568
|
-
"htp.tokenex.com": Object.freeze({}),
|
|
3568
|
+
"htp.tokenex.com": Object.freeze({ "9014311640612780": "JetBlue" }),
|
|
3569
3569
|
"test-htp.tokenex.com": Object.freeze({})
|
|
3570
3570
|
});
|
|
3571
3571
|
var BODY_LIMIT22 = 8192;
|
package/dist/cdp.js
CHANGED
|
@@ -25,6 +25,7 @@ import { isArmedEkashuUrl } from './ekashu.js';
|
|
|
25
25
|
import { isArmedTransbankUrl, transbankMerchantReturn, transbankMerchantReturnAnswer } from './transbank.js';
|
|
26
26
|
import { isArmedRedsysUrl } from './redsys.js';
|
|
27
27
|
import { isArmedPrzelewy24Url } from './przelewy24.js';
|
|
28
|
+
import { isArmedBarionUrl } from './barion.js';
|
|
28
29
|
import { isArmedQuickpayUrl } from './quickpay.js';
|
|
29
30
|
import { COMGATE_CARD_PATTERNS, isArmedComgateUrl, servesComgate } from './comgate.js';
|
|
30
31
|
import { isArmedEximbayUrl } from './eximbay.js';
|
|
@@ -3980,6 +3981,9 @@ export async function attachToPlaywright(page, opts) {
|
|
|
3980
3981
|
// the hosts: the card method's post, the card form's post and the Saferpay resolver reach the Przelewy24
|
|
3981
3982
|
// gate and fail.
|
|
3982
3983
|
|| isArmedPrzelewy24Url(opts.vault, url.toString())
|
|
3984
|
+
// Every request to Barion's gateway hosts once its entry is served (barion.ts), as attachToCdp arms the hosts:
|
|
3985
|
+
// the gateway's email check, card posts and 3-D Secure post reach the Barion gate and fail.
|
|
3986
|
+
|| isArmedBarionUrl(opts.vault, url.toString())
|
|
3983
3987
|
// Every request to an NMI host whose entry is served (ekashu.ts), as attachToCdp arms the
|
|
3984
3988
|
// host: the card page's post and its 3-D Secure calls reach the NMI gate and fail.
|
|
3985
3989
|
|| isArmedEkashuUrl(opts.vault, url.toString())
|
package/dist/client.d.ts
CHANGED
|
@@ -499,6 +499,13 @@ export declare const SUPPORTED_REGISTRY_FEATURES: readonly string[];
|
|
|
499
499
|
* amount, so the agent's pair, above zero, is the one the cardholder approves.
|
|
500
500
|
* Served on the same terms: only to a build that lists it, for a company Agentcard turned APS on for.
|
|
501
501
|
*
|
|
502
|
+
* `barion_hosted_payment_page`: Barion's Smart Gateway, whose card-free link
|
|
503
|
+
* (secure.barion.com/Pay?Id=<payment id>, a plain GET the merchant's redirect or script sends
|
|
504
|
+
* the buyer to) this build pauses for the cardholder's device by its exact link (hosted-entry.ts),
|
|
505
|
+
* and whose email check, card posts and 3-D Secure post this build never lets the agent's browser
|
|
506
|
+
* send (pre-claim.ts, barion.ts). Served on the same terms as Przelewy24's: only to a build that
|
|
507
|
+
* lists it, for a company Agentcard turned Barion on for.
|
|
508
|
+
*
|
|
502
509
|
* The list itself is capabilities.json, sorted, one per line (scripts/generate-capabilities.mjs).
|
|
503
510
|
*/
|
|
504
511
|
export declare const SUPPORTED_CAPABILITIES: readonly string[];
|
package/dist/client.js
CHANGED
|
@@ -492,6 +492,13 @@ export const SUPPORTED_REGISTRY_FEATURES = ['card_fields', 'checkout_sessions'];
|
|
|
492
492
|
* amount, so the agent's pair, above zero, is the one the cardholder approves.
|
|
493
493
|
* Served on the same terms: only to a build that lists it, for a company Agentcard turned APS on for.
|
|
494
494
|
*
|
|
495
|
+
* `barion_hosted_payment_page`: Barion's Smart Gateway, whose card-free link
|
|
496
|
+
* (secure.barion.com/Pay?Id=<payment id>, a plain GET the merchant's redirect or script sends
|
|
497
|
+
* the buyer to) this build pauses for the cardholder's device by its exact link (hosted-entry.ts),
|
|
498
|
+
* and whose email check, card posts and 3-D Secure post this build never lets the agent's browser
|
|
499
|
+
* send (pre-claim.ts, barion.ts). Served on the same terms as Przelewy24's: only to a build that
|
|
500
|
+
* lists it, for a company Agentcard turned Barion on for.
|
|
501
|
+
*
|
|
495
502
|
* The list itself is capabilities.json, sorted, one per line (scripts/generate-capabilities.mjs).
|
|
496
503
|
*/
|
|
497
504
|
export const SUPPORTED_CAPABILITIES = DECLARED_CAPABILITIES;
|
package/dist/hosted-entry.js
CHANGED
|
@@ -17,10 +17,12 @@
|
|
|
17
17
|
import { PRZELEWY24_PSP, isPrzelewy24EntryUrl } from './przelewy24.js';
|
|
18
18
|
import { COMGATE_PSP, isComgateEntryUrl } from './comgate.js';
|
|
19
19
|
import { TRANSBANK_PSP, isTransbankEntryUrl } from './transbank.js';
|
|
20
|
+
import { BARION_PSP, isBarionEntryUrl } from './barion.js';
|
|
20
21
|
const HOSTED_GET_ENTRIES = new Map([
|
|
21
22
|
[PRZELEWY24_PSP, isPrzelewy24EntryUrl],
|
|
22
23
|
[COMGATE_PSP, isComgateEntryUrl],
|
|
23
24
|
[TRANSBANK_PSP, isTransbankEntryUrl],
|
|
25
|
+
[BARION_PSP, isBarionEntryUrl],
|
|
24
26
|
]);
|
|
25
27
|
/** Whether this processor's hosted page is entered with a GET this build reads exactly. */
|
|
26
28
|
export function hasHostedGetEntry(psp) {
|
package/dist/pre-claim.d.ts
CHANGED
|
@@ -279,6 +279,7 @@ export declare function isArmedCreditguardCall(vault: {
|
|
|
279
279
|
recognizesProcessor?(psp: string): boolean;
|
|
280
280
|
} | undefined, url: string): boolean;
|
|
281
281
|
export declare const przelewy24PreClaim: PreClaimGate;
|
|
282
|
+
export declare const barionPreClaim: PreClaimGate;
|
|
282
283
|
export declare const ekashuPreClaim: PreClaimGate;
|
|
283
284
|
export declare const transbankPreClaim: PreClaimGate;
|
|
284
285
|
export declare const paytrailPreClaim: PreClaimGate;
|
package/dist/pre-claim.js
CHANGED
|
@@ -85,6 +85,7 @@ import { ekashuEntryUrl, isEkashuEntry, isEkashuHost } from './ekashu.js';
|
|
|
85
85
|
import { isArmedTransbankUrl } from './transbank.js';
|
|
86
86
|
import { isRedsysEntry, isRedsysHost, redsysEntryUrl } from './redsys.js';
|
|
87
87
|
import { isArmedPrzelewy24Url, isPrzelewy24PayStep } from './przelewy24.js';
|
|
88
|
+
import { isArmedBarionUrl, isBarionPayStep } from './barion.js';
|
|
88
89
|
import { isQuickpayCardLookup, isQuickpayEntry, quickpayEntryUrl } from './quickpay.js';
|
|
89
90
|
import { isArmedComgateUrl } from './comgate.js';
|
|
90
91
|
import { isArmedEximbayUrl, isEximbayEntry } from './eximbay.js';
|
|
@@ -1663,6 +1664,22 @@ export const przelewy24PreClaim = (ctx) => {
|
|
|
1663
1664
|
return undefined;
|
|
1664
1665
|
return processorPageAbort(ctx);
|
|
1665
1666
|
};
|
|
1667
|
+
// Barion's Smart Gateway (barion.ts). Once this build's registry serves Barion's entry (a capability the API serves
|
|
1668
|
+
// only to a company Agentcard turned Barion on for), every request to the gateway's two hosts pauses. The merchant's
|
|
1669
|
+
// entry, a GET of /Pay?Id=<payment id> exactly, is no step of this gate's: it defers, and the terminal arbiter pauses
|
|
1670
|
+
// it for the claim flow like any card request, so the cardholder's device pays it. Every step toward paying on the
|
|
1671
|
+
// gateway itself aborts as an unsupported checkout: every POST there (the email check, the card's two posts, the 3-D
|
|
1672
|
+
// Secure post, any form the gateway posts). So Barion never sees the card the agent typed. The agent's browser only
|
|
1673
|
+
// reaches the gateway when the entry was not paused (an attachment made too late, say), and then only the cardholder's
|
|
1674
|
+
// device can pay. The gateway's own pages, scripts, images and 3-D Secure frames are GETs this gate leaves to
|
|
1675
|
+
// continue. With Barion not served, the gate defers, and every request continues as before. Synchronous until it
|
|
1676
|
+
// must abort, like every gate. Exported for the gate registry's tests.
|
|
1677
|
+
export const barionPreClaim = (ctx) => {
|
|
1678
|
+
const { url, method } = ctx.request;
|
|
1679
|
+
if (!isBarionPayStep(url, method) || !isArmedBarionUrl(ctx.vault, url))
|
|
1680
|
+
return undefined;
|
|
1681
|
+
return processorPageAbort(ctx);
|
|
1682
|
+
};
|
|
1666
1683
|
// NMI's hosted payment page (ekashu.ts). Once this build's registry serves NMI's entry (a
|
|
1667
1684
|
// capability the API serves only to a company Agentcard turned NMI on for), every request to
|
|
1668
1685
|
// NMI's two hosts pauses, and this gate judges the POSTs:
|
|
@@ -2482,7 +2499,7 @@ async function unsupportedContinue(ctx) {
|
|
|
2482
2499
|
* arbiter runs after all of them and is not part of this list. A gate appended
|
|
2483
2500
|
* after Stripe is never offered a step Stripe claimed: Stripe answers, aborts or
|
|
2484
2501
|
* pauses each one itself. */
|
|
2485
|
-
export const PSP_PRE_CLAIM_GATES = [cardEndpointResendPreClaim, cardEndpointPreClaim, mercadoPreClaim, juspayPreClaim, braintreePreClaim, stripePreClaim, merchantHostedPreClaim, verifonePreClaim, fiservPreClaim, gmoPreClaim, cybersourceFlexPreClaim, datatransPreClaim, tokenexIframePreClaim, pelecardPreClaim, aciPreClaim, creditguardPreClaim, primerPreClaim, payrailsPreClaim, convergePreClaim, eprotectPreClaim, sbpsPreClaim, wspayPreClaim, shijiStsPreClaim, ekashuPreClaim, redsysPreClaim, quickpayPreClaim, comgatePreClaim, przelewy24PreClaim, transbankPreClaim, eximbayPreClaim, paypalHostedFieldsPreClaim,
|
|
2502
|
+
export const PSP_PRE_CLAIM_GATES = [cardEndpointResendPreClaim, cardEndpointPreClaim, mercadoPreClaim, juspayPreClaim, braintreePreClaim, stripePreClaim, merchantHostedPreClaim, verifonePreClaim, fiservPreClaim, gmoPreClaim, cybersourceFlexPreClaim, datatransPreClaim, tokenexIframePreClaim, pelecardPreClaim, aciPreClaim, creditguardPreClaim, primerPreClaim, payrailsPreClaim, convergePreClaim, eprotectPreClaim, sbpsPreClaim, wspayPreClaim, shijiStsPreClaim, ekashuPreClaim, redsysPreClaim, quickpayPreClaim, comgatePreClaim, przelewy24PreClaim, transbankPreClaim, eximbayPreClaim, barionPreClaim, paypalHostedFieldsPreClaim,
|
|
2486
2503
|
paypalCardFormsPreClaim, cybersourceSecureAcceptancePreClaim, worldlineMyCheckoutPreClaim, paddleVgsPayPreClaim, ebanxPreClaim, payrexxPreClaim, hipayPreClaim, paytrailPreClaim];
|
|
2487
2504
|
/** Run each gate in order; the first to return a decision wins. If none does,
|
|
2488
2505
|
* the terminal arbiter decides between continue, abort (unsupported) and pause.
|
package/dist/primer.generated.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// Generated from @agent-cards/payment-core. Do not edit.
|
|
3
|
-
// artifact-sha256:
|
|
3
|
+
// artifact-sha256: 12785bf93affbf72e1c0f5b4a8b3dedecab36a87d1bfa2c16405bffa841432c6
|
|
4
4
|
// src/card-number-key.js
|
|
5
5
|
var CARD_NUMBER_KEY = /^(number|card_number|cardnumber|cardNum|card_num|pan)$/i;
|
|
6
6
|
// src/json-path.js
|
|
@@ -3569,11 +3569,11 @@ var TOKENEX_IFRAME_BODY_KEYS = Object.freeze([
|
|
|
3569
3569
|
]);
|
|
3570
3570
|
var TOKENEX_IFRAME_TOKEN_SCHEMES = Object.freeze(["sixTOKENfour"]);
|
|
3571
3571
|
var TOKENEX_IFRAME_REVIEWED_ACCOUNTS = Object.freeze({
|
|
3572
|
-
"htp.tokenex.com": Object.freeze({}),
|
|
3572
|
+
"htp.tokenex.com": Object.freeze({ "9014311640612780": "https://www.jetblue.com" }),
|
|
3573
3573
|
"test-htp.tokenex.com": Object.freeze({})
|
|
3574
3574
|
});
|
|
3575
3575
|
var TOKENEX_IFRAME_ACCOUNT_NAMES = Object.freeze({
|
|
3576
|
-
"htp.tokenex.com": Object.freeze({}),
|
|
3576
|
+
"htp.tokenex.com": Object.freeze({ "9014311640612780": "JetBlue" }),
|
|
3577
3577
|
"test-htp.tokenex.com": Object.freeze({})
|
|
3578
3578
|
});
|
|
3579
3579
|
var BODY_LIMIT22 = 8192;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// Generated from @agent-cards/payment-core. Do not edit.
|
|
3
|
-
// artifact-sha256:
|
|
3
|
+
// artifact-sha256: d0cb72d4119895f1fa8110ae4048be399964c6ab62814a11527cc163b8cb70cd
|
|
4
4
|
// src/deep-freeze.js
|
|
5
5
|
function deepFreeze(value) {
|
|
6
6
|
if (value && typeof value === "object" && !Object.isFrozen(value)) {
|
|
@@ -3344,11 +3344,11 @@ var TOKENEX_IFRAME_BODY_KEYS = Object.freeze([
|
|
|
3344
3344
|
]);
|
|
3345
3345
|
var TOKENEX_IFRAME_TOKEN_SCHEMES = Object.freeze(["sixTOKENfour"]);
|
|
3346
3346
|
var TOKENEX_IFRAME_REVIEWED_ACCOUNTS = Object.freeze({
|
|
3347
|
-
"htp.tokenex.com": Object.freeze({}),
|
|
3347
|
+
"htp.tokenex.com": Object.freeze({ "9014311640612780": "https://www.jetblue.com" }),
|
|
3348
3348
|
"test-htp.tokenex.com": Object.freeze({})
|
|
3349
3349
|
});
|
|
3350
3350
|
var TOKENEX_IFRAME_ACCOUNT_NAMES = Object.freeze({
|
|
3351
|
-
"htp.tokenex.com": Object.freeze({}),
|
|
3351
|
+
"htp.tokenex.com": Object.freeze({ "9014311640612780": "JetBlue" }),
|
|
3352
3352
|
"test-htp.tokenex.com": Object.freeze({})
|
|
3353
3353
|
});
|
|
3354
3354
|
var exact = (pattern, value) => typeof value === "string" && pattern.exec(value)?.[0] === value;
|
|
@@ -7,11 +7,15 @@ declare var TOKENEX_IFRAME_REFUSAL_REASONS: readonly string[];
|
|
|
7
7
|
declare var TOKENEX_IFRAME_BODY_KEYS: readonly string[];
|
|
8
8
|
declare var TOKENEX_IFRAME_TOKEN_SCHEMES: readonly string[];
|
|
9
9
|
declare var TOKENEX_IFRAME_REVIEWED_ACCOUNTS: Readonly<{
|
|
10
|
-
"htp.tokenex.com": Readonly<{
|
|
10
|
+
"htp.tokenex.com": Readonly<{
|
|
11
|
+
"9014311640612780": "https://www.jetblue.com";
|
|
12
|
+
}>;
|
|
11
13
|
"test-htp.tokenex.com": Readonly<{}>;
|
|
12
14
|
}>;
|
|
13
15
|
declare var TOKENEX_IFRAME_ACCOUNT_NAMES: Readonly<{
|
|
14
|
-
"htp.tokenex.com": Readonly<{
|
|
16
|
+
"htp.tokenex.com": Readonly<{
|
|
17
|
+
"9014311640612780": "JetBlue";
|
|
18
|
+
}>;
|
|
15
19
|
"test-htp.tokenex.com": Readonly<{}>;
|
|
16
20
|
}>;
|
|
17
21
|
declare function tokenexIframeTarget(url: any): {
|
|
@@ -37,20 +41,28 @@ declare function tokenexIframeAccount(request: any): {
|
|
|
37
41
|
origin: any;
|
|
38
42
|
} | null;
|
|
39
43
|
declare function tokenexIframeAccountRefusal(request: any, accounts?: Readonly<{
|
|
40
|
-
"htp.tokenex.com": Readonly<{
|
|
44
|
+
"htp.tokenex.com": Readonly<{
|
|
45
|
+
"9014311640612780": "https://www.jetblue.com";
|
|
46
|
+
}>;
|
|
41
47
|
"test-htp.tokenex.com": Readonly<{}>;
|
|
42
48
|
}>): "unreviewed_account" | null;
|
|
43
49
|
declare function tokenexIframeAccountName(request: any, accounts?: Readonly<{
|
|
44
|
-
"htp.tokenex.com": Readonly<{
|
|
50
|
+
"htp.tokenex.com": Readonly<{
|
|
51
|
+
"9014311640612780": "https://www.jetblue.com";
|
|
52
|
+
}>;
|
|
45
53
|
"test-htp.tokenex.com": Readonly<{}>;
|
|
46
54
|
}>, names?: Readonly<{
|
|
47
|
-
"htp.tokenex.com": Readonly<{
|
|
55
|
+
"htp.tokenex.com": Readonly<{
|
|
56
|
+
"9014311640612780": "JetBlue";
|
|
57
|
+
}>;
|
|
48
58
|
"test-htp.tokenex.com": Readonly<{}>;
|
|
49
59
|
}>): string | null;
|
|
50
60
|
declare function tokenexIframeCardType(number: any): string | RegExp | null;
|
|
51
61
|
declare function tokenexIframeBrandRefusal(body: any, card: any): "unsupported" | "brand_mismatch" | null;
|
|
52
62
|
declare function tokenexIframeDeviceRefusal(request: any, card: any, accounts?: Readonly<{
|
|
53
|
-
"htp.tokenex.com": Readonly<{
|
|
63
|
+
"htp.tokenex.com": Readonly<{
|
|
64
|
+
"9014311640612780": "https://www.jetblue.com";
|
|
65
|
+
}>;
|
|
54
66
|
"test-htp.tokenex.com": Readonly<{}>;
|
|
55
67
|
}>): "unsupported" | "brand_mismatch" | "unreviewed_account" | null;
|
|
56
68
|
declare function tokenexIframeRefusalMessage(reason: any): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// Generated from @agent-cards/payment-core. Do not edit.
|
|
3
|
-
// artifact-sha256:
|
|
3
|
+
// artifact-sha256: 01596d96a2321c72cafdda7f9e60136ce5b46747178151f0878190aff8159ea2
|
|
4
4
|
// src/tokenex-iframe.js
|
|
5
5
|
var TOKENEX_IFRAME_PSP = "tokenex_iframe";
|
|
6
6
|
var TOKENEX_IFRAME_CAPABILITY = "tokenex_iframe_tokenize";
|
|
@@ -32,11 +32,11 @@ var TOKENEX_IFRAME_BODY_KEYS = Object.freeze([
|
|
|
32
32
|
]);
|
|
33
33
|
var TOKENEX_IFRAME_TOKEN_SCHEMES = Object.freeze(["sixTOKENfour"]);
|
|
34
34
|
var TOKENEX_IFRAME_REVIEWED_ACCOUNTS = Object.freeze({
|
|
35
|
-
"htp.tokenex.com": Object.freeze({}),
|
|
35
|
+
"htp.tokenex.com": Object.freeze({ "9014311640612780": "https://www.jetblue.com" }),
|
|
36
36
|
"test-htp.tokenex.com": Object.freeze({})
|
|
37
37
|
});
|
|
38
38
|
var TOKENEX_IFRAME_ACCOUNT_NAMES = Object.freeze({
|
|
39
|
-
"htp.tokenex.com": Object.freeze({}),
|
|
39
|
+
"htp.tokenex.com": Object.freeze({ "9014311640612780": "JetBlue" }),
|
|
40
40
|
"test-htp.tokenex.com": Object.freeze({})
|
|
41
41
|
});
|
|
42
42
|
var UNSUPPORTED_REFUSAL = "Refusing to pay: unsupported TokenEx card request.";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-cards/sdk",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.25",
|
|
4
4
|
"description": "Agentcard's SDK: one client, Agentcard, with two modules. checkout pauses a browser purchase and pays it with the person's own card; voice connects a person to your product once and approves a purchase by voice inside it. Card data never enters your process.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"_comment_test": "check:built runs first and names the command when a file the build generates (the copies in src/, the preflight contracts in dist/, the Kernel inventory) is missing or stale; verify:pack runs last, on the same dist.",
|
|
31
31
|
"check:built": "node scripts/generate-payment-core.mjs --check && node scripts/generate-voice-stream.mjs --check && node scripts/generate-url-masks.mjs --check && node scripts/generate-capabilities.mjs --check && node scripts/generate-agent-amount.mjs --check && node scripts/generate-preflight-contract.mjs --check && node scripts/generate-kernel-native-inventory.mjs --check",
|
|
32
32
|
"verify:pack": "node scripts/verify-pack.mjs",
|
|
33
|
-
"test": "npm run check:built && node test.mjs && node --test lifecycle.test.mjs merchant-abort.test.mjs preparation.test.mjs braintree.test.mjs pre-claim.test.mjs ekashu.test.mjs redsys.test.mjs quickpay.test.mjs paytrail.test.mjs paypal-hosted-fields.test.mjs paypal-card-forms.test.mjs cybersource-secure-acceptance.test.mjs ebanx.test.mjs payrexx.test.mjs payrexx-follow-ups.test.mjs payrexx-adapters.test.mjs autopilot.test.mjs stripe-checkout.test.mjs stripe-setup.test.mjs stripe-legacy-checkout.test.mjs payment-core.test.mjs prepared-processor.test.mjs merchant-hosted.test.mjs merchant-total.test.mjs sandbox-declaration.test.mjs minimum-delay.test.mjs paysafe.test.mjs wix-payments.test.mjs hipay.test.mjs openpay.test.mjs payu.test.mjs attachment.test.mjs worker-targets.test.mjs mercado-checkout.test.mjs mercado-polling.test.mjs amadeus.test.mjs pelecard.test.mjs aci.test.mjs primer.test.mjs payrails.test.mjs elavon-converge.test.mjs voice.test.mjs agentcard.test.mjs buy.test.mjs readme.test.mjs gmo.test.mjs cybersource-flex.test.mjs juspay-gate.test.mjs card-endpoint.test.mjs card-endpoint-fastspring.test.mjs card-endpoint-navigation.test.mjs merchant-session-probe.test.mjs datatrans.test.mjs authorize-net-dpm.test.mjs creditguard.test.mjs eprotect.test.mjs wspay.test.mjs shiji-sts.test.mjs worldline-mycheckout.test.mjs verifone.test.mjs gravy.test.mjs paddle-vgs.test.mjs sbps.test.mjs hold.test.mjs paddle-tokenex.test.mjs lyra.test.mjs gopay.test.mjs paygent.test.mjs twoc2p.test.mjs tap-payments.test.mjs pay-nl.test.mjs toast.test.mjs redact-url.test.mjs hosted-entry.test.mjs comgate.test.mjs przelewy24.test.mjs tokenex-iframe.test.mjs transbank.test.mjs sumup.test.mjs clover.test.mjs eximbay.test.mjs xendit.test.mjs omise.test.mjs fastspring.test.mjs amazon-payment-services.test.mjs && node --test preflight-package.test.mjs preflight-collector.test.mjs browser-tests.test.mjs && node --test kernel-native-qualification.test.mjs && node --test ../vault/scripts/recurly-validation/watch-duty-sdk-result.test.mjs && node scripts/verify-pack.mjs",
|
|
33
|
+
"test": "npm run check:built && node test.mjs && node --test lifecycle.test.mjs merchant-abort.test.mjs preparation.test.mjs braintree.test.mjs pre-claim.test.mjs ekashu.test.mjs redsys.test.mjs quickpay.test.mjs paytrail.test.mjs paypal-hosted-fields.test.mjs paypal-card-forms.test.mjs cybersource-secure-acceptance.test.mjs ebanx.test.mjs payrexx.test.mjs payrexx-follow-ups.test.mjs payrexx-adapters.test.mjs autopilot.test.mjs stripe-checkout.test.mjs stripe-setup.test.mjs stripe-legacy-checkout.test.mjs payment-core.test.mjs prepared-processor.test.mjs merchant-hosted.test.mjs merchant-total.test.mjs sandbox-declaration.test.mjs minimum-delay.test.mjs paysafe.test.mjs wix-payments.test.mjs hipay.test.mjs openpay.test.mjs payu.test.mjs attachment.test.mjs worker-targets.test.mjs mercado-checkout.test.mjs mercado-polling.test.mjs amadeus.test.mjs pelecard.test.mjs aci.test.mjs primer.test.mjs payrails.test.mjs elavon-converge.test.mjs voice.test.mjs agentcard.test.mjs buy.test.mjs readme.test.mjs gmo.test.mjs cybersource-flex.test.mjs juspay-gate.test.mjs card-endpoint.test.mjs card-endpoint-fastspring.test.mjs card-endpoint-navigation.test.mjs merchant-session-probe.test.mjs datatrans.test.mjs authorize-net-dpm.test.mjs creditguard.test.mjs eprotect.test.mjs wspay.test.mjs shiji-sts.test.mjs worldline-mycheckout.test.mjs verifone.test.mjs gravy.test.mjs paddle-vgs.test.mjs sbps.test.mjs hold.test.mjs paddle-tokenex.test.mjs lyra.test.mjs gopay.test.mjs paygent.test.mjs twoc2p.test.mjs tap-payments.test.mjs pay-nl.test.mjs toast.test.mjs redact-url.test.mjs hosted-entry.test.mjs comgate.test.mjs przelewy24.test.mjs tokenex-iframe.test.mjs transbank.test.mjs sumup.test.mjs clover.test.mjs eximbay.test.mjs xendit.test.mjs omise.test.mjs fastspring.test.mjs amazon-payment-services.test.mjs barion.test.mjs && node --test preflight-package.test.mjs preflight-collector.test.mjs browser-tests.test.mjs && node --test kernel-native-qualification.test.mjs && node --test ../vault/scripts/recurly-validation/watch-duty-sdk-result.test.mjs && node scripts/verify-pack.mjs",
|
|
34
34
|
"test:browser": "node browser-tests.mjs",
|
|
35
35
|
"check:payment-core": "node scripts/generate-payment-core.mjs --check",
|
|
36
36
|
"check:voice-stream": "node scripts/generate-voice-stream.mjs --check",
|