tonder-web-sdk 1.16.3 → 1.16.6-beta.DEV-1433.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.
- package/README.md +22 -25
- package/package.json +10 -3
- package/types/common.d.ts +4 -0
- package/v1/bundle.min.js +1 -18
- package/.env-example +0 -1
- package/.husky/pre-commit +0 -4
- package/.prettierignore +0 -8
- package/.prettierrc +0 -10
- package/cypress/e2e/1-getting-started/todo.cy.js +0 -143
- package/cypress/e2e/2-advanced-examples/actions.cy.js +0 -299
- package/cypress/e2e/2-advanced-examples/aliasing.cy.js +0 -39
- package/cypress/e2e/2-advanced-examples/assertions.cy.js +0 -176
- package/cypress/e2e/2-advanced-examples/connectors.cy.js +0 -98
- package/cypress/e2e/2-advanced-examples/cookies.cy.js +0 -118
- package/cypress/e2e/2-advanced-examples/cypress_api.cy.js +0 -185
- package/cypress/e2e/2-advanced-examples/files.cy.js +0 -85
- package/cypress/e2e/2-advanced-examples/location.cy.js +0 -32
- package/cypress/e2e/2-advanced-examples/misc.cy.js +0 -104
- package/cypress/e2e/2-advanced-examples/navigation.cy.js +0 -56
- package/cypress/e2e/2-advanced-examples/network_requests.cy.js +0 -163
- package/cypress/e2e/2-advanced-examples/querying.cy.js +0 -114
- package/cypress/e2e/2-advanced-examples/spies_stubs_clocks.cy.js +0 -201
- package/cypress/e2e/2-advanced-examples/storage.cy.js +0 -110
- package/cypress/e2e/2-advanced-examples/traversal.cy.js +0 -121
- package/cypress/e2e/2-advanced-examples/utilities.cy.js +0 -108
- package/cypress/e2e/2-advanced-examples/viewport.cy.js +0 -58
- package/cypress/e2e/2-advanced-examples/waiting.cy.js +0 -30
- package/cypress/e2e/2-advanced-examples/window.cy.js +0 -22
- package/cypress/fixtures/example.json +0 -5
- package/cypress/support/commands.js +0 -25
- package/cypress/support/e2e.js +0 -20
- package/cypress.config.js +0 -9
- package/eslint.config.mjs +0 -15
- package/index.js.example +0 -50
- package/samples/react/README.md +0 -70
- package/samples/react/build/asset-manifest.json +0 -16
- package/samples/react/build/favicon.ico +0 -0
- package/samples/react/build/index.html +0 -1
- package/samples/react/build/logo192.png +0 -0
- package/samples/react/build/logo512.png +0 -0
- package/samples/react/build/manifest.json +0 -25
- package/samples/react/build/robots.txt +0 -3
- package/samples/react/build/static/css/main.073c9b0a.css +0 -2
- package/samples/react/build/static/css/main.073c9b0a.css.map +0 -1
- package/samples/react/build/static/js/787.b83ed06f.chunk.js +0 -2
- package/samples/react/build/static/js/787.b83ed06f.chunk.js.map +0 -1
- package/samples/react/build/static/js/main.0a848807.js +0 -3
- package/samples/react/build/static/js/main.0a848807.js.LICENSE.txt +0 -39
- package/samples/react/build/static/js/main.0a848807.js.map +0 -1
- package/samples/react/build/static/media/sdk-icons.b491623214b2af4cccdb.png +0 -0
- package/samples/react/package-lock.json +0 -28973
- package/samples/react/package.json +0 -44
- package/samples/react/public/favicon.ico +0 -0
- package/samples/react/public/index.html +0 -43
- package/samples/react/public/logo192.png +0 -0
- package/samples/react/public/logo512.png +0 -0
- package/samples/react/public/manifest.json +0 -25
- package/samples/react/public/robots.txt +0 -3
- package/samples/react/src/App.css +0 -38
- package/samples/react/src/App.js +0 -22
- package/samples/react/src/App.test.js +0 -8
- package/samples/react/src/assets/img/sdk-icons.png +0 -0
- package/samples/react/src/components/Cart.js +0 -29
- package/samples/react/src/components/ProductCard.js +0 -27
- package/samples/react/src/context/CartContext.js +0 -116
- package/samples/react/src/index.css +0 -13
- package/samples/react/src/index.js +0 -17
- package/samples/react/src/logo.svg +0 -1
- package/samples/react/src/reportWebVitals.js +0 -13
- package/samples/react/src/screens/Checkout.js +0 -82
- package/samples/react/src/screens/Store.js +0 -21
- package/samples/react/src/setupTests.js +0 -5
- package/samples/react/src/storeProducts.js +0 -30
- package/src/classes/3dsHandler.js +0 -199
- package/src/classes/BaseInlineCheckout.js +0 -303
- package/src/classes/LiteInlineCheckout.js +0 -217
- package/src/classes/checkout.js +0 -129
- package/src/classes/globalLoader.js +0 -31
- package/src/classes/inlineCheckout.js +0 -713
- package/src/data/apmApi.js +0 -38
- package/src/data/businessApi.js +0 -16
- package/src/data/cardApi.js +0 -134
- package/src/data/checkoutApi.js +0 -92
- package/src/data/customerApi.js +0 -32
- package/src/data/index.js +0 -17
- package/src/data/openPayApi.js +0 -16
- package/src/data/skyflowApi.js +0 -16
- package/src/helpers/skyflow.js +0 -370
- package/src/helpers/styles.js +0 -90
- package/src/helpers/template-skeleton.js +0 -59
- package/src/helpers/template.js +0 -1104
- package/src/helpers/utils.js +0 -257
- package/src/helpers/validations.js +0 -53
- package/src/index-dev.js +0 -329
- package/src/index.html +0 -180
- package/src/index.js +0 -21
- package/src/shared/catalog/commonLogosCatalog.js +0 -7
- package/src/shared/catalog/paymentMethodsCatalog.js +0 -246
- package/src/shared/constants/colors.js +0 -15
- package/src/shared/constants/displayMode.js +0 -4
- package/src/shared/constants/fieldPathNames.js +0 -4
- package/src/shared/constants/htmlTonderIds.js +0 -18
- package/src/shared/constants/messages.js +0 -11
- package/src/shared/constants/paymentMethodAPM.js +0 -63
- package/src/shared/constants/tonderUrl.js +0 -8
- package/webpack.config.js +0 -77
package/src/index.html
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
7
|
-
<style>
|
|
8
|
-
#checkout-container {
|
|
9
|
-
display: flex;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
}
|
|
12
|
-
#pay-button {
|
|
13
|
-
padding: 10px 20px;
|
|
14
|
-
margin-top: 30px;
|
|
15
|
-
background-color: #4a90e2;
|
|
16
|
-
color: white;
|
|
17
|
-
border: none;
|
|
18
|
-
border-radius: 5px;
|
|
19
|
-
font-size: 16px;
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
transition: background-color 0.3s;
|
|
22
|
-
}
|
|
23
|
-
#payButton:hover {
|
|
24
|
-
background-color: #357abd;
|
|
25
|
-
}
|
|
26
|
-
.cart-details {
|
|
27
|
-
font-size: 3rem;
|
|
28
|
-
font-weight: bold;
|
|
29
|
-
padding: 2rem;
|
|
30
|
-
display: flex;
|
|
31
|
-
justify-content: center;
|
|
32
|
-
}
|
|
33
|
-
.button-container {
|
|
34
|
-
width: 100%;
|
|
35
|
-
display: flex;
|
|
36
|
-
justify-content: center;
|
|
37
|
-
}
|
|
38
|
-
.tab-container {
|
|
39
|
-
display: flex;
|
|
40
|
-
justify-content: center;
|
|
41
|
-
margin-bottom: 20px;
|
|
42
|
-
}
|
|
43
|
-
.tab {
|
|
44
|
-
padding: 10px 20px;
|
|
45
|
-
cursor: pointer;
|
|
46
|
-
background-color: #f1f1f1;
|
|
47
|
-
border: 1px solid #ccc;
|
|
48
|
-
border-bottom: none;
|
|
49
|
-
margin-right: 5px;
|
|
50
|
-
}
|
|
51
|
-
.tab.active {
|
|
52
|
-
background-color: #fff;
|
|
53
|
-
border-bottom: 1px solid #4a90e2;
|
|
54
|
-
}
|
|
55
|
-
.tab-content {
|
|
56
|
-
display: none;
|
|
57
|
-
width: 100%;
|
|
58
|
-
}
|
|
59
|
-
.card-form {
|
|
60
|
-
max-width: 400px;
|
|
61
|
-
margin: 0 auto;
|
|
62
|
-
}
|
|
63
|
-
.form-group {
|
|
64
|
-
margin-bottom: 1.5rem;
|
|
65
|
-
}
|
|
66
|
-
.form-group label {
|
|
67
|
-
display: block;
|
|
68
|
-
margin-bottom: 0.5rem;
|
|
69
|
-
font-weight: 500;
|
|
70
|
-
}
|
|
71
|
-
.form-group input {
|
|
72
|
-
width: 100%;
|
|
73
|
-
padding: 0.75rem;
|
|
74
|
-
border: 1px solid #ddd;
|
|
75
|
-
border-radius: 4px;
|
|
76
|
-
font-size: 1rem;
|
|
77
|
-
transition: border-color 0.3s ease;
|
|
78
|
-
}
|
|
79
|
-
.form-group input:focus {
|
|
80
|
-
outline: none;
|
|
81
|
-
border-color: #4a90e2;
|
|
82
|
-
}
|
|
83
|
-
.form-row {
|
|
84
|
-
display: flex;
|
|
85
|
-
gap: 3rem;
|
|
86
|
-
}
|
|
87
|
-
.form-row .form-group {
|
|
88
|
-
flex: 1;
|
|
89
|
-
}
|
|
90
|
-
.btn {
|
|
91
|
-
display: inline-block;
|
|
92
|
-
padding: 0.75rem 1.5rem;
|
|
93
|
-
background-color: #4a90e2;
|
|
94
|
-
color: #fff;
|
|
95
|
-
border: none;
|
|
96
|
-
border-radius: 4px;
|
|
97
|
-
font-size: 1rem;
|
|
98
|
-
cursor: pointer;
|
|
99
|
-
transition: background-color 0.3s ease;
|
|
100
|
-
}
|
|
101
|
-
.btn:hover {
|
|
102
|
-
background-color: #357abd;
|
|
103
|
-
}
|
|
104
|
-
.cart-details {
|
|
105
|
-
text-align: center;
|
|
106
|
-
font-size: 1.5rem;
|
|
107
|
-
margin-bottom: 2rem;
|
|
108
|
-
}
|
|
109
|
-
.input-md {
|
|
110
|
-
max-width: 100%;
|
|
111
|
-
}
|
|
112
|
-
.invalid {
|
|
113
|
-
border: 2px solid red !important;
|
|
114
|
-
}
|
|
115
|
-
</style>
|
|
116
|
-
</head>
|
|
117
|
-
|
|
118
|
-
<body>
|
|
119
|
-
<div class="checkout-container">
|
|
120
|
-
<div class="tab-container">
|
|
121
|
-
<a
|
|
122
|
-
href="?mode=inline"
|
|
123
|
-
class="tab"
|
|
124
|
-
data-mode="inline"
|
|
125
|
-
onclick="switchTab('inline'); return false;"
|
|
126
|
-
>Inline Checkout</a
|
|
127
|
-
>
|
|
128
|
-
<a href="?mode=lite" class="tab" data-mode="lite" onclick="switchTab('lite'); return false;"
|
|
129
|
-
>Lite Inline Checkout</a
|
|
130
|
-
>
|
|
131
|
-
</div>
|
|
132
|
-
|
|
133
|
-
<div id="lite-content" class="tab-content">
|
|
134
|
-
<div class="cart-details">
|
|
135
|
-
<span>Total </span>
|
|
136
|
-
<div id="cart-total-lite">$399</div>
|
|
137
|
-
</div>
|
|
138
|
-
<form id="lite-payment-form" class="card-form">
|
|
139
|
-
<div class="form-group">
|
|
140
|
-
<label for="card-number">Número de Tarjeta</label>
|
|
141
|
-
<input type="text" id="card-number" placeholder="1234 5678 9012 3456" required />
|
|
142
|
-
</div>
|
|
143
|
-
<div class="form-group">
|
|
144
|
-
<label for="card-name">Nombre en la Tarjeta</label>
|
|
145
|
-
<input type="text" id="card-name" placeholder="John Doe" required />
|
|
146
|
-
</div>
|
|
147
|
-
<div class="form-row">
|
|
148
|
-
<div class="form-group">
|
|
149
|
-
<label for="month">Fecha de Expiración</label>
|
|
150
|
-
<div class="form-row">
|
|
151
|
-
<input class="input-md" type="text" id="month" placeholder="MM" required />
|
|
152
|
-
<input class="input-md" type="text" id="year" placeholder="AA" required />
|
|
153
|
-
</div>
|
|
154
|
-
</div>
|
|
155
|
-
<div class="form-group">
|
|
156
|
-
<label for="cvv">CVV</label>
|
|
157
|
-
<input class="input-md" type="text" id="cvv" placeholder="123" required />
|
|
158
|
-
</div>
|
|
159
|
-
</div>
|
|
160
|
-
<button type="submit" class="btn" id="pay-button-lite">Pagar Ahora</button>
|
|
161
|
-
</form>
|
|
162
|
-
</div>
|
|
163
|
-
<div id="inline-content" class="tab-content">
|
|
164
|
-
<div class="cart-details">
|
|
165
|
-
<span>Total </span>
|
|
166
|
-
<div id="cart-total">$399</div>
|
|
167
|
-
</div>
|
|
168
|
-
<form id="payment-form">
|
|
169
|
-
<div id="tonder-checkout"></div>
|
|
170
|
-
</form>
|
|
171
|
-
<div class="button-container">
|
|
172
|
-
<button id="pay-button">Pagar</button>
|
|
173
|
-
</div>
|
|
174
|
-
</div>
|
|
175
|
-
</div>
|
|
176
|
-
</body>
|
|
177
|
-
<script src="https://js.skyflow.com/v1/index.js"></script>
|
|
178
|
-
<script src="https://openpay.s3.amazonaws.com/openpay.v1.min.js"></script>
|
|
179
|
-
<script src="https://openpay.s3.amazonaws.com/openpay-data.v1.min.js"></script>
|
|
180
|
-
</html>
|
package/src/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Checkout } from "./classes/checkout";
|
|
2
|
-
import { InlineCheckout } from "./classes/inlineCheckout";
|
|
3
|
-
import { LiteInlineCheckout } from "./classes/LiteInlineCheckout";
|
|
4
|
-
import {
|
|
5
|
-
validateCVV,
|
|
6
|
-
validateCardNumber,
|
|
7
|
-
validateCardholderName,
|
|
8
|
-
validateExpirationMonth,
|
|
9
|
-
validateExpirationYear,
|
|
10
|
-
} from "./helpers/validations";
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
Checkout,
|
|
14
|
-
InlineCheckout,
|
|
15
|
-
LiteInlineCheckout,
|
|
16
|
-
validateCVV,
|
|
17
|
-
validateCardNumber,
|
|
18
|
-
validateCardholderName,
|
|
19
|
-
validateExpirationMonth,
|
|
20
|
-
validateExpirationYear,
|
|
21
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
const COMMON_LOGOS = Object.freeze({
|
|
2
|
-
pci: "https://d35a75syrgujp0.cloudfront.net/tonder/logo-pci-500.png",
|
|
3
|
-
tonderBlue: "https://d35a75syrgujp0.cloudfront.net/tonder/logo-tonder-blue.png",
|
|
4
|
-
tonderWhite: "https://d35a75syrgujp0.cloudfront.net/tonder/logo-tonder-white.png",
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
export { COMMON_LOGOS };
|
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import { clearSpace } from "../../helpers/utils";
|
|
2
|
-
import { PAYMENT_METHOD_APM } from "../constants/paymentMethodAPM";
|
|
3
|
-
|
|
4
|
-
const PAYMENT_METHODS_CATALOG = {
|
|
5
|
-
[PAYMENT_METHOD_APM.SORIANA]: {
|
|
6
|
-
label: "Soriana",
|
|
7
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/soriana.png",
|
|
8
|
-
},
|
|
9
|
-
[PAYMENT_METHOD_APM.OXXO]: {
|
|
10
|
-
label: "Oxxo",
|
|
11
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/oxxo.png",
|
|
12
|
-
},
|
|
13
|
-
[PAYMENT_METHOD_APM.CODI]: {
|
|
14
|
-
label: "CoDi",
|
|
15
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/codi.png",
|
|
16
|
-
},
|
|
17
|
-
[PAYMENT_METHOD_APM.SPEI]: {
|
|
18
|
-
label: "SPEI",
|
|
19
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/spei.png",
|
|
20
|
-
},
|
|
21
|
-
[PAYMENT_METHOD_APM.PAYPAL]: {
|
|
22
|
-
label: "Paypal",
|
|
23
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/paypal.png",
|
|
24
|
-
},
|
|
25
|
-
[PAYMENT_METHOD_APM.COMERCIALMEXICANA]: {
|
|
26
|
-
label: "Comercial Mexicana",
|
|
27
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/comercial_exicana.png",
|
|
28
|
-
},
|
|
29
|
-
[PAYMENT_METHOD_APM.BANCOMER]: {
|
|
30
|
-
label: "Bancomer",
|
|
31
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/bancomer.png",
|
|
32
|
-
},
|
|
33
|
-
[PAYMENT_METHOD_APM.WALMART]: {
|
|
34
|
-
label: "Walmart",
|
|
35
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/walmart.png",
|
|
36
|
-
},
|
|
37
|
-
[PAYMENT_METHOD_APM.BODEGA]: {
|
|
38
|
-
label: "Bodega Aurrera",
|
|
39
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/bodega_aurrera.png",
|
|
40
|
-
},
|
|
41
|
-
[PAYMENT_METHOD_APM.SAMSCLUB]: {
|
|
42
|
-
label: "Sam´s Club",
|
|
43
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/sams_club.png",
|
|
44
|
-
},
|
|
45
|
-
[PAYMENT_METHOD_APM.SUPERAMA]: {
|
|
46
|
-
label: "Superama",
|
|
47
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/superama.png",
|
|
48
|
-
},
|
|
49
|
-
[PAYMENT_METHOD_APM.CALIMAX]: {
|
|
50
|
-
label: "Calimax",
|
|
51
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/calimax.png",
|
|
52
|
-
},
|
|
53
|
-
[PAYMENT_METHOD_APM.EXTRA]: {
|
|
54
|
-
label: "Tiendas Extra",
|
|
55
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/tiendas_extra.png",
|
|
56
|
-
},
|
|
57
|
-
[PAYMENT_METHOD_APM.CIRCULOK]: {
|
|
58
|
-
label: "Círculo K",
|
|
59
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/circulo_k.png",
|
|
60
|
-
},
|
|
61
|
-
[PAYMENT_METHOD_APM.SEVEN11]: {
|
|
62
|
-
label: "7 Eleven",
|
|
63
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/7_eleven.png",
|
|
64
|
-
},
|
|
65
|
-
[PAYMENT_METHOD_APM.TELECOMM]: {
|
|
66
|
-
label: "Telecomm",
|
|
67
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/telecomm.png",
|
|
68
|
-
},
|
|
69
|
-
[PAYMENT_METHOD_APM.BANORTE]: {
|
|
70
|
-
label: "Banorte",
|
|
71
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/banorte.png",
|
|
72
|
-
},
|
|
73
|
-
[PAYMENT_METHOD_APM.BENAVIDES]: {
|
|
74
|
-
label: "Farmacias Benavides",
|
|
75
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/farmacias_benavides.png",
|
|
76
|
-
},
|
|
77
|
-
[PAYMENT_METHOD_APM.DELAHORRO]: {
|
|
78
|
-
label: "Farmacias del Ahorro",
|
|
79
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/farmacias_ahorro.png",
|
|
80
|
-
},
|
|
81
|
-
[PAYMENT_METHOD_APM.ELASTURIANO]: {
|
|
82
|
-
label: "El Asturiano",
|
|
83
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/asturiano.png",
|
|
84
|
-
},
|
|
85
|
-
[PAYMENT_METHOD_APM.WALDOS]: {
|
|
86
|
-
label: "Waldos",
|
|
87
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/waldos.png",
|
|
88
|
-
},
|
|
89
|
-
[PAYMENT_METHOD_APM.ALSUPER]: {
|
|
90
|
-
label: "Alsuper",
|
|
91
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/al_super.png",
|
|
92
|
-
},
|
|
93
|
-
[PAYMENT_METHOD_APM.KIOSKO]: {
|
|
94
|
-
label: "Kiosko",
|
|
95
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/kiosko.png",
|
|
96
|
-
},
|
|
97
|
-
[PAYMENT_METHOD_APM.STAMARIA]: {
|
|
98
|
-
label: "Farmacias Santa María",
|
|
99
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/farmacias_santa_maria.png",
|
|
100
|
-
},
|
|
101
|
-
[PAYMENT_METHOD_APM.LAMASBARATA]: {
|
|
102
|
-
label: "Farmacias la más barata",
|
|
103
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/farmacias_barata.png",
|
|
104
|
-
},
|
|
105
|
-
[PAYMENT_METHOD_APM.FARMROMA]: {
|
|
106
|
-
label: "Farmacias Roma",
|
|
107
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/farmacias_roma.png",
|
|
108
|
-
},
|
|
109
|
-
[PAYMENT_METHOD_APM.FARMUNION]: {
|
|
110
|
-
label: "Pago en Farmacias Unión",
|
|
111
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/farmacias_union.png",
|
|
112
|
-
},
|
|
113
|
-
[PAYMENT_METHOD_APM.FARMATODO]: {
|
|
114
|
-
label: "Pago en Farmacias Farmatodo",
|
|
115
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/farmacias_farmatodo.png ",
|
|
116
|
-
},
|
|
117
|
-
[PAYMENT_METHOD_APM.SFDEASIS]: {
|
|
118
|
-
label: "Pago en Farmacias San Francisco de Asís",
|
|
119
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/farmacias_san_francisco.png",
|
|
120
|
-
},
|
|
121
|
-
[PAYMENT_METHOD_APM.FARM911]: {
|
|
122
|
-
label: "Farmacias 911",
|
|
123
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
124
|
-
},
|
|
125
|
-
[PAYMENT_METHOD_APM.FARMECONOMICAS]: {
|
|
126
|
-
label: "Farmacias Economicas",
|
|
127
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
128
|
-
},
|
|
129
|
-
[PAYMENT_METHOD_APM.FARMMEDICITY]: {
|
|
130
|
-
label: "Farmacias Medicity",
|
|
131
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
132
|
-
},
|
|
133
|
-
[PAYMENT_METHOD_APM.RIANXEIRA]: {
|
|
134
|
-
label: "Rianxeira",
|
|
135
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
136
|
-
},
|
|
137
|
-
[PAYMENT_METHOD_APM.WESTERNUNION]: {
|
|
138
|
-
label: "Western Union",
|
|
139
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
140
|
-
},
|
|
141
|
-
[PAYMENT_METHOD_APM.ZONAPAGO]: {
|
|
142
|
-
label: "Zona Pago",
|
|
143
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
144
|
-
},
|
|
145
|
-
[PAYMENT_METHOD_APM.CAJALOSANDES]: {
|
|
146
|
-
label: "Caja Los Andes",
|
|
147
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
148
|
-
},
|
|
149
|
-
[PAYMENT_METHOD_APM.CAJAPAITA]: {
|
|
150
|
-
label: "Caja Paita",
|
|
151
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
152
|
-
},
|
|
153
|
-
[PAYMENT_METHOD_APM.CAJASANTA]: {
|
|
154
|
-
label: "Caja Santa",
|
|
155
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
156
|
-
},
|
|
157
|
-
[PAYMENT_METHOD_APM.CAJASULLANA]: {
|
|
158
|
-
label: "Caja Sullana",
|
|
159
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
160
|
-
},
|
|
161
|
-
[PAYMENT_METHOD_APM.CAJATRUJILLO]: {
|
|
162
|
-
label: "Caja Trujillo",
|
|
163
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
164
|
-
},
|
|
165
|
-
[PAYMENT_METHOD_APM.EDPYME]: {
|
|
166
|
-
label: "Edpyme",
|
|
167
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
168
|
-
},
|
|
169
|
-
[PAYMENT_METHOD_APM.KASNET]: {
|
|
170
|
-
label: "KasNet",
|
|
171
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
172
|
-
},
|
|
173
|
-
[PAYMENT_METHOD_APM.NORANDINO]: {
|
|
174
|
-
label: "Norandino",
|
|
175
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
176
|
-
},
|
|
177
|
-
[PAYMENT_METHOD_APM.QAPAQ]: {
|
|
178
|
-
label: "Qapaq",
|
|
179
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
180
|
-
},
|
|
181
|
-
[PAYMENT_METHOD_APM.RAIZ]: {
|
|
182
|
-
label: "Raiz",
|
|
183
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
184
|
-
},
|
|
185
|
-
[PAYMENT_METHOD_APM.PAYSER]: {
|
|
186
|
-
label: "Paysera",
|
|
187
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
188
|
-
},
|
|
189
|
-
[PAYMENT_METHOD_APM.WUNION]: {
|
|
190
|
-
label: "Western Union",
|
|
191
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
192
|
-
},
|
|
193
|
-
[PAYMENT_METHOD_APM.BANCOCONTINENTAL]: {
|
|
194
|
-
label: "Banco Continental",
|
|
195
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
196
|
-
},
|
|
197
|
-
[PAYMENT_METHOD_APM.GMONEY]: {
|
|
198
|
-
label: "Go money",
|
|
199
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
200
|
-
},
|
|
201
|
-
[PAYMENT_METHOD_APM.GOPAY]: {
|
|
202
|
-
label: "Go pay",
|
|
203
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
204
|
-
},
|
|
205
|
-
[PAYMENT_METHOD_APM.WU]: {
|
|
206
|
-
label: "Western Union",
|
|
207
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
208
|
-
},
|
|
209
|
-
[PAYMENT_METHOD_APM.PUNTOSHEY]: {
|
|
210
|
-
label: "Puntoshey",
|
|
211
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
212
|
-
},
|
|
213
|
-
[PAYMENT_METHOD_APM.AMPM]: {
|
|
214
|
-
label: "Ampm",
|
|
215
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
216
|
-
},
|
|
217
|
-
[PAYMENT_METHOD_APM.JUMBOMARKET]: {
|
|
218
|
-
label: "Jumbomarket",
|
|
219
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
220
|
-
},
|
|
221
|
-
[PAYMENT_METHOD_APM.SMELPUEBLO]: {
|
|
222
|
-
label: "Smelpueblo",
|
|
223
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
224
|
-
},
|
|
225
|
-
[PAYMENT_METHOD_APM.BAM]: {
|
|
226
|
-
label: "Bam",
|
|
227
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
228
|
-
},
|
|
229
|
-
[PAYMENT_METHOD_APM.REFACIL]: {
|
|
230
|
-
label: "Refacil",
|
|
231
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
232
|
-
},
|
|
233
|
-
[PAYMENT_METHOD_APM.ACYVALORES]: {
|
|
234
|
-
label: "Acyvalores",
|
|
235
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
236
|
-
},
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
export const getPaymentMethodDetails = scheme_data => {
|
|
240
|
-
const scheme = clearSpace(scheme_data.toUpperCase());
|
|
241
|
-
const _default = {
|
|
242
|
-
icon: "https://d35a75syrgujp0.cloudfront.net/payment_methods/store.png",
|
|
243
|
-
label: "",
|
|
244
|
-
};
|
|
245
|
-
return PAYMENT_METHODS_CATALOG[scheme] || _default;
|
|
246
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export const COLORS = Object.freeze({
|
|
2
|
-
white: "#FFFFFF",
|
|
3
|
-
grayDark: "#1A1A1A",
|
|
4
|
-
borderLight: "#CED0D1",
|
|
5
|
-
grayExtraLight: "#B9B9B9",
|
|
6
|
-
borderMedium: "#B9B9B9",
|
|
7
|
-
borderDark: "#B0B2B3",
|
|
8
|
-
grayMedium: "#333333",
|
|
9
|
-
purple: "#5E48FC",
|
|
10
|
-
redExtraLight: "#FDE7E7",
|
|
11
|
-
red: "#832828",
|
|
12
|
-
greenExtraLight: "#ECFDE7",
|
|
13
|
-
green: "#28832C",
|
|
14
|
-
black: "#000000",
|
|
15
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export const HTML_IDS = Object.freeze({
|
|
2
|
-
globalLoader: "global-loader",
|
|
3
|
-
tonderContainer: "tndr-container",
|
|
4
|
-
tonderCheckout: "tonder-checkout",
|
|
5
|
-
tonderPayButton: "tonderPayButton",
|
|
6
|
-
tonderCancelButton: "tonderCancelButton",
|
|
7
|
-
msgError: "msgError",
|
|
8
|
-
msgErrorText: "tndr-msgErrorText",
|
|
9
|
-
msgNotification: "msgNotification",
|
|
10
|
-
msgNotificationText: "tndr-msgNotificationText",
|
|
11
|
-
cardsListContainer: "cardsListContainer",
|
|
12
|
-
collectCardholderName: "collectCardholderName",
|
|
13
|
-
collectCardNumber: "collectCardNumber",
|
|
14
|
-
collectExpirationMonth: "collectExpirationMonth",
|
|
15
|
-
collectExpirationYear: "collectExpirationYear",
|
|
16
|
-
collectCvv: "collectCvv",
|
|
17
|
-
apmsListContainer: "apmsListContainer",
|
|
18
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export const MESSAGES = Object.freeze({
|
|
2
|
-
saveCardError: "Ha ocurrido un error guardando la tarjeta. Inténtalo nuevamente.",
|
|
3
|
-
removeCardError: "Ha ocurrido un error eliminado la tarjeta. Inténtalo nuevamente.",
|
|
4
|
-
getCardsError: "Ha ocurrido un error obteniendo las tarjetas del customer. Inténtalo nuevamente.",
|
|
5
|
-
cardExist: "La tarjeta fue registrada previamente.",
|
|
6
|
-
removedCard: "Card deleted successfully",
|
|
7
|
-
errorCheckout: "No se ha podido procesar el pago",
|
|
8
|
-
cardSaved: "Tarjeta registrada con éxito.",
|
|
9
|
-
getPaymentMethodsError:
|
|
10
|
-
"Ha ocurrido un error obteniendo las métodos de pago del customer. Inténtalo nuevamente.",
|
|
11
|
-
});
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
const PAYMENT_METHOD_APM = Object.freeze({
|
|
2
|
-
SORIANA: "SORIANA",
|
|
3
|
-
OXXO: "OXXO",
|
|
4
|
-
SPEI: "SPEI",
|
|
5
|
-
CODI: "CODI",
|
|
6
|
-
MERCADOPAGO: "MERCADOPAGO",
|
|
7
|
-
PAYPAL: "PAYPAL",
|
|
8
|
-
COMERCIALMEXICANA: "COMERCIALMEXICANA",
|
|
9
|
-
BANCOMER: "BANCOMER",
|
|
10
|
-
WALMART: "WALMART",
|
|
11
|
-
BODEGA: "BODEGA",
|
|
12
|
-
SAMSCLUB: "SAMSCLUB",
|
|
13
|
-
SUPERAMA: "SUPERAMA",
|
|
14
|
-
CALIMAX: "CALIMAX",
|
|
15
|
-
EXTRA: "EXTRA",
|
|
16
|
-
CIRCULOK: "CIRCULOK",
|
|
17
|
-
SEVEN11: "7ELEVEN",
|
|
18
|
-
TELECOMM: "TELECOMM",
|
|
19
|
-
BANORTE: "BANORTE",
|
|
20
|
-
BENAVIDES: "BENAVIDES",
|
|
21
|
-
DELAHORRO: "DELAHORRO",
|
|
22
|
-
ELASTURIANO: "ELASTURIANO",
|
|
23
|
-
WALDOS: "WALDOS",
|
|
24
|
-
ALSUPER: "ALSUPER",
|
|
25
|
-
KIOSKO: "KIOSKO",
|
|
26
|
-
STAMARIA: "STAMARIA",
|
|
27
|
-
LAMASBARATA: "LAMASBARATA",
|
|
28
|
-
FARMROMA: "FARMROMA",
|
|
29
|
-
FARMUNION: "FARMUNION",
|
|
30
|
-
FARMATODO: "FARMATODO",
|
|
31
|
-
SFDEASIS: "SFDEASIS",
|
|
32
|
-
FARM911: "FARM911",
|
|
33
|
-
FARMECONOMICAS: "FARMECONOMICAS",
|
|
34
|
-
FARMMEDICITY: "FARMMEDICITY",
|
|
35
|
-
RIANXEIRA: "RIANXEIRA",
|
|
36
|
-
WESTERNUNION: "WESTERNUNION",
|
|
37
|
-
ZONAPAGO: "ZONAPAGO",
|
|
38
|
-
CAJALOSANDES: "CAJALOSANDES",
|
|
39
|
-
CAJAPAITA: "CAJAPAITA",
|
|
40
|
-
CAJASANTA: "CAJASANTA",
|
|
41
|
-
CAJASULLANA: "CAJASULLANA",
|
|
42
|
-
CAJATRUJILLO: "CAJATRUJILLO",
|
|
43
|
-
EDPYME: "EDPYME",
|
|
44
|
-
KASNET: "KASNET",
|
|
45
|
-
NORANDINO: "NORANDINO",
|
|
46
|
-
QAPAQ: "QAPAQ",
|
|
47
|
-
RAIZ: "RAIZ",
|
|
48
|
-
PAYSER: "PAYSER",
|
|
49
|
-
WUNION: "WUNION",
|
|
50
|
-
BANCOCONTINENTAL: "BANCOCONTINENTAL",
|
|
51
|
-
GMONEY: "GMONEY",
|
|
52
|
-
GOPAY: "GOPAY",
|
|
53
|
-
WU: "WU",
|
|
54
|
-
PUNTOSHEY: "PUNTOSHEY",
|
|
55
|
-
AMPM: "AMPM",
|
|
56
|
-
JUMBOMARKET: "JUMBOMARKET",
|
|
57
|
-
SMELPUEBLO: "SMELPUEBLO",
|
|
58
|
-
BAM: "BAM",
|
|
59
|
-
REFACIL: "REFACIL",
|
|
60
|
-
ACYVALORES: "ACYVALORES",
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
export { PAYMENT_METHOD_APM };
|
package/webpack.config.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
3
|
-
const TerserPlugin = require('terser-webpack-plugin');
|
|
4
|
-
const webpack = require('webpack');
|
|
5
|
-
|
|
6
|
-
module.exports = (env, argv) => {
|
|
7
|
-
const isProduction = argv.mode === 'production';
|
|
8
|
-
|
|
9
|
-
const plugins = [
|
|
10
|
-
new webpack.DefinePlugin({
|
|
11
|
-
'process.env.BASE_URL': JSON.stringify(process.env.BASE_URL),
|
|
12
|
-
}),
|
|
13
|
-
new webpack.IgnorePlugin({
|
|
14
|
-
resourceRegExp: /samples\//
|
|
15
|
-
}),
|
|
16
|
-
];
|
|
17
|
-
|
|
18
|
-
if (isProduction) {
|
|
19
|
-
plugins.push(
|
|
20
|
-
new webpack.IgnorePlugin({
|
|
21
|
-
resourceRegExp: /^@maskito\/core$/,
|
|
22
|
-
})
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
if (!isProduction) {
|
|
26
|
-
plugins.push(new HtmlWebpackPlugin({
|
|
27
|
-
template: 'src/index.html'
|
|
28
|
-
}));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return {
|
|
32
|
-
mode: isProduction ? 'production' : 'development',
|
|
33
|
-
entry: isProduction ? './src/index.js': './src/index-dev.js',
|
|
34
|
-
output: {
|
|
35
|
-
path: path.resolve(__dirname, 'v1'),
|
|
36
|
-
filename: isProduction ? 'bundle.min.js' : 'bundle.js',
|
|
37
|
-
library: 'TonderSdk',
|
|
38
|
-
libraryTarget: 'umd',
|
|
39
|
-
globalObject: 'this',
|
|
40
|
-
},
|
|
41
|
-
devtool: isProduction ? false : 'inline-source-map',
|
|
42
|
-
devServer: {
|
|
43
|
-
static: {
|
|
44
|
-
directory: path.join(__dirname, 'dist'),
|
|
45
|
-
},
|
|
46
|
-
host: '0.0.0.0',
|
|
47
|
-
port: 8080,
|
|
48
|
-
allowedHosts: 'all',
|
|
49
|
-
},
|
|
50
|
-
module: {
|
|
51
|
-
rules: [
|
|
52
|
-
{
|
|
53
|
-
test: /\.css$/,
|
|
54
|
-
use: ['style-loader', 'css-loader'],
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
test: /\.js$/,
|
|
58
|
-
exclude: /node_modules/,
|
|
59
|
-
use: {
|
|
60
|
-
loader: 'babel-loader',
|
|
61
|
-
options: {
|
|
62
|
-
presets: ['@babel/preset-env'],
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
},
|
|
68
|
-
plugins: plugins,
|
|
69
|
-
optimization: {
|
|
70
|
-
minimizer: [
|
|
71
|
-
new TerserPlugin({
|
|
72
|
-
extractComments: false,
|
|
73
|
-
}),
|
|
74
|
-
],
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
};
|