tonder-web-sdk 1.12.0-beta.17 → 1.12.0-beta.19
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/package.json +1 -1
- package/src/classes/LiteInlineCheckout.js +1 -2
- package/src/index-dev.js +5 -11
- package/src/index.html +1 -1
- package/v1/bundle.min.js +1 -1
- package/.idea/aws.xml +0 -17
- package/.idea/inspectionProfiles/profiles_settings.xml +0 -6
- package/.idea/misc.xml +0 -4
- package/.idea/prettier.xml +0 -6
- package/.idea/vcs.xml +0 -6
- package/.idea/workspace.xml +0 -150
package/package.json
CHANGED
|
@@ -181,7 +181,6 @@ export class LiteInlineCheckout extends BaseInlineCheckout {
|
|
|
181
181
|
);
|
|
182
182
|
const { vault_id, vault_url } = this.merchantData;
|
|
183
183
|
let skyflowTokens;
|
|
184
|
-
console.log("_checkout", card, payment_method);
|
|
185
184
|
if (!payment_method || payment_method !== "" || payment_method === null) {
|
|
186
185
|
if (typeof card === "string") {
|
|
187
186
|
skyflowTokens = {
|
|
@@ -191,7 +190,7 @@ export class LiteInlineCheckout extends BaseInlineCheckout {
|
|
|
191
190
|
skyflowTokens = await getSkyflowTokens({
|
|
192
191
|
vault_id: vault_id,
|
|
193
192
|
vault_url: vault_url,
|
|
194
|
-
data: card,
|
|
193
|
+
data: {...card, card_number: card.card_number.replace(/\s+/g, '')},
|
|
195
194
|
baseUrl: this.baseUrl,
|
|
196
195
|
apiKey: this.apiKeyTonder,
|
|
197
196
|
});
|
package/src/index-dev.js
CHANGED
|
@@ -157,6 +157,7 @@ function setupLiteInlineCheckout() {
|
|
|
157
157
|
});
|
|
158
158
|
|
|
159
159
|
const liteForm = document.getElementById("lite-payment-form");
|
|
160
|
+
const payButton = document.getElementById("pay-button");
|
|
160
161
|
liteForm.addEventListener("submit", async function (event) {
|
|
161
162
|
event.preventDefault();
|
|
162
163
|
|
|
@@ -169,6 +170,7 @@ function setupLiteInlineCheckout() {
|
|
|
169
170
|
};
|
|
170
171
|
|
|
171
172
|
try {
|
|
173
|
+
payButton.textContent = "Procesando..."
|
|
172
174
|
const paymentData = {
|
|
173
175
|
...checkoutData,
|
|
174
176
|
card: cardData,
|
|
@@ -179,6 +181,8 @@ function setupLiteInlineCheckout() {
|
|
|
179
181
|
} catch (error) {
|
|
180
182
|
console.error("Error en el pago:", error);
|
|
181
183
|
alert("Error al realizar el pago");
|
|
184
|
+
}finally {
|
|
185
|
+
payButton.textContent = "Pagar Ahora";
|
|
182
186
|
}
|
|
183
187
|
});
|
|
184
188
|
}
|
|
@@ -234,17 +238,7 @@ function loadMaskitoMask(){
|
|
|
234
238
|
};
|
|
235
239
|
|
|
236
240
|
const cvvOptions = {
|
|
237
|
-
mask: [
|
|
238
|
-
...Array(4).fill(/\d/),
|
|
239
|
-
" ",
|
|
240
|
-
...Array(4).fill(/\d/),
|
|
241
|
-
" ",
|
|
242
|
-
...Array(4).fill(/\d/),
|
|
243
|
-
" ",
|
|
244
|
-
...Array(4).fill(/\d/),
|
|
245
|
-
" ",
|
|
246
|
-
...Array(3).fill(/\d/),
|
|
247
|
-
],
|
|
241
|
+
mask: [...Array(3).fill(/\d/)],
|
|
248
242
|
};
|
|
249
243
|
|
|
250
244
|
// Aplicar Maskito a cada campo
|
package/src/index.html
CHANGED
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
<input class="input-md" type="text" id="cvv" placeholder="123" required>
|
|
150
150
|
</div>
|
|
151
151
|
</div>
|
|
152
|
-
<button type="submit" class="btn">Pagar Ahora</button>
|
|
152
|
+
<button type="submit" class="btn" id="pay-button">Pagar Ahora</button>
|
|
153
153
|
</form>
|
|
154
154
|
</div>
|
|
155
155
|
<div id="inline-content" class="tab-content">
|