@wirexapp/card-topup-web 1.1.0-beta.4 → 1.1.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +114 -0
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,119 @@
1
1
  # @wirexapp/card-topup-web
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8097859: CVV entry masking — show / hide what was typed into the top-up CVV field. The
8
+ CVV has always been masked as it is typed (a password input); this adds the
9
+ reveal element's masking model to that input, for both collect variants
10
+ (`createCardTopUpFields`, `createCardTopUpForm`). The card number is not
11
+ affected, and with no option passed nothing changes.
12
+
13
+ - `masked` (boolean, default `true`) — the state at mount; `false` starts the
14
+ field shown.
15
+ - `maskToggle: 'button' | 'text' | 'none'` (default `'none'`) — an in-frame
16
+ control at the field's right edge: the reveal's eye / eye-off icon, or a
17
+ text button from the new collect strings `show` / `hide`. It is the same
18
+ control the reveal rows draw (one module in the frames), themed by the same
19
+ `copyIconSize` / `colorCopyIcon` / `colorCopyIconHover` tokens. No `'row'`
20
+ mode: a tap on an input has to focus it. The toggle never takes the focus
21
+ from the field; the value and the caret stay.
22
+ - `maskAfter` (ms, default never) — shown digits re-mask from the frame,
23
+ counted from the moment they are visible.
24
+ - `setMasked(boolean)` on `PciCollectElement` and `PciCollectGroup` (the group
25
+ forwards to its `cvv` field) — host control in place, safe before `mount()`
26
+ resolves and after `destroy()`. Host→frame event `collect-set-masked`, sent
27
+ with the reply-less `PciFrameChannel.post()`.
28
+ - `onMaskedChange({ masked, reason })` — the state the frame applied, once at
29
+ mount (`'init'`) and after every change (`'user'`, `'host'`, `'timeout'`).
30
+ Frame→host event `collect-masked-changed`: a boolean and a reason, never
31
+ the value.
32
+ - `PciCollectGroup.field(name, options?)` takes the same masking options for
33
+ the `cvv` field (they win over the group config's).
34
+ - React: `CardCvvField` takes `masked` (live — forwarded in place, never a
35
+ remount), `maskToggle`, `maskAfter` and `onMaskedChange`. Mirroring
36
+ `onMaskedChange` into the state `masked` is rendered from is safe — the rule
37
+ is "when in doubt, mask": a hide is always sent, a show is not sent when it
38
+ is the echo of the frame's own "shown" report.
39
+
40
+ No reveal gate (`onRevealRequested`) on the input — the digits are the user's
41
+ own typing — and no `maskedPlaceholder`: the masked rendering is the browser's
42
+ password bullet. Microsoft Edge's built-in reveal button is now hidden in the
43
+ CVV field (it showed the digits behind the frame's state); the SDK's toggle
44
+ and `setMasked()` are the only ways to show them, in every browser alike.
45
+ The OCT package's surface is unchanged (its profile has no CVV). Additive
46
+ within protocol v1: frames that predate this ignore the three options and
47
+ `collect-set-masked`, keep the CVV masked and never send
48
+ `collect-masked-changed`; ship the frames first.
49
+
50
+ - 901cddf: Collect failures. `PciFrameRequestError` gains `code`,
51
+ `retryable` and `reason`: the mobile SDK's failure payload
52
+ (`WirexCollectErrorPayload`), with the same values classified by the same rules.
53
+
54
+ - `code` is one of a frozen set: `unauthorized`, `actionRequired`,
55
+ `updateRequired`, `invalidInput`, `temporary`, `failed`. It is typed as the
56
+ `PciFrameErrorCode` union, so a `switch` over it checks exhaustively.
57
+ - `retryable` says whether sending the request again is safe.
58
+ - `reason` is present where one `code` has two remedies: `invalidInput` with
59
+ `cardAlreadyLinked` (enter another card) or `cardLimitReached` (remove one
60
+ first). The set grows; handle an unknown value.
61
+
62
+ The frame classifies a tokenize failure by the backend's business code on a 400
63
+ (`0243`, `0366`), otherwise by the HTTP status. A request without an answer is
64
+ `temporary`; a `Validation failed — …` reply is `invalidInput`. Messages are
65
+ unchanged. Older frames send none of the fields (`code` and `reason` undefined,
66
+ `retryable` false): ship the frames first.
67
+
68
+ - 731da3e: Wallet checkout TOKEN MODE (WPAY-4431): pass the backend's short-lived top-up
69
+ token as `auth.checkoutToken` and the hosted checkout executes the top-up
70
+ itself, reporting `onExecuted` / `onExecuteFailed` (`wallet-executed` /
71
+ `wallet-execute-failed` on the wire) — the wallet payment token never leaves
72
+ the frame. Legacy tokenize-and-return (`onToken`) is unchanged without `auth`.
73
+
74
+ Token mode also brings Google Pay to desktop (`googlePayHandoff: 'qr' | 'none'`,
75
+ probe flag `googlePayHandoff`): the frame draws a QR that carries the checkout
76
+ itself — the token, the quote and the estimate's `provider` name (new init /
77
+ `arm()` / `update()` field) — and an Android phone opens the same checkout
78
+ top-level, pays and executes. Nothing is stored on the frames service and the
79
+ desktop never learns the outcome: hosts reconcile by their own status reads
80
+ after `wallet-state: handoff-pending`. `arm(quote, config, auth?, provider?)` /
81
+ `update(quote, config?, auth?, provider?)`; `wallet-update` carries `auth` and
82
+ `provider`; new `wallet-state` values `executing`, `handoff-pending`.
83
+
84
+ `buildWalletLaunchFragment` / `buildWalletLaunchUrl` (core) build the same
85
+ compact fragment for a Chrome Custom Tab launch (`#t=&e=&s=&p=[&r=]`); the page
86
+ resolves the provider block from the public BaaS config by name.
87
+
88
+ ### Patch Changes
89
+
90
+ - 274c69f: Fixed: the frames rendered as solid white rectangles in host pages that declare
91
+ `<meta name="color-scheme" content="dark">` (or `light dark` with dark
92
+ preferred) — typical of hybrid-app shells and dark-themed sites. The SDK set
93
+ `color-scheme: normal` on the iframe element; Chromium resolves `normal` from
94
+ the host's meta, so under a dark host the element became dark while the frame
95
+ document is light, and on that mismatch the browser paints the frame's canvas
96
+ opaque (CSS Color Adjust). The iframe element is now explicitly
97
+ `color-scheme: light`, matching the frame documents, which now declare
98
+ `:root { color-scheme: light }` as well — the frames stay transparent under any
99
+ host scheme. Hosts that set their dark theme through CSS alone were never
100
+ affected. The SDK change alone removes the mismatch for an updated host; the
101
+ frame-document change makes the pair explicit and independent of any meta.
102
+ - Updated dependencies [8097859]
103
+ - Updated dependencies [901cddf]
104
+ - Updated dependencies [cc46627]
105
+ - Updated dependencies [390c416]
106
+ - Updated dependencies [274c69f]
107
+ - Updated dependencies [b43affc]
108
+ - Updated dependencies [d4654e9]
109
+ - Updated dependencies [417ab29]
110
+ - Updated dependencies [1d89a12]
111
+ - Updated dependencies [5f67be4]
112
+ - Updated dependencies [33b4595]
113
+ - Updated dependencies [a629a98]
114
+ - Updated dependencies [731da3e]
115
+ - @wirexapp/card-sdk-core@1.1.0
116
+
3
117
  ## 1.1.0-beta.4
4
118
 
5
119
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirexapp/card-topup-web",
3
- "version": "1.1.0-beta.4",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "description": "Collect an external card for top-up inside Wirex-served PCI iframes; the host receives only a token. CHD-free loader.",
6
6
  "license": "UNLICENSED",
@@ -37,6 +37,6 @@
37
37
  "prepublishOnly": "yarn clean && yarn build"
38
38
  },
39
39
  "dependencies": {
40
- "@wirexapp/card-sdk-core": "1.1.0-beta.4"
40
+ "@wirexapp/card-sdk-core": "1.1.0"
41
41
  }
42
42
  }