@flopay/vue 1.14.9 → 1.14.11

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.
@@ -450,7 +450,7 @@ var VaultCardFields = (0, import_vue3.defineComponent)({
450
450
  };
451
451
  const offReady = capture.on("ready", emitReadyOnce);
452
452
  const offError = capture.on("error", (event) => {
453
- const message = event.message ?? "There was a problem loading the secure card form.";
453
+ const message = (0, import_shared2.buyerEmailRequiredPrompt)(event.vaultOutcome) ?? event.message ?? "There was a problem loading the secure card form.";
454
454
  (0, import_shared2.invokeMerchantCallback)(() => emit("error", message));
455
455
  });
456
456
  const offValidation = capture.on("validation", (event) => {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  FloPayCardSetup
3
- } from "./chunk-DUU6SMKP.mjs";
3
+ } from "./chunk-5N47KHFQ.mjs";
4
4
  import {
5
5
  FloPayCardSetupError
6
- } from "./chunk-W52CQTJI.mjs";
6
+ } from "./chunk-Q7WDXSRE.mjs";
7
7
  export {
8
8
  FloPayCardSetup,
9
9
  FloPayCardSetupError
@@ -4,7 +4,7 @@ import {
4
4
  asCardSetupError,
5
5
  useCardSetupTheme,
6
6
  useHostedSetup
7
- } from "./chunk-W52CQTJI.mjs";
7
+ } from "./chunk-Q7WDXSRE.mjs";
8
8
 
9
9
  // src/flopay-card-setup.ts
10
10
  import { invokeMerchantCallback, setupOverlayLabels } from "@flopay/shared";
@@ -394,7 +394,7 @@ function useHostedSetup(props, emitters, options) {
394
394
  }
395
395
 
396
396
  // src/vault-card-fields.ts
