vk-payments 0.1.8 → 0.2.0

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.
@@ -2789,7 +2789,6 @@
2789
2789
  */
2790
2790
  function () {
2791
2791
  if (this.verificationCode) {
2792
- console.log('Código ingresado:', this.verificationCode);
2793
2792
  this.codeVerified.emit(this.verificationCode); // Emitir el código ingresado
2794
2793
  this.modalVisible = false;
2795
2794
  }
@@ -2956,6 +2955,7 @@
2956
2955
  function GoCuotasComponent(goCuotasApiService, notificationService) {
2957
2956
  this.goCuotasApiService = goCuotasApiService;
2958
2957
  this.notificationService = notificationService;
2958
+ this.statusPay = new core.EventEmitter();
2959
2959
  this.sale_token = '';
2960
2960
  this.error_message = '';
2961
2961
  this.paymentCompleted = false;
@@ -3053,8 +3053,8 @@
3053
3053
  */
3054
3054
  function (response) {
3055
3055
  if (!response.success) {
3056
- console.log(response.errorsMessages);
3057
3056
  this.error_message = response.errorsMessages[0];
3057
+ this.statusPay.emit(this.paymentResult);
3058
3058
  this.disabled = true;
3059
3059
  this.disabledSelect = true;
3060
3060
  return;
@@ -3129,6 +3129,7 @@
3129
3129
  this.paymentStatus = 'error';
3130
3130
  this.disabled = true;
3131
3131
  this.disabledSelect = true;
3132
+ this.statusPay.emit(this.paymentResult);
3132
3133
  if (!response.ok && response.error === null && response.status === 500) {
3133
3134
  this.error_message = "Error en el servidor. Vuelva a intentar más tarde.";
3134
3135
  this.isLoading = false;
@@ -3153,9 +3154,12 @@
3153
3154
  this.paymentStatus = 'success';
3154
3155
  if (!response.success) {
3155
3156
  this.error_message = response.errorsMessages[0];
3157
+ this.statusPay.emit(this.paymentResult);
3156
3158
  return;
3157
3159
  }
3158
3160
  this.Opayment.paymentId = response.data.paymentId;
3161
+ this.paymentResult = { success: true, paymentId: String(this.Opayment.paymentId), integrator: 'GOGUOTAS' };
3162
+ this.statusPay.emit(this.paymentResult);
3159
3163
  this.loadingMessage = '¡Pago procesado correctamente!';
3160
3164
  this.paymentCompleted = true;
3161
3165
  };
@@ -3420,6 +3424,7 @@
3420
3424
  idVen: [{ type: core.Input }],
3421
3425
  storeId: [{ type: core.Input }],
3422
3426
  data: [{ type: core.Input }],
3427
+ statusPay: [{ type: core.Output }],
3423
3428
  checkOutForm: [{ type: core.ViewChild, args: ['f', { static: false },] }],
3424
3429
  modal: [{ type: core.ViewChild, args: [ModalComponent, { static: false },] }]
3425
3430
  };
@@ -3443,6 +3448,8 @@
3443
3448
  /** @type {?} */
3444
3449
  GoCuotasComponent.prototype.data;
3445
3450
  /** @type {?} */
3451
+ GoCuotasComponent.prototype.statusPay;
3452
+ /** @type {?} */
3446
3453
  GoCuotasComponent.prototype.defaultName;
3447
3454
  /** @type {?} */
3448
3455
  GoCuotasComponent.prototype.mailText;