@agent-cards/sdk 0.20.0 → 0.22.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 +51 -0
- package/PREFLIGHT.md +34 -0
- package/README.md +1217 -15
- package/dist/aci.d.ts +173 -0
- package/dist/aci.generated.d.ts +87 -0
- package/dist/aci.generated.js +306 -0
- package/dist/aci.js +371 -0
- package/dist/adyen-merchant-hosted.generated.d.ts +3 -3
- package/dist/adyen-merchant-hosted.generated.js +283 -49
- package/dist/agentcard.d.ts +9 -2
- package/dist/agentcard.js +4 -2
- package/dist/amadeus-checkout.generated.d.ts +57 -0
- package/dist/amadeus-checkout.generated.js +549 -0
- package/dist/amadeus.d.ts +41 -0
- package/dist/amadeus.js +81 -0
- package/dist/builtin-registry.generated.js +1 -1
- package/dist/card-endpoint.d.ts +177 -0
- package/dist/card-endpoint.js +286 -0
- package/dist/card-fields.generated.d.ts +5 -3
- package/dist/card-fields.generated.js +284 -7
- package/dist/cdp.d.ts +6 -1
- package/dist/cdp.js +983 -147
- package/dist/client.d.ts +493 -13
- package/dist/client.js +1100 -82
- package/dist/creditguard.generated.d.ts +79 -0
- package/dist/creditguard.generated.js +662 -0
- package/dist/cse-body.js +11 -1
- package/dist/cybersource-flex.d.ts +183 -0
- package/dist/cybersource-flex.generated.d.ts +92 -0
- package/dist/cybersource-flex.generated.js +689 -0
- package/dist/cybersource-flex.js +275 -0
- package/dist/datatrans.d.ts +96 -0
- package/dist/datatrans.generated.d.ts +64 -0
- package/dist/datatrans.generated.js +426 -0
- package/dist/datatrans.js +178 -0
- package/dist/elavon-converge.d.ts +37 -0
- package/dist/elavon-converge.generated.d.ts +49 -0
- package/dist/elavon-converge.generated.js +439 -0
- package/dist/elavon-converge.js +84 -0
- package/dist/eprotect.d.ts +152 -0
- package/dist/eprotect.generated.d.ts +77 -0
- package/dist/eprotect.generated.js +498 -0
- package/dist/eprotect.js +222 -0
- package/dist/gmo.d.ts +63 -0
- package/dist/gmo.generated.d.ts +60 -0
- package/dist/gmo.generated.js +586 -0
- package/dist/gmo.js +119 -0
- package/dist/hosted-form.d.ts +3 -2
- package/dist/hosted-form.js +3 -2
- package/dist/index.d.ts +19 -3
- package/dist/index.js +6 -1
- package/dist/juspay-gate.d.ts +82 -0
- package/dist/juspay-gate.js +126 -0
- package/dist/juspay.generated.d.ts +89 -0
- package/dist/juspay.generated.js +705 -0
- package/dist/lifecycle.d.ts +62 -6
- package/dist/lifecycle.js +123 -8
- package/dist/merchant-card-endpoints.generated.d.ts +63 -0
- package/dist/merchant-card-endpoints.generated.js +1103 -0
- package/dist/merchant-hosted.d.ts +4 -1
- package/dist/merchant-hosted.js +5 -2
- package/dist/merchant-session-probe.d.ts +48 -0
- package/dist/merchant-session-probe.js +53 -0
- package/dist/merchant-session.generated.d.ts +69 -0
- package/dist/merchant-session.generated.js +919 -0
- package/dist/payrails.d.ts +133 -0
- package/dist/payrails.generated.d.ts +73 -0
- package/dist/payrails.generated.js +596 -0
- package/dist/payrails.js +305 -0
- package/dist/pelecard.d.ts +32 -0
- package/dist/pelecard.generated.d.ts +32 -0
- package/dist/pelecard.generated.js +283 -0
- package/dist/pelecard.js +42 -0
- package/dist/pre-claim.d.ts +84 -3
- package/dist/pre-claim.js +987 -9
- package/dist/preflight-catalog.json +2310 -263
- package/dist/preflight-schemas.json +187 -6
- package/dist/preflight.generated.d.ts +1 -1
- package/dist/preflight.generated.js +247 -4
- package/dist/preparation.d.ts +5 -2
- package/dist/preparation.js +36 -10
- package/dist/prepared-processor.d.ts +86 -5
- package/dist/prepared-processor.js +157 -6
- package/dist/primer.d.ts +53 -0
- package/dist/primer.generated.d.ts +38 -0
- package/dist/primer.generated.js +624 -0
- package/dist/primer.js +82 -0
- package/dist/registry.d.ts +114 -12
- package/dist/registry.js +85 -11
- package/dist/shiji-sts.d.ts +144 -0
- package/dist/shiji-sts.generated.d.ts +72 -0
- package/dist/shiji-sts.generated.js +913 -0
- package/dist/shiji-sts.js +222 -0
- package/dist/stripe-checkout.generated.d.ts +1 -1
- package/dist/stripe-checkout.generated.js +735 -10
- package/dist/stripe-setup.d.ts +16 -0
- package/dist/stripe-setup.js +61 -0
- package/dist/substitutions.generated.js +187 -29
- package/dist/verifone.d.ts +68 -0
- package/dist/verifone.generated.d.ts +51 -0
- package/dist/verifone.generated.js +1401 -0
- package/dist/verifone.js +119 -0
- package/dist/voice-types.d.ts +27 -0
- package/dist/voice.d.ts +6 -1
- package/dist/voice.js +6 -1
- package/dist/wspay.d.ts +41 -0
- package/dist/wspay.generated.d.ts +41 -0
- package/dist/wspay.generated.js +370 -0
- package/dist/wspay.js +65 -0
- package/examples/preflight/kernel-native/inventory.json +1 -1
- package/package.json +3 -3
package/dist/cse-body.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { substituteEncryptedFields } from './substitute.js';
|
|
4
4
|
import { substituteMerchantHostedBody } from './merchant-hosted.js';
|
|
5
5
|
import { fiservCapturePinId, isFiservCaptureHost, substituteFiservEnvelope } from './fiserv.js';
|
|
6
|
+
import { substituteVerifoneBody } from './verifone.js';
|
|
6
7
|
/**
|
|
7
8
|
* The cse continuation: the paused body with the vault's ciphertext in place
|
|
8
9
|
* of the dummy blobs. The adapters send it as postData ALONE. Chromium
|
|
@@ -25,8 +26,17 @@ import { fiservCapturePinId, isFiservCaptureHost, substituteFiservEnvelope } fro
|
|
|
25
26
|
* a Fiserv capture host. Every refusal throws before anything is sent.
|
|
26
27
|
*/
|
|
27
28
|
export function cseBody(body, replay, url, preparation) {
|
|
29
|
+
// A Verifone approval is always a prepared one for the profile it pays, and continues only the
|
|
30
|
+
// leg that profile reviewed, with the device's blob written into the LIVE paused body, which
|
|
31
|
+
// must still be the body the API checked at create (verifone.ts).
|
|
32
|
+
if (preparation?.psp === 'verifone' || replay.kind === 'verifone') {
|
|
33
|
+
if (replay.kind !== 'verifone' || preparation?.psp !== 'verifone' || preparation.merchantProfile !== replay.profile) {
|
|
34
|
+
throw new Error('Refusing to substitute: the paused request is not the Verifone card request the cardholder approved.');
|
|
35
|
+
}
|
|
36
|
+
return substituteVerifoneBody({ url, method: 'POST', body }, replay);
|
|
37
|
+
}
|
|
28
38
|
if (preparation?.psp === 'fiserv') {
|
|
29
|
-
if (replay.kind
|
|
39
|
+
if (replay.kind !== undefined || !isFiservCaptureHost(url) || fiservCapturePinId(url, body) !== preparation.merchantProfile) {
|
|
30
40
|
throw new Error('Refusing to substitute: the paused request is not a Fiserv capture under the key pin the cardholder approved.');
|
|
31
41
|
}
|
|
32
42
|
return substituteFiservEnvelope(body, replay.substitutions);
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/** The processor id, as the registry and the API name it. */
|
|
2
|
+
export declare const CYBERSOURCE_FLEX_PSP = "cybersource_flex";
|
|
3
|
+
/**
|
|
4
|
+
* The dark-launch capability the Flex recognizer names: the capture-context sidecar a create
|
|
5
|
+
* must carry. syncRegistry declares it (SUPPORTED_CAPABILITIES), because this build reads the
|
|
6
|
+
* context and sends it; the API serves the recognizer only to a client that does.
|
|
7
|
+
*/
|
|
8
|
+
export declare const CYBERSOURCE_FLEX_CAPABILITY = "capture_context";
|
|
9
|
+
/** The Microform v2 card fields the cardholder's device can rebuild. */
|
|
10
|
+
export type MicroformField = 'number' | 'securityCode';
|
|
11
|
+
/**
|
|
12
|
+
* The Microform fields of one payment, as the create carries them: the field iframe's version,
|
|
13
|
+
* the fields that loaded (the number field always, the security code field when the merchant
|
|
14
|
+
* created it), and the field whose iframe sent this request. The device rebuilds the iframe's
|
|
15
|
+
* exact plaintext from them, and the triggering field's data comes first in it.
|
|
16
|
+
*/
|
|
17
|
+
export interface MicroformSidecar {
|
|
18
|
+
version: string;
|
|
19
|
+
fields: MicroformField[];
|
|
20
|
+
trigger: MicroformField;
|
|
21
|
+
}
|
|
22
|
+
/** request.capture_context and request.microform on the create. */
|
|
23
|
+
export interface CybersourceFlexSidecar {
|
|
24
|
+
/** The capture context, byte for byte as the field iframe's URL fragment carries it. */
|
|
25
|
+
capture_context: string;
|
|
26
|
+
microform: MicroformSidecar;
|
|
27
|
+
}
|
|
28
|
+
/** A Flex card request the claim flow may take over. */
|
|
29
|
+
export interface CybersourceFlexPause {
|
|
30
|
+
sidecar: CybersourceFlexSidecar;
|
|
31
|
+
/**
|
|
32
|
+
* The request's shape for the retry rule (cdp.ts sameCheckoutRequest): microform type, fields,
|
|
33
|
+
* the context's key id and the verified capture context itself. Every createToken seals a fresh
|
|
34
|
+
* JWE, so the body itself never repeats; a retry under the same context and fields carries this
|
|
35
|
+
* same shape, and a field reloaded under any other context never reuses the approval, even one
|
|
36
|
+
* whose key id is the same.
|
|
37
|
+
*/
|
|
38
|
+
shape: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Why a Flex card request is not one this build can pay; reported on the unsupported_checkout
|
|
42
|
+
* event. Each is a fact about the page that its next request repeats: a request that is not a
|
|
43
|
+
* Microform card field's (including one from a frame this attachment read and found to be no
|
|
44
|
+
* Microform field), an unreviewed field version, or fields the device cannot rebuild.
|
|
45
|
+
*/
|
|
46
|
+
export type MicroformUnsupportedReason = 'microform_request_unrecognized' | 'microform_version_unreviewed' | 'microform_fields_unsupported';
|
|
47
|
+
/**
|
|
48
|
+
* Why this one request is refused while the next may pass; reported on the blocked event.
|
|
49
|
+
* `microform_frame_unread`: the frame that sent it could not be read (a missed event, a frame
|
|
50
|
+
* tree read that failed or timed out), which the page's next request may not repeat.
|
|
51
|
+
*/
|
|
52
|
+
export type CybersourceFlexRefusal = 'capture_context_invalid' | 'capture_context_mismatch' | 'request_body_unreadable' | 'microform_frame_unread';
|
|
53
|
+
export type CybersourceFlexDecision = {
|
|
54
|
+
kind: 'pause';
|
|
55
|
+
flex: CybersourceFlexPause;
|
|
56
|
+
} | {
|
|
57
|
+
kind: 'continue';
|
|
58
|
+
} | {
|
|
59
|
+
kind: 'unsupported';
|
|
60
|
+
reason: MicroformUnsupportedReason;
|
|
61
|
+
} | {
|
|
62
|
+
kind: 'refuse';
|
|
63
|
+
reason: CybersourceFlexRefusal;
|
|
64
|
+
cause?: string;
|
|
65
|
+
};
|
|
66
|
+
/** The paused request, as the pre-claim gates see it. */
|
|
67
|
+
export interface FlexRequest {
|
|
68
|
+
url: string;
|
|
69
|
+
method: string;
|
|
70
|
+
headers: Record<string, string>;
|
|
71
|
+
body: string | null;
|
|
72
|
+
}
|
|
73
|
+
/** An https URL on flex.cybersource.com or testflex.cybersource.com, with no port or credentials. */
|
|
74
|
+
export declare function isCybersourceFlexHost(url: string): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* How an adapter fails a card request it will not let through: a CyberSource Flex request as a
|
|
77
|
+
* network error (Playwright 'failed', CDP 'Failed', net::ERR_FAILED), every other request as an
|
|
78
|
+
* abort (net::ERR_ABORTED). Microform 2.12.1's field reports a failed request to the merchant's page
|
|
79
|
+
* at once (createToken's callback gets CREATE_TOKEN_XHR_ERROR), so the page runs its own error path:
|
|
80
|
+
* a message, a retry under the same capture context, or GetPay's reload under a new one. It never
|
|
81
|
+
* reports an aborted request, so after a refusal or a decline the page's createToken would wait with
|
|
82
|
+
* no answer. Both were observed with the real field on CyberSource's sandbox.
|
|
83
|
+
*/
|
|
84
|
+
export declare function refusedRequestFailure(url: string): 'failed' | 'aborted';
|
|
85
|
+
/** A Microform field iframe's URL, read: payment-core's parseMicroformFragment. */
|
|
86
|
+
type MicroformFrame = {
|
|
87
|
+
environment: string;
|
|
88
|
+
version: string;
|
|
89
|
+
reviewed: boolean;
|
|
90
|
+
microformType: string;
|
|
91
|
+
microformId: string | null;
|
|
92
|
+
fieldType: string;
|
|
93
|
+
captureContext: string;
|
|
94
|
+
};
|
|
95
|
+
type VerifiedContext = {
|
|
96
|
+
url: string;
|
|
97
|
+
environment: string;
|
|
98
|
+
exp: number;
|
|
99
|
+
jwk: {
|
|
100
|
+
kid: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
type Verification = {
|
|
104
|
+
ok: true;
|
|
105
|
+
context: VerifiedContext;
|
|
106
|
+
} | {
|
|
107
|
+
ok: false;
|
|
108
|
+
cause: string;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Each capture context verified once, offline, against the keys payment-core pins, and
|
|
112
|
+
* remembered for the attachment. The adapters start a context's check when its field iframe
|
|
113
|
+
* loads, so by the time the page sends its card the answer is usually settled and the pause
|
|
114
|
+
* stays synchronous. Bounded: the oldest context is dropped past 32.
|
|
115
|
+
*/
|
|
116
|
+
export declare class CaptureContexts {
|
|
117
|
+
private readonly entries;
|
|
118
|
+
verify(jwt: string): Verification | Promise<Verification>;
|
|
119
|
+
/** Start the check of a card field iframe's capture context from the frame's URL, when it is one. */
|
|
120
|
+
warm(url: string | undefined): void;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Judge one POST to a Flex host, given the frame that sent it and every Microform frame this
|
|
124
|
+
* attachment knows. `issuing` is that frame read as a Microform field: `undefined` when its URL
|
|
125
|
+
* could not be read at all, `null` when it was read and is no Microform v2 field (the merchant's
|
|
126
|
+
* own page or frame, which is where Flex API direct traffic comes from). In order:
|
|
127
|
+
* 1. a check (eCheck) Microform: continue, it carries no card;
|
|
128
|
+
* 2. a body the adapter could not read: refuse this request;
|
|
129
|
+
* 3. not a field iframe's sealed card (application/jwt, a Microform JWE, the exact tokens
|
|
130
|
+
* URL): unsupported, Microform v0.x and Flex API direct post here too;
|
|
131
|
+
* 4. a frame that could not be read: refuse this request, since the read can fail for a
|
|
132
|
+
* reason the page's next request does not repeat (a missed event, a slow frame tree read);
|
|
133
|
+
* 5. a frame read and found to be no Microform field, an unreviewed version, or fields the
|
|
134
|
+
* device cannot rebuild: unsupported, as the page's next request repeats each of them;
|
|
135
|
+
* 6. a capture context that does not verify, has expired, names another URL or host, or did
|
|
136
|
+
* not seal this body: refuse this request;
|
|
137
|
+
* 7. otherwise pause, with the sidecar the create carries.
|
|
138
|
+
* Returns synchronously when the context's verification already settled.
|
|
139
|
+
*/
|
|
140
|
+
export declare function judgeMicroformRequest(request: FlexRequest, issuing: MicroformFrame | null | undefined, frames: Iterable<MicroformFrame>, contexts: CaptureContexts): CybersourceFlexDecision | Promise<CybersourceFlexDecision>;
|
|
141
|
+
/**
|
|
142
|
+
* The CDP adapter's record of Microform field iframes, keyed by frame id (an out-of-process
|
|
143
|
+
* iframe's target id is its frame id). Fed only from CDP sources that report a document the
|
|
144
|
+
* frame COMMITTED, with its fragment: Page.frameNavigated (the child's own session for an
|
|
145
|
+
* out-of-process iframe, the parent's for an in-process one), the iframe target's url on
|
|
146
|
+
* Target.attachedToTarget when the SDK attaches to a form that already rendered, and the
|
|
147
|
+
* pausing session's Page.getFrameTree as a last read. A document request (Network.
|
|
148
|
+
* requestWillBeSent, Fetch.requestPaused) is only a hint that warms the context's check: a page
|
|
149
|
+
* can start a navigation to a genuine field URL in a frame it scripts and stop it before it
|
|
150
|
+
* commits, and that frame then still runs the page's own document. A frame that navigates
|
|
151
|
+
* elsewhere or detaches is forgotten. Bounded to the 64 most recent frames.
|
|
152
|
+
*/
|
|
153
|
+
export declare class MicroformFrames {
|
|
154
|
+
private readonly frames;
|
|
155
|
+
readonly contexts: CaptureContexts;
|
|
156
|
+
/** Start the capture context's check from a navigation that has not committed; records nothing. */
|
|
157
|
+
warm(url: string | undefined): void;
|
|
158
|
+
/** A frame's committed document URL, fragment included. A URL that is not a field iframe's forgets the frame. */
|
|
159
|
+
observe(frameId: unknown, url: unknown): void;
|
|
160
|
+
forget(frameId: unknown): void;
|
|
161
|
+
/**
|
|
162
|
+
* Judge a POST the frame `frameId` sent. When that frame is not on record, `reread` reads the
|
|
163
|
+
* pausing session's frame tree once (recording what it finds) and resolves to the frame's
|
|
164
|
+
* committed URL, or undefined when the frame was not found or the read failed: a frame read and
|
|
165
|
+
* found to be no field is judged as such, one never read is refused for this request alone.
|
|
166
|
+
*/
|
|
167
|
+
judge(request: FlexRequest, frameId: string | undefined, reread?: () => Promise<string | undefined>): CybersourceFlexDecision | Promise<CybersourceFlexDecision>;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* The Playwright adapter's judge: Playwright keeps a frame's fragment in frame.url() (checked in
|
|
171
|
+
* cybersource-flex-browser.test.mjs) and moves frame.url() only when a navigation commits, so the
|
|
172
|
+
* issuing frame and its siblings are read at pause time. `issuingUrl` is undefined when the
|
|
173
|
+
* request's frame could not be read at all.
|
|
174
|
+
*/
|
|
175
|
+
export declare function judgeMicroformFrameUrls(request: FlexRequest, issuingUrl: string | undefined, frameUrls: Iterable<string | undefined>, contexts: CaptureContexts): CybersourceFlexDecision | Promise<CybersourceFlexDecision>;
|
|
176
|
+
/**
|
|
177
|
+
* Whether a create's sidecar has the shape the API admits (routes/api/v2/checkout.ts
|
|
178
|
+
* createSchema): a capture context of 1 to 16384 characters, and a Microform version with a
|
|
179
|
+
* number field, an optional security code field and a trigger among them. authorize() checks
|
|
180
|
+
* it before any create, so a hand-built request fails locally rather than at the API.
|
|
181
|
+
*/
|
|
182
|
+
export declare function validCybersourceFlexSidecar(captureContext: unknown, microform: unknown): boolean;
|
|
183
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
declare var CYBERSOURCE_FLEX_RULES_SOURCE: Readonly<{
|
|
2
|
+
version: "2.12.1";
|
|
3
|
+
sha256: "8429ebae83e9745cd53ad8ff0d9ba69bee0087c1435ed0695a25444bed418327";
|
|
4
|
+
}>;
|
|
5
|
+
declare var CybersourceFlexError: {
|
|
6
|
+
new (reason: any, message: any): {
|
|
7
|
+
name: string;
|
|
8
|
+
message: string;
|
|
9
|
+
stack?: string;
|
|
10
|
+
cause?: unknown;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
declare function isVerifiedCaptureContext(value: any): boolean;
|
|
14
|
+
declare function flexHostEnvironment(hostname: any): "production" | "sandbox" | null;
|
|
15
|
+
declare var CYBERSOURCE_FLEX_PSP: string;
|
|
16
|
+
declare var CYBERSOURCE_FLEX_CONTENT_TYPE: string;
|
|
17
|
+
declare var CYBERSOURCE_FLEX_TOKENS_URLS: Readonly<{
|
|
18
|
+
production: `https://flex.cybersource.com${string}`;
|
|
19
|
+
sandbox: `https://testflex.cybersource.com${string}`;
|
|
20
|
+
}>;
|
|
21
|
+
declare var CYBERSOURCE_FLEX_CAPTURE_CONTEXT_MAX_LENGTH: number;
|
|
22
|
+
declare var CYBERSOURCE_FLEX_REVIEWED_IFRAME_VERSIONS: readonly string[];
|
|
23
|
+
declare var CYBERSOURCE_FLEX_SIGNING_KEYS: any;
|
|
24
|
+
declare var CYBERSOURCE_FLEX_TEST_PANS: Readonly<Set<string>>;
|
|
25
|
+
declare function verifyCaptureContext(jwt: any, { crypto, now }?: {}): Promise<Readonly<{
|
|
26
|
+
raw: any;
|
|
27
|
+
signingKid: any;
|
|
28
|
+
environment: any;
|
|
29
|
+
origin: string;
|
|
30
|
+
path: string;
|
|
31
|
+
url: string;
|
|
32
|
+
jwk: Readonly<{
|
|
33
|
+
kty: "RSA";
|
|
34
|
+
n: any;
|
|
35
|
+
e: any;
|
|
36
|
+
kid: any;
|
|
37
|
+
}>;
|
|
38
|
+
modulusBytes: number;
|
|
39
|
+
index: any;
|
|
40
|
+
contextType: any;
|
|
41
|
+
allowedCardNetworks: readonly any[] | null;
|
|
42
|
+
targetOrigins: readonly any[];
|
|
43
|
+
iat: any;
|
|
44
|
+
exp: any;
|
|
45
|
+
}>>;
|
|
46
|
+
declare function cybersourceFlexEnvironment(url: any): "production" | "sandbox" | undefined;
|
|
47
|
+
declare function parseMicroformFragment(rawUrl: any): Readonly<{
|
|
48
|
+
environment: "production" | "sandbox";
|
|
49
|
+
version: string;
|
|
50
|
+
reviewed: boolean;
|
|
51
|
+
microformType: any;
|
|
52
|
+
microformId: any;
|
|
53
|
+
fieldType: any;
|
|
54
|
+
keyId: string | null;
|
|
55
|
+
captureContext: any;
|
|
56
|
+
}> | null;
|
|
57
|
+
declare function detectCardTypes(pan: any, allowedCardNetworks: any): {
|
|
58
|
+
codes: any[];
|
|
59
|
+
valid: boolean;
|
|
60
|
+
cards: {
|
|
61
|
+
code: any;
|
|
62
|
+
name: any;
|
|
63
|
+
valid: any;
|
|
64
|
+
}[];
|
|
65
|
+
securityCode: {
|
|
66
|
+
required: boolean;
|
|
67
|
+
length: any;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
declare function cybersourceFlexTemplateKid(body: any): any;
|
|
71
|
+
declare function isCybersourceFlexTemplateBody(body: any): boolean;
|
|
72
|
+
declare function isCybersourceFlexMediaType(value: any): boolean;
|
|
73
|
+
declare function isCybersourceFlexRequest(url: any, method: any, body: any, headers: any): boolean;
|
|
74
|
+
declare function assertCybersourceFlexTemplate(body: any, verified: any): void;
|
|
75
|
+
declare function buildCardPlaintext(verified: any, card: any, { fields, trigger, now }?: {
|
|
76
|
+
trigger?: string | undefined;
|
|
77
|
+
}): string;
|
|
78
|
+
declare function sealForContext(verified: any, plaintext: any, { crypto }?: {}): Promise<string>;
|
|
79
|
+
declare var CYBERSOURCE_FLEX_REFUSAL_REASONS: readonly string[];
|
|
80
|
+
declare function cybersourceFlexRefusalCode(text: any): string | null;
|
|
81
|
+
declare function isCybersourceFlexTokenShape(text: any): boolean;
|
|
82
|
+
declare function transientTokenSigned(status: any, body: any, verified: any, { crypto }?: {}): Promise<{
|
|
83
|
+
confirmed: boolean;
|
|
84
|
+
reason: any;
|
|
85
|
+
}>;
|
|
86
|
+
declare function transientTokenFacts(status: any, body: any, verified: any, card: any, { crypto }?: {}): Promise<{
|
|
87
|
+
confirmed: boolean;
|
|
88
|
+
reason: any;
|
|
89
|
+
}>;
|
|
90
|
+
declare function cybersourceFlexPreparationUrl(environment: any): any;
|
|
91
|
+
declare function isPreparedCybersourceFlexRequest(url: any, method: any, body: any, environment: any, headers: any): boolean;
|
|
92
|
+
export { CYBERSOURCE_FLEX_CAPTURE_CONTEXT_MAX_LENGTH, CYBERSOURCE_FLEX_CONTENT_TYPE, CYBERSOURCE_FLEX_PSP, CYBERSOURCE_FLEX_REFUSAL_REASONS, CYBERSOURCE_FLEX_REVIEWED_IFRAME_VERSIONS, CYBERSOURCE_FLEX_RULES_SOURCE, CYBERSOURCE_FLEX_SIGNING_KEYS, CYBERSOURCE_FLEX_TEST_PANS, CYBERSOURCE_FLEX_TOKENS_URLS, CybersourceFlexError, assertCybersourceFlexTemplate, buildCardPlaintext, cybersourceFlexEnvironment, flexHostEnvironment as cybersourceFlexHostEnvironment, cybersourceFlexPreparationUrl, cybersourceFlexRefusalCode, cybersourceFlexTemplateKid, detectCardTypes, isCybersourceFlexMediaType, isCybersourceFlexRequest, isCybersourceFlexTemplateBody, isCybersourceFlexTokenShape, isPreparedCybersourceFlexRequest, isVerifiedCaptureContext, parseMicroformFragment, sealForContext, transientTokenFacts, transientTokenSigned, verifyCaptureContext };
|