@payfurl/client 4.11.2 → 4.11.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.
Files changed (27) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +22 -0
  3. package/dist/sdk/{CloseIcon-Ejad61tT.js → CloseIcon-Dkap5zUl.js} +15 -15
  4. package/dist/sdk/{DefaultThreeDsProvider-CJ7D2Irh.js → DefaultThreeDsProvider-D0iYIu6R.js} +18 -18
  5. package/dist/sdk/{MetricsGlobalThreeDsProvider-c8-Fc5ST.js → MetricsGlobalThreeDsProvider-BiILkcHI.js} +14 -14
  6. package/dist/sdk/{PayWayAppleButton-u5eH-Gev.js → PayWayAppleButton-CxT40BI6.js} +16 -16
  7. package/dist/sdk/{alerts-1YSRy5iI.js → alerts-CWLXzX6j.js} +7 -7
  8. package/dist/sdk/{cxpay-Dugz0O74.js → cxpay-CYbHYLG3.js} +1 -1
  9. package/dist/sdk/{default-DGxERUSN.js → default-zi2wr9FU.js} +1 -1
  10. package/dist/sdk/{ecentric-ByBa3UWI.js → ecentric-BKZbgUUA.js} +12 -12
  11. package/dist/sdk/{epna-DQVvimvd.js → epna-BM5bSJk1.js} +1 -1
  12. package/dist/sdk/{flashbanc-CBdnGJ_h.js → flashbanc-CF9FiNJl.js} +1 -1
  13. package/dist/sdk/{forter-BbB3-cUq.js → forter-DJAURi8-.js} +2 -2
  14. package/dist/sdk/{gpayments-CmUdD9kJ.js → gpayments-BI4ClQBQ.js} +13 -13
  15. package/dist/sdk/{metrics_global-DzTY7GMQ.js → metrics_global-DuXa4GNp.js} +1 -1
  16. package/dist/sdk/{nmi-EgdsSmhg.js → nmi-BtGmIJu6.js} +1 -1
  17. package/dist/sdk/{nuvei-DSwwNCnf.js → nuvei-DV30sIgG.js} +33 -33
  18. package/dist/sdk/{payabli-M87Lxo_m.js → payabli-8yAmXU9j.js} +1 -1
  19. package/dist/sdk/payfurl.d.ts +21 -0
  20. package/dist/sdk/payfurl.es.js +1512 -1548
  21. package/dist/sdk/payfurl.umd.js +9 -8
  22. package/dist/sdk/{payglocal-HYHj4xrA.js → payglocal-4P2oZpaS.js} +17 -17
  23. package/dist/sdk/{payway_rest-DvyvbsDG.js → payway_rest-yUi2dJyl.js} +1 -1
  24. package/dist/sdk/{skybank-Divo_TW3.js → skybank-Czn5pUK_.js} +1 -1
  25. package/dist/sdk/strings-B1OTvB_L.js +322 -0
  26. package/package.json +1 -1
  27. package/dist/sdk/strings-C2ICfH1P.js +0 -175
@@ -1,7 +1,7 @@
1
- import { At as e, Mt as t, St as n, Tt as r, h as i, ht as a, kt as o, n as s, tt as c } from "./CloseIcon-Ejad61tT.js";
2
- import { t as l } from "./DefaultThreeDsProvider-CJ7D2Irh.js";
1
+ import { Dt as e, Mt as t, Pt as n, _t as r, h as i, jt as a, n as o, rt as s, wt as c } from "./CloseIcon-Dkap5zUl.js";
2
+ import { t as l } from "./DefaultThreeDsProvider-D0iYIu6R.js";
3
3
  // src/sdk/3ds/nuvei.vue?vue&type=script&setup=true&lang.ts
