@payfurl/react-plugin 1.0.5 → 1.0.7

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 (34) hide show
  1. package/dist/{CxPayThreeDsProvider-qI6LA8iK-7hd6hU9V.js → CxPayThreeDsProvider-DUx0ZP9g-Degsqn78.js} +1 -1
  2. package/dist/{DefaultThreeDsProvider-BKnpkX8X-Cz7DrRsl.js → DefaultThreeDsProvider-OrSUoygj-DDT1hQi-.js} +14 -14
  3. package/dist/{EcentricThreeDsProvider-Dor61dsV-GhDmnDn-.js → EcentricThreeDsProvider-C0n-kUpY-BWP8kYWo.js} +18 -18
  4. package/dist/{EpnaThreeDsProvider-6j4cBf2g-Cd_oxzGb.js → EpnaThreeDsProvider-BlzPLUQj-DXLWm964.js} +1 -1
  5. package/dist/{FlashBancThreeDsProvider-B1IMjfpm-DrqCM_Cb.js → FlashBancThreeDsProvider-BZD1Bmox-GnYUlI65.js} +1 -1
  6. package/dist/{GPaymentsThreeDsProvider-PKB94NB4-CNkJLCnl.js → GPaymentsThreeDsProvider-Dmc3T7m7-35lrMFpb.js} +10 -10
  7. package/dist/{MetricsGlobalThreeDsProvider-CkIGiDkd-DUSl24lr.js → MetricsGlobalThreeDsProvider-D8pmLCaF-DEaemgZa.js} +33 -33
  8. package/dist/{NmiThreeDsProvider-CcMEqhmQ-CFas_kIM.js → NmiThreeDsProvider-D6MYO9TE-DHwB0bYd.js} +1 -1
  9. package/dist/{NuveiThreeDsProvider-CwXxM_h7-BITQd7Iq.js → NuveiThreeDsProvider-B0_hr137-D1_gqEvl.js} +21 -21
  10. package/dist/{PayGLocalThreeDsProvider-sIfhhTia-CvvMuyyq.js → PayGLocalThreeDsProvider-CcVtz_cC-BQ8_PCsN.js} +11 -11
  11. package/dist/PayWayAppleButton-DI0k_xsw-AVNktU-g.js +157 -0
  12. package/dist/{PayabliThreeDsProvider-Dbril8Rp-3ZWzXe4X.js → PayabliThreeDsProvider-BTuW5mNX-kyO_hsCR.js} +1 -1
  13. package/dist/{SkyBankThreeDsProvider-C07fNAvi-DkOg-Std.js → SkyBankThreeDsProvider-CFsEdtDi-Dce6uOn9.js} +1 -1
  14. package/dist/{cxpay-CEQ4-BTN-DtdA08b6.js → cxpay-CzXEk7uT-Btncowxp.js} +1 -1
  15. package/dist/{default-C_HQSLX4-DWKpaokp.js → default-CVlT2ZTw-CLMr4GWi.js} +1 -1
  16. package/dist/{ecentric-BNc1h8Eo-wq39vDkR.js → ecentric-p4HkLdd1-DUXx49X_.js} +1 -1
  17. package/dist/{epna-B9Y2q1w--DGUu8ZJW.js → epna-ugAK06qE-DXI-Rhx5.js} +1 -1
  18. package/dist/{flashbanc-C0Ty8vp7-CIVRvn_D.js → flashbanc-BD7QXswZ-mrOZli3W.js} +1 -1
  19. package/dist/{gpayments-rnHqXJDK-DoKIhXX0.js → gpayments-BJ23p2Lx-BcpckQ_O.js} +1 -1
  20. package/dist/{index-C07A5tMl.js → index-ClH0YevK.js} +5935 -5529
  21. package/dist/{metrics_global-B6yYoxRR-CP7W0f7G.js → metrics_global-Ce0HIVhq-BRn4NHF3.js} +1 -1
  22. package/dist/nmi-Ci4ItU_O-gLvtT0HD.js +7 -0
  23. package/dist/{nuvei-Bh2t9NPs-CeU1te1v.js → nuvei-Dy9kXWcy-CyecXMCz.js} +1 -1
  24. package/dist/{payabli-NfqCrBOu-CjD5Swso.js → payabli-FwdYUjhG-BseeifP8.js} +1 -1
  25. package/dist/payfurl-react.es.js +1 -1
  26. package/dist/payfurl-react.umd.js +43 -24
  27. package/dist/{payglocal-D3sg1uGV-zrK77nM8.js → payglocal-DX_7nogS-PD41uw-Y.js} +1 -1
  28. package/dist/payway_rest-BMXIpCn0-rvMOa3J_.js +7 -0
  29. package/dist/{skybank-CrMnPsZ3-Bz6P0PvB.js → skybank-JGD9tw1a-YWSy9RUx.js} +1 -1
  30. package/dist/src/sdk/types/PaymentType.type.d.ts +2 -2
  31. package/package.json +2 -2
  32. package/dist/PayWayAppleButton-BhhFv3LB-C565KkXF.js +0 -141
  33. package/dist/nmi-2JLTZ129-DlW8mhIU.js +0 -7
  34. package/dist/payway_rest-B7rIKWt2-BQ72GP3z.js +0 -7
