htech-pay 0.0.14-alpha → 0.0.16-alpha
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.
- package/README.md +7 -7
- package/dist/htechPay.mjs +18 -14
- package/dist/htechPay.umd.js +1 -1
- package/package.json +42 -42
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# HtechPay.js
|
|
2
|
-
|
|
3
|
-
HTechPay JS es una libreria diseñada para facilitar la integración del flujo de pagos de HTechPay para entornos web. Proporciona una interfaz eficiente y segura para procesar transacciones, optimizando la velocidad y la experiencia del usuario.
|
|
4
|
-
|
|
5
|
-
HTechPay JS is a library designed to facilitate the integration of HTechPay payment flows into web environments. It provides an efficient and secure interface for processing transactions, optimizing speed and user experience.
|
|
6
|
-
|
|
7
|
-
- [Htech.com](https://htech.com/desarrolladores/)
|
|
1
|
+
# HtechPay.js
|
|
2
|
+
|
|
3
|
+
HTechPay JS es una libreria diseñada para facilitar la integración del flujo de pagos de HTechPay para entornos web. Proporciona una interfaz eficiente y segura para procesar transacciones, optimizando la velocidad y la experiencia del usuario.
|
|
4
|
+
|
|
5
|
+
HTechPay JS is a library designed to facilitate the integration of HTechPay payment flows into web environments. It provides an efficient and secure interface for processing transactions, optimizing speed and user experience.
|
|
6
|
+
|
|
7
|
+
- [Htech.com](https://htech.com/desarrolladores/)
|
package/dist/htechPay.mjs
CHANGED
|
@@ -1,29 +1,33 @@
|
|
|
1
1
|
/*! HtechPay SDK v0.0.12 | MIT License */
|
|
2
|
-
async function
|
|
2
|
+
async function p(i, m = {}) {
|
|
3
3
|
const {
|
|
4
|
-
|
|
5
|
-
isPaymentWithToken:
|
|
4
|
+
environment: l = "qa",
|
|
5
|
+
isPaymentWithToken: c = !1,
|
|
6
6
|
onViewForm: n,
|
|
7
7
|
onPaymentResult: r,
|
|
8
8
|
theme: u
|
|
9
|
-
} = m,
|
|
10
|
-
|
|
9
|
+
} = m, h = `${{
|
|
10
|
+
qa: "https://d2zrptqqy5dqev.cloudfront.net/index.html",
|
|
11
|
+
stage: "",
|
|
12
|
+
prod: ""
|
|
13
|
+
}[l]}?orderId=${i}&theme=${u}${c ? "#/paymentToken" : ""}`, e = document.createElement("iframe");
|
|
14
|
+
e.src = h, e.width = "100%", e.height = "800", e.frameBorder = "0", e.allowFullscreen = !0, e.title = "Carta de pago";
|
|
11
15
|
const a = {
|
|
12
16
|
onViewForm: () => n == null ? void 0 : n(!0),
|
|
13
|
-
onPaymentResult: (
|
|
14
|
-
}, s = (
|
|
17
|
+
onPaymentResult: (t) => r == null ? void 0 : r(t.data.payload || {})
|
|
18
|
+
}, s = (t) => {
|
|
15
19
|
var d;
|
|
16
|
-
const
|
|
17
|
-
!
|
|
20
|
+
const o = (d = t.data) == null ? void 0 : d.hook;
|
|
21
|
+
!o || !a[o] || a[o](t.data);
|
|
18
22
|
};
|
|
19
23
|
return window.addEventListener("message", s), {
|
|
20
|
-
mount: (
|
|
21
|
-
const
|
|
22
|
-
if (!
|
|
24
|
+
mount: (t) => {
|
|
25
|
+
const o = typeof t == "string" ? document.querySelector(t) : t;
|
|
26
|
+
if (!o)
|
|
23
27
|
throw new Error(
|
|
24
28
|
"No se encontró el contenedor para montar el formulario"
|
|
25
29
|
);
|
|
26
|
-
|
|
30
|
+
o.appendChild(e);
|
|
27
31
|
},
|
|
28
32
|
destroy: () => {
|
|
29
33
|
window.removeEventListener("message", s), e.remove();
|
|
@@ -31,5 +35,5 @@ async function h(i, m = {}) {
|
|
|
31
35
|
};
|
|
32
36
|
}
|
|
33
37
|
export {
|
|
34
|
-
|
|
38
|
+
p as loadForm
|
|
35
39
|
};
|
package/dist/htechPay.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(n,r){typeof exports=="object"&&typeof module<"u"?r(exports):typeof define=="function"&&define.amd?define(["exports"],r):(n=typeof globalThis<"u"?globalThis:n||self,r(n.HtechPay={}))})(this,function(n){"use strict";/*! HtechPay SDK v0.0.12 | MIT License */async function r(u,l={}){const{environment:f="qa",isPaymentWithToken:c=!1,onViewForm:a,onPaymentResult:d,theme:h}=l,p=`${{qa:"https://d2zrptqqy5dqev.cloudfront.net/index.html",stage:"",prod:""}[f]}?orderId=${u}&theme=${h}${c?"#/paymentToken":""}`,e=document.createElement("iframe");e.src=p,e.width="100%",e.height="800",e.frameBorder="0",e.allowFullscreen=!0,e.title="Carta de pago";const i={onViewForm:()=>a==null?void 0:a(!0),onPaymentResult:t=>d==null?void 0:d(t.data.payload||{})},s=t=>{var m;const o=(m=t.data)==null?void 0:m.hook;!o||!i[o]||i[o](t.data)};return window.addEventListener("message",s),{mount:t=>{const o=typeof t=="string"?document.querySelector(t):t;if(!o)throw new Error("No se encontró el contenedor para montar el formulario");o.appendChild(e)},destroy:()=>{window.removeEventListener("message",s),e.remove()}}}n.loadForm=r,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "htech-pay",
|
|
3
|
-
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"description": "Payment SDK for HtechPay",
|
|
6
|
-
"main": "dist/htechPay.umd.js",
|
|
7
|
-
"module": "dist/htechPay.mjs",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"import": "./dist/htechPay.mjs",
|
|
11
|
-
"require": "./dist/htechPay.umd.js"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"dist"
|
|
16
|
-
],
|
|
17
|
-
"keywords": [
|
|
18
|
-
"sdk",
|
|
19
|
-
"pay",
|
|
20
|
-
"vite",
|
|
21
|
-
"htech",
|
|
22
|
-
"sanval"
|
|
23
|
-
],
|
|
24
|
-
"repository": {
|
|
25
|
-
"type": "git",
|
|
26
|
-
"url": "https://git.lagersoft.com/sanval-plus/componente-iframeform"
|
|
27
|
-
},
|
|
28
|
-
"author": "Htech",
|
|
29
|
-
"license": "MIT",
|
|
30
|
-
"scripts": {
|
|
31
|
-
"dev": "vite",
|
|
32
|
-
"build": "vite build",
|
|
33
|
-
"preview": "vite preview",
|
|
34
|
-
"publish:npm": "npm run build && npm publish --access public"
|
|
35
|
-
},
|
|
36
|
-
"devDependencies": {
|
|
37
|
-
"@vitejs/plugin-react": "^4.3.1",
|
|
38
|
-
"react": "^18.3.1",
|
|
39
|
-
"react-dom": "^18.3.1",
|
|
40
|
-
"vite": "^5.4.1"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "htech-pay",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.0.16-alpha",
|
|
5
|
+
"description": "Payment SDK for HtechPay",
|
|
6
|
+
"main": "dist/htechPay.umd.js",
|
|
7
|
+
"module": "dist/htechPay.mjs",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/htechPay.mjs",
|
|
11
|
+
"require": "./dist/htechPay.umd.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"keywords": [
|
|
18
|
+
"sdk",
|
|
19
|
+
"pay",
|
|
20
|
+
"vite",
|
|
21
|
+
"htech",
|
|
22
|
+
"sanval"
|
|
23
|
+
],
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://git.lagersoft.com/sanval-plus/componente-iframeform"
|
|
27
|
+
},
|
|
28
|
+
"author": "Htech",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"scripts": {
|
|
31
|
+
"dev": "vite",
|
|
32
|
+
"build": "vite build",
|
|
33
|
+
"preview": "vite preview",
|
|
34
|
+
"publish:npm": "npm run build && npm publish --access public --tag alpha"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
38
|
+
"react": "^18.3.1",
|
|
39
|
+
"react-dom": "^18.3.1",
|
|
40
|
+
"vite": "^5.4.1"
|
|
41
|
+
}
|
|
42
|
+
}
|