@agent-cards/checkout 0.5.0 → 0.7.0
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 +17 -0
- package/README.md +49 -31
- package/dist/attachment.d.ts +11 -0
- package/dist/attachment.js +50 -0
- package/dist/braintree.d.ts +2 -0
- package/dist/braintree.js +12 -0
- package/dist/cdp.d.ts +21 -7
- package/dist/cdp.js +313 -159
- package/dist/client.d.ts +113 -25
- package/dist/client.js +134 -22
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/preparation.js +5 -4
- package/dist/prepared-processor.d.ts +4 -2
- package/dist/prepared-processor.js +75 -7
- package/dist/registry.js +10 -6
- package/package.json +2 -2
package/dist/registry.js
CHANGED
|
@@ -48,8 +48,12 @@ export const BUILTIN_REGISTRY = [
|
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
psp: 'checkout_com',
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
// Flow's native card controller can use either tokenization host.
|
|
52
|
+
match: /(api|card-acquisition-gateway)(\.sandbox)?\.checkout\.com\/tokens/i,
|
|
53
|
+
hosts: [
|
|
54
|
+
"^api\\.checkout\\.com$", "^api\\.sandbox\\.checkout\\.com$",
|
|
55
|
+
"^card-acquisition-gateway\\.checkout\\.com$", "^card-acquisition-gateway\\.sandbox\\.checkout\\.com$",
|
|
56
|
+
],
|
|
53
57
|
encoding: 'json',
|
|
54
58
|
passthroughHeaders: [/^authorization$/i],
|
|
55
59
|
},
|
|
@@ -156,10 +160,10 @@ export const BUILTIN_REGISTRY = [
|
|
|
156
160
|
},
|
|
157
161
|
{
|
|
158
162
|
psp: 'paysafe',
|
|
159
|
-
match: /api(\.test)?\.paysafe\.com\/(?:paymenthub\/v1\/singleusepaymenthandles|js\/api\/v1\/tokenize)(?![\w\/-])/i,
|
|
160
|
-
hosts: ["^api\\.paysafe\\.com$", "^api\\.test\\.paysafe\\.com$"],
|
|
163
|
+
match: /(?:api(\.test)?\.paysafe\.com\/(?:paymenthub\/v1\/singleusepaymenthandles|js\/api\/v1\/tokenize)|hosted(\.test)?\.paysafe\.com\/checkout\/api\/v1\/tokenize)(?![\w\/-])/i,
|
|
164
|
+
hosts: ["^api\\.paysafe\\.com$", "^api\\.test\\.paysafe\\.com$", "^hosted\\.paysafe\\.com$", "^hosted\\.test\\.paysafe\\.com$"],
|
|
161
165
|
encoding: 'json',
|
|
162
|
-
passthroughHeaders: [/^authorization$/i, /^x-paysafe-credentials$/i],
|
|
166
|
+
passthroughHeaders: [/^authorization$/i, /^x-paysafe-credentials$/i, /^correlationid$/i],
|
|
163
167
|
},
|
|
164
168
|
{
|
|
165
169
|
psp: 'recurly',
|
|
@@ -211,7 +215,7 @@ export function findRecognizer(url, registry = BUILTIN_REGISTRY) {
|
|
|
211
215
|
catch {
|
|
212
216
|
return null;
|
|
213
217
|
}
|
|
214
|
-
if (parsed.protocol !== 'https:')
|
|
218
|
+
if (parsed.protocol !== 'https:' || parsed.port || parsed.username || parsed.password)
|
|
215
219
|
return null;
|
|
216
220
|
const hostPath = `${parsed.hostname.toLowerCase()}${parsed.pathname}`;
|
|
217
221
|
return (registry.find((r) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-cards/checkout",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Let browser agents pay with the user's own card, without your infrastructure ever touching card data.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"_comment_build": "TypeScript is fetched rather than declared as a devDependency ON PURPOSE. This package ships zero dependencies, which is why pnpm writes no importer for it in the workspace lockfile; adding any dep here creates one, and an importer the lockfile has not been regenerated for fails every Vercel build with ERR_PNPM_OUTDATED_LOCKFILE. Pinned so the published output is reproducible.",
|
|
24
24
|
"build": "npx -y -p typescript@5.9.3 tsc",
|
|
25
25
|
"prepublishOnly": "pnpm build",
|
|
26
|
-
"test": "node test.mjs && node --test lifecycle.test.mjs merchant-abort.test.mjs preparation.test.mjs braintree.test.mjs minimum-delay.test.mjs",
|
|
26
|
+
"test": "node test.mjs && node --test lifecycle.test.mjs merchant-abort.test.mjs preparation.test.mjs braintree.test.mjs prepared-processor.test.mjs minimum-delay.test.mjs paysafe.test.mjs attachment.test.mjs",
|
|
27
27
|
"test:browser": "node browser.test.mjs && node stripe-browser.test.mjs && node preparation-browser.test.mjs"
|
|
28
28
|
},
|
|
29
29
|
"keywords": [
|