@@ -1,4 +1,4 @@
1
- import { PayGLocalThreeDsProvider as a } from "./PayGLocalThreeDsProvider-sIfhhTia-CvvMuyyq.js";
1
+ import { PayGLocalThreeDsProvider as a } from "./PayGLocalThreeDsProvider-CcVtz_cC-BQ8_PCsN.js";
2
2
  function n(r, e, o) {
3
3
  return new a(r, e, o);
4
4
  }
@@ -0,0 +1,7 @@
1
+ import { PayWayAppleButton as f } from "./PayWayAppleButton-DI0k_xsw-AVNktU-g.js";
2
+ function u(t, a, e, n, o, r) {
3
+ return new f(t, a, e, n, o, r);
4
+ }
5
+ export {
6
+ u as default
7
+ };
@@ -1,4 +1,4 @@
1
- import { SkyBankThreeDsProvider as n } from "./SkyBankThreeDsProvider-C07fNAvi-DkOg-Std.js";
1
+ import { SkyBankThreeDsProvider as n } from "./SkyBankThreeDsProvider-CFsEdtDi-Dce6uOn9.js";
2
2
  function t(r, e, a) {
3
3
  return new n(r, e, a);
4
4
  }
@@ -6,10 +6,10 @@ export declare enum PaymentType {
6
6
  upi = "upi",
7
7
  payto = "payto",
8
8
  payid = "payid",
9
- azupay = "azupay",
10
9
  shift = "shift",
11
10
  pesapal = "pesapal",
12
11
  paybyaccount = "paybyaccount",
13
12
  payglocal = "payglocal",
14
- zip = "zip"
13
+ zip = "zip",
14
+ dlocal = "dlocal"
15
15
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@payfurl/react-plugin",
3
3
  "private": false,
4
- "version": "1.0.5",
4
+ "version": "1.0.7",
5
5
  "description": "PayFURL React Plugin",
6
6
  "type": "module",
7
7
  "files": [
@@ -25,7 +25,7 @@
25
25
  "preview": "vite preview"
26
26
  },
27
27
  "dependencies": {
28
- "@payfurl/client": "^4.6.19"
28
+ "@payfurl/client": "^4.6.29"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "react": "^18.3.1",
@@ -1,141 +0,0 @@
1
- import { D as b, O as g, w as A } from "./index-C07A5tMl.js";
2
- var v = Object.defineProperty, C = (a, t, i) => t in a ? v(a, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : a[t] = i, s = (a, t, i) => C(a, typeof t != "symbol" ? t + "" : t, i);
3
- const h = {
4
- CHECKOUT: "CHECKOUT",
5
- CHARGE: "CHARGE"
6
- }, y = (a) => ({
7
- [h.CHECKOUT]: {
8
- url: a + "/payment_method/checkout",
9
- method: "POST"
10
- },
11
- [h.CHARGE]: {
12
- url: a + "/charge/checkout",
13
- method: "POST"
14
- }
15
- });
16
- class k {
17
- constructor(t, i, o, r, n, e) {
18
- s(this, "log"), s(this, "container"), s(this, "button", null), s(this, "providerId"), s(this, "apiUrl"), s(this, "amount"), s(this, "currency"), s(this, "clientParameters"), s(this, "billingAddress", null), s(this, "customer", null), s(this, "order", null), s(this, "buttonId", "apple-pay-payway-button"), s(this, "onLoad", () => {
19
- }), s(this, "onSuccess"), s(this, "onFailure"), s(this, "httpInvoker", null), this.log = t, this.apiUrl = e.apiUrl, this.container = i || document.body, this.clientParameters = e.clientParameters, this.providerId = e.providerId, this.amount = Number(r), this.currency = n, this.providerId = o, this.onSuccess = e.onSuccess || null, this.onFailure = e.onFailure || null;
20
- const c = new b(e.environment, g(e.publicKey));
21
- this.httpInvoker = new A(e.publicKey, e.version, c), this.init();
22
- }
23
- draw() {
24
- const t = () => {
25
- this.onLoad = () => {
26
- };
27
- const i = {
28
- container: this.buttonId,
29
- publishableApiKey: this.clientParameters.PublishableApiKey,
30
- principalAmount: this.amount,
31
- currency: String(this.currency).toLowerCase(),
32
- buttonMode: "callback"
33
- };
34
- this.log("[createPaymentRequestButton]", i), window.payway.createPaymentRequestButton(i, (o, r) => {
35
- var n;
36
- if (this.log("[createPaymentRequestButton]", o, r), o) {
37
- (n = this.onFailure) == null || n.call(this, o);
38
- return;
39
- }
40
- this.checkout(r.singleUseTokenId);
41
- });
42
- };
43
- window.payway ? t() : this.onLoad = t;
44
- }
45
- show() {
46
- this.button && (this.button.style.display = "block");
47
- }
48
- hide() {
49
- this.button && (this.button.style.display = "none");
50
- }
51
- init() {
52
- const t = document.createElement("div");
53
- t.id = this.buttonId, this.container.appendChild(t), this.button = t, this.initScript();
54
- }
55
- initScript() {
56
- const t = document.createElement("script");
57
- t.src = "https://api.payway.com.au/rest/v1/payway.js", t.onload = () => {
58
- this.onLoad && this.onLoad();
59
- }, document.head.appendChild(t);
60
- }
61
- checkout(t) {
62
- var i, o, r, n, e, c;
63
- const m = {
64
- providerId: this.providerId,
65
- amount: this.amount,
66
- currency: this.currency,
67
- reference: (i = this.order) == null ? void 0 : i.orderNumber,
68
- options: {
69
- ProviderToken: t
70
- },
71
- customer: {
72
- firstName: (o = this.customer) == null ? void 0 : o.firstName,
73
- lastName: (r = this.customer) == null ? void 0 : r.lastName,
74
- email: (n = this.customer) == null ? void 0 : n.email,
75
- phone: (e = this.customer) == null ? void 0 : e.phoneNumber,
76
- billingAddress: this.billingAddress && {
77
- name: `${this.billingAddress.firstName} ${this.billingAddress.lastName}`,
78
- addressLine1: this.billingAddress.streetAddress,
79
- addressLine2: this.billingAddress.streetAddress2,
80
- suburb: this.billingAddress.city,
81
- countryCode: this.billingAddress.country,
82
- postcode: this.billingAddress.postalCode,
83
- state: this.billingAddress.state
84
- } || void 0
85
- },
86
- items: this.order && this.order.orderItems.map((l) => ({
87
- name: l.name,
88
- reference: l.sku,
89
- quantity: Number(l.quantity),
90
- amount: Number(l.unitPrice)
91
- })) || []
92
- };
93
- this.log("[PayWayAppleButton][checkout]", m), (c = this.httpInvoker) == null || c.invoke(y(this.apiUrl)[h.CHECKOUT].url, y(this.apiUrl)[h.CHECKOUT].method, JSON.stringify(m), (l, u) => {
94
- this.log("[PayWayAppleButton][checkout]: successCheckoutHandler", l, u);
95
- const d = JSON.parse(u), p = JSON.parse(window.atob(d.checkoutData));
96
- this.log("[PayWayAppleButton][checkout]: decodedData", p), this.charge(p.checkoutId);
97
- }, (l, u) => {
98
- var d;
99
- this.log("[PayWayAppleButton][checkout]: failureCheckoutHandler", l, u);
100
- const p = JSON.parse(u);
101
- (d = this.onFailure) == null || d.call(this, { error: p.message });
102
- });
103
- }
104
- charge(t) {
105
- var i;
106
- this.log("[PayWayAppleButton][charge]", { checkoutId: t }), (i = this.httpInvoker) == null || i.invoke(y(this.apiUrl)[h.CHARGE].url, y(this.apiUrl)[h.CHARGE].method, JSON.stringify({ checkoutId: t }), (o, r) => {
107
- var n;
108
- this.log("[PayWayAppleButton][charge]: successChargeHandler", o, r);
109
- const e = JSON.parse(r);
110
- (n = this.onSuccess) == null || n.call(this, {
111
- transactionId: e == null ? void 0 : e.chargeId
112
- });
113
- }, (o, r) => {
114
- var n;
115
- this.log("[PayWayAppleButton][charge]: failureChargeHandler", o, r);
116
- const e = JSON.parse(r);
117
- (n = this.onFailure) == null || n.call(this, { error: e.message });
118
- });
119
- }
120
- redraw() {
121
- this.button && (this.button.innerHTML = "", this.draw());
122
- }
123
- setAmount(t) {
124
- this.log("[PayWayAppleButton][setAmount]", t), this.amount = t, this.redraw();
125
- }
126
- setCurrency(t) {
127
- this.log("[PayWayAppleButton][setCurrency]", t), this.currency = t, this.redraw();
128
- }
129
- setCustomerInfo(t) {
130
- this.log("[PayWayAppleButton][setCustomerInfo]", t), this.customer = { ...t };
131
- }
132
- setBillingAddress(t) {
133
- this.log("[PayWayAppleButton][setBillingAddress]", t), this.billingAddress = { ...t };
134
- }
135
- setOrderInfo(t) {
136
- this.log("[PayWayAppleButton][setOrderInfo]", t), this.order = { ...t };
137
- }
138
- }
139
- export {
140
- k as PayWayAppleButton
141
- };
@@ -1,7 +0,0 @@
1
- import { NmiThreeDsProvider as o } from "./NmiThreeDsProvider-CcMEqhmQ-CFas_kIM.js";
2
- function n(r, e, t) {
3
- return new o(r, e, t);
4
- }
5
- export {
6
- n as default
7
- };
@@ -1,7 +0,0 @@
1
- import { PayWayAppleButton as p } from "./PayWayAppleButton-BhhFv3LB-C565KkXF.js";
2
- function f(t, a, e, n, o, r) {
3
- return new p(t, a, e, n, o, r);
4
- }
5
- export {
6
- f as default
7
- };