@agent-cards/sdk 0.21.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 +47 -0
- package/PREFLIGHT.md +30 -0
- package/README.md +1070 -21
- 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 +5 -1
- package/dist/cdp.js +841 -135
- package/dist/client.d.ts +403 -19
- package/dist/client.js +949 -98
- package/dist/creditguard.generated.d.ts +79 -0
- package/dist/creditguard.generated.js +662 -0
- package/dist/cse-body.js +11 -1
- 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/hosted-form.d.ts +3 -2
- package/dist/hosted-form.js +3 -2
- package/dist/index.d.ts +17 -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 +57 -6
- package/dist/lifecycle.js +119 -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 +72 -2
- package/dist/pre-claim.js +857 -5
- package/dist/preflight-catalog.json +2218 -287
- package/dist/preflight-schemas.json +179 -6
- package/dist/preflight.generated.d.ts +1 -1
- package/dist/preflight.generated.js +233 -4
- package/dist/preparation.d.ts +5 -2
- package/dist/preparation.js +36 -10
- package/dist/prepared-processor.d.ts +84 -5
- package/dist/prepared-processor.js +147 -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 +100 -8
- 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 +699 -9
- 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
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
// Datatrans / PCI Proxy Secure Fields 2.0.0 in TOKENIZE mode (psp `datatrans`), on
|
|
2
|
+
// pay.datatrans.com (live) and pay.sandbox.datatrans.com (sandbox): the card form British Airways's
|
|
3
|
+
// Nexus checkout loads. Datatrans's card-number iframe reads the CVV from its same-origin CVV frame
|
|
4
|
+
// and sends the whole card in one same-origin XHR, POST /upp/payment/SecureFields/paymentField,
|
|
5
|
+
// form encoded. This module holds what the SDK decides about that iframe's requests. The rules
|
|
6
|
+
// themselves are payment-core's (datatrans.generated.ts): the API applies the same ones at create,
|
|
7
|
+
// and the cardholder's device applies them again before it writes a card. The one rule meant to
|
|
8
|
+
// change after a build ships, the card-on-file policy, is never read from that copy: the API serves
|
|
9
|
+
// the policy its create applies with the recognizer (Recognizer.cardOnFile), and this build follows
|
|
10
|
+
// it at each sync.
|
|
11
|
+
//
|
|
12
|
+
// The processor ships dark. The API serves the datatrans recognizer only to a build that declares
|
|
13
|
+
// the `datatrans_secure_fields_tokenize` capability (client.ts SUPPORTED_CAPABILITIES) and only to
|
|
14
|
+
// an org Agentcard enabled for it, so an SDK the API never served it leaves every Datatrans request
|
|
15
|
+
// alone.
|
|
16
|
+
import { DATATRANS_CARD_ON_FILE_REFUSED, DATATRANS_HOSTS, DATATRANS_INVALID_REQUEST, DATATRANS_REGISTRATION_POLICIES, classifyDatatransRequest, datatransResponseOutcome, isDatatransTokenizeUrl, parseDatatransForm, } from './datatrans.generated.js';
|
|
17
|
+
export const DATATRANS_PSP = 'datatrans';
|
|
18
|
+
/** The dark-launch capability the API serves the datatrans recognizer behind. */
|
|
19
|
+
export const DATATRANS_CAPABILITY = 'datatrans_secure_fields_tokenize';
|
|
20
|
+
/** True when the URL's host is one of Datatrans's two pay hosts. */
|
|
21
|
+
export function isDatatransHost(url) {
|
|
22
|
+
try {
|
|
23
|
+
return DATATRANS_HOSTS.includes(new URL(url).hostname);
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The card-on-file policy this build applies to a Datatrans card post: the one the API served with
|
|
31
|
+
* the datatrans recognizer (Recognizer.cardOnFile, VaultClient.cardOnFilePolicy) when payment-core
|
|
32
|
+
* defines it (`refuse`, `disclose`, `agentcard_single_use`), and `refuse` for anything else, an entry
|
|
33
|
+
* that names none included. The decision is payment-core's DATATRANS_REGISTRATION_POLICY, which the
|
|
34
|
+
* API reads each time it serves the catalog and again at create, so a change to that one line
|
|
35
|
+
* reaches every build already published at its next syncRegistry(), with no SDK release.
|
|
36
|
+
*/
|
|
37
|
+
export function datatransCardOnFilePolicy(served) {
|
|
38
|
+
return typeof served === 'string' && DATATRANS_REGISTRATION_POLICIES.includes(served) ? served : 'refuse';
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The pause decision for a POST the registry recognized on a Datatrans pay host, by payment-core's
|
|
42
|
+
* classifyDatatransRequest under the card-on-file policy the API served (datatransCardOnFilePolicy):
|
|
43
|
+
* 'card' the exact card URL with jQuery's form type and a sound TOKENIZE card body: it pauses. A
|
|
44
|
+
* usage=REGISTRATION post is one too once the served policy allows card on file, and the
|
|
45
|
+
* API and the cardholder's device then apply that policy;
|
|
46
|
+
* a DatatransRefusalReason: it is refused in the browser;
|
|
47
|
+
* null no card in the body (a wallet, bank-account or CVV-only post) or not the card path:
|
|
48
|
+
* the SDK's ordinary handling decides, and such a post continues untouched.
|
|
49
|
+
*/
|
|
50
|
+
export function datatransPauseDecision(request, servedPolicy) {
|
|
51
|
+
const verdict = classifyDatatransRequest(request.url, 'POST', request.body ?? '', request.headers ?? {}, datatransCardOnFilePolicy(servedPolicy));
|
|
52
|
+
if (verdict === 'card')
|
|
53
|
+
return 'card';
|
|
54
|
+
if (verdict === 'card_on_file')
|
|
55
|
+
return DATATRANS_CARD_ON_FILE_REFUSED;
|
|
56
|
+
return verdict === null ? null : DATATRANS_INVALID_REQUEST;
|
|
57
|
+
}
|
|
58
|
+
// ── The repeat rule ─────────────────────────────────────────────────────────
|
|
59
|
+
// British Airways's Nexus page tokenizes on blur, not on Pay: it submits the Secure Fields form
|
|
60
|
+
// whenever a valid field loses focus, on autofill and whenever the expiry changes, and field.js
|
|
61
|
+
// itself answers only a byte-identical submit from its cache. Without this rule each of those posts
|
|
62
|
+
// would be a new approval on the cardholder's phone for a card the phone already tokenized into the
|
|
63
|
+
// same form. So once an approved answer is handed to a card post, a later card post from the same
|
|
64
|
+
// frame that differs from it only in the expiry (expm, expy) and the browser details (browser*) is
|
|
65
|
+
// answered here, with that stored answer: no create, no prompt, no second replay. Those are the
|
|
66
|
+
// fields the design lets a re-submit change: the device writes the Vault card's own expiry, and the
|
|
67
|
+
// browser details describe the window, not the card. Every other field must match: the formId, the
|
|
68
|
+
// merchantId, the placeholder card number and CVV, the brand, usage, and the traveller's email and
|
|
69
|
+
// phone number, which Nexus sends for Amex and which reach Datatrans with the real card. A new
|
|
70
|
+
// formId (the iframe reloaded), another placeholder, other contact data or another frame is a new
|
|
71
|
+
// question. The answer also belongs to one approval's handoff: the gate in pre-claim.ts hands it
|
|
72
|
+
// out only while that approval is the attachment's current one, so the order completing or failing,
|
|
73
|
+
// a latched attachment and a new authorization all end it. The post names no amount and no order, so
|
|
74
|
+
// once the answer reached the page the gate asks the application's merchant resolver before each
|
|
75
|
+
// repeat and answers only while the order is still pending; an attachment with no resolver answers no
|
|
76
|
+
// repeat after the handoff. The answer also ends once its form goes quiet (DATATRANS_REPEAT_IDLE_MS).
|
|
77
|
+
/**
|
|
78
|
+
* How long an approved Datatrans answer is replayed to its own frame: the token's own lifetime
|
|
79
|
+
* (PCI Proxy keeps a tokenization readable for 30 minutes). Past it the stored transactionId names a
|
|
80
|
+
* token the merchant can no longer read, so a later post is a new question.
|
|
81
|
+
*/
|
|
82
|
+
export const DATATRANS_REPEAT_WINDOW_MS = 30 * 60_000;
|
|
83
|
+
/**
|
|
84
|
+
* How long a stored answer waits for its form's next post. British Airways re-submits while the agent
|
|
85
|
+
* finishes the card form, right after the approved answer. A form that posts nothing for this long has
|
|
86
|
+
* moved on: the order was placed or abandoned, which the SDK cannot tell apart without reconcile(). Its
|
|
87
|
+
* next post is a new approval. Each answered re-submit restarts the wait, and the token's lifetime
|
|
88
|
+
* still ends every answer.
|
|
89
|
+
*/
|
|
90
|
+
export const DATATRANS_REPEAT_IDLE_MS = 5 * 60_000;
|
|
91
|
+
/** The most answers one attachment keeps; the oldest goes first. */
|
|
92
|
+
const MAX_REMEMBERED = 8;
|
|
93
|
+
/** The fields a re-submit may change and still be the same question: the expiry and the browser details. */
|
|
94
|
+
const REPEAT_FREE_FIELDS = new Set(['expm', 'expy', 'browserUserAgent', 'browserJavaEnabled',
|
|
95
|
+
'browserLanguage', 'browserColorDepth', 'browserScreenHeight', 'browserScreenWidth', 'browserTZ']);
|
|
96
|
+
function repeatKey(url, body) {
|
|
97
|
+
if (!isDatatransTokenizeUrl(url) || typeof body !== 'string')
|
|
98
|
+
return null;
|
|
99
|
+
const pairs = parseDatatransForm(body);
|
|
100
|
+
if (!pairs)
|
|
101
|
+
return null;
|
|
102
|
+
const kept = pairs.filter(({ key }) => !REPEAT_FREE_FIELDS.has(key)).map(({ key, value }) => [key, value]);
|
|
103
|
+
const fields = new Map(kept);
|
|
104
|
+
if (!['formId', 'merchantId', 'cardNumber', 'paymentMethod'].every((name) => fields.get(name)))
|
|
105
|
+
return null;
|
|
106
|
+
return { url, fields: JSON.stringify(kept) };
|
|
107
|
+
}
|
|
108
|
+
function sameKey(a, b) {
|
|
109
|
+
return a.url === b.url && a.fields === b.fields;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The approved Datatrans answers one attachment handed to a card post, per frame. `frame` is the
|
|
113
|
+
* adapter's identity for the request's frame (the CDP frameId, the Playwright Frame); a request
|
|
114
|
+
* whose frame is unknown is never remembered and never answered. Only an answer payment-core reads
|
|
115
|
+
* as approved ({transactionId, cardInfo}) is kept: an error answer leaves the next post a new
|
|
116
|
+
* question, so the page can try again.
|
|
117
|
+
*/
|
|
118
|
+
export class DatatransRepeats {
|
|
119
|
+
windowMs;
|
|
120
|
+
now;
|
|
121
|
+
idleMs;
|
|
122
|
+
// `at`: when the approved answer reached the page; `seen`: when its form last posted and was answered.
|
|
123
|
+
remembered = [];
|
|
124
|
+
constructor(windowMs = DATATRANS_REPEAT_WINDOW_MS, now = Date.now, idleMs = DATATRANS_REPEAT_IDLE_MS) {
|
|
125
|
+
this.windowMs = windowMs;
|
|
126
|
+
this.now = now;
|
|
127
|
+
this.idleMs = idleMs;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Keep the answer a token replay handed to this card post, when Datatrans approved it. Called
|
|
131
|
+
* after the answer reached the browser, so it never throws: a failure here only leaves the
|
|
132
|
+
* page's next post a new question.
|
|
133
|
+
*/
|
|
134
|
+
remember(frame, url, body, replay) {
|
|
135
|
+
try {
|
|
136
|
+
if (frame === undefined || frame === null || frame === '')
|
|
137
|
+
return;
|
|
138
|
+
if (replay.mode === 'cse' || replay.mode === 'hosted_form')
|
|
139
|
+
return;
|
|
140
|
+
const key = repeatKey(url, body);
|
|
141
|
+
if (!key || datatransResponseOutcome(replay.status, replay.body, undefined).outcome !== 'approved')
|
|
142
|
+
return;
|
|
143
|
+
this.prune();
|
|
144
|
+
this.remembered = this.remembered.filter((entry) => !(entry.frame === frame && sameKey(entry.key, key)));
|
|
145
|
+
const at = this.now();
|
|
146
|
+
this.remembered.push({ frame, key, authorizationId: replay.authorizationId, status: replay.status,
|
|
147
|
+
headers: { ...replay.headers }, body: replay.body, at, seen: at });
|
|
148
|
+
if (this.remembered.length > MAX_REMEMBERED)
|
|
149
|
+
this.remembered.shift();
|
|
150
|
+
}
|
|
151
|
+
catch { /* see above: the next post is a new question */ }
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* The stored answer for a repeat of an answered card post from the same frame, or null. Only an
|
|
155
|
+
* answer from `authorizationId`, the approval the attachment is handing off now, is handed out,
|
|
156
|
+
* and every answer from another approval is dropped: a later authorization ends the window of
|
|
157
|
+
* every earlier one. An answer whose form stayed quiet past the idle bound is dropped too, and
|
|
158
|
+
* handing one out restarts that bound.
|
|
159
|
+
*/
|
|
160
|
+
answerFor(frame, url, body, authorizationId) {
|
|
161
|
+
if (frame === undefined || frame === null || frame === '' || !authorizationId)
|
|
162
|
+
return null;
|
|
163
|
+
const key = repeatKey(url, body);
|
|
164
|
+
if (!key)
|
|
165
|
+
return null;
|
|
166
|
+
this.prune();
|
|
167
|
+
this.remembered = this.remembered.filter((entry) => entry.authorizationId === authorizationId);
|
|
168
|
+
const entry = this.remembered.find((candidate) => candidate.frame === frame && sameKey(candidate.key, key));
|
|
169
|
+
if (!entry)
|
|
170
|
+
return null;
|
|
171
|
+
entry.seen = this.now();
|
|
172
|
+
return { authorizationId: entry.authorizationId, response: { status: entry.status, headers: { ...entry.headers }, body: entry.body } };
|
|
173
|
+
}
|
|
174
|
+
prune() {
|
|
175
|
+
const now = this.now();
|
|
176
|
+
this.remembered = this.remembered.filter((entry) => now - entry.at < this.windowMs && now - entry.seen < this.idleMs);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const CONVERGE_PSP = "elavon_converge";
|
|
2
|
+
/** The dark-launch capability the API serves the elavon_converge recognizer behind. */
|
|
3
|
+
export declare const CONVERGE_CAPABILITY = "converge_hpp_process";
|
|
4
|
+
/**
|
|
5
|
+
* Why the SDK refuses an Elavon Converge payment before anything is claimed, created or prompted:
|
|
6
|
+
* payment-core's own codes (CONVERGE_REFUSAL_CODES), the ones the API answers a create with and
|
|
7
|
+
* the device refuses with, so an integrator reads one code whichever of them refused.
|
|
8
|
+
* - A shape the Vault never pays: `converge_wallet_refused`, `converge_debit_card_refused`,
|
|
9
|
+
* `converge_push_to_card_refused`, `converge_gift_card_refused`, `converge_payment_type_refused`,
|
|
10
|
+
* `converge_captcha_refused`, `converge_service_fee_refused`, `converge_recurring_refused`,
|
|
11
|
+
* `converge_card_saving_refused` (ssl_get_token or ssl_add_token), `converge_amount_add_on_refused`
|
|
12
|
+
* (a tip or cash back) and `converge_currency_refused` (anything but US dollars).
|
|
13
|
+
* - A follow-up after a step the Vault cannot complete: `converge_3ds_follow_up_refused` (3-D
|
|
14
|
+
* Secure or Pay Defense) and `converge_surcharge_refused`.
|
|
15
|
+
* - A body the cardholder has nothing to approve on: `converge_amount_missing` and
|
|
16
|
+
* `converge_context_missing`.
|
|
17
|
+
* - Not the page's own card request, which the device could never fill: `converge_body_malformed`,
|
|
18
|
+
* `converge_credential_refused`, `converge_card_missing`, `converge_card_malformed`,
|
|
19
|
+
* `converge_url_refused`, `converge_method_refused` and `converge_content_type_refused`.
|
|
20
|
+
*/
|
|
21
|
+
export declare const CONVERGE_REFUSAL_REASONS: readonly ["converge_body_malformed", "converge_payment_type_refused", "converge_debit_card_refused", "converge_push_to_card_refused", "converge_gift_card_refused", "converge_credential_refused", "converge_wallet_refused", "converge_captcha_refused", "converge_service_fee_refused", "converge_3ds_follow_up_refused", "converge_surcharge_refused", "converge_amount_add_on_refused", "converge_card_saving_refused", "converge_recurring_refused", "converge_currency_refused", "converge_amount_missing", "converge_context_missing", "converge_card_missing", "converge_card_malformed", "converge_url_refused", "converge_method_refused", "converge_content_type_refused"];
|
|
22
|
+
export type ConvergeRefusalReason = typeof CONVERGE_REFUSAL_REASONS[number];
|
|
23
|
+
/** True when the URL's host is one of Converge's two payment page hosts. */
|
|
24
|
+
export declare function isConvergeHost(url: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The pause decision for a card-carrying POST the registry recognized on a Converge host. Null
|
|
27
|
+
* when it is the page's own first credit card sale, which pauses for approval; otherwise the reason
|
|
28
|
+
* it is refused. It judges the whole request (the exact process URL, the page's JSON content type,
|
|
29
|
+
* and a body exactly as the page serializes it) with payment-core's convergeRequestRefusal, the
|
|
30
|
+
* check the API runs at create and the device runs before it writes a card. A code this build does
|
|
31
|
+
* not list reads as not the page's request, so a newer core can only refuse more.
|
|
32
|
+
*/
|
|
33
|
+
export declare function convergeRefusal(request: {
|
|
34
|
+
url: string;
|
|
35
|
+
headers: Record<string, string>;
|
|
36
|
+
body: string | null;
|
|
37
|
+
}): ConvergeRefusalReason | null;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
declare var CONVERGE_HOSTS: readonly string[];
|
|
2
|
+
declare var CONVERGE_DEMO_HOST: string;
|
|
3
|
+
declare var CONVERGE_PROCESS_PATH: string;
|
|
4
|
+
declare var CONVERGE_PROCESS_URLS: readonly string[];
|
|
5
|
+
declare var CONVERGE_REFUSAL_CODES: readonly string[];
|
|
6
|
+
declare function parseConvergeBody(body: any): any;
|
|
7
|
+
declare function convergeAmountCents(value: any): number | null;
|
|
8
|
+
declare function convergeBodyVerdict(body: any): Readonly<{
|
|
9
|
+
verdict: "refuse";
|
|
10
|
+
code: any;
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
verdict: "continue";
|
|
13
|
+
}> | Readonly<{
|
|
14
|
+
verdict: "card";
|
|
15
|
+
}>;
|
|
16
|
+
declare function convergeBodyRefusal(body: any): any;
|
|
17
|
+
declare function isConvergeProcessUrl(url: any): boolean;
|
|
18
|
+
declare function convergeRequestRefusal(request: any): any;
|
|
19
|
+
declare function convergeRefusalMessage(code: any): any;
|
|
20
|
+
declare function injectConvergeHppCard(templateBody: any, card: any): {
|
|
21
|
+
body: string;
|
|
22
|
+
where: string[];
|
|
23
|
+
};
|
|
24
|
+
declare function convergeAnswerKind(text: any): "unknown" | "approved" | "declined" | "step" | "session_timeout";
|
|
25
|
+
declare function convergeFacts(text: any, template: any): {
|
|
26
|
+
kind: string;
|
|
27
|
+
final: boolean;
|
|
28
|
+
refusalCode: any;
|
|
29
|
+
txnId: string | null;
|
|
30
|
+
approvalCode: string | null;
|
|
31
|
+
amountCents: number | null;
|
|
32
|
+
tokenIssued: boolean;
|
|
33
|
+
chargedAboveRequest: boolean;
|
|
34
|
+
};
|
|
35
|
+
declare function convergeResponseOutcome(status: any, text: any): {
|
|
36
|
+
outcome: string;
|
|
37
|
+
reason: string;
|
|
38
|
+
code?: undefined;
|
|
39
|
+
} | {
|
|
40
|
+
outcome: string;
|
|
41
|
+
reason?: undefined;
|
|
42
|
+
code?: undefined;
|
|
43
|
+
} | {
|
|
44
|
+
outcome: string;
|
|
45
|
+
code: any;
|
|
46
|
+
reason?: undefined;
|
|
47
|
+
};
|
|
48
|
+
declare function sanitizeConvergeResponse(text: any): string;
|
|
49
|
+
export { CONVERGE_DEMO_HOST, CONVERGE_HOSTS, CONVERGE_PROCESS_PATH, CONVERGE_PROCESS_URLS, CONVERGE_REFUSAL_CODES, convergeAmountCents, convergeAnswerKind, convergeBodyRefusal, convergeBodyVerdict, convergeFacts, convergeRefusalMessage, convergeRequestRefusal, convergeResponseOutcome, injectConvergeHppCard, isConvergeProcessUrl, parseConvergeBody, sanitizeConvergeResponse };
|