@ranty/ranty-sdk 3.28.0-beta.1 → 3.28.0-beta.2
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.0-beta.
|
|
929
|
+
const FT = "@nx-ranty/ranty-sdk", RT = "3.28.0-beta.2", 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(Lo(), "DD_LOGS", Pp);
|
|
16594
|
-
const JM = "@
|
|
16594
|
+
const JM = "@ranty/ranty-sdk", XM = "3.28.0-beta.2", ZM = 3, $M = !0, ez = {
|
|
16595
16595
|
"": {
|
|
16596
|
-
name: "@
|
|
16597
|
-
version: "3.28.0-beta.
|
|
16596
|
+
name: "@ranty/ranty-sdk",
|
|
16597
|
+
version: "3.28.0-beta.2",
|
|
16598
16598
|
license: "ISC",
|
|
16599
16599
|
dependencies: {
|
|
16600
16600
|
"@amplitude/analytics-browser": "^2.33.1",
|
|
@@ -47130,7 +47130,7 @@ let zr = class t extends Ze {
|
|
|
47130
47130
|
}
|
|
47131
47131
|
firstUpdated(e) {
|
|
47132
47132
|
return ue(this, null, function* () {
|
|
47133
|
-
var n, r, s, i, o
|
|
47133
|
+
var n, r, s, i, o;
|
|
47134
47134
|
if (Vn(t.prototype, this, "firstUpdated").call(this, e), this.sonicBranding && (yield this._playSonic()), this.callbackUrl = ((n = this.payfacContext.paymentRequest) == null ? void 0 : n.payment_type) === ao.ECOMMERCE && this.payfacContext.paymentRequest.additional_info.callback_url || "", this.isStatusSuccess) {
|
|
47135
47135
|
ie.info("firstUpdatedStatus", {
|
|
47136
47136
|
context: Se.DEFAULT,
|
|
@@ -47145,16 +47145,12 @@ let zr = class t extends Ze {
|
|
|
47145
47145
|
payment_sync: this.payfacContext.paymentSync
|
|
47146
47146
|
}
|
|
47147
47147
|
}), this.isActivePdfByPlatform();
|
|
47148
|
-
const
|
|
47148
|
+
const a = this.status.hasDownloadPDF ? 2e4 : 5e3;
|
|
47149
47149
|
this.callbackUrl !== "" && ((s = this.settings.customerProperties) != null && s.enable_auto_redirect) && setTimeout(() => {
|
|
47150
47150
|
window.location.href = this.callbackUrl;
|
|
47151
|
-
},
|
|
47152
|
-
}
|
|
47153
|
-
if (((i = this.payfacContext.paymentRequest) == null ? void 0 : i.status) === "SUCCESS_PROCESSED" && !this.isStatusSuccess && this.tracking.linkNotAvailable(), ((o = this.payfacContext.paymentRequest) == null ? void 0 : o.status) === "EXPIRED" && this.getPaymentInputsAvailableWrongTimeExpired(), ((a = this.payfacContext.paymentRequest) == null ? void 0 : a.status) === "BLOCKED") {
|
|
47154
|
-
this.tracking.WrongPaymentCantMode();
|
|
47155
|
-
return;
|
|
47151
|
+
}, a);
|
|
47156
47152
|
}
|
|
47157
|
-
this.title = this.status.title, this.message = this.status.subtitle, this.image = this.status.icon, this.returnButton = this.status.returnButton || !1;
|
|
47153
|
+
((i = this.payfacContext.paymentRequest) == null ? void 0 : i.status) === "SUCCESS_PROCESSED" && !this.isStatusSuccess && this.tracking.linkNotAvailable(), ((o = this.payfacContext.paymentRequest) == null ? void 0 : o.status) === "EXPIRED" && this.getPaymentInputsAvailableWrongTimeExpired(), this.title = this.status.title, this.message = this.status.subtitle, this.image = this.status.icon, this.returnButton = this.status.returnButton || !1;
|
|
47158
47154
|
});
|
|
47159
47155
|
}
|
|
47160
47156
|
_playSonic() {
|
|
@@ -47166,17 +47162,15 @@ let zr = class t extends Ze {
|
|
|
47166
47162
|
});
|
|
47167
47163
|
}
|
|
47168
47164
|
handleClick() {
|
|
47169
|
-
var e, n, r, s, i;
|
|
47170
47165
|
if (this.payfacContext.paymentSync && this.state.paymentResponse) {
|
|
47171
|
-
if (this.hasAllowedRetries
|
|
47172
|
-
this.
|
|
47166
|
+
if (this.hasAllowedRetries) {
|
|
47167
|
+
this.retryPayment();
|
|
47173
47168
|
return;
|
|
47174
47169
|
}
|
|
47175
47170
|
this.executeRedirect();
|
|
47176
47171
|
return;
|
|
47177
|
-
}
|
|
47178
|
-
|
|
47179
|
-
if (!oc(this.payfacContext.paymentRequest) && this.hasAllowedRetries && ((i = this.payfacContext.payment) == null ? void 0 : i.status) !== "REJECTED") {
|
|
47172
|
+
}
|
|
47173
|
+
if (this.hasAllowedRetries && !oc(this.payfacContext.paymentRequest)) {
|
|
47180
47174
|
this.retryPayment();
|
|
47181
47175
|
return;
|
|
47182
47176
|
}
|
|
@@ -47203,9 +47197,10 @@ let zr = class t extends Ze {
|
|
|
47203
47197
|
return;
|
|
47204
47198
|
}
|
|
47205
47199
|
}
|
|
47206
|
-
|
|
47207
|
-
|
|
47208
|
-
|
|
47200
|
+
// si el pr esta expirado
|
|
47201
|
+
getPaymentInputsAvailableWrongTimeExpired() {
|
|
47202
|
+
const { paymentinputsavailable: e } = mn(this.tracking, this.payfacContext.paymentRequest);
|
|
47203
|
+
this.tracking.wrongTimeExpired(e);
|
|
47209
47204
|
}
|
|
47210
47205
|
retryPayment() {
|
|
47211
47206
|
var e;
|
|
@@ -47227,10 +47222,6 @@ let zr = class t extends Ze {
|
|
|
47227
47222
|
}
|
|
47228
47223
|
}), this.status.isRetry = !0;
|
|
47229
47224
|
}
|
|
47230
|
-
getPaymentInputsAvailableWrongTimeExpired() {
|
|
47231
|
-
const { paymentinputsavailable: e } = mn(this.tracking, this.payfacContext.paymentRequest);
|
|
47232
|
-
this.tracking.wrongTimeExpired(e);
|
|
47233
|
-
}
|
|
47234
47225
|
isActivePdfByPlatform() {
|
|
47235
47226
|
var e;
|
|
47236
47227
|
if ((e = this.payfacContext.paymentRequest) != null && e.additional_info && this.payfacContext.paymentRequest.additional_info.platform) {
|
|
@@ -50532,34 +50523,43 @@ let eo = class t extends Ze {
|
|
|
50532
50523
|
}
|
|
50533
50524
|
loadData() {
|
|
50534
50525
|
return ue(this, null, function* () {
|
|
50535
|
-
var e, n;
|
|
50526
|
+
var e, n, r, s, i;
|
|
50536
50527
|
try {
|
|
50537
|
-
const
|
|
50538
|
-
this.state.paymentRequest =
|
|
50539
|
-
const
|
|
50528
|
+
const o = this.state.paymentResponse ? (yield jo((n = (e = this.state) == null ? void 0 : e.paymentRequest) == null ? void 0 : n.id, "payment_request", !0)).response : this.payfacContext.paymentRequest;
|
|
50529
|
+
this.state.paymentRequest = o != null ? o : null, yield this.validateCircuitBreaker(), this.payfacContext.payment !== void 0 && this.getInpustPaymentNotProcessedretry();
|
|
50530
|
+
const a = {
|
|
50540
50531
|
context: Se.DEFAULT,
|
|
50541
50532
|
payment_sync: this.payfacContext.paymentSync,
|
|
50542
50533
|
is_embedded: this.payfacContext.isEmbedded
|
|
50543
|
-
},
|
|
50544
|
-
if (
|
|
50545
|
-
Object.assign(this.status,
|
|
50546
|
-
this.
|
|
50547
|
-
|
|
50548
|
-
|
|
50534
|
+
}, d = yield w4(this.payfacContext.paymentRequest, a), { source: l, payment: c } = yield z9(this.payfacContext.paymentRequest), u = H9(this.payfacContext.paymentRequest, c);
|
|
50535
|
+
if (c && (this.payfacContext.payment = c, this.state.payment = c), this.payfacContext.paymentRequest = o, d && d.error) {
|
|
50536
|
+
if (Object.assign(this.status, d.message), l === "QR") {
|
|
50537
|
+
u === "BUSINESS" && this.tracking.paymentNotProcessedRetryQR(
|
|
50538
|
+
this.payfacContext.payment.payment_input,
|
|
50539
|
+
this.payfacContext.payment.wallet.name
|
|
50540
|
+
);
|
|
50541
|
+
return;
|
|
50542
|
+
} else
|
|
50543
|
+
this.tracking.servicePaymentFailedRetry((i = (s = (r = this.state.binData) == null ? void 0 : r.installment) == null ? void 0 : s.type) != null ? i : "no_installment");
|
|
50544
|
+
this.createEvent("button-pushed", Ne.STATUS);
|
|
50549
50545
|
return;
|
|
50550
50546
|
}
|
|
50551
|
-
const
|
|
50552
|
-
if (!(
|
|
50553
|
-
const
|
|
50554
|
-
Object.assign(this.status,
|
|
50547
|
+
const h = qw(o), p = u4(o), f = qv(o);
|
|
50548
|
+
if (!(h || p || f)) {
|
|
50549
|
+
const y = ns.messages.find((w) => w.name === "no-payment-methods");
|
|
50550
|
+
Object.assign(this.status, y), this.createEvent("button-pushed", Ne.STATUS);
|
|
50555
50551
|
return;
|
|
50556
50552
|
}
|
|
50557
|
-
qv(this.payfacContext.paymentRequest) && (yield this.getDataSCOF(this.payfacContext.paymentRequest.id)), p4(this.payfacContext.paymentRequest) && (yield this.getDataA2A(this.payfacContext.paymentRequest.id)), this.state.onlyWallet || (yield this.getPromotions()), !this.state.scofEnabled && !this.state.onlyWallet && (yield this.getInstallmentPlans()), this.processPaymentInputs(
|
|
50558
|
-
} catch (
|
|
50559
|
-
_t("LOAD_DATA_ERROR", "Load data failed."), console.log(
|
|
50553
|
+
qv(this.payfacContext.paymentRequest) && (yield this.getDataSCOF(this.payfacContext.paymentRequest.id)), p4(this.payfacContext.paymentRequest) && (yield this.getDataA2A(this.payfacContext.paymentRequest.id)), this.state.onlyWallet || (yield this.getPromotions()), !this.state.scofEnabled && !this.state.onlyWallet && (yield this.getInstallmentPlans()), this.processPaymentInputs(o), this.requestUpdate();
|
|
50554
|
+
} catch (o) {
|
|
50555
|
+
_t("LOAD_DATA_ERROR", "Load data failed."), console.log(o), this.redirectByUnknownError();
|
|
50560
50556
|
}
|
|
50561
50557
|
});
|
|
50562
50558
|
}
|
|
50559
|
+
getInpustPaymentNotProcessedretry() {
|
|
50560
|
+
var e, n, r;
|
|
50561
|
+
mn(this.tracking, this.payfacContext.paymentRequest), this.tracking.paymentNotProcessedretry((r = (n = (e = this.state.binData) == null ? void 0 : e.installment) == null ? void 0 : n.type) != null ? r : "no_installment");
|
|
50562
|
+
}
|
|
50563
50563
|
getInstallmentPlans() {
|
|
50564
50564
|
return ue(this, null, function* () {
|
|
50565
50565
|
var e, n;
|
|
@@ -66595,7 +66595,7 @@ function(t) {
|
|
|
66595
66595
|
var l = d.getContext("2d");
|
|
66596
66596
|
l.fillStyle = "#fff", l.fillRect(0, 0, d.width, d.height);
|
|
66597
66597
|
var c = { ignoreMouse: !0, ignoreAnimation: !0, ignoreDimensions: !0 }, u = this;
|
|
66598
|
-
return (wt.canvg ? Promise.resolve(wt.canvg) : import("./index.es-
|
|
66598
|
+
return (wt.canvg ? Promise.resolve(wt.canvg) : import("./index.es-a783b22c.js")).catch(function(h) {
|
|
66599
66599
|
return Promise.reject(new Error("Could not load canvg: " + h));
|
|
66600
66600
|
}).then(function(h) {
|
|
66601
66601
|
return h.default ? h.default : h;
|
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-
|
|
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-42d398d4.js";
|
|
2
2
|
export {
|
|
3
3
|
t as A2AAccountDetails,
|
|
4
4
|
e as A2AFeedbackHome,
|