4
- var u = { class: "mask" }, d = /*#__PURE__*/ c(/* @__PURE__ */ o({
4
+ var u = { class: "mask" }, d = /*#__PURE__*/ s(/* @__PURE__ */ a({
5
5
  __name: "nuvei",
6
6
  props: {
7
7
  threeDSServerTransID: {},
@@ -21,47 +21,47 @@ var u = { class: "mask" }, d = /*#__PURE__*/ c(/* @__PURE__ */ o({
21
21
  email: {},
22
22
  country: {}
23
23
  },
24
- setup(i) {
25
- let { hideSpinner: a, showSpinner: o } = s(), c = i;
26
- e(() => {
27
- o();
24
+ setup(r) {
25
+ let { hideSpinner: i, showSpinner: a } = o(), s = r;
26
+ t(() => {
27
+ a();
28
28
  let e = document.createElement("script");
29
29
  e.type = "text/javascript", e.src = "https://cdn.safecharge.com/safecharge_resources/v1/websdk/safecharge.js", e.onload = () => {
30
30
  let e = new MutationObserver(function() {
31
- document.getElementsByClassName("sfcModal-dialog")[0] && (a(), e.disconnect());
31
+ document.getElementsByClassName("sfcModal-dialog")[0] && (i(), e.disconnect());
32
32
  }), t = { childList: !0 }, n = document.querySelector("body");
33
33
  e.observe(n, t), l();
34
34
  }, document.head.appendChild(e);
35
35
  });
36
36
  function l() {
37
37
  let e = window.SafeCharge({
38
- env: c.env,
39
- merchantId: c.merchantId,
40
- merchantSiteId: c.merchantSiteId
38
+ env: s.env,
39
+ merchantId: s.merchantId,
40
+ merchantSiteId: s.merchantSiteId
41
41
  });
42
42
  e.fields({
43
43
  fonts: [{ cssUrl: "https://fonts.googleapis.com/css?family=Source+Code+Pro" }],
44
44
  locale: "en"
45
45
  });
46
- let t = c.userPaymentOptionId ? {
47
- userPaymentOptionId: c.userPaymentOptionId,
48
- ...c.CVV ? { card: { CVV: c.CVV } } : {}
46
+ let t = s.userPaymentOptionId ? {
47
+ userPaymentOptionId: s.userPaymentOptionId,
48
+ ...s.CVV ? { card: { CVV: s.CVV } } : {}
49
49
  } : { card: {
50
- cardNumber: c.cardNumber,
51
- cardHolderName: c.cardHolderName,
52
- expirationMonth: c.expirationMonth,
53
- expirationYear: c.expirationYear,
54
- CVV: c.CVV
50
+ cardNumber: s.cardNumber,
51
+ cardHolderName: s.cardHolderName,
52
+ expirationMonth: s.expirationMonth,
53
+ expirationYear: s.expirationYear,
54
+ CVV: s.CVV
55
55
  } };
56
56
  e.authenticate3d({
57
- sessionToken: c.sessionToken,
58
- ...c.userTokenId ? { userTokenId: c.userTokenId } : {},
57
+ sessionToken: s.sessionToken,
58
+ ...s.userTokenId ? { userTokenId: s.userTokenId } : {},
59
59
  paymentOption: t,
60
60
  billingAddress: {
61
- firstName: c.firstName,
62
- lastName: c.lastName,
63
- email: c.email,
64
- country: c.country
61
+ firstName: s.firstName,
62
+ lastName: s.lastName,
63
+ email: s.email,
64
+ country: s.country
65
65
  }
66
66
  }, function(e) {
67
67
  window.postMessage({
@@ -70,9 +70,9 @@ var u = { class: "mask" }, d = /*#__PURE__*/ c(/* @__PURE__ */ o({
70
70
  }, "*");
71
71
  });
72
72
  }
73
- return (e, i) => (t(), r("div", u, [...i[0] ||= [n("div", { class: "wrapper" }, [n("div", { class: "container" })], -1)]]));
73
+ return (t, r) => (n(), e("div", u, [...r[0] ||= [c("div", { class: "wrapper" }, [c("div", { class: "container" })], -1)]]));
74
74
  }
75
- }), [["__scopeId", "data-v-299db412"]]), { hideSpinner: f } = s(), p = class extends l {
75
+ }), [["__scopeId", "data-v-299db412"]]), { hideSpinner: f } = o(), p = class extends l {
76
76
  _paResPayload = null;
77
77
  getType() {
78
78
  return "Nuvei";
@@ -88,20 +88,20 @@ var u = { class: "mask" }, d = /*#__PURE__*/ c(/* @__PURE__ */ o({
88
88
  }, this.onSuccess, this.onError);
89
89
  }
90
90
  doNuveiChallenge(e, t, n) {
91
- let r = JSON.parse(e);
92
- if (r === null || !r.merchantId || !r.merchantSiteId) {
91
+ let a = JSON.parse(e);
92
+ if (a === null || !a.merchantId || !a.merchantSiteId) {
93
93
  this.threeDsProcessor?.onError({ error: i });
94
94
  return;
95
95
  }
96
- if (this.threeDsProcessor?.getTokenId() && !r?.userPaymentOptionId) {
96
+ if (this.threeDsProcessor?.getTokenId() && !a?.userPaymentOptionId) {
97
97
  this.threeDsProcessor?.onError({ error: "3D Secure with a token needs a token created on this Nuvei provider" });
98
98
  return;
99
99
  }
100
- t && (r.firstName = t.firstName, r.lastName = t.lastName, r.email = t.email, r.country = t.country), n && (r.cardNumber = n.cardNumber, r.cardHolderName = n.cardholder || "", r.expirationMonth = n.expiryDate.substring(2, 4), r.expirationYear = n.expiryDate.substring(0, 2), r.CVV = n.ccv), this.setChallengeFrameVisible(!0);
101
- let { destroy: o } = a({
100
+ t && (a.firstName = t.firstName, a.lastName = t.lastName, a.email = t.email, a.country = t.country), n && (a.cardNumber = n.cardNumber, a.cardHolderName = n.cardholder || "", a.expirationMonth = n.expiryDate.substring(2, 4), a.expirationYear = n.expiryDate.substring(0, 2), a.CVV = n.ccv), this.setChallengeFrameVisible(!0);
101
+ let { destroy: o } = r({
102
102
  el: document.body,
103
103
  component: d,
104
- props: r,
104
+ props: a,
105
105
  on: { close: () => {
106
106
  o(), this.setChallengeFrameVisible(!1), this.threeDSDestroy = () => {}, this.threeDsProcessor?.onError({ error: "Challenge cancelled" });
107
107
  } }
@@ -1,4 +1,4 @@
1
- import { t as e } from "./MetricsGlobalThreeDsProvider-c8-Fc5ST.js";
1
+ import { t as e } from "./MetricsGlobalThreeDsProvider-BiILkcHI.js";
2
2
  // src/sdk/3ds/PayabliThreeDsProvider.ts
3
3
  var t = class extends e {
4
4
  getType() {
@@ -51,6 +51,25 @@ export declare type AddSavedPaymentMethodsOptionsType = {
51
51
  networkTokenOptions?: NetworkTokenOptionsType;
52
52
  };
53
53
 
54
+ export declare type ApplePayButtonOptionsType = {
55
+ /** Default "black". */
56
+ buttonStyle?: ApplePayButtonStyle;
57
+ /** Default "buy". */
58
+ type?: ApplePayButtonType;
59
+ /** A language tag such as "en-US" or "fr-FR". Default "en-US". */
60
+ locale?: string;
61
+ /** A number is pixels; a string is any CSS length, such as "100%". Apple's default is auto, and its minimum is 140px (100px for "plain"). */
62
+ width?: number | string;
63
+ /** A number is pixels; a string is any CSS length. Apple's default and minimum are 30px. */
64
+ height?: number | string;
65
+ /** A number is pixels; a string is any CSS length. Apple's default is 4px. */
66
+ borderRadius?: number | string;
67
+ };
68
+
69
+ export declare type ApplePayButtonStyle = "black" | "white" | "white-outline";
70
+
71
+ export declare type ApplePayButtonType = "add-money" | "book" | "buy" | "check-out" | "continue" | "contribute" | "donate" | "order" | "pay" | "plain" | "reload" | "rent" | "subscribe" | "support" | "tip" | "top-up";
72
+
54
73
  export declare type ApplePayMerchantCapabilityType = "supports3DS" | "supportsCredit" | "supportsDebit" | "supportsEMV";
55
74
 
56
75
  export declare type ApplePayOptionsType = {
@@ -74,6 +93,7 @@ export declare type ApplePayOptionsType = {
74
93
  supportedNetworks?: string[];
75
94
  supportedCountries?: string[];
76
95
  applePayVersion?: number;
96
+ buttonOptions?: ApplePayButtonOptionsType;
77
97
  };
78
98
 
79
99
  declare enum CardBrandType {
@@ -150,6 +170,7 @@ export declare type DropInApplePayOptionsType = {
150
170
  supportedNetworks?: string[];
151
171
  supportedCountries?: string[];
152
172
  applePayVersion?: number;
173
+ buttonOptions?: ApplePayButtonOptionsType;
153
174
  };
154
175
 
155
176
  export declare type DropInGooglePayOptionsType = {