@agent-cards/sdk 0.23.21 → 0.23.22
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 +14 -0
- package/PREFLIGHT.md +4 -0
- package/README.md +27 -1
- package/dist/amadeus-checkout.generated.d.ts +6 -1
- package/dist/amadeus-checkout.generated.js +26 -2
- package/dist/card-fields.generated.js +1391 -104
- package/dist/cdp.js +53 -18
- package/dist/client.d.ts +73 -6
- package/dist/client.js +164 -24
- package/dist/creditguard.generated.js +4 -2
- package/dist/cse-body.js +11 -0
- package/dist/ebanx.d.ts +1 -1
- package/dist/ebanx.js +1 -1
- package/dist/eximbay.d.ts +46 -0
- package/dist/eximbay.js +69 -0
- package/dist/lifecycle.d.ts +9 -4
- package/dist/lifecycle.js +16 -4
- package/dist/paygent.generated.d.ts +60 -0
- package/dist/paygent.generated.js +425 -0
- package/dist/payrexx.d.ts +91 -0
- package/dist/payrexx.generated.d.ts +91 -0
- package/dist/payrexx.generated.js +536 -0
- package/dist/payrexx.js +141 -0
- package/dist/pre-claim.d.ts +23 -0
- package/dist/pre-claim.js +131 -20
- package/dist/prepared-processor.d.ts +7 -2
- package/dist/prepared-processor.js +16 -2
- package/dist/primer.generated.js +1427 -140
- package/dist/stripe-checkout.generated.js +289 -21
- package/dist/toast-seal.generated.d.ts +37 -0
- package/dist/toast-seal.generated.js +625 -0
- package/dist/toast.generated.d.ts +41 -0
- package/dist/toast.generated.js +113 -0
- package/package.json +2 -2
package/dist/cdp.js
CHANGED
|
@@ -11,6 +11,7 @@ import { EprotectGate, classifyEprotectRequest, eprotectScriptAnswer } from './e
|
|
|
11
11
|
import { dispatchPreClaim, eventUrl, isArmedCreditguardCall, routesHipayVault } from './pre-claim.js';
|
|
12
12
|
import { GMO_TOKEN_V1_PATTERNS, gmoRequestShop, isGmoTokenV1Request, recognizesGmo } from './gmo.js';
|
|
13
13
|
import { isPaddleVgsCardsUrl } from './paddle-vgs.generated.js';
|
|
14
|
+
import { isToastPaymentMethodsUrl, readToastBody } from './toast.generated.js';
|
|
14
15
|
import { PADDLE_VGS_PAY_PATTERNS, PaddleVgsPayGate, isPaddleCheckoutService, recognizesPaddleVgs } from './paddle-vgs-pay.js';
|
|
15
16
|
import { DatatransRepeats } from './datatrans.js';
|
|
16
17
|
import { TokenexIframeRepeats, isArmedTokenexIframeUrl } from './tokenex-iframe.js';
|
|
@@ -23,8 +24,10 @@ import { isArmedRedsysUrl } from './redsys.js';
|
|
|
23
24
|
import { isArmedPrzelewy24Url } from './przelewy24.js';
|
|
24
25
|
import { isArmedQuickpayUrl } from './quickpay.js';
|
|
25
26
|
import { COMGATE_CARD_PATTERNS, isArmedComgateUrl, servesComgate } from './comgate.js';
|
|
27
|
+
import { isArmedEximbayUrl } from './eximbay.js';
|
|
26
28
|
import { PAYPAL_HOSTED_FIELDS_PATTERNS, isPaypalHostedFieldsConfirm } from './paypal-hosted-fields.js';
|
|
27
29
|
import { EBANX_RESEND_PATTERNS, EbanxFollowUps, isEbanxResendUrl } from './ebanx.js';
|
|
30
|
+
import { PayrexxFollowUps } from './payrexx.js';
|
|
28
31
|
import { PAYPAL_CARD_FORM_PATTERNS, isPaypalCardFormUrl } from './paypal-card-forms.js';
|
|
29
32
|
import { CYBERSOURCE_SECURE_ACCEPTANCE_PATTERNS, CYBERSOURCE_SECURE_ACCEPTANCE_RECIPIENT, SecureAcceptanceFollowUpWatch, isCybersourceSecureAcceptanceUrl, secureAcceptanceFollowUp, secureAcceptanceFrameAnswer, secureAcceptanceReplyLast4, } from './cybersource-secure-acceptance.js';
|
|
30
33
|
import { CheckoutAttachmentError, attachmentDeadline, attachmentFailure, withinAttachmentDeadline } from './attachment.js';
|
|
@@ -1288,9 +1291,23 @@ function requestIdentity(opts, url, method, body, documentUrl, pageAmount, flexS
|
|
|
1288
1291
|
// out, so the shop joins the identity: a retry that names another shop needs its own approval.
|
|
1289
1292
|
const shop = gmoRequestShop(url, body);
|
|
1290
1293
|
const identity = shop === undefined ? shaped.shape : `${shaped.shape};gmo_shop:${JSON.stringify(shop)}`;
|
|
1291
|
-
return { url, method, documentUrl, pageAmount, body: `${identity}${paddleVgsRetryKey(url, body, headers)}`,
|
|
1294
|
+
return { url, method, documentUrl, pageAmount, body: `${identity}${paddleVgsRetryKey(url, body, headers)}${toastRetryKey(url, body)}`,
|
|
1292
1295
|
amountEvidence: opts.amount != null || pageAmount !== undefined || shaped.namesAmount };
|
|
1293
1296
|
}
|
|
1297
|
+
/**
|
|
1298
|
+
* What a Toast card request's retry must repeat, beyond its shape: the sealed card opens at any Toast
|
|
1299
|
+
* restaurant whose payment intent names it, and the frame seals the ZIP inside it, so the payment session
|
|
1300
|
+
* and the ZIP join the identity. A request under another session or with another ZIP never receives the
|
|
1301
|
+
* card the cardholder approved for the first, while the frame's retry, its placeholder sealed afresh, still
|
|
1302
|
+
* does. A body Toast's reader refuses joins whole, so it matches nothing but itself. Empty for every other
|
|
1303
|
+
* request.
|
|
1304
|
+
*/
|
|
1305
|
+
function toastRetryKey(url, body) {
|
|
1306
|
+
if (!isToastPaymentMethodsUrl(url))
|
|
1307
|
+
return '';
|
|
1308
|
+
const read = readToastBody(body);
|
|
1309
|
+
return `;toast:${JSON.stringify(read.ok ? [read.sessionSecret, read.postalCode] : body)}`;
|
|
1310
|
+
}
|
|
1294
1311
|
/**
|
|
1295
1312
|
* What a Paddle VGS card request's retry must repeat byte for byte, beyond its shape: Paddle's frame
|
|
1296
1313
|
* sends its second request with the same body under the same bearer, and the bearer names the
|
|
@@ -1867,6 +1884,8 @@ export async function attachToCdp(cdp, pageSessionId, opts) {
|
|
|
1867
1884
|
const juspayCheckout = new JuspayCheckoutGate(opts.vault);
|
|
1868
1885
|
// The approved EBANX token request on this attachment and the sends claimed under it (ebanx.ts).
|
|
1869
1886
|
const ebanxFollowUps = new EbanxFollowUps();
|
|
1887
|
+
// The approved Payrexx card request on this attachment and the 3-D Secure sends claimed under it (payrexx.ts).
|
|
1888
|
+
const payrexxFollowUps = new PayrexxFollowUps();
|
|
1870
1889
|
const aci = new AciGate(opts.vault);
|
|
1871
1890
|
const eprotect = new EprotectGate(opts.vault);
|
|
1872
1891
|
// The merchant's follow-up request after a delivered Secure Acceptance reply (cybersource-secure-acceptance.ts).
|
|
@@ -2821,6 +2840,7 @@ export async function attachToCdp(cdp, pageSessionId, opts) {
|
|
|
2821
2840
|
datatrans: datatransRepeats,
|
|
2822
2841
|
tokenexIframe: tokenexIframeRepeats,
|
|
2823
2842
|
ebanx: ebanxFollowUps,
|
|
2843
|
+
payrexx: payrexxFollowUps,
|
|
2824
2844
|
frame: typeof frameId === 'string' && frameId ? frameId : undefined,
|
|
2825
2845
|
payrails,
|
|
2826
2846
|
shijiSts: { companions: shijiCompanions, page: () => cdpShijiPage(sessionId, frameId) },
|
|
@@ -2934,8 +2954,9 @@ export async function attachToCdp(cdp, pageSessionId, opts) {
|
|
|
2934
2954
|
// A request that skipped the spent preparation's claim and was not bound as
|
|
2935
2955
|
// its retry (the approval ended while it was judged) is refused as that
|
|
2936
2956
|
// claim would refuse it, never asked as a new approval.
|
|
2937
|
-
// An EBANX send still out (a confirm that may pay
|
|
2938
|
-
//
|
|
2957
|
+
// An EBANX or Payrexx send still out (a confirm that may pay, a 3-D Secure step whose answer names the token the
|
|
2958
|
+
// page charges) holds the attachment too: a new card request the page sends meanwhile, a second tap on the hosted
|
|
2959
|
+
// page's Pay among them, would start another payment over it.
|
|
2939
2960
|
const followUpOut = lifecycle.followUpsInFlight();
|
|
2940
2961
|
if (terminal || lifecycle.isBlocked() || awaitingApproval || followUpOut || preparedRetry || Date.now() < quietUntil) {
|
|
2941
2962
|
let repeatedAuthorizationId = null;
|
|
@@ -2946,7 +2967,7 @@ export async function attachToCdp(cdp, pageSessionId, opts) {
|
|
|
2946
2967
|
}
|
|
2947
2968
|
}
|
|
2948
2969
|
const why = terminal ?? (lifecycle.isBlocked() ? lifecycle.getState().status : awaitingApproval ? 'an approval is already outstanding'
|
|
2949
|
-
: followUpOut ? '
|
|
2970
|
+
: followUpOut ? 'a follow-up send is in flight' : preparedRetry ? 'CheckoutPreparationError' : 'awaiting approval cooldown');
|
|
2950
2971
|
opts.onEvent?.({ type: 'blocked', detail: why instanceof Error ? failureSummary(why) : String(why) });
|
|
2951
2972
|
if (preparation)
|
|
2952
2973
|
preparationGate.retireUnboundClaim();
|
|
@@ -2987,8 +3008,9 @@ export async function attachToCdp(cdp, pageSessionId, opts) {
|
|
|
2987
3008
|
// The approval the device gave, and whether it reached a browser request.
|
|
2988
3009
|
let approvedId = null;
|
|
2989
3010
|
let deliveryBegun = false;
|
|
2990
|
-
// Whether this handoff kept an
|
|
2991
|
-
|
|
3011
|
+
// Whether this handoff kept an approval's follow-ups (ebanxFollowUps.remember, payrexxFollowUps.remember), which a
|
|
3012
|
+
// failed handoff stops.
|
|
3013
|
+
let followUpsRemembered = false;
|
|
2992
3014
|
// The business's pause, so resume resolves once the page has its answer.
|
|
2993
3015
|
let businessPause = null;
|
|
2994
3016
|
// Hold mode: the person's release, settled with what came of it.
|
|
@@ -3322,12 +3344,14 @@ export async function attachToCdp(cdp, pageSessionId, opts) {
|
|
|
3322
3344
|
throw new PaymentOutcomeUnknownError(replay.authorizationId, 'paddle_vgs_card_facts_unavailable');
|
|
3323
3345
|
}
|
|
3324
3346
|
// An approved EBANX token request whose read names a window covers the 3-D Secure calls and the confirm the
|
|
3325
|
-
// page sends next (ebanx.ts)
|
|
3326
|
-
//
|
|
3327
|
-
//
|
|
3347
|
+
// page sends next (ebanx.ts), and an approved Payrexx card request whose answer started 3-D Secure covers the
|
|
3348
|
+
// card frame's two 3-D Secure sends (payrexx.ts): kept as the API stored it, the request that raised the
|
|
3349
|
+
// approval. Kept before the page has the answer, since the page may send its first 3-D Secure call the moment
|
|
3350
|
+
// the answer lands; a handoff that then fails stops them (the catch below).
|
|
3328
3351
|
if (replay.mode !== 'device_encrypt') {
|
|
3329
3352
|
ebanxFollowUps.remember({ url: request.url, body }, replay);
|
|
3330
|
-
|
|
3353
|
+
payrexxFollowUps.remember({ url: request.url, body }, replay);
|
|
3354
|
+
followUpsRemembered = true;
|
|
3331
3355
|
}
|
|
3332
3356
|
await cdp.send('Fetch.fulfillRequest', {
|
|
3333
3357
|
requestId: deliverTo,
|
|
@@ -3365,10 +3389,12 @@ export async function attachToCdp(cdp, pageSessionId, opts) {
|
|
|
3365
3389
|
authorizationId: approvedId ?? lifecycle.getState().authorizationId, detail: failureSummary(err) });
|
|
3366
3390
|
// Ignore the failure event caused by our own safe decline/error abort.
|
|
3367
3391
|
const dead = attempt.target ?? { requestId, sessionId };
|
|
3368
|
-
// An
|
|
3369
|
-
//
|
|
3370
|
-
if (
|
|
3392
|
+
// An answer this handoff kept follow-ups for and did not finish handing over: nothing after it is claimed
|
|
3393
|
+
// (ebanx.ts EbanxFollowUps.stop, payrexx.ts PayrexxFollowUps.stop).
|
|
3394
|
+
if (followUpsRemembered) {
|
|
3371
3395
|
ebanxFollowUps.stop();
|
|
3396
|
+
payrexxFollowUps.stop();
|
|
3397
|
+
}
|
|
3372
3398
|
// The business's resume settles once the request is answered: a terminal read is an answer (failed, nothing charged), a lost handoff is not.
|
|
3373
3399
|
const settlePause = () => { if (businessPause) {
|
|
3374
3400
|
if (isApprovalOutcome(err))
|
|
@@ -3541,6 +3567,8 @@ export async function attachToPlaywright(page, opts) {
|
|
|
3541
3567
|
const juspayCheckout = new JuspayCheckoutGate(opts.vault);
|
|
3542
3568
|
// The approved EBANX token request on this attachment and the sends claimed under it (ebanx.ts).
|
|
3543
3569
|
const ebanxFollowUps = new EbanxFollowUps();
|
|
3570
|
+
// The approved Payrexx card request on this attachment and the 3-D Secure sends claimed under it (payrexx.ts).
|
|
3571
|
+
const payrexxFollowUps = new PayrexxFollowUps();
|
|
3544
3572
|
const aci = new AciGate(opts.vault);
|
|
3545
3573
|
let navigationBodyReplaced;
|
|
3546
3574
|
const eprotect = new EprotectGate(opts.vault);
|
|
@@ -3886,6 +3914,9 @@ export async function attachToPlaywright(page, opts) {
|
|
|
3886
3914
|
// Every request on the TokenEx iframe's /iframe/v3 path once its entry is served (tokenex-iframe.ts), as attachToCdp
|
|
3887
3915
|
// arms its hosts: a card post the recognizer's exact URL does not match reaches the TokenEx gate and fails.
|
|
3888
3916
|
|| isArmedTokenexIframeUrl(opts.vault, url.toString())
|
|
3917
|
+
// Every request to an Eximbay host once its entry is served there (eximbay.ts), as attachToCdp arms the host: the
|
|
3918
|
+
// step, the window's lookups and its card post reach the Eximbay gate and fail.
|
|
3919
|
+
|| isArmedEximbayUrl(opts.vault, url.toString())
|
|
3889
3920
|
// PayPal's legacy Hosted Fields confirm, for every org, as attachToCdp arms it (paypal-hosted-fields.ts).
|
|
3890
3921
|
|| isPaypalHostedFieldsConfirm(url.toString())
|
|
3891
3922
|
// PayPal's Card Fields confirm and GraphQL on www.paypal.com, for every org, as attachToCdp arms them (paypal-card-forms.ts).
|
|
@@ -3993,6 +4024,7 @@ export async function attachToPlaywright(page, opts) {
|
|
|
3993
4024
|
datatrans: datatransRepeats,
|
|
3994
4025
|
tokenexIframe: tokenexIframeRepeats,
|
|
3995
4026
|
ebanx: ebanxFollowUps,
|
|
4027
|
+
payrexx: payrexxFollowUps,
|
|
3996
4028
|
frame: frameOf(request),
|
|
3997
4029
|
payrails,
|
|
3998
4030
|
shijiSts: { companions: shijiCompanions, page: async () => (await playwrightShijiDocumentPage(request)) ?? `pw:none:${++playwrightShijiSeq}` },
|
|
@@ -4087,7 +4119,7 @@ export async function attachToPlaywright(page, opts) {
|
|
|
4087
4119
|
// identically whichever adapter is attached. An Amadeus card request is
|
|
4088
4120
|
// 'failed' (ERR_FAILED) in both too, see failsAsNetworkError (refusalFailure).
|
|
4089
4121
|
// As in attachToCdp: an unbound request that skipped the spent preparation's claim is refused.
|
|
4090
|
-
// As in attachToCdp: an EBANX send still out holds the attachment too.
|
|
4122
|
+
// As in attachToCdp: an EBANX or Payrexx send still out holds the attachment too.
|
|
4091
4123
|
const followUpOut = lifecycle.followUpsInFlight();
|
|
4092
4124
|
if (terminal || lifecycle.isBlocked() || awaitingApproval || followUpOut || preparedRetry || Date.now() < quietUntil) {
|
|
4093
4125
|
let repeatedAuthorizationId = null;
|
|
@@ -4102,7 +4134,7 @@ export async function attachToPlaywright(page, opts) {
|
|
|
4102
4134
|
}
|
|
4103
4135
|
}
|
|
4104
4136
|
const why = terminal ?? (lifecycle.isBlocked() ? lifecycle.getState().status : awaitingApproval ? 'an approval is already outstanding'
|
|
4105
|
-
: followUpOut ? '
|
|
4137
|
+
: followUpOut ? 'a follow-up send is in flight' : preparedRetry ? 'CheckoutPreparationError' : 'awaiting approval cooldown');
|
|
4106
4138
|
opts.onEvent?.({ type: 'blocked', detail: why instanceof Error ? failureSummary(why) : String(why) });
|
|
4107
4139
|
if (preparation)
|
|
4108
4140
|
preparationGate.retireUnboundClaim();
|
|
@@ -4156,7 +4188,7 @@ export async function attachToPlaywright(page, opts) {
|
|
|
4156
4188
|
let approvedId = null;
|
|
4157
4189
|
let deliveryBegun = false;
|
|
4158
4190
|
// See the same flag in attachToCdp.
|
|
4159
|
-
let
|
|
4191
|
+
let followUpsRemembered = false;
|
|
4160
4192
|
// A prepared Amadeus SDK add must be sent within its window (see amadeus.ts).
|
|
4161
4193
|
let disarmSendWindow = null;
|
|
4162
4194
|
try {
|
|
@@ -4374,7 +4406,8 @@ export async function attachToPlaywright(page, opts) {
|
|
|
4374
4406
|
// See the same step in attachToCdp: kept before the page has the answer.
|
|
4375
4407
|
if (replay.mode !== 'device_encrypt') {
|
|
4376
4408
|
ebanxFollowUps.remember({ url: request.url(), body }, replay);
|
|
4377
|
-
|
|
4409
|
+
payrexxFollowUps.remember({ url: request.url(), body }, replay);
|
|
4410
|
+
followUpsRemembered = true;
|
|
4378
4411
|
}
|
|
4379
4412
|
await deliverTo.fulfill({ status: replay.status, headers: withCorsHeaders(replay.headers, cors.headers), body: replay.body });
|
|
4380
4413
|
datatransRepeats.remember(frameOf(deliverRequest), deliverRequest.url(), deliverBody, replay);
|
|
@@ -4393,8 +4426,10 @@ export async function attachToPlaywright(page, opts) {
|
|
|
4393
4426
|
catch (err) {
|
|
4394
4427
|
const dead = attempt.target?.route ?? route;
|
|
4395
4428
|
// See the same step in attachToCdp.
|
|
4396
|
-
if (
|
|
4429
|
+
if (followUpsRemembered) {
|
|
4397
4430
|
ebanxFollowUps.stop();
|
|
4431
|
+
payrexxFollowUps.stop();
|
|
4432
|
+
}
|
|
4398
4433
|
if (activeRequest?.attempt === attempt)
|
|
4399
4434
|
activeRequest = null;
|
|
4400
4435
|
try {
|
package/dist/client.d.ts
CHANGED
|
@@ -274,6 +274,22 @@ export declare const SUPPORTED_REGISTRY_FEATURES: readonly string[];
|
|
|
274
274
|
* company until a reviewed change binds GoPay's payee and amount to the approval: the post names
|
|
275
275
|
* neither. The API takes it only at a shop Agentcard reviewed.
|
|
276
276
|
*
|
|
277
|
+
* `paygent_token`: the token request Paygent's own PaygentToken.js sends from a merchant's
|
|
278
|
+
* page (token.paygent.co.jp/n/token/request), only through a prepared checkout: the script
|
|
279
|
+
* abandons the request 35 seconds after the press that sends it, so the cardholder approves
|
|
280
|
+
* before the press. The cardholder's device sends the card itself and the page gets back
|
|
281
|
+
* Paygent's single-use token alone; the SDK refuses a second token request on the same approval.
|
|
282
|
+
* Served on the same terms: only to a build that lists it, for a company Agentcard turned
|
|
283
|
+
* Paygent on for.
|
|
284
|
+
*
|
|
285
|
+
* `payrexx_card_frame`: the card request Payrexx Pay's card frame sends to its own URL
|
|
286
|
+
* (checkout.payrexx.com/?pspId=44&lang=<xx>) on a Payrexx merchant's page. This build pauses only
|
|
287
|
+
* the frame's own one-time card request and answers it with Payrexx's answer as the API recorded
|
|
288
|
+
* it: the token the merchant's page then charges, or the start of 3-D Secure, whose two later sends
|
|
289
|
+
* of the card this build hands to the cardholder's device under the same approval (payrexx.ts,
|
|
290
|
+
* pre-claim.ts payrexxPreClaim). The cardholder's device sends the card through the checkout relay.
|
|
291
|
+
* Served only to a build that lists it, for a company Agentcard turned Payrexx on for.
|
|
292
|
+
*
|
|
277
293
|
* `hipay_vault_token`: the token create HiPay's hosted fields send to HiPay's Secure Vault
|
|
278
294
|
* (secure2-vault.hipay-tpp.com, stage-secure2-vault for a test row), only through a prepared
|
|
279
295
|
* checkout: the merchant's page gives the frame 20 seconds after Pay. The cardholder's device
|
|
@@ -373,6 +389,32 @@ export declare const SUPPORTED_REGISTRY_FEATURES: readonly string[];
|
|
|
373
389
|
* device sends the card itself, and the API holds the payment to a merchant Agentcard reviewed, at the
|
|
374
390
|
* amount SumUp holds for the checkout. Served on the same terms: only to a build that lists it, for a
|
|
375
391
|
* company Agentcard turned SumUp on for.
|
|
392
|
+
*
|
|
393
|
+
* `clover_card_token`: the card token request Clover's card frame (the hidden frame of
|
|
394
|
+
* checkout.clover.com that Clover's iframe mounts on a merchant's page) sends to
|
|
395
|
+
* token.clover.com/v1/tokens (token-sandbox.dev.clover.com for a test row), with the number
|
|
396
|
+
* encrypted under Clover's key. This build pauses only the frame's own body at that exact URL; the
|
|
397
|
+
* cardholder's device builds the request again with the real card under the key payment-core pins
|
|
398
|
+
* and sends it to Clover itself, and the frame gets the token answer payment-core's judge rebuilt.
|
|
399
|
+
* The request names no amount, so the agent's pair, above zero, is the one the cardholder approves
|
|
400
|
+
* (CLOVER_PSP below). Served on the same terms: only to a build that lists it, for a company
|
|
401
|
+
* Agentcard turned Clover on for.
|
|
402
|
+
*
|
|
403
|
+
* `eximbay_hosted_payment_page`: Eximbay's payment window, whose card-free signed entry
|
|
404
|
+
* (a form post to /Gateway/BasicProcessor.krp on secureapi.eximbay.com, or its test host) this
|
|
405
|
+
* build pauses for the cardholder's device, in the page or in a window it opened once attachToCdp
|
|
406
|
+
* has armed that window (eximbay.ts names the entry that can leave first), and whose
|
|
407
|
+
* step, amount query, card lookup and card post this build never lets the agent's browser send
|
|
408
|
+
* (pre-claim.ts, eximbay.ts). Served on the same terms as NMI's and Redsys's: only to a build
|
|
409
|
+
* that lists it, for a company Agentcard turned Eximbay on for.
|
|
410
|
+
*
|
|
411
|
+
* `toast_pinned_key`: the card request Toast's payments frame sends to
|
|
412
|
+
* payments.toasttab.com/v1/payment-methods on a Toast online-ordering checkout, with
|
|
413
|
+
* the card sealed in card.cardData under one key every Toast restaurant shares. The
|
|
414
|
+
* cardholder's device seals the real card under that key, which payment-core pins, and
|
|
415
|
+
* this build writes it over the agent's placeholder and nothing else before it
|
|
416
|
+
* continues the request. Served on the same terms: only to a build that lists it, for
|
|
417
|
+
* a company Agentcard turned Toast on for.
|
|
376
418
|
*/
|
|
377
419
|
export declare const SUPPORTED_CAPABILITIES: readonly string[];
|
|
378
420
|
/**
|
|
@@ -452,8 +494,9 @@ export interface TokenReplay extends ExecutionMetadata {
|
|
|
452
494
|
amountAuthority?: AmountAuthority;
|
|
453
495
|
/**
|
|
454
496
|
* An EBANX token approval that covers the sends EBANX's page makes after it (its 3-D Secure calls and the hosted
|
|
455
|
-
* page's confirm), for a company Agentcard turned that on for
|
|
456
|
-
*
|
|
497
|
+
* page's confirm), for a company Agentcard turned that on for, or a Payrexx card request whose answer started 3-D
|
|
498
|
+
* Secure, which covers the card frame's two 3-D Secure sends: until when (ISO 8601) the adapters may ask the
|
|
499
|
+
* cardholder's device to send them (sendEbanxFollowUp, sendPayrexxFollowUp). Absent on every other approval.
|
|
457
500
|
*/
|
|
458
501
|
followUpsUntil?: string;
|
|
459
502
|
}
|
|
@@ -1230,12 +1273,12 @@ export interface PresetRefusal {
|
|
|
1230
1273
|
/** A decline reason only the company presets stamp (see PresetRefusedError). */
|
|
1231
1274
|
export declare const PRESET_REFUSAL_REASONS: ReadonlySet<string>;
|
|
1232
1275
|
/**
|
|
1233
|
-
* How often sendEbanxFollowUp
|
|
1234
|
-
* client's own `pollIntervalMs`. One send is out at a time per approval, so this is 120
|
|
1235
|
-
* API's 240 a minute per caller and authorization (routes/api/v2/checkout-follow-ups.ts).
|
|
1276
|
+
* How often sendEbanxFollowUp and sendPayrexxFollowUp read a send back while the cardholder's device has it: every
|
|
1277
|
+
* half second, whatever the client's own `pollIntervalMs`. One send is out at a time per approval, so this is 120
|
|
1278
|
+
* reads a minute, inside the API's 240 a minute per caller and authorization (routes/api/v2/checkout-follow-ups.ts).
|
|
1236
1279
|
*/
|
|
1237
1280
|
export declare const EBANX_FOLLOW_UP_READ_MS = 500;
|
|
1238
|
-
/** The longest
|
|
1281
|
+
/** The longest a follow-up send waits after reads the API refused as too many (429): 1, 2, 4, 8, then 15 seconds. */
|
|
1239
1282
|
export declare const EBANX_FOLLOW_UP_BACKOFF_MAX_MS = 15000;
|
|
1240
1283
|
export declare class CheckoutApiError extends Error {
|
|
1241
1284
|
status: number;
|
|
@@ -1318,6 +1361,8 @@ export declare class CheckoutAuthError extends Error {
|
|
|
1318
1361
|
* https://pgw-ui.2c2p.com/payment/4.1/{token}.
|
|
1319
1362
|
* On QuickPay's host the window's session reads `{session}`:
|
|
1320
1363
|
* https://payment.quickpay.net/{session}/3ds_auth.
|
|
1364
|
+
* On FastSpring's store hosts the session id reads `{session}`:
|
|
1365
|
+
* https://daisydisk.onfastspring.com/session/{session}/payment.
|
|
1321
1366
|
* A string that is not a URL keeps the part before any `?` or `#`, with the
|
|
1322
1367
|
* same segments masked for every processor whose host it names.
|
|
1323
1368
|
* A URL is read by its host only when the parser finds one. Text before a URL
|
|
@@ -1708,6 +1753,28 @@ export declare class VaultClient {
|
|
|
1708
1753
|
headers: Record<string, string>;
|
|
1709
1754
|
body: string;
|
|
1710
1755
|
}>;
|
|
1756
|
+
/**
|
|
1757
|
+
* Send one of Payrexx's 3-D Secure sends an approved Payrexx card request covers (payrexx.ts says which: the card
|
|
1758
|
+
* frame's authentication after the ACS method and its post-authentication after the bank's challenge, bound to that
|
|
1759
|
+
* approval) from the cardholder's device, and resolve with Payrexx's answer for the paused request, exactly as
|
|
1760
|
+
* sendEbanxFollowUp does for EBANX: the same create, reads and clocks, and no prompt. Rejects with a
|
|
1761
|
+
* PayrexxFollowUpError naming why there is no answer and whether the card may have reached Payrexx.
|
|
1762
|
+
*/
|
|
1763
|
+
sendPayrexxFollowUp(authorizationId: string, request: {
|
|
1764
|
+
url: string;
|
|
1765
|
+
method: 'POST';
|
|
1766
|
+
headers: Record<string, string>;
|
|
1767
|
+
body: string;
|
|
1768
|
+
}, options?: {
|
|
1769
|
+
signal?: AbortSignal;
|
|
1770
|
+
until?: number;
|
|
1771
|
+
}): Promise<{
|
|
1772
|
+
status: number;
|
|
1773
|
+
headers: Record<string, string>;
|
|
1774
|
+
body: string;
|
|
1775
|
+
}>;
|
|
1776
|
+
/** The send behind sendEbanxFollowUp and sendPayrexxFollowUp; `fail` builds the processor's error for a send with no answer. */
|
|
1777
|
+
private sendFollowUp;
|
|
1711
1778
|
/**
|
|
1712
1779
|
* Create a merchant-session probe, the phase-0 read of the deterministic merchant total:
|
|
1713
1780
|
* `user` is the org's connected user, who opens the returned Vault link and reads the
|