397
- import { invokeMerchantCallback as invokeMerchantCallback2 } from "@flopay/shared";
397
+ import { buyerEmailRequiredPrompt, invokeMerchantCallback as invokeMerchantCallback2 } from "@flopay/shared";
398
398
  import {
399
399
  defineComponent as defineComponent2,
400
400
  h as h2,
@@ -441,7 +441,7 @@ var VaultCardFields = defineComponent2({
441
441
  };
442
442
  const offReady = capture.on("ready", emitReadyOnce);
443
443
  const offError = capture.on("error", (event) => {
444
- const message = event.message ?? "There was a problem loading the secure card form.";
444
+ const message = buyerEmailRequiredPrompt(event.vaultOutcome) ?? event.message ?? "There was a problem loading the secure card form.";
445
445
  invokeMerchantCallback2(() => emit("error", message));
446
446
  });
447
447
  const offValidation = capture.on("validation", (event) => {
@@ -6,7 +6,7 @@ import {
6
6
  asCardSetupError,
7
7
  useCardSetupTheme,
8
8
  useHostedSetup
9
- } from "./chunk-W52CQTJI.mjs";
9
+ } from "./chunk-Q7WDXSRE.mjs";
10
10
 
11
11
  // src/flopay-payment-method-setup-main.ts
12
12
  import {
package/dist/index.cjs CHANGED
@@ -2091,7 +2091,7 @@ var VaultCardFields = (0, import_vue5.defineComponent)({
2091
2091
  };
2092
2092
  const offReady = capture.on("ready", emitReadyOnce);
2093
2093
  const offError = capture.on("error", (event) => {
2094
- const message = event.message ?? "There was a problem loading the secure card form.";
2094
+ const message = (0, import_shared7.buyerEmailRequiredPrompt)(event.vaultOutcome) ?? event.message ?? "There was a problem loading the secure card form.";
2095
2095
  (0, import_shared7.invokeMerchantCallback)(() => emit("error", message));
2096
2096
  });
2097
2097
  const offValidation = capture.on("validation", (event) => {
@@ -2874,6 +2874,21 @@ var SplitCardForm = (0, import_vue6.defineComponent)({
2874
2874
  });
2875
2875
  });
2876
2876
  const offError = adapter.on("error", (event) => {
2877
+ const buyerEmailPrompt = (0, import_shared8.buyerEmailRequiredPrompt)(event.vaultOutcome);
2878
+ if (buyerEmailPrompt !== null) {
2879
+ if (overlayTimer) {
2880
+ clearTimeout(overlayTimer);
2881
+ overlayTimer = null;
2882
+ }
2883
+ overlay.value = null;
2884
+ failure.value = buyerEmailPrompt;
2885
+ emitError(
2886
+ new import_shared8.FloPayError(buyerEmailPrompt, "api_error", {
2887
+ code: import_shared8.CHECKOUT_SESSION_BUYER_EMAIL_REQUIRED
2888
+ })
2889
+ );
2890
+ return;
2891
+ }
2877
2892
  const message = event.message ?? "There was a problem processing your card.";
2878
2893
  failure.value = message;
2879
2894
  holdFailureOverlay();
package/dist/index.mjs CHANGED
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  FloPayCardSetup
3
- } from "./chunk-DUU6SMKP.mjs";
3
+ } from "./chunk-5N47KHFQ.mjs";
4
4
  import {
5
5
  FloPayPaymentMethodSetup
6
- } from "./chunk-5K5MGWEN.mjs";
6
+ } from "./chunk-YN3PHIYF.mjs";
7
7
  import {
8
8
  FloPayCardSetupError,
9
9
  VaultCardFields
10
- } from "./chunk-W52CQTJI.mjs";
10
+ } from "./chunk-Q7WDXSRE.mjs";
11
11
  import {
12
12
  CHECKOUT_FORM_DEFAULTS,
13
13
  CHECKOUT_STATE,
@@ -213,6 +213,8 @@ import { PaymentAPI as PaymentAPI2, PciVaultCardCapture } from "@flopay/js/card-
213
213
  import {
214
214
  buildCheckoutProcessMetadata,
215
215
  buildProcessPaymentAvsAccount,
216
+ buyerEmailRequiredPrompt,
217
+ CHECKOUT_SESSION_BUYER_EMAIL_REQUIRED,
216
218
  COUNTRY_OPTIONS,
217
219
  canRecoverHostedCardForm,
218
220
  computeVaultCardThemeColors,
@@ -1775,6 +1777,21 @@ var SplitCardForm = defineComponent3({
1775
1777
  });
1776
1778
  });
1777
1779
  const offError = adapter.on("error", (event) => {
1780
+ const buyerEmailPrompt = buyerEmailRequiredPrompt(event.vaultOutcome);
1781
+ if (buyerEmailPrompt !== null) {
1782
+ if (overlayTimer) {
1783
+ clearTimeout(overlayTimer);
1784
+ overlayTimer = null;
1785
+ }
1786
+ overlay.value = null;
1787
+ failure.value = buyerEmailPrompt;
1788
+ emitError(
1789
+ new FloPayError3(buyerEmailPrompt, "api_error", {
1790
+ code: CHECKOUT_SESSION_BUYER_EMAIL_REQUIRED
1791
+ })
1792
+ );
1793
+ return;
1794
+ }
1778
1795
  const message = event.message ?? "There was a problem processing your card.";
1779
1796
  failure.value = message;
1780
1797
  holdFailureOverlay();
@@ -1517,7 +1517,7 @@ var VaultCardFields = (0, import_vue3.defineComponent)({
1517
1517
  };
1518
1518
  const offReady = capture.on("ready", emitReadyOnce);
1519
1519
  const offError = capture.on("error", (event) => {
1520
- const message = event.message ?? "There was a problem loading the secure card form.";
1520
+ const message = (0, import_shared2.buyerEmailRequiredPrompt)(event.vaultOutcome) ?? event.message ?? "There was a problem loading the secure card form.";
1521
1521
  (0, import_shared2.invokeMerchantCallback)(() => emit("error", message));
1522
1522
  });
1523
1523
  const offValidation = capture.on("validation", (event) => {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FloPayPaymentMethodSetup
3
- } from "./chunk-5K5MGWEN.mjs";
4
- import "./chunk-W52CQTJI.mjs";
3
+ } from "./chunk-YN3PHIYF.mjs";
4
+ import "./chunk-Q7WDXSRE.mjs";
5
5
  export {
6
6
  FloPayPaymentMethodSetup
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flopay/vue",
3
- "version": "1.14.9",
3
+ "version": "1.14.11",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "publishConfig": {
@@ -36,8 +36,8 @@
36
36
  "dist"
37
37
  ],
38
38
  "dependencies": {
39
- "@flopay/js": "1.14.9",
40
- "@flopay/shared": "1.14.9",
39
+ "@flopay/js": "1.14.11",
40
+ "@flopay/shared": "1.14.11",
41
41
  "@paypal/paypal-js": "^10.1.0",
42
42
  "@stripe/stripe-js": "^10.2.1"
43
43
  },