@nordhealth/provet-pay-elements 0.18.0 → 0.18.1

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.18.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Once the form has ended on Adyen's attempt limit and "Add a new card" opens a new session, `changeLocale` starts the form again in the new locale. Before, it did nothing for the rest of the mount.
8
+
3
9
  ## 0.18.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -13,6 +13,8 @@ Contents: [Prerequisites](#prerequisites) · [Quick start](#quick-start) · [API
13
13
 
14
14
  ## Prerequisites
15
15
 
16
+ **The component works only for integrations that Nordhealth has allowlisted.** To get access, email [pay.dev@nordhealth.com](mailto:pay.dev@nordhealth.com).
17
+
16
18
  Three things must be in place before the card form can load on a page.
17
19
 
18
20
  | # | Requirement | Set up by | Why |
@@ -21,9 +23,9 @@ Three things must be in place before the card form can load on a page.
21
23
  | 2 | The same origin is registered with Adyen as an allowed origin for the client key | Provet, on request | Adyen renders the card fields only on a registered origin |
22
24
  | 3 | A backend that mints the browser token | The integrator | See [step 1](#1-mint-a-browser-token-on-the-backend) |
23
25
 
24
- Ask Provet to add each origin, for example `https://booking.example.com`, for each environment (test and production).
26
+ Send each origin, for example `https://booking.example.com`, for each environment (test and production), to [pay.dev@nordhealth.com](mailto:pay.dev@nordhealth.com).
25
27
 
26
- **Local development on the test environment.** These local origins already work: `http://localhost` and `http://127.0.0.1` on ports 3000, 4200, 5173, 6002, 7200 and 8080. Each origin is listed exactly, because Adyen does not accept a port wildcard. On any other port the component shows "Could not reach the server. Check your connection and try again." and the card fields do not appear. Ask Provet to add the port. In production, partners use their own domains, so this applies to the test environment only.
28
+ **Local development on the test environment.** These local origins already work: `http://localhost` and `http://127.0.0.1` on ports 3000, 4200, 5173, 6002, 7200 and 8080. Each origin is listed exactly, because Adyen does not accept a port wildcard. On any other port the component shows "Could not reach the server. Check your connection and try again." and the card fields do not appear. Ask for the port at the same address. In production, partners use their own domains, so this applies to the test environment only.
27
29
 
28
30
  If the card form never appears and the browser console shows a blocked cross-origin request to `provetcloud.com` or an Adyen origin error, requirement 1 or 2 is missing for that origin.
29
31
 
@@ -255,7 +257,7 @@ options.locale = 'sv-SE' // or: handle.changeLocale('sv-SE')
255
257
 
256
258
  Adyen takes its locale only when its checkout starts, and 6.40.1 keeps that language through its own `update()`, so the card fields start again too: what the shopper typed into them is cleared, and `onReady` is called again once the form is back. An open card session is resumed rather than a second one opened, so a shopper who opened the card form comes back to it; otherwise the saved cards show again. Starting again calls Provet again, so once the token has expired it needs `auth.refreshToken`.
257
259
 
258
- It does nothing for the locale the form already has, while a card check is running (from the save button until its result, 3-D Secure included), once the card is saved, after Adyen has ended the session for too many attempts, or after `unmount()`. Called while the form is still opening a card session, it waits for that session instead of opening a second one. A `locale` that is not a string throws `config_invalid` and leaves the form as it is.
260
+ It does nothing for the locale the form already has, while a card check is running (from the save button until its result, 3-D Secure included), once the card is saved, after Adyen has ended the session for too many attempts (until "Add a new card" opens a new session), or after `unmount()`. Called while the form is still opening a card session, it waits for that session instead of opening a second one. A `locale` that is not a string throws `config_invalid` and leaves the form as it is.
259
261
 
260
262
  ### Tokens
261
263
 
@@ -6085,7 +6085,10 @@ class p_ {
6085
6085
  * back to Adyen, until its outcome.
6086
6086
  */
6087
6087
  X(this, "paying", !1);
6088
- /** Adyen ended the session for too many attempts; nothing starts again on its own. */
6088
+ /**
6089
+ * Adyen ended the session for too many attempts. Nothing starts again on its
6090
+ * own; the next session mounted clears it.
6091
+ */
6089
6092
  X(this, "closed", !1);
6090
6093
  /**
6091
6094
  * The view says something failed: the error banner, or a notice over the
@@ -6248,7 +6251,7 @@ class p_ {
6248
6251
  var s;
6249
6252
  (s = this.mounted) == null || s.unmount();
6250
6253
  const i = ++this.attempt;
6251
- this.paying = !!r;
6254
+ this.paying = !!r, this.closed = !1;
6252
6255
  try {
6253
6256
  const d = await Dm({
6254
6257
  container: this.chrome.fieldsHost,
@@ -6620,7 +6623,7 @@ function yf(t, e) {
6620
6623
  changeLocale: a
6621
6624
  };
6622
6625
  }
6623
- const mf = "0.18.0";
6626
+ const mf = "0.18.1";
6624
6627
  export {
6625
6628
  ln as DEFAULT_LOCALE,
6626
6629
  hf as DEFAULT_TRANSLATIONS,