@agent-cards/sdk 0.23.8 → 0.23.9
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
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- Hand Arrow Electronics' token page to its frame when CyberSource's payment token is numeric. CyberSource gives a merchant set up before 2019 a `payment_token` of 22, 19 or 16 digits, and 0.23.8 judged every token but 32 hex characters as `token_shape`, so an approved Arrow save on 2026-10-10 ended `outcome_unknown` (`secure_acceptance_reply_late`) although CyberSource had answered it. The reply rule now takes each format CyberSource documents; a token of any other length or alphabet still reads `token_shape`. The card-free check skips a numeric token as it skips the instrument identifier, because CyberSource's 16- and 19-digit formats pass the card check digit; the device, which holds the card, still refuses a token equal to the card's number. A payment also needs the matching API and Vault releases.
|
|
6
|
+
|
|
5
7
|
- Pay Arrow Electronics' card save as its live checkout signs it. Arrow's server adds an id of its own, `merchant_defined_data8` (digits), to the form and to the end of `unsigned_field_names` when it signs the save, and 0.23.7 refused that request with `secure_acceptance_unsigned_fields_unreviewed` on 2026-10-10, after the cardholder approved and before any card was sent. The request now passes with that field or without it; a list that names it anywhere but last, names it twice or posts it unlisted is still refused, and a value other than at most 20 digits is refused as `secure_acceptance_merchant_reference`. Nothing else about Arrow's lists changed. A payment also needs the matching API and Vault releases.
|
|
6
8
|
|
|
7
9
|
- Pause a Worldpay eProtect registration whatever Worldpay key its page names. Worldpay rotates its production eProtect key daily (`26457000011` on 2026-10-08), and 0.23.3 refused every registration whose `publicKeyId` was not `26455500012`, the key it shipped, so an attached checkout at any eProtect merchant read `unsupported`. The SDK now takes any key id in Worldpay's digits; the cardholder's device encrypts the card under the key it reads from Worldpay's own `eProtect-api3.js` and writes that key's id into its copy, so no later rotation needs an SDK release. SmartPak Equine (paypageId `zhs8KzuRAryaq4cs` at `https://www.smartpakequine.com`) and Nordstrom (`fL33BPkRvbRqJ29S` at `https://www.nordstrom.com`) are reviewed eProtect merchants: a live checkout there passes `merchant: 'SmartPak Equine'` or `merchant: 'Nordstrom'` exactly, and `prepare()` refuses another name with `merchant_profile_mismatch` before any network call. eProtect stays dark for every org Agentcard has not enabled, and a payment also needs the matching API and Vault releases.
|
|
@@ -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: 9151ab8e96dace64217197a15a2eb2083d454faca475564b96ddcabb2100fa0f
|
|
4
4
|
// src/deep-freeze.js
|
|
5
5
|
function deepFreeze(value) {
|
|
6
6
|
if (value && typeof value === "object" && !Object.isFrozen(value)) {
|
|
@@ -159,6 +159,7 @@ var SA_SIGNED_DATE_TIME = /^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01]
|
|
|
159
159
|
var SA_SIGNATURE = /^[A-Za-z0-9+/]{43}=$/;
|
|
160
160
|
var SA_DEVICE_FINGERPRINT = /^[A-Za-z0-9_.:-]{1,88}$/;
|
|
161
161
|
var SA_MERCHANT_REFERENCE = /^[0-9]{0,20}$/;
|
|
162
|
+
var SA_PAYMENT_TOKEN = /^(?:[0-9A-Fa-f]{32}|[0-9]{22}|[0-9]{19}|[0-9]{16})$/;
|
|
162
163
|
var SA_EXPIRY = /^(?:0[1-9]|1[0-2])-[0-9]{4}$/;
|
|
163
164
|
var saExact = (pattern, value) => typeof value === "string" && pattern.exec(value)?.[0] === value;
|
|
164
165
|
var saControlFree = (value, min, max) => typeof value === "string" && value.length >= min && value.length <= max && !/[\u0000-\u001f\u007f]/.test(value);
|
|
@@ -771,7 +772,7 @@ function saTemplateFields(template) {
|
|
|
771
772
|
}
|
|
772
773
|
var SA_SCRUBBED = /* @__PURE__ */ new Map([
|
|
773
774
|
["signature", SA_SIGNATURE],
|
|
774
|
-
["payment_token",
|
|
775
|
+
["payment_token", SA_PAYMENT_TOKEN],
|
|
775
776
|
["transaction_id", /^[0-9]{22}$/],
|
|
776
777
|
["request_token", /^[A-Za-z0-9+/]{16,512}={0,2}$/],
|
|
777
778
|
["payment_token_instrument_identifier_id", /^[0-9]{12,32}$/],
|
|
@@ -910,7 +911,7 @@ function secureAcceptanceReplyOutcome(reply, template, card, options) {
|
|
|
910
911
|
return unknown("reply_fields");
|
|
911
912
|
if (SA_MATCHED_ECHOES.some((name) => fields.has(`req_${name}`) && value(`req_${name}`) !== sent.values.get(name)))
|
|
912
913
|
return unknown("reply_mismatch");
|
|
913
|
-
if (!saExact(/^[0-9]{22}$/, value("transaction_id")) || fields.has("payment_token") && !saExact(
|
|
914
|
+
if (!saExact(/^[0-9]{22}$/, value("transaction_id")) || fields.has("payment_token") && !saExact(SA_PAYMENT_TOKEN, value("payment_token"))) {
|
|
914
915
|
return unknown("token_shape");
|
|
915
916
|
}
|
|
916
917
|
const masked = value("req_card_number");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-cards/sdk",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.9",
|
|
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",
|