@ranty/ranty-sdk 3.28.5-beta.2 → 3.28.5-beta.3

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.
@@ -926,7 +926,7 @@ function _e(t) {
926
926
  */
927
927
  var oy;
928
928
  ((oy = window.HTMLSlotElement) === null || oy === void 0 ? void 0 : oy.prototype.assignedElements) != null;
929
- const FT = "@nx-ranty/ranty-sdk", RT = "3.28.5-beta.2", DT = "Ranty sdk", PT = "dist/index.js", NT = {
929
+ const FT = "@nx-ranty/ranty-sdk", RT = "3.28.5-beta.3", DT = "Ranty sdk", PT = "dist/index.js", NT = {
930
930
  ".": "./dist/index.js"
931
931
  }, OT = "types/index.d.ts", LT = [
932
932
  "dist",
@@ -16591,10 +16591,10 @@ function YM(t, e, n, r) {
16591
16591
  }
16592
16592
  const Pp = bM(YM);
16593
16593
  bQ(Qo(), "DD_LOGS", Pp);
16594
- const JM = "@nx-ranty/ranty-sdk", XM = "3.28.5-beta.2", ZM = 3, $M = !0, ez = {
16594
+ const JM = "@nx-ranty/ranty-sdk", XM = "3.28.5-beta.3", ZM = 3, $M = !0, ez = {
16595
16595
  "": {
16596
16596
  name: "@nx-ranty/ranty-sdk",
16597
- version: "3.28.5-beta.2",
16597
+ version: "3.28.5-beta.3",
16598
16598
  license: "ISC",
16599
16599
  dependencies: {
16600
16600
  "@amplitude/analytics-browser": "^2.33.1",
@@ -42855,7 +42855,7 @@ class Si {
42855
42855
  mode: s,
42856
42856
  paymentstage: "completed_attempt",
42857
42857
  paymenttype: this.resolvePaymentType(r),
42858
- statusResponsePayment: i
42858
+ statusresponsePayment: i
42859
42859
  }
42860
42860
  });
42861
42861
  }
@@ -42915,20 +42915,21 @@ class Si {
42915
42915
  }
42916
42916
  });
42917
42917
  }
42918
- paymentResultQR(e, n, r, s) {
42919
- const i = s.name === "APPROVED" ? "payment_confirmation" : "payment_not_processed";
42918
+ paymentResultQR(e, n, r, s, i) {
42919
+ const o = i.name === "APPROVED" ? "payment_confirmation" : "payment_not_processed";
42920
42920
  on("trackevent", {
42921
42921
  eventName: "pageview",
42922
42922
  eventParams: {
42923
42923
  product: "checkout",
42924
42924
  section: "payment_result",
42925
42925
  paymentstage: "completed_attempt",
42926
- subsection: i,
42926
+ subsection: o,
42927
42927
  method: "qr",
42928
42928
  paymentinput: e,
42929
- walletname: n,
42930
- paymenttype: this.resolvePaymentType(r),
42931
- statusResponsePayment: s.name
42929
+ walletname: r,
42930
+ paymenttype: this.resolvePaymentType(s),
42931
+ type: n,
42932
+ statusresponsePayment: i.name
42932
42933
  }
42933
42934
  });
42934
42935
  }
@@ -42959,7 +42960,7 @@ class Si {
42959
42960
  }
42960
42961
  });
42961
42962
  }
42962
- paymentnotProcessedRetryQR(e) {
42963
+ webSocketDisconnetRetry(e) {
42963
42964
  on("trackevent", {
42964
42965
  eventName: "click",
42965
42966
  eventParams: {
@@ -46474,10 +46475,10 @@ let Ts = class extends Ze {
46474
46475
  try {
46475
46476
  const i = (n = (e = (t = this.state.paymentResponse) == null ? void 0 : t.data) == null ? void 0 : e.id) != null ? n : this.payfacContext.paymentRequest.payment_id, o = (s = (r = this.payfacContext.payment) != null ? r : this.state.payment) != null ? s : void 0, a = o != null ? o : yield q0(i, !1);
46476
46477
  this.state.payment = a, this.payfacContext.payment = a, this.paymentInput = this.state.payment.payment_input;
46477
- const d = this.state.payment.payment_type;
46478
+ const d = this.state.payment.payment_type, l = this.state.payment.payment_method.type;
46478
46479
  this.walletName = this.state.payment.payment_method.wallet_name;
46479
- const l = this.state.payment.status;
46480
- this.tracking.paymentResultQR(this.paymentInput, this.walletName, d, l);
46480
+ const c = this.state.payment.status;
46481
+ this.tracking.paymentResultQR(this.paymentInput, l, this.walletName, d, c);
46481
46482
  } catch (i) {
46482
46483
  console.log(i), _t("PAYMENT_ERROR", "Payment failed.");
46483
46484
  }
@@ -66412,7 +66413,7 @@ function(t) {
66412
66413
  var l = d.getContext("2d");
66413
66414
  l.fillStyle = "#fff", l.fillRect(0, 0, d.width, d.height);
66414
66415
  var c = { ignoreMouse: !0, ignoreAnimation: !0, ignoreDimensions: !0 }, u = this;
66415
- return (wt.canvg ? Promise.resolve(wt.canvg) : import("./index.es-f912392e.js")).catch(function(h) {
66416
+ return (wt.canvg ? Promise.resolve(wt.canvg) : import("./index.es-d3594be9.js")).catch(function(h) {
66416
66417
  return Promise.reject(new Error("Could not load canvg: " + h));
66417
66418
  }).then(function(h) {
66418
66419
  return h.default ? h.default : h;
@@ -67400,6 +67401,9 @@ let Ch = class extends Ze {
67400
67401
  var t, e;
67401
67402
  return ((e = (t = this.state.payment) == null ? void 0 : t.payment_method) == null ? void 0 : e.card_type) === Um.CREDIT;
67402
67403
  }
67404
+ get isCards() {
67405
+ return this.state.payment.payment_method.card_type;
67406
+ }
67403
67407
  get buyerDocumentNumber() {
67404
67408
  var t, e;
67405
67409
  return (e = (t = this.state.payment) == null ? void 0 : t.payment_method) == null ? void 0 : e.card_holder_doc_number;
@@ -67412,7 +67416,7 @@ let Ch = class extends Ze {
67412
67416
  return this.state.paymentRequest;
67413
67417
  }
67414
67418
  get paymentInput() {
67415
- return this.state.paymentResponse.data.payment_input;
67419
+ return this.state.payment.payment_input;
67416
67420
  }
67417
67421
  get isBuyerInfo() {
67418
67422
  return !!this.buyerDocumentNumber && !!this.buyerFullName;
@@ -67432,13 +67436,13 @@ let Ch = class extends Ze {
67432
67436
  t && this.generatePDF(t);
67433
67437
  }
67434
67438
  getTracking() {
67435
- this.isPaymentTransfer ? this.getPaymentsClickDownloadReceiptQR() : this.getPaymentsClickDownloadReceipt();
67439
+ this.paymentInput === "wallet" ? this.getPaymentsClickDownloadReceiptQR() : this.getPaymentsClickDownloadReceipt();
67436
67440
  }
67437
67441
  getPaymentsClickDownloadReceipt() {
67438
67442
  const { paymentinputsavailable: t } = In(this.tracking, this.paymentRequest);
67439
67443
  this.tracking.clickDownloadReceipt(
67440
67444
  this.paymentInput,
67441
- this.state.binData.installment.type,
67445
+ this.isCards ? this.isCards : "",
67442
67446
  t,
67443
67447
  this.state.paymentRequest.payment_type
67444
67448
  );
@@ -67446,7 +67450,7 @@ let Ch = class extends Ze {
67446
67450
  getPaymentsClickDownloadReceiptQR() {
67447
67451
  const { paymentinputsavailable: t } = In(this.tracking, this.paymentRequest);
67448
67452
  this.tracking.openReceiptQR(
67449
- this.state.payment.payment_input,
67453
+ this.paymentInput,
67450
67454
  this.state.payment.payment_method.type,
67451
67455
  this.state.payment.payment_method.wallet_name,
67452
67456
  t,
@@ -1,4 +1,4 @@
1
- import { c as Ke, _ as za, g as _o } from "./index-78c31694.js";
1
+ import { c as Ke, _ as za, g as _o } from "./index-28c5c75a.js";
2
2
  var vt = function(a) {
3
3
  return a && a.Math === Math && a;
4
4
  }, V = (
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a4 as t, a7 as e, a5 as n, a6 as o, A as r, t as p, G as C, v as i, B as u, a3 as l, R as d, K as m, X as c, J as P, Y as A, Z as I, $ as y, h as D, f, a2 as k, a1 as F, M as S, O as L, T as H, U as M, V as g, C as v, i as x, n as E, a as O, d as b, a0 as Q, s as h, y as B, r as w, o as N, p as j, q, D as z, W as G, E as J, e as K, k as R, b as T, F as U, H as V, I as W, L as X, N as Y, j as Z, w as $, P as _, l as aa, u as sa, x as ta, Q as ea, S as na, z as oa, m as ra } from "./index-78c31694.js";
1
+ import { a4 as t, a7 as e, a5 as n, a6 as o, A as r, t as p, G as C, v as i, B as u, a3 as l, R as d, K as m, X as c, J as P, Y as A, Z as I, $ as y, h as D, f, a2 as k, a1 as F, M as S, O as L, T as H, U as M, V as g, C as v, i as x, n as E, a as O, d as b, a0 as Q, s as h, y as B, r as w, o as N, p as j, q, D as z, W as G, E as J, e as K, k as R, b as T, F as U, H as V, I as W, L as X, N as Y, j as Z, w as $, P as _, l as aa, u as sa, x as ta, Q as ea, S as na, z as oa, m as ra } from "./index-28c5c75a.js";
2
2
  export {
3
3
  t as A2AAccountDetails,
4
4
  e as A2AFeedbackHome,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ranty/ranty-sdk",
3
- "version": "3.28.5-beta.2",
3
+ "version": "3.28.5-beta.3",
4
4
  "description": "Ranty sdk",
5
5
  "main": "dist/index.js",
6
6
  "exports": {