@wirexapp/card-sdk-core 1.1.0-beta.2 → 1.1.0-beta.4
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 +76 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/protocol.d.ts +182 -3
- package/dist/protocol.d.ts.map +1 -1
- package/dist/walletLaunch.d.ts +39 -0
- package/dist/walletLaunch.d.ts.map +1 -0
- package/dist/walletLaunch.js +38 -0
- package/dist/walletLaunch.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,81 @@
|
|
|
1
1
|
# @wirexapp/card-sdk-core
|
|
2
2
|
|
|
3
|
+
## 1.1.0-beta.4
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 731da3e: Wallet checkout TOKEN MODE (WPAY-4431): pass the backend's short-lived top-up
|
|
8
|
+
token as `auth.checkoutToken` and the hosted checkout executes the top-up
|
|
9
|
+
itself, reporting `onExecuted` / `onExecuteFailed` (`wallet-executed` /
|
|
10
|
+
`wallet-execute-failed` on the wire) — the wallet payment token never leaves
|
|
11
|
+
the frame. Legacy tokenize-and-return (`onToken`) is unchanged without `auth`.
|
|
12
|
+
|
|
13
|
+
Token mode also brings Google Pay to desktop (`googlePayHandoff: 'qr' | 'none'`,
|
|
14
|
+
probe flag `googlePayHandoff`): the frame draws a QR that carries the checkout
|
|
15
|
+
itself — the token, the quote and the estimate's `provider` name (new init /
|
|
16
|
+
`arm()` / `update()` field) — and an Android phone opens the same checkout
|
|
17
|
+
top-level, pays and executes. Nothing is stored on the frames service and the
|
|
18
|
+
desktop never learns the outcome: hosts reconcile by their own status reads
|
|
19
|
+
after `wallet-state: handoff-pending`. `arm(quote, config, auth?, provider?)` /
|
|
20
|
+
`update(quote, config?, auth?, provider?)`; `wallet-update` carries `auth` and
|
|
21
|
+
`provider`; new `wallet-state` values `executing`, `handoff-pending`.
|
|
22
|
+
|
|
23
|
+
`buildWalletLaunchFragment` / `buildWalletLaunchUrl` (core) build the same
|
|
24
|
+
compact fragment for a Chrome Custom Tab launch (`#t=&e=&s=&p=[&r=]`); the page
|
|
25
|
+
resolves the provider block from the public BaaS config by name.
|
|
26
|
+
|
|
27
|
+
## 1.1.0-beta.3
|
|
28
|
+
|
|
29
|
+
### Minor Changes
|
|
30
|
+
|
|
31
|
+
- 390c416: New `fontSmoothing` appearance token — `'auto'` (default, as today) or
|
|
32
|
+
`'antialiased'`: the frame document gets `-webkit-font-smoothing:
|
|
33
|
+
antialiased` and `-moz-osx-font-smoothing: grayscale`. Host pages whose
|
|
34
|
+
global CSS antialiases the body (Mantine, Tailwind preflight, most design
|
|
35
|
+
systems) otherwise sit next to frame text that macOS renders visibly heavier
|
|
36
|
+
at the same family, size and weight. Applies to the collect, reveal and
|
|
37
|
+
wallet frames; enumerated and re-validated in the frame, and an older frame
|
|
38
|
+
drops the token and keeps `auto`.
|
|
39
|
+
- d4654e9: Reveal `copy` option — `'button'` (default: the icon button, as today),
|
|
40
|
+
`'row'` (the whole row is one copy control: a real `<button>`, no icon, no
|
|
41
|
+
reserved width; the copied state shows on the value and is announced to
|
|
42
|
+
assistive tech) or `'none'` (no copy affordance; the value stays selectable
|
|
43
|
+
text). Copy still runs inside the frame and `onCopied` still carries the
|
|
44
|
+
field name only. Enumerated and re-validated in the frame; an older frame
|
|
45
|
+
ignores the option and renders the icon button.
|
|
46
|
+
|
|
47
|
+
Reveal `showLabels` option (default `true`). `false` renders no label
|
|
48
|
+
element at all — not an empty one — so a row is exactly as tall as its
|
|
49
|
+
value; the label string becomes the value's `aria-label`, and the icon copy
|
|
50
|
+
button's name carries the field ("Card Number: Copy"). With `copy:
|
|
51
|
+
'button'` such a row is floored at the icon's hit target (`copyIconSize` +
|
|
52
|
+
12px) so adjacent buttons never overlap. Replaces the `fontSizeLabel: '0px'`
|
|
53
|
+
/ `lineHeightLabel: '0px'` workaround.
|
|
54
|
+
|
|
55
|
+
Reveal `rowStyle` option — `'plain'` (default, as today) or `'boxed'`: each
|
|
56
|
+
row becomes a pill drawn from the box tokens the collect inputs already use
|
|
57
|
+
(`colorBackground`, `colorBorder`, `borderRadius`, `borderWidth`,
|
|
58
|
+
`controlMinHeight`; 16px horizontal padding, `spacingUnit` vertical,
|
|
59
|
+
`fieldGap` between pills), so a border hugs the value instead of the
|
|
60
|
+
iframe. Deliberately opt-in: those tokens already reach reveal frames from
|
|
61
|
+
hosts that share one appearance object with collect, so honouring them on
|
|
62
|
+
presence would have restyled existing reveal rows.
|
|
63
|
+
|
|
64
|
+
Reveal `layout` option — `'column'` (default) or `'row'`: the frame's
|
|
65
|
+
fields sit side by side with equal widths, separated by the new `fieldGap`
|
|
66
|
+
appearance token (length; default `12px`; also the gap between `'boxed'`
|
|
67
|
+
pills). `fields: ['expiry', 'cvv']` with `layout: 'row'` is one frame and
|
|
68
|
+
one `/details` call where two single-field frames called it twice with the
|
|
69
|
+
same action token. Frame-wide on purpose: a mixed arrangement is two
|
|
70
|
+
frames, because a nested `fields` shape would not be ignorable by older
|
|
71
|
+
frames.
|
|
72
|
+
|
|
73
|
+
New `wordSpacing` appearance token (length grammar): extra space between
|
|
74
|
+
the card number's four-digit groups in the reveal frame — the value is
|
|
75
|
+
still chunked with single spaces, and no other row is affected. Reveal
|
|
76
|
+
`fields` entries are now validated against the known row names (unknown
|
|
77
|
+
entries are dropped instead of rendering an `undefined` label).
|
|
78
|
+
|
|
3
79
|
## 1.1.0-beta.2
|
|
4
80
|
|
|
5
81
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export { PciCollectGroup } from './collectGroup.js';
|
|
|
16
16
|
export { PciFrameChannel, PciFrameRequestError } from './frameChannel.js';
|
|
17
17
|
export type { PciEnvironment, PciFrameDocument, PciSdkConfig } from './frameUrl.js';
|
|
18
18
|
export { buildFrameUrl, resolveFrameOrigin } from './frameUrl.js';
|
|
19
|
-
export type { PciAppearance, PciAppearanceVariables, PciBrandBadgeAppearance, PciCardBrand, PciCollectChangeState, PciCollectFieldInitConfig, PciCollectFieldName, PciCollectInitConfig, PciCollectProfile, PciFrameAuth, PciFrameError, PciFrameStrings, PciFrameToHostMessage, PciHostToFrameMessage, PciInitConfig, PciRevealField, PciRevealInitConfig, PciRevealState, PciRevealStatus, PciTokenizeOctRequest, PciTokenizeOctResult, PciTokenizeRequest, PciTokenizeTopUpRequest, PciTokenizeTopUpResult, PciWalletApplePayConfig, PciWalletAvailability, PciWalletBrandingConfig, PciWalletButtonAppearance, PciWalletCheckoutInitConfig, PciWalletCheckoutState, PciWalletGooglePayConfig, PciWalletMoney, PciWalletPaymentTokenDto, PciWalletProbeInitConfig, PciWalletProviderConfig, PciWalletQuote, } from './protocol.js';
|
|
19
|
+
export type { PciAppearance, PciAppearanceVariables, PciBrandBadgeAppearance, PciCardBrand, PciCollectChangeState, PciCollectFieldInitConfig, PciCollectFieldName, PciCollectInitConfig, PciCollectProfile, PciFrameAuth, PciFrameError, PciFrameStrings, PciFrameToHostMessage, PciHostToFrameMessage, PciInitConfig, PciRevealCopyMode, PciRevealField, PciRevealInitConfig, PciRevealLayout, PciRevealRowStyle, PciRevealState, PciRevealStatus, PciTokenizeOctRequest, PciTokenizeOctResult, PciTokenizeRequest, PciTokenizeTopUpRequest, PciTokenizeTopUpResult, PciWalletApplePayConfig, PciWalletAvailability, PciWalletBillingDetails, PciWalletBrandingConfig, PciWalletButtonAppearance, PciWalletCheckoutAuth, PciWalletCheckoutInitConfig, PciWalletCheckoutState, PciWalletExecuteError, PciWalletExecuteResult, PciWalletGooglePayConfig, PciWalletGooglePayHandoff, PciWalletMoney, PciWalletPaymentTokenDto, PciWalletProbeInitConfig, PciWalletProviderConfig, PciWalletQuote, } from './protocol.js';
|
|
20
20
|
export { PCI_PROTOCOL_VERSION } from './protocol.js';
|
|
21
|
+
export type { PciWalletLaunchParams } from './walletLaunch.js';
|
|
22
|
+
export { buildWalletLaunchFragment, buildWalletLaunchUrl, PCI_WALLET_LAUNCH_KEYS } from './walletLaunch.js';
|
|
21
23
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,YAAY,EACV,cAAc,EACd,uBAAuB,EACvB,mBAAmB,EACnB,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACvE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC/D,YAAY,EACV,aAAa,EACb,sBAAsB,EACtB,uBAAuB,EACvB,YAAY,EACZ,qBAAqB,EACrB,yBAAyB,EACzB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EACzB,2BAA2B,EAC3B,sBAAsB,EACtB,wBAAwB,EACxB,cAAc,EACd,wBAAwB,EACxB,wB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cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,YAAY,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ export { PciCollectGroup } from './collectGroup.js';
|
|
|
14
14
|
export { PciFrameChannel, PciFrameRequestError } from './frameChannel.js';
|
|
15
15
|
export { buildFrameUrl, resolveFrameOrigin } from './frameUrl.js';
|
|
16
16
|
export { PCI_PROTOCOL_VERSION } from './protocol.js';
|
|
17
|
+
export { buildWalletLaunchFragment, buildWalletLaunchUrl, PCI_WALLET_LAUNCH_KEYS } from './walletLaunch.js';
|
|
17
18
|
// Wallet top-up machinery lives in @wirexapp/card-wallet-topup-web — the
|
|
18
19
|
// wallet API surface is BETA and iterates independently of this package
|
|
19
20
|
// (RELEASING.md "Channels"). Only the frozen wire-protocol types stay here.
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AA+C/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACzG,yEAAyE;AACzE,wEAAwE;AACxE,4EAA4E"}
|
package/dist/protocol.d.ts
CHANGED
|
@@ -106,12 +106,28 @@ export interface PciAppearanceVariables {
|
|
|
106
106
|
fontWeightBase?: string;
|
|
107
107
|
/** Font weight for labels (e.g. `400`). */
|
|
108
108
|
fontWeightLabel?: string;
|
|
109
|
+
/** Font smoothing of all frame text: `auto` (browser default) or
|
|
110
|
+
* `antialiased` (`-webkit-font-smoothing: antialiased` plus
|
|
111
|
+
* `-moz-osx-font-smoothing: grayscale`). Pass `antialiased` when your page
|
|
112
|
+
* antialiases the body — Mantine, Tailwind preflight and most design systems
|
|
113
|
+
* do — otherwise on macOS the frame text renders visibly heavier than the
|
|
114
|
+
* inputs around it at the same family, size and weight. Enumerated and
|
|
115
|
+
* re-validated in the frame. Default `auto`. */
|
|
116
|
+
fontSmoothing?: 'auto' | 'antialiased';
|
|
109
117
|
borderRadius?: string;
|
|
110
118
|
borderWidth?: string;
|
|
111
119
|
/** Vertical gap between fields/rows. */
|
|
112
120
|
spacingUnit?: string;
|
|
113
121
|
/** Min height of an input control (the field "pill"). */
|
|
114
122
|
controlMinHeight?: string;
|
|
123
|
+
/** Reveal frame: gap between fields drawn as separate boxes
|
|
124
|
+
* (`rowStyle: 'boxed'`) or placed side by side (`layout: 'row'`).
|
|
125
|
+
* Default `12px`; the plain column keeps its `spacingUnit` rhythm. */
|
|
126
|
+
fieldGap?: string;
|
|
127
|
+
/** Reveal frame: extra space between the card number's four-digit groups
|
|
128
|
+
* (CSS `word-spacing` on the card-number value only — no other row is
|
|
129
|
+
* affected). Length grammar; default `normal`, i.e. a single space. */
|
|
130
|
+
wordSpacing?: string;
|
|
115
131
|
/** Wallet review screen: divider line between the amount rows. */
|
|
116
132
|
colorDivider?: string;
|
|
117
133
|
/** Wallet review screen: emphasis colour of the total ("you pay") value. */
|
|
@@ -205,6 +221,12 @@ export interface PciCollectFieldInitConfig {
|
|
|
205
221
|
}
|
|
206
222
|
/** A reveal row. Used to render one field per iframe (`fields`). */
|
|
207
223
|
export type PciRevealField = 'cardholder' | 'number' | 'expiry' | 'cvv' | 'pin';
|
|
224
|
+
/** How a reveal row's value gets copied — see `PciRevealInitConfig.copy`. */
|
|
225
|
+
export type PciRevealCopyMode = 'button' | 'row' | 'none';
|
|
226
|
+
/** How a reveal row is drawn — see `PciRevealInitConfig.rowStyle`. */
|
|
227
|
+
export type PciRevealRowStyle = 'plain' | 'boxed';
|
|
228
|
+
/** How a reveal frame arranges its rows — see `PciRevealInitConfig.layout`. */
|
|
229
|
+
export type PciRevealLayout = 'column' | 'row';
|
|
208
230
|
export interface PciRevealInitConfig {
|
|
209
231
|
mode: 'reveal';
|
|
210
232
|
auth: PciFrameAuth;
|
|
@@ -222,6 +244,45 @@ export interface PciRevealInitConfig {
|
|
|
222
244
|
cardholderName?: string;
|
|
223
245
|
appearance?: PciAppearance;
|
|
224
246
|
strings?: PciFrameStrings;
|
|
247
|
+
/** Copy affordance per row. `'button'` (default) — the icon button beside
|
|
248
|
+
* the value, as today; `'row'` — the whole row is the copy control (a real
|
|
249
|
+
* `<button>`: click, Enter, Space), no icon and no reserved width, with the
|
|
250
|
+
* copied state shown on the value and announced to assistive tech;
|
|
251
|
+
* `'none'` — no copy affordance at all, the value stays selectable text.
|
|
252
|
+
* The clipboard write always happens inside the frame; the host still
|
|
253
|
+
* receives only `reveal-copied` with the field NAME. Enumerated and
|
|
254
|
+
* re-validated in the frame — anything else renders as `'button'`; an
|
|
255
|
+
* older frame ignores the option and renders the button. */
|
|
256
|
+
copy?: PciRevealCopyMode;
|
|
257
|
+
/** Render the label above each value. Default `true`. `false` renders no
|
|
258
|
+
* label element at all (not an empty one), so the row is exactly as tall
|
|
259
|
+
* as its value (with `copy: 'button'` floored at the icon's hit target so
|
|
260
|
+
* adjacent buttons never overlap); the label string becomes the value's
|
|
261
|
+
* `aria-label`, so the accessible name survives. This is the only way to
|
|
262
|
+
* suppress a label — an
|
|
263
|
+
* empty `strings` entry falls back to the English default. Older frames
|
|
264
|
+
* ignore it (labels render). */
|
|
265
|
+
showLabels?: boolean;
|
|
266
|
+
/** How each row is drawn. `'plain'` (default) — text on the host surface,
|
|
267
|
+
* as today. `'boxed'` — every row is a pill built from the box tokens the
|
|
268
|
+
* collect inputs already use: `colorBackground`, `colorBorder`,
|
|
269
|
+
* `borderRadius`, `borderWidth`, `controlMinHeight` (16px horizontal
|
|
270
|
+
* padding, `spacingUnit` vertical, `fieldGap` between pills), so a border
|
|
271
|
+
* hugs the value instead of the iframe. Opt-in rather than token-presence
|
|
272
|
+
* on purpose: hosts share one appearance object between collect and reveal,
|
|
273
|
+
* so those tokens already reach reveal frames (ignored) — honouring them
|
|
274
|
+
* silently would have restyled existing reveal rows. Enumerated and
|
|
275
|
+
* re-validated in the frame; older frames ignore it. */
|
|
276
|
+
rowStyle?: PciRevealRowStyle;
|
|
277
|
+
/** Arrangement of the rows inside this frame. `'column'` (default) stacks
|
|
278
|
+
* them, as today. `'row'` places them side by side with equal widths,
|
|
279
|
+
* separated by `fieldGap` — so `fields: ['expiry', 'cvv']` is ONE frame
|
|
280
|
+
* and one `/details` call where two single-field frames call it twice
|
|
281
|
+
* with the same action token. Frame-wide on purpose: a nested `fields`
|
|
282
|
+
* shape would not be ignorable by older frames, so a mixed arrangement
|
|
283
|
+
* (one field full-width above a row of others) is two frames. Enumerated
|
|
284
|
+
* and re-validated in the frame; older frames ignore it and stack. */
|
|
285
|
+
layout?: PciRevealLayout;
|
|
225
286
|
}
|
|
226
287
|
/** Availability probe — no transaction context, no backend calls. The `init`
|
|
227
288
|
* request's result carries `PciWalletAvailability`. */
|
|
@@ -236,6 +297,12 @@ export interface PciWalletProbeInitConfig {
|
|
|
236
297
|
export interface PciWalletAvailability {
|
|
237
298
|
applePay: boolean;
|
|
238
299
|
googlePay: boolean;
|
|
300
|
+
/** Google Pay cannot tokenize HERE (no cryptogram cards — desktop, iOS), but
|
|
301
|
+
* this context can show the desktop QR handoff: the user scans a code with
|
|
302
|
+
* an Android phone, which opens the same checkout top-level and pays there
|
|
303
|
+
* (token mode only — see `PciWalletCheckoutAuth`). Absent on frames that
|
|
304
|
+
* predate WPAY-4431. */
|
|
305
|
+
googlePayHandoff?: boolean;
|
|
239
306
|
}
|
|
240
307
|
/**
|
|
241
308
|
* Wallet-button presentation presets. Both wallets brand-control their buttons,
|
|
@@ -357,6 +424,73 @@ export interface PciWalletBrandingConfig {
|
|
|
357
424
|
* privacy policy. */
|
|
358
425
|
privacyUrl?: string;
|
|
359
426
|
}
|
|
427
|
+
/**
|
|
428
|
+
* TOKEN MODE (WPAY-4431) — the frame EXECUTES the top-up itself instead of
|
|
429
|
+
* handing the wallet payment token back to the host. The host passes a
|
|
430
|
+
* short-lived top-up token minted by the backend (`POST
|
|
431
|
+
* /api/v1/cards/topup/token`: a user token restricted to the estimate/execute
|
|
432
|
+
* paths); after the sheet authorizes, the frame calls
|
|
433
|
+
* `POST /api/v1/cards/topup/execute` with it and reports `wallet-executed` /
|
|
434
|
+
* `wallet-execute-failed`. The encrypted wallet payment token never leaves the
|
|
435
|
+
* frame. Without `auth` the frame keeps the legacy tokenize-and-return
|
|
436
|
+
* behaviour (`wallet-token`) unchanged.
|
|
437
|
+
*
|
|
438
|
+
* Why: partner Android apps cannot run Google Pay in a WebView (Google
|
|
439
|
+
* validates the hosting app's package against the merchant profile), so the
|
|
440
|
+
* checkout must run TOP-LEVEL (Chrome Custom Tabs, our desktop QR) where no
|
|
441
|
+
* host channel exists to hand a token back to — the page has to finish the
|
|
442
|
+
* top-up on its own. The token rides postMessage for hosted documents and
|
|
443
|
+
* the URL FRAGMENT for top-level launches (never a query string; stripped
|
|
444
|
+
* from the address bar on load).
|
|
445
|
+
*/
|
|
446
|
+
export interface PciWalletCheckoutAuth {
|
|
447
|
+
/** The backend's short-lived top-up token (`token` of the
|
|
448
|
+
* `/cards/topup/token` response). Opaque to the SDK — sent as the
|
|
449
|
+
* `Authorization: Bearer` of the execute call and nothing else. Never log
|
|
450
|
+
* it; never pass a full user session token in production. */
|
|
451
|
+
checkoutToken: string;
|
|
452
|
+
/** Mirrors of the host's own `X-User-Email` / `X-User-Wallet` request
|
|
453
|
+
* headers — only for backends that still resolve the caller from them;
|
|
454
|
+
* the token itself identifies the user. Optional, never logged. */
|
|
455
|
+
userEmail?: string;
|
|
456
|
+
userWallet?: string;
|
|
457
|
+
}
|
|
458
|
+
/** Where Google Pay goes on a device that cannot tokenize natively (desktop):
|
|
459
|
+
* `qr` (default in token mode) shows a code the user scans with an Android
|
|
460
|
+
* phone. The code carries the checkout itself — the top-up token, the quote
|
|
461
|
+
* and the estimate's `provider` name (`buildWalletLaunchFragment`); the phone
|
|
462
|
+
* opens this checkout top-level, resolves the provider block from the public
|
|
463
|
+
* BaaS config, pays natively and executes. Nothing is stored anywhere and
|
|
464
|
+
* this document never learns the outcome: the host reconciles by its own
|
|
465
|
+
* status reads after `wallet-state: handoff-pending`. Requires `provider`
|
|
466
|
+
* in the init. `none` hides Google Pay on such devices, as before WPAY-4431. */
|
|
467
|
+
export type PciWalletGooglePayHandoff = 'qr' | 'none';
|
|
468
|
+
/** Token mode: the execute call succeeded — the top-up exists. `status` is
|
|
469
|
+
* the execute response's status (`Completed` | `Pending` | `Failed` | …):
|
|
470
|
+
* treat it exactly like the card top-up flow's; the status feed owns the
|
|
471
|
+
* final truth. */
|
|
472
|
+
export interface PciWalletExecuteResult {
|
|
473
|
+
/** The top-up transaction id. */
|
|
474
|
+
id: string;
|
|
475
|
+
status: string;
|
|
476
|
+
method: 'apple_pay' | 'google_pay';
|
|
477
|
+
cardNetwork?: string;
|
|
478
|
+
panLast4?: string;
|
|
479
|
+
displayName?: string;
|
|
480
|
+
}
|
|
481
|
+
/** Token mode: the execute call did not succeed. `reason` is a stable slug
|
|
482
|
+
* for messaging/analytics: `execute_rejected` (4xx — token rejected,
|
|
483
|
+
* validation), `already_executed` (409 — a second execute on the same
|
|
484
|
+
* estimation; reconcile by status), `estimation_expired` (422),
|
|
485
|
+
* `execute_unauthorized` (401/403 — token expired or wrong scope),
|
|
486
|
+
* `execute_failed` (5xx), `network_error`. */
|
|
487
|
+
export interface PciWalletExecuteError {
|
|
488
|
+
reason: string;
|
|
489
|
+
/** HTTP status of the execute response, when there was one. */
|
|
490
|
+
status?: number;
|
|
491
|
+
/** Sanitized backend message — diagnostics and toasts, never the token. */
|
|
492
|
+
message?: string;
|
|
493
|
+
}
|
|
360
494
|
export interface PciWalletCheckoutInitConfig {
|
|
361
495
|
mode: 'wallet-checkout';
|
|
362
496
|
/** `full` (default) renders the review card (top-up / fee / total).
|
|
@@ -381,6 +515,25 @@ export interface PciWalletCheckoutInitConfig {
|
|
|
381
515
|
buttons?: PciWalletButtonAppearance;
|
|
382
516
|
branding?: PciWalletBrandingConfig;
|
|
383
517
|
strings?: PciFrameStrings;
|
|
518
|
+
/** TOKEN MODE — see {@link PciWalletCheckoutAuth}. Present: the frame
|
|
519
|
+
* executes the top-up itself and reports `wallet-executed` /
|
|
520
|
+
* `wallet-execute-failed`; `wallet-token` is never sent. Absent: legacy
|
|
521
|
+
* tokenize-and-return. */
|
|
522
|
+
auth?: PciWalletCheckoutAuth;
|
|
523
|
+
/** Token mode only — see {@link PciWalletGooglePayHandoff}. Default `qr`. */
|
|
524
|
+
googlePayHandoff?: PciWalletGooglePayHandoff;
|
|
525
|
+
/** The estimate's `provider` name — required for the desktop Google Pay QR
|
|
526
|
+
* (the phone resolves the provider block by name); harmless otherwise. */
|
|
527
|
+
provider?: string;
|
|
528
|
+
/** STANDALONE launches only (a partner Android app opening this document
|
|
529
|
+
* top-level in Chrome Custom Tabs with `#init=`): an `https` App Link the
|
|
530
|
+
* result screen offers as "Return to the app", with `estimation_id` and
|
|
531
|
+
* `outcome` (`completed` | `pending` | `failed` | `already_executed`)
|
|
532
|
+
* appended as query parameters — never the token, never the wallet
|
|
533
|
+
* payload. Validated in-frame (https only; anything else is ignored);
|
|
534
|
+
* hosted documents (iframe, popup, native WebView) ignore it. The app
|
|
535
|
+
* reconciles by estimation status — the link is a UX signal only. */
|
|
536
|
+
returnUrl?: string;
|
|
384
537
|
/** DEV ONLY: arm the frame's `wallet-debug` channel — in-frame JS errors,
|
|
385
538
|
* unhandled rejections and console output stream to the host as
|
|
386
539
|
* `wallet-debug` events (native WebViews have no reachable console).
|
|
@@ -388,10 +541,19 @@ export interface PciWalletCheckoutInitConfig {
|
|
|
388
541
|
* console output (cardholder data risk). Never enable in production. */
|
|
389
542
|
debug?: boolean;
|
|
390
543
|
}
|
|
391
|
-
|
|
544
|
+
/** Wallet checkout lifecycle. `sheet-open` = the OS wallet sheet is up;
|
|
545
|
+
* token mode adds `executing` (the frame is calling execute) and
|
|
546
|
+
* `handoff-pending` (the desktop QR is on screen — the phone pays and
|
|
547
|
+
* executes; this frame never learns the outcome, the host reconciles by its
|
|
548
|
+
* own status reads). */
|
|
549
|
+
export type PciWalletCheckoutState = 'loading' | 'ready' | 'sheet-open' | 'executing' | 'handoff-pending';
|
|
392
550
|
/**
|
|
393
|
-
* One authorized payment sheet's output. `walletPaymentToken` is the
|
|
394
|
-
*
|
|
551
|
+
* One authorized payment sheet's output. `walletPaymentToken` is the sheet's
|
|
552
|
+
* payment token serialized for the wire, in the PSP's `mobileToken` shape —
|
|
553
|
+
* Apple: the whole PKPaymentToken JSON (encrypted `paymentData` verbatim +
|
|
554
|
+
* `paymentMethod` + `transactionIdentifier`); Google: the whole
|
|
555
|
+
* `paymentMethodData` JSON (`type` + `description` + `info` +
|
|
556
|
+
* `tokenizationData`, the gateway-encrypted token inside). Relay it VERBATIM
|
|
395
557
|
* as the execute call's `wallet_payment_token` (never parse, reshape or log
|
|
396
558
|
* it; max 16384 chars server-side). The rest is non-sensitive display
|
|
397
559
|
* metadata. The sheet has already closed successfully when this arrives —
|
|
@@ -496,6 +658,11 @@ export type PciHostToFrameMessage = Envelope & ({
|
|
|
496
658
|
requestId: string;
|
|
497
659
|
quote: PciWalletQuote;
|
|
498
660
|
config: PciWalletProviderConfig;
|
|
661
|
+
/** Token mode: a fresh top-up token for the fresh quote (the old one
|
|
662
|
+
* may have expired with it). Omitted = keep the mounted token. */
|
|
663
|
+
auth?: PciWalletCheckoutAuth;
|
|
664
|
+
/** The fresh estimate's `provider` (the desktop QR needs it). */
|
|
665
|
+
provider?: string;
|
|
499
666
|
});
|
|
500
667
|
export type PciFrameToHostMessage = Envelope & ({
|
|
501
668
|
type: 'ready';
|
|
@@ -550,6 +717,18 @@ export type PciFrameToHostMessage = Envelope & ({
|
|
|
550
717
|
| {
|
|
551
718
|
type: 'wallet-token';
|
|
552
719
|
token: PciWalletPaymentTokenDto;
|
|
720
|
+
}
|
|
721
|
+
/** TOKEN MODE: the frame executed the top-up itself — the host shows the
|
|
722
|
+
* outcome (and reconciles by status). Never sent alongside `wallet-token`. */
|
|
723
|
+
| {
|
|
724
|
+
type: 'wallet-executed';
|
|
725
|
+
result: PciWalletExecuteResult;
|
|
726
|
+
}
|
|
727
|
+
/** TOKEN MODE: the execute call failed — see `PciWalletExecuteError`. The
|
|
728
|
+
* frame keeps its buttons disabled until a `wallet-update` re-arms it. */
|
|
729
|
+
| {
|
|
730
|
+
type: 'wallet-execute-failed';
|
|
731
|
+
error: PciWalletExecuteError;
|
|
553
732
|
} | {
|
|
554
733
|
type: 'result';
|
|
555
734
|
requestId: string;
|
package/dist/protocol.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[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AiB,CAAC;IAAC,MAAM,EAAE,sBAAsB,CAAA;CAAE;AAC7D;2EAC2E;GACzE;IAAE,IAAI,EAAE,uBAAuB,CAAC;IAAC,KAAK,EAAE,qBAAqB,CAAA;CAAE,GAC/D;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GAC9D;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,aAAa,CAAA;CAAE,CACzE,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { PciWalletQuote } from './protocol.js';
|
|
2
|
+
/**
|
|
3
|
+
* DIRECT standalone launch (WPAY-4431, store-less variant): everything the
|
|
4
|
+
* checkout needs rides the URL fragment of `wallet-checkout.html` — the
|
|
5
|
+
* top-up token, the quote, the provider NAME and an optional return link.
|
|
6
|
+
* No session on the frames service: the page resolves the provider block
|
|
7
|
+
* itself from the public BaaS config (`GET /api/v1/config` →
|
|
8
|
+
* `topup.providers[name]`), so a QR or a Custom Tab URL stays short. The
|
|
9
|
+
* token dominates the length; a shorter backend token shrinks the code.
|
|
10
|
+
*
|
|
11
|
+
* The fragment never reaches a server, but a browser keeps the URL it opened
|
|
12
|
+
* in its history — use this form only with a token that is bound to the
|
|
13
|
+
* estimation and single-use, or in a dev build.
|
|
14
|
+
*/
|
|
15
|
+
export interface PciWalletLaunchParams {
|
|
16
|
+
checkoutToken: string;
|
|
17
|
+
quote: PciWalletQuote;
|
|
18
|
+
/** The estimate's `provider` — selects the block in the public config. */
|
|
19
|
+
provider: string;
|
|
20
|
+
/** https App Link the result screen offers as "Return to the app". */
|
|
21
|
+
returnUrl?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Fragment keys (single letters: the fragment is QR payload). */
|
|
24
|
+
export declare const PCI_WALLET_LAUNCH_KEYS: {
|
|
25
|
+
readonly token: "t";
|
|
26
|
+
readonly estimationId: "e";
|
|
27
|
+
readonly sourceAmount: "s";
|
|
28
|
+
readonly destinationAmount: "d";
|
|
29
|
+
readonly fee: "f";
|
|
30
|
+
readonly expiresAt: "x";
|
|
31
|
+
readonly provider: "p";
|
|
32
|
+
readonly returnUrl: "r";
|
|
33
|
+
};
|
|
34
|
+
/** `t=<token>&e=<estimationId>&s=<amount>:<CUR>[&d=…][&f=…][&x=<unix seconds>]&p=<provider>[&r=<https url>]`
|
|
35
|
+
* (no leading `#`). */
|
|
36
|
+
export declare const buildWalletLaunchFragment: (params: PciWalletLaunchParams) => string;
|
|
37
|
+
/** The full URL to open top-level (Custom Tab) or to encode in a QR. */
|
|
38
|
+
export declare const buildWalletLaunchUrl: (frameOrigin: string, params: PciWalletLaunchParams, client?: string) => string;
|
|
39
|
+
//# sourceMappingURL=walletLaunch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walletLaunch.d.ts","sourceRoot":"","sources":["../src/walletLaunch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,cAAc,CAAC;IACtB,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,kEAAkE;AAClE,eAAO,MAAM,sBAAsB;;;;;;;;;CASzB,CAAC;AAIX;wBACwB;AACxB,eAAO,MAAM,yBAAyB,GAAI,QAAQ,qBAAqB,KAAG,MAYzE,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,GAAI,aAAa,MAAM,EAAE,QAAQ,qBAAqB,EAAE,SAAS,MAAM,KAAG,MAI1G,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Fragment keys (single letters: the fragment is QR payload). */
|
|
2
|
+
export const PCI_WALLET_LAUNCH_KEYS = {
|
|
3
|
+
token: 't',
|
|
4
|
+
estimationId: 'e',
|
|
5
|
+
sourceAmount: 's',
|
|
6
|
+
destinationAmount: 'd',
|
|
7
|
+
fee: 'f',
|
|
8
|
+
expiresAt: 'x',
|
|
9
|
+
provider: 'p',
|
|
10
|
+
returnUrl: 'r',
|
|
11
|
+
};
|
|
12
|
+
const money = (value) => `${value.amount}:${value.currency}`;
|
|
13
|
+
/** `t=<token>&e=<estimationId>&s=<amount>:<CUR>[&d=…][&f=…][&x=<unix seconds>]&p=<provider>[&r=<https url>]`
|
|
14
|
+
* (no leading `#`). */
|
|
15
|
+
export const buildWalletLaunchFragment = (params) => {
|
|
16
|
+
const keys = PCI_WALLET_LAUNCH_KEYS;
|
|
17
|
+
const query = new URLSearchParams();
|
|
18
|
+
query.set(keys.token, params.checkoutToken);
|
|
19
|
+
query.set(keys.estimationId, params.quote.estimationId);
|
|
20
|
+
query.set(keys.sourceAmount, money(params.quote.sourceAmount));
|
|
21
|
+
if (params.quote.destinationAmount)
|
|
22
|
+
query.set(keys.destinationAmount, money(params.quote.destinationAmount));
|
|
23
|
+
if (params.quote.fee)
|
|
24
|
+
query.set(keys.fee, money(params.quote.fee));
|
|
25
|
+
if (params.quote.expiresAtMs)
|
|
26
|
+
query.set(keys.expiresAt, String(Math.floor(params.quote.expiresAtMs / 1000)));
|
|
27
|
+
query.set(keys.provider, params.provider);
|
|
28
|
+
if (params.returnUrl)
|
|
29
|
+
query.set(keys.returnUrl, params.returnUrl);
|
|
30
|
+
return query.toString();
|
|
31
|
+
};
|
|
32
|
+
/** The full URL to open top-level (Custom Tab) or to encode in a QR. */
|
|
33
|
+
export const buildWalletLaunchUrl = (frameOrigin, params, client) => {
|
|
34
|
+
const base = `${frameOrigin.replace(/\/+$/, '')}/wallet-checkout.html`;
|
|
35
|
+
const query = client ? `?client=${encodeURIComponent(client)}` : '';
|
|
36
|
+
return `${base}${query}#${buildWalletLaunchFragment(params)}`;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=walletLaunch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walletLaunch.js","sourceRoot":"","sources":["../src/walletLaunch.ts"],"names":[],"mappings":"AAwBA,kEAAkE;AAClE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,KAAK,EAAE,GAAG;IACV,YAAY,EAAE,GAAG;IACjB,YAAY,EAAE,GAAG;IACjB,iBAAiB,EAAE,GAAG;IACtB,GAAG,EAAE,GAAG;IACR,SAAS,EAAE,GAAG;IACd,QAAQ,EAAE,GAAG;IACb,SAAS,EAAE,GAAG;CACN,CAAC;AAEX,MAAM,KAAK,GAAG,CAAC,KAAoD,EAAU,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;AAEpH;wBACwB;AACxB,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,MAA6B,EAAU,EAAE;IACjF,MAAM,IAAI,GAAG,sBAAsB,CAAC;IACpC,MAAM,KAAK,GAAG,IAAI,eAAe,EAAE,CAAC;IACpC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;IAC5C,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACxD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IAC/D,IAAI,MAAM,CAAC,KAAK,CAAC,iBAAiB;QAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC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ation of the Wirex PCI card SDK: postMessage protocol, frame channel, frame-URL building, collect machinery. CHD-free.",
|
|
6
6
|
"license": "UNLICENSED",
|