tonder-web-sdk 1.10.2 → 1.10.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.
- package/package.json +1 -1
- package/src/classes/inlineCheckout.js +6 -13
- package/src/helpers/template.js +0 -6
- package/v1/bundle.min.js +1 -1
package/package.json
CHANGED
|
@@ -292,7 +292,7 @@ export class InlineCheckout {
|
|
|
292
292
|
return await customerRegister(this.baseUrl, this.apiKeyTonder, customer, signal);
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
async #mountTonder(getCards =
|
|
295
|
+
async #mountTonder(getCards = false) {
|
|
296
296
|
this.#mountPayButton()
|
|
297
297
|
try {
|
|
298
298
|
const {
|
|
@@ -304,18 +304,11 @@ export class InlineCheckout {
|
|
|
304
304
|
const customerResponse = await this.getCustomer({ email: this.email });
|
|
305
305
|
if ("auth_token" in customerResponse) {
|
|
306
306
|
const { auth_token } = customerResponse
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
const cards = await getCustomerCards(this.baseUrl, auth_token);
|
|
313
|
-
saveCardCheckbox.style.display = '';
|
|
314
|
-
|
|
315
|
-
if ("cards" in cards) {
|
|
316
|
-
const cardsMapped = cards.cards.map(mapCards)
|
|
317
|
-
this.#loadCardsList(cardsMapped, auth_token)
|
|
318
|
-
}
|
|
307
|
+
const cards = await getCustomerCards(this.baseUrl, auth_token);
|
|
308
|
+
|
|
309
|
+
if ("cards" in cards) {
|
|
310
|
+
const cardsMapped = cards.cards.map(mapCards)
|
|
311
|
+
this.#loadCardsList(cardsMapped, auth_token)
|
|
319
312
|
}
|
|
320
313
|
}
|
|
321
314
|
}
|
package/src/helpers/template.js
CHANGED
|
@@ -19,12 +19,6 @@ export const cardTemplate = `
|
|
|
19
19
|
<div id="collectExpirationYear" class="expiration-year"></div>
|
|
20
20
|
<div id="collectCvv" class="empty-div"></div>
|
|
21
21
|
</div>
|
|
22
|
-
<div class="checkbox" id="save-card-container">
|
|
23
|
-
<input id="save-checkout-card" type="checkbox">
|
|
24
|
-
<label for="save-checkout-card">
|
|
25
|
-
Guardar tarjeta para futuros pagos
|
|
26
|
-
</label>
|
|
27
|
-
</div>
|
|
28
22
|
<div id="msgError"></div>
|
|
29
23
|
<div id="msgNotification"></div>
|
|
30
24
|
</div>
|