tonder-web-sdk 1.16.3 → 1.16.5
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
|
@@ -70,10 +70,9 @@ export class BaseInlineCheckout {
|
|
|
70
70
|
this.#setCheckoutData(data);
|
|
71
71
|
const response = await this._checkout(data);
|
|
72
72
|
this.process3ds.setPayload(response);
|
|
73
|
-
this
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
resolve(response);
|
|
73
|
+
const result = await this.#handle3dsRedirect(response);
|
|
74
|
+
if (result) {
|
|
75
|
+
resolve(result);
|
|
77
76
|
}
|
|
78
77
|
} catch (error) {
|
|
79
78
|
reject(error);
|
package/src/index-dev.js
CHANGED
|
@@ -134,7 +134,7 @@ function setupInlineCheckout() {
|
|
|
134
134
|
showSaved: true, // Usar para mostrar/ocultar el listado de tarjetas guardadas
|
|
135
135
|
},
|
|
136
136
|
paymentButton: {
|
|
137
|
-
show:
|
|
137
|
+
show: true, // Usar para mostrar/ocultar el boton de pago
|
|
138
138
|
showAmount: true, // Usar para concatener el monto junto al texto del botón de pago
|
|
139
139
|
text: "Pagar", // Usar para cambiar el texto del botón de pago
|
|
140
140
|
},
|
|
@@ -149,6 +149,14 @@ function setupInlineCheckout() {
|
|
|
149
149
|
show: true, // Usar para mostrar/ocultar el formulario de tarjeta
|
|
150
150
|
},
|
|
151
151
|
},
|
|
152
|
+
callBack: async response => {
|
|
153
|
+
console.log("Payment response", JSON.stringify(response, null, 2));
|
|
154
|
+
if (response.error) {
|
|
155
|
+
console.log("Payment error", response.error?.details);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
alert("Payment success");
|
|
159
|
+
},
|
|
152
160
|
callbacks: {
|
|
153
161
|
// Usar para definir la acción a ejecutar cuando el usuario de click en el botón Cancelar
|
|
154
162
|
onCancel: () => {
|