@agent-cards/sdk 0.23.13 → 0.23.14

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.
@@ -177,7 +177,11 @@ function freshCardBody(psp, body) {
177
177
  * preparation's, the submit is the /process URL of the page the preparation read, on that page's
178
178
  * own host and for its txId, and the request is the page's own new-card submit exactly as the
179
179
  * device will judge it, with ppDomain bound to the approved merchant page. A saved card, a wallet,
180
- * a refused flag, another transaction or another PPS host never spends consent.
180
+ * a refused flag, another transaction or another PPS host never spends consent. The encrypted
181
+ * variant (jwePayload) is the page's own submit when the transaction carries a key, so it binds
182
+ * too: the API's create reads the transaction and holds the body to it (a jwePayload only under a
183
+ * key, and only while the API admits the encrypted card), and the device seals the approved card
184
+ * under the key the API's own read hands it.
181
185
  */
182
186
  function matchesPreparedCreditguard(environment, requestUrl, body, headers, binding) {
183
187
  let hostname = '', merchantHost = '';
@@ -194,7 +198,7 @@ function matchesPreparedCreditguard(environment, requestUrl, body, headers, bind
194
198
  const txId = creditguardProcessTxId(requestUrl);
195
199
  if (page === null || txId === null || page !== requestUrl)
196
200
  return false;
197
- return creditguardProcessRefusal({ url: requestUrl, method: 'POST', headers, body: body ?? '' }, { merchantHost }) === null;
201
+ return creditguardProcessRefusal({ url: requestUrl, method: 'POST', headers, body: body ?? '' }, { merchantHost, jwe: true }) === null;
198
202
  }
199
203
  /**
200
204
  * The approved merchant page's host, with its port if it has one: what the Amadeus SDK sends in its