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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tonder-web-sdk",
3
- "version": "1.10.2",
3
+ "version": "1.10.3",
4
4
  "description": "tonder sdk for integrations",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -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 = true) {
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 saveCardCheckbox = document.getElementById('save-card-container');
308
-
309
- saveCardCheckbox.style.display = 'none';
310
- console.log("mode: ", this.mode)
311
- if (this.mode !== 'production') {
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
  }
@@ -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>