vk-payments 0.2.31 → 0.2.32

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.
Files changed (39) hide show
  1. package/bundles/vk-payments.umd.js +354 -194
  2. package/bundles/vk-payments.umd.js.map +1 -1
  3. package/bundles/vk-payments.umd.min.js +1 -1
  4. package/bundles/vk-payments.umd.min.js.map +1 -1
  5. package/esm2015/lib/galicia/components/galicia.component.js +311 -0
  6. package/esm2015/lib/galicia/galicia.module.js +37 -0
  7. package/esm2015/lib/galicia/models/galicia.models.js +46 -0
  8. package/esm2015/lib/galicia/services/galicia.api.service.js +74 -0
  9. package/esm2015/lib/vk-payments.module.js +5 -4
  10. package/esm2015/vk-payments.js +4 -4
  11. package/esm5/lib/galicia/components/galicia.component.js +359 -0
  12. package/esm5/lib/galicia/galicia.module.js +41 -0
  13. package/esm5/lib/galicia/models/galicia.models.js +46 -0
  14. package/esm5/lib/galicia/services/galicia.api.service.js +87 -0
  15. package/esm5/lib/vk-payments.module.js +5 -4
  16. package/esm5/vk-payments.js +4 -4
  17. package/fesm2015/vk-payments.js +290 -157
  18. package/fesm2015/vk-payments.js.map +1 -1
  19. package/fesm5/vk-payments.js +350 -189
  20. package/fesm5/vk-payments.js.map +1 -1
  21. package/lib/galicia/components/galicia.component.d.ts +46 -0
  22. package/lib/galicia/galicia.module.d.ts +2 -0
  23. package/lib/galicia/models/galicia.models.d.ts +17 -0
  24. package/lib/galicia/services/galicia.api.service.d.ts +11 -0
  25. package/package.json +4 -1
  26. package/vk-payments.d.ts +3 -3
  27. package/vk-payments.metadata.json +1 -1
  28. package/esm2015/lib/bank-transfer/bank-transfer.module.js +0 -33
  29. package/esm2015/lib/bank-transfer/components/bank-transfer.component.js +0 -206
  30. package/esm2015/lib/bank-transfer/models/bank-transfer.models.js +0 -54
  31. package/esm2015/lib/bank-transfer/services/bank-transfer.api.service.js +0 -52
  32. package/esm5/lib/bank-transfer/bank-transfer.module.js +0 -37
  33. package/esm5/lib/bank-transfer/components/bank-transfer.component.js +0 -234
  34. package/esm5/lib/bank-transfer/models/bank-transfer.models.js +0 -54
  35. package/esm5/lib/bank-transfer/services/bank-transfer.api.service.js +0 -57
  36. package/lib/bank-transfer/bank-transfer.module.d.ts +0 -2
  37. package/lib/bank-transfer/components/bank-transfer.component.d.ts +0 -30
  38. package/lib/bank-transfer/models/bank-transfer.models.d.ts +0 -20
  39. package/lib/bank-transfer/services/bank-transfer.api.service.d.ts +0 -8
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/router'), require('@angular/common/http'), require('sha256')) :
3
- typeof define === 'function' && define.amd ? define('vk-payments', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/router', '@angular/common/http', 'sha256'], factory) :
4
- (global = global || self, factory(global['vk-payments'] = {}, global.ng.core, global.ng.common, global.ng.forms, global.ng.router, global.ng.common.http, global.sha256));
5
- }(this, function (exports, core, common, forms, router, http, sha256) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/router'), require('@angular/common/http'), require('sha256'), require('qrcode')) :
3
+ typeof define === 'function' && define.amd ? define('vk-payments', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/router', '@angular/common/http', 'sha256', 'qrcode'], factory) :
4
+ (global = global || self, factory(global['vk-payments'] = {}, global.ng.core, global.ng.common, global.ng.forms, global.ng.router, global.ng.common.http, global.sha256, global.qrcode));
5
+ }(this, function (exports, core, common, forms, router, http, sha256, qrcode) { 'use strict';
6
6
 
7
7
  sha256 = sha256 && sha256.hasOwnProperty('default') ? sha256['default'] : sha256;
8
8
 
@@ -3912,314 +3912,473 @@
3912
3912
 
3913
3913
  /**
3914
3914
  * @fileoverview added by tsickle
3915
- * Generated from: lib/bank-transfer/services/bank-transfer.api.service.ts
3915
+ * Generated from: lib/galicia/services/galicia.api.service.ts
3916
3916
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3917
3917
  */
3918
- var BankTransferApiService = /** @class */ (function () {
3919
- function BankTransferApiService(http) {
3920
- this.http = http;
3918
+ var GaliciaApiService = /** @class */ (function () {
3919
+ function GaliciaApiService(httpClient) {
3920
+ this.httpClient = httpClient;
3921
3921
  }
3922
3922
  /**
3923
- * @param {?} accessToken
3924
- * @param {?} request
3925
- * @param {?} vkApiUrl
3923
+ * @param {?} url
3926
3924
  * @return {?}
3927
3925
  */
3928
- BankTransferApiService.prototype.createPayment = /**
3929
- * @param {?} accessToken
3930
- * @param {?} request
3931
- * @param {?} vkApiUrl
3926
+ GaliciaApiService.prototype.normalizeUrl = /**
3927
+ * @param {?} url
3932
3928
  * @return {?}
3933
3929
  */
3934
- function (accessToken, request, vkApiUrl) {
3935
- /** @type {?} */
3936
- var headers = new http.HttpHeaders({
3937
- 'Content-Type': 'application/json',
3938
- Authorization: "Bearer " + accessToken
3939
- });
3940
- // Construimos la URL agregando la rute del Controller de BankTransfer
3930
+ function (url) {
3931
+ if (url.length > 0 && url.charAt(url.length - 1) == '/') {
3932
+ url = url.substr(0, url.length - 1);
3933
+ }
3934
+ return url;
3935
+ };
3936
+ /**
3937
+ * @param {?} url
3938
+ * @param {?} initPayment
3939
+ * @return {?}
3940
+ */
3941
+ GaliciaApiService.prototype.initPayment = /**
3942
+ * @param {?} url
3943
+ * @param {?} initPayment
3944
+ * @return {?}
3945
+ */
3946
+ function (url, initPayment) {
3941
3947
  /** @type {?} */
3942
- var url = vkApiUrl + "payments/BankTransfer/create-payment";
3943
- return this.http.post(url, request, { headers: headers });
3948
+ var body = {
3949
+ storeId: initPayment.storeId,
3950
+ userId: initPayment.userId,
3951
+ sessionId: initPayment.sessionId,
3952
+ storeName: initPayment.storeName,
3953
+ checkoutId: initPayment.checkoutId
3954
+ };
3955
+ return this.httpClient.post(this.normalizeUrl(url) + '/init-payment', body);
3944
3956
  };
3945
- BankTransferApiService.decorators = [
3957
+ /**
3958
+ * @param {?} url
3959
+ * @param {?} billNumber
3960
+ * @return {?}
3961
+ */
3962
+ GaliciaApiService.prototype.paymentStatus = /**
3963
+ * @param {?} url
3964
+ * @param {?} billNumber
3965
+ * @return {?}
3966
+ */
3967
+ function (url, billNumber) {
3968
+ return this.httpClient.get(this.normalizeUrl(url) + '/payment-status?billNumber=' + billNumber);
3969
+ };
3970
+ GaliciaApiService.decorators = [
3946
3971
  { type: core.Injectable, args: [{
3947
3972
  providedIn: 'root'
3948
3973
  },] }
3949
3974
  ];
3950
3975
  /** @nocollapse */
3951
- BankTransferApiService.ctorParameters = function () { return [
3976
+ GaliciaApiService.ctorParameters = function () { return [
3952
3977
  { type: http.HttpClient }
3953
3978
  ]; };
3954
- /** @nocollapse */ BankTransferApiService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function BankTransferApiService_Factory() { return new BankTransferApiService(core.ɵɵinject(http.HttpClient)); }, token: BankTransferApiService, providedIn: "root" });
3955
- return BankTransferApiService;
3979
+ /** @nocollapse */ GaliciaApiService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function GaliciaApiService_Factory() { return new GaliciaApiService(core.ɵɵinject(http.HttpClient)); }, token: GaliciaApiService, providedIn: "root" });
3980
+ return GaliciaApiService;
3956
3981
  }());
3957
3982
  if (false) {
3958
3983
  /**
3959
3984
  * @type {?}
3960
3985
  * @private
3961
3986
  */
3962
- BankTransferApiService.prototype.http;
3987
+ GaliciaApiService.prototype.authHeaders;
3988
+ /**
3989
+ * @type {?}
3990
+ * @private
3991
+ */
3992
+ GaliciaApiService.prototype.httpClient;
3963
3993
  }
3964
3994
 
3965
3995
  /**
3966
3996
  * @fileoverview added by tsickle
3967
- * Generated from: lib/bank-transfer/components/bank-transfer.component.ts
3997
+ * Generated from: lib/galicia/components/galicia.component.ts
3968
3998
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3969
3999
  */
3970
- var BankTransferComponent = /** @class */ (function () {
3971
- function BankTransferComponent(bankTransferApi) {
3972
- this.bankTransferApi = bankTransferApi;
3973
- this.discountRate = 0.10; // Tasa de descuento (10% por defecto)
3974
- // Descuento explícito desde el carrito
4000
+ var GaliciaComponent = /** @class */ (function () {
4001
+ function GaliciaComponent(galiciaApiService) {
4002
+ this.galiciaApiService = galiciaApiService;
3975
4003
  this.statusPay = new core.EventEmitter();
3976
- this.isLoading = false;
4004
+ this.qrImage = '';
4005
+ this.billNumber = '';
3977
4006
  this.errorMessage = '';
3978
- this.submittedSuccessfully = false;
3979
- this.amountCopied = false;
3980
- // CUIT no se pide al usuario por ahora — se envía valor genérico
3981
- this.paymentForm = new forms.FormGroup({
3982
- cuit: new forms.FormControl('00000000000')
3983
- });
4007
+ this.isGeneratingQr = true;
4008
+ this.paymentCompleted = false;
4009
+ this.paymentId = '';
4010
+ this.showQr = false;
4011
+ this.expired = false;
4012
+ this.isLoading = false;
4013
+ this.hasError = false;
4014
+ this.minutes = 0;
4015
+ this.seconds = 0;
4016
+ this.paymentResult = { success: false, paymentId: '', integrator: 'GALICIA' };
3984
4017
  }
3985
- Object.defineProperty(BankTransferComponent.prototype, "subtotalAmount", {
3986
- // Calculados a partir de `amount` (que ya tiene el descuento aplicado)
3987
- get:
3988
- // Calculados a partir de `amount` (que ya tiene el descuento aplicado)
3989
- /**
3990
- * @return {?}
3991
- */
3992
- function () {
3993
- if (this.discountAmountValue !== undefined && this.discountAmountValue !== null) {
3994
- return this.amount + this.discountAmountValue;
3995
- }
3996
- return this.amount ? Math.round(this.amount / (1 - this.discountRate)) : 0;
3997
- },
3998
- enumerable: true,
3999
- configurable: true
4000
- });
4001
- Object.defineProperty(BankTransferComponent.prototype, "discountAmount", {
4002
- get: /**
4003
- * @return {?}
4004
- */
4005
- function () {
4006
- if (this.discountAmountValue !== undefined && this.discountAmountValue !== null) {
4007
- return this.discountAmountValue;
4008
- }
4009
- return this.subtotalAmount - (this.amount || 0);
4010
- },
4011
- enumerable: true,
4012
- configurable: true
4013
- });
4014
4018
  /**
4015
4019
  * @return {?}
4016
4020
  */
4017
- BankTransferComponent.prototype.ngOnInit = /**
4021
+ GaliciaComponent.prototype.ngOnInit = /**
4018
4022
  * @return {?}
4019
4023
  */
4020
- function () { };
4024
+ function () {
4025
+ this.createInitPayment();
4026
+ };
4021
4027
  /**
4022
- * @param {?} text
4028
+ * @param {?} datos
4023
4029
  * @return {?}
4024
4030
  */
4025
- BankTransferComponent.prototype.copyToClipboard = /**
4026
- * @param {?} text
4031
+ GaliciaComponent.prototype.generateQr = /**
4032
+ * @param {?} datos
4027
4033
  * @return {?}
4028
4034
  */
4029
- function (text) {
4030
- navigator.clipboard.writeText(text).catch((/**
4035
+ function (datos) {
4036
+ var _this = this;
4037
+ /** @type {?} */
4038
+ var decoded = atob(datos);
4039
+ qrcode.toDataURL(decoded, {
4040
+ width: 300,
4041
+ margin: 2
4042
+ })
4043
+ .then((/**
4044
+ * @param {?} url
4031
4045
  * @return {?}
4032
4046
  */
4033
- function () {
4034
- /** @type {?} */
4035
- var el = document.createElement('textarea');
4036
- el.value = text;
4037
- document.body.appendChild(el);
4038
- el.select();
4039
- document.execCommand('copy');
4040
- document.body.removeChild(el);
4047
+ function (url) {
4048
+ _this.qrImage = url;
4049
+ _this.isGeneratingQr = false;
4050
+ _this.showQr = true;
4051
+ _this.expired = false;
4052
+ _this.startTimer();
4053
+ _this.startPaymentValidation();
4041
4054
  }));
4042
4055
  };
4043
4056
  /**
4044
4057
  * @return {?}
4045
4058
  */
4046
- BankTransferComponent.prototype.copyAmount = /**
4059
+ GaliciaComponent.prototype.createInitPayment = /**
4047
4060
  * @return {?}
4048
4061
  */
4049
4062
  function () {
4050
- var _this = this;
4051
- /** @type {?} */
4052
- var amountStr = this.amount ? this.amount.toFixed(2) : '0';
4053
- this.copyToClipboard(amountStr);
4054
- this.amountCopied = true;
4055
- setTimeout((/**
4056
- * @return {?}
4057
- */
4058
- function () { return _this.amountCopied = false; }), 2000);
4063
+ this.OinitPayment = {
4064
+ sessionId: '',
4065
+ userId: this.userId,
4066
+ storeId: this.storeId,
4067
+ storeName: this.storeName,
4068
+ checkoutId: this.checkoutId
4069
+ };
4070
+ this.initPayment();
4059
4071
  };
4060
4072
  /**
4061
4073
  * @return {?}
4062
4074
  */
4063
- BankTransferComponent.prototype.onSubmit = /**
4075
+ GaliciaComponent.prototype.initPayment = /**
4064
4076
  * @return {?}
4065
4077
  */
4066
4078
  function () {
4067
4079
  var _this = this;
4068
- if (this.submittedSuccessfully || this.isLoading)
4080
+ this.isGeneratingQr = true;
4081
+ this.galiciaApiService.initPayment(this.vkUrlApi, this.OinitPayment)
4082
+ .subscribe({
4083
+ next: (/**
4084
+ * @param {?} v
4085
+ * @return {?}
4086
+ */
4087
+ function (v) { return _this.initPaymentResponseHandler(v); }),
4088
+ error: (/**
4089
+ * @param {?} v
4090
+ * @return {?}
4091
+ */
4092
+ function (v) { return _this.initPaymentErrorHandler(v); })
4093
+ });
4094
+ };
4095
+ /**
4096
+ * @private
4097
+ * @param {?} response
4098
+ * @return {?}
4099
+ */
4100
+ GaliciaComponent.prototype.initPaymentResponseHandler = /**
4101
+ * @private
4102
+ * @param {?} response
4103
+ * @return {?}
4104
+ */
4105
+ function (response) {
4106
+ if (!response.success) {
4107
+ this.isLoading = false;
4108
+ this.hasError = true;
4109
+ this.statusPay.emit(this.paymentResult);
4110
+ this.errorMessage = response.errorsMessages[0] || 'Ocurrió un error al generar el código QR.';
4069
4111
  return;
4070
- this.isLoading = true;
4071
- this.errorMessage = '';
4112
+ }
4072
4113
  /** @type {?} */
4073
- var request = {
4074
- cuit: '00000000000',
4075
- // Valor genérico mientras no se pide al usuario
4076
- checkoutId: this.checkoutId,
4077
- checkoutAdditionalData: this.checkoutAdditionalData,
4078
- storeName: this.storeName || 'Tienda VK',
4079
- storeId: this.storeId
4080
- };
4081
- this.bankTransferApi.createPayment(this.accessToken, request, this.vkUrlApi).subscribe((/**
4082
- * @param {?} response
4114
+ var qrData = response.data.bills[0].qr.datos;
4115
+ this.billNumber = response.data.bills[0].nroBoleta;
4116
+ this.generateQr(qrData);
4117
+ };
4118
+ /**
4119
+ * @private
4120
+ * @param {?} error
4121
+ * @return {?}
4122
+ */
4123
+ GaliciaComponent.prototype.initPaymentErrorHandler = /**
4124
+ * @private
4125
+ * @param {?} error
4126
+ * @return {?}
4127
+ */
4128
+ function (error) {
4129
+ this.isLoading = false;
4130
+ this.hasError = true;
4131
+ this.errorMessage = error.errorsMessages[0] || 'Ocurrió un error al generar el código QR.';
4132
+ this.paymentResult.success = false;
4133
+ this.statusPay.emit(this.paymentResult);
4134
+ };
4135
+ /**
4136
+ * @return {?}
4137
+ */
4138
+ GaliciaComponent.prototype.startTimer = /**
4139
+ * @return {?}
4140
+ */
4141
+ function () {
4142
+ var _this = this;
4143
+ clearInterval(this.interval);
4144
+ this.minutes = 1;
4145
+ this.seconds = 0;
4146
+ this.interval = setInterval((/**
4083
4147
  * @return {?}
4084
4148
  */
4085
- function (response) {
4086
- _this.isLoading = false;
4087
- if (response && response.success) {
4088
- _this.submittedSuccessfully = true;
4089
- _this.statusPay.emit({
4090
- success: true,
4091
- paymentId: (response.data && response.data.bankTransferEcommId) ? response.data.bankTransferEcommId : '',
4092
- integrator: 'BANK_TRANSFER'
4093
- });
4149
+ function () {
4150
+ if (_this.seconds === 0) {
4151
+ if (_this.minutes === 0) {
4152
+ _this.stopValidation();
4153
+ _this.showQr = false;
4154
+ _this.expired = true;
4155
+ return;
4156
+ }
4157
+ _this.minutes--;
4158
+ _this.seconds = 59;
4094
4159
  }
4095
4160
  else {
4096
- _this.errorMessage = (response.errorsMessages && response.errorsMessages.length > 0)
4097
- ? response.errorsMessages[0]
4098
- : 'Ocurrió un error al registrar la transferencia.';
4099
- _this.statusPay.emit({
4100
- success: false,
4101
- paymentId: '',
4102
- integrator: 'BANK_TRANSFER'
4103
- });
4161
+ _this.seconds--;
4104
4162
  }
4105
- }), (/**
4106
- * @param {?} error
4107
- * @return {?}
4108
- */
4109
- function (error) {
4110
- _this.isLoading = false;
4111
- _this.errorMessage = (error && error.error && error.error.errorsMessages && error.error.errorsMessages.length > 0)
4112
- ? error.error.errorsMessages[0]
4113
- : 'Ocurrió un error de conexión al registrar la transferencia.';
4114
- _this.statusPay.emit({
4115
- success: false,
4116
- paymentId: '',
4117
- integrator: 'BANK_TRANSFER'
4118
- });
4119
- console.error('Error BankTransferApiService:', error);
4120
- }));
4163
+ }), 1000);
4121
4164
  };
4122
- Object.defineProperty(BankTransferComponent.prototype, "cuitControl", {
4123
- get: /**
4165
+ /**
4166
+ * @return {?}
4167
+ */
4168
+ GaliciaComponent.prototype.startPaymentValidation = /**
4169
+ * @return {?}
4170
+ */
4171
+ function () {
4172
+ var _this = this;
4173
+ this.validationInterval = setInterval((/**
4124
4174
  * @return {?}
4125
4175
  */
4126
4176
  function () {
4127
- return this.paymentForm.get('cuit');
4128
- },
4129
- enumerable: true,
4130
- configurable: true
4131
- });
4132
- BankTransferComponent.decorators = [
4177
+ _this.galiciaApiService.paymentStatus(_this.vkUrlApi, _this.billNumber)
4178
+ .subscribe({
4179
+ next: (/**
4180
+ * @param {?} v
4181
+ * @return {?}
4182
+ */
4183
+ function (v) { return _this.paymentStatusResponseHandler(v); }),
4184
+ error: (/**
4185
+ * @param {?} v
4186
+ * @return {?}
4187
+ */
4188
+ function (v) { return _this.paymentStatusErrorHandler(v); })
4189
+ });
4190
+ }), 5000);
4191
+ };
4192
+ /**
4193
+ * @param {?} response
4194
+ * @return {?}
4195
+ */
4196
+ GaliciaComponent.prototype.paymentStatusResponseHandler = /**
4197
+ * @param {?} response
4198
+ * @return {?}
4199
+ */
4200
+ function (response) {
4201
+ console.log(response);
4202
+ if (!response.success) {
4203
+ this.isLoading = false;
4204
+ this.statusPay.emit(this.paymentResult);
4205
+ return;
4206
+ }
4207
+ if (response.data.isPaid) {
4208
+ this.stopValidation();
4209
+ this.showQr = false;
4210
+ this.expired = false;
4211
+ this.paymentCompleted = true;
4212
+ this.paymentId = response.data.paymentId;
4213
+ this.paymentResult = {
4214
+ success: true,
4215
+ paymentId: this.paymentId,
4216
+ integrator: 'GALICIA'
4217
+ };
4218
+ this.statusPay.emit(this.paymentResult);
4219
+ }
4220
+ };
4221
+ /**
4222
+ * @private
4223
+ * @param {?} error
4224
+ * @return {?}
4225
+ */
4226
+ GaliciaComponent.prototype.paymentStatusErrorHandler = /**
4227
+ * @private
4228
+ * @param {?} error
4229
+ * @return {?}
4230
+ */
4231
+ function (error) {
4232
+ clearInterval(this.validationInterval);
4233
+ this.hasError = true;
4234
+ };
4235
+ /**
4236
+ * @return {?}
4237
+ */
4238
+ GaliciaComponent.prototype.showQrAgain = /**
4239
+ * @return {?}
4240
+ */
4241
+ function () {
4242
+ this.showQr = true;
4243
+ this.expired = false;
4244
+ this.startTimer();
4245
+ this.startPaymentValidation();
4246
+ };
4247
+ /**
4248
+ * @private
4249
+ * @return {?}
4250
+ */
4251
+ GaliciaComponent.prototype.stopValidation = /**
4252
+ * @private
4253
+ * @return {?}
4254
+ */
4255
+ function () {
4256
+ clearInterval(this.validationInterval);
4257
+ clearInterval(this.interval);
4258
+ };
4259
+ GaliciaComponent.decorators = [
4133
4260
  { type: core.Component, args: [{
4134
- selector: 'vk-bank-transfer',
4135
- template: "<form\n [formGroup]=\"paymentForm\"\n (ngSubmit)=\"onSubmit()\"\n class=\"bt-payment\"\n id=\"formularioBT\"\n autocomplete=\"off\"\n>\n\n <!-- Datos bancarios -->\n <div class=\"bank-info-box\">\n <div class=\"bank-info-header\">\n <i class=\"material-icons\">account_balance</i>\n <span>Datos para la transferencia</span>\n </div>\n <div class=\"bank-info-row\">\n <span class=\"bank-info-label\"><i class=\"material-icons\">tag</i>N\u00FAmero de cuenta</span>\n <span class=\"bank-info-value\">2-311972/1</span>\n </div>\n <div class=\"bank-info-row\">\n <span class=\"bank-info-label\"><i class=\"material-icons\">qr_code</i>CBU</span>\n <span class=\"bank-info-value bank-info-copy\">\n <span class=\"bank-info-copy-text\">4150002012003119720013</span>\n <button class=\"copy-btn\" type=\"button\" title=\"Copiar CBU\" (click)=\"copyToClipboard('4150002012003119720013')\">\n <i class=\"material-icons\">content_copy</i>\n </button>\n </span>\n </div>\n <div class=\"bank-info-row\">\n <span class=\"bank-info-label\"><i class=\"material-icons\">alternate_email</i>Alias</span>\n <span class=\"bank-info-value bank-info-copy\">\n <span class=\"bank-info-copy-text\">reba.vitnik</span>\n <button class=\"copy-btn\" type=\"button\" title=\"Copiar alias\" (click)=\"copyToClipboard('reba.vitnik')\">\n <i class=\"material-icons\">content_copy</i>\n </button>\n </span>\n </div>\n <div class=\"bank-info-row\">\n <span class=\"bank-info-label\"><i class=\"material-icons\">badge</i>CUIT/CUIL</span>\n <span class=\"bank-info-value\">30708777893</span>\n </div>\n <div class=\"bank-info-row\">\n <span class=\"bank-info-label\"><i class=\"material-icons\">attach_money</i>Moneda</span>\n <span class=\"bank-info-value\">Peso Argentino</span>\n </div>\n </div>\n\n <!-- Resumen con desglose del descuento -->\n <div class=\"summary-box\">\n <div class=\"summary-row\">\n <span class=\"summary-label\">Subtotal</span>\n <span class=\"summary-value\">${{ subtotalAmount | number:'1.2-2' }}</span>\n </div>\n <div class=\"summary-row discount\">\n <span class=\"summary-label\">\n <i class=\"material-icons\">local_offer</i>\n Descuento transferencia ({{ discountRate * 100 | number:'1.0-0' }}%)\n </span>\n <span class=\"summary-value discount-value\">-${{ discountAmount | number:'1.2-2' }}</span>\n </div>\n <div class=\"summary-row total\">\n <span class=\"summary-label\">Total a transferir</span>\n <span class=\"summary-value total-value\">\n ${{ amount | number:'1.2-2' }}\n <button\n class=\"copy-btn copy-amount-btn\"\n type=\"button\"\n [title]=\"amountCopied ? 'Copiado!' : 'Copiar monto'\"\n (click)=\"copyAmount()\"\n >\n <i class=\"material-icons\">{{ amountCopied ? 'check' : 'content_copy' }}</i>\n </button>\n </span>\n </div>\n </div>\n\n <!-- Leyenda de monto exacto -->\n <div class=\"exact-amount-notice\">\n <i class=\"material-icons notice-icon\">info</i>\n <p>\n <strong>\u00A1Ya casi es tuyo!</strong> Para que podamos procesar tu pedido sin demoras,\n asegurate de que el importe de la transferencia sea <strong>id\u00E9ntico</strong> al total indicado arriba.\n </p>\n </div>\n\n <!-- Error devuelto por la API -->\n <div class=\"pay-message error\" *ngIf=\"errorMessage && !isLoading\">\n <i class=\"material-icons\">error</i>\n <p>{{ errorMessage }}</p>\n </div>\n\n <!-- Loading -->\n <div *ngIf=\"isLoading\" class=\"pay-message info\">\n <i class=\"material-icons\">info</i>\n <p>Procesando informaci\u00F3n de transferencia...</p>\n </div>\n\n <!-- Bot\u00F3n confirmar (oculto tras \u00E9xito) -->\n <div *ngIf=\"!submittedSuccessfully\">\n <button type=\"submit\" [disabled]=\"paymentForm.invalid || isLoading\">\n Confirmar Transferencia\n </button>\n </div>\n\n</form>\n",
4136
- styles: [".bt-payment{background-color:transparent;font-family:inherit,sans-serif;padding:0 12px}.bt-payment p.description{font-size:16px;color:#888;margin-bottom:5px}.bt-payment .bank-info-box{border:1px solid #c8e0f0;border-radius:8px;overflow:hidden;margin-bottom:18px}.bt-payment .bank-info-box .bank-info-header{display:flex;align-items:center;gap:8px;background-color:#009ee3;color:#fff;padding:10px 14px;font-size:18px;font-weight:600;letter-spacing:.4px;text-transform:uppercase}.bt-payment .bank-info-box .bank-info-header i.material-icons{font-size:18px}.bt-payment .bank-info-box .bank-info-row{display:flex;justify-content:space-between;align-items:center;font-size:18px;padding:8px 14px;background-color:#fff;border-bottom:1px solid #eef3f7}.bt-payment .bank-info-box .bank-info-row:last-child{border-bottom:none}.bt-payment .bank-info-box .bank-info-label{display:flex;align-items:center;gap:6px;color:#777;flex-shrink:0;margin-right:8px}.bt-payment .bank-info-box .bank-info-label i.material-icons{font-size:15px;color:#009ee3}.bt-payment .bank-info-box .bank-info-value{font-weight:600;color:#1a1a1a;text-align:right}.bt-payment .bank-info-box .bank-info-value.bank-info-copy{display:flex;align-items:center;gap:4px}.bt-payment .bank-info-box .bank-info-value .bank-info-copy-text{font-family:\"Courier New\",monospace;font-size:18px;letter-spacing:.3px}.bt-payment .bank-info-box .copy-btn{background:0 0;border:none;cursor:pointer;padding:2px 4px;border-radius:4px;color:#009ee3;display:flex;align-items:center;margin-top:0;width:auto;min-width:unset}.bt-payment .bank-info-box .copy-btn i.material-icons{font-size:16px}.bt-payment .bank-info-box .copy-btn:hover{background-color:#e8f4fb}.bt-payment .bank-info-box .copy-btn:disabled{background-color:transparent;cursor:default}.bt-payment .summary-box{margin:20px 0;border:1px solid #e0e0e0;border-radius:8px;overflow:hidden}.bt-payment .summary-box .summary-row{display:flex;justify-content:space-between;align-items:center;padding:10px 16px;font-size:16px;background-color:#fff;border-bottom:1px solid #f0f0f0}.bt-payment .summary-box .summary-row:last-child{border-bottom:none}.bt-payment .summary-box .summary-row .summary-label{display:flex;align-items:center;gap:6px;color:#555}.bt-payment .summary-box .summary-row .summary-label i.material-icons{font-size:14px}.bt-payment .summary-box .summary-row .summary-value{font-weight:600;color:#1a1a1a;display:flex;align-items:center;gap:6px}.bt-payment .summary-box .summary-row.discount{background-color:#f0fdf4}.bt-payment .summary-box .summary-row.discount .summary-label{color:#16a34a;font-weight:500}.bt-payment .summary-box .summary-row.discount .summary-label i.material-icons{color:#16a34a}.bt-payment .summary-box .summary-row.discount .discount-value{color:#16a34a;font-weight:700}.bt-payment .summary-box .summary-row.total{background-color:#f8f9fa;border-top:2px solid #009ee3}.bt-payment .summary-box .summary-row.total .summary-label{font-size:17px;font-weight:700;color:#1a1a1a}.bt-payment .summary-box .summary-row.total .total-value{font-size:20px;font-weight:800;color:#009ee3}.bt-payment .summary-box .copy-amount-btn{background:0 0;border:1px solid #009ee3;border-radius:6px;cursor:pointer;padding:2px 6px;color:#009ee3;display:flex;align-items:center;width:auto;min-width:unset;margin-top:0;transition:background-color .2s}.bt-payment .summary-box .copy-amount-btn i.material-icons{font-size:16px}.bt-payment .summary-box .copy-amount-btn:hover{background-color:#e8f4fb}.bt-payment .exact-amount-notice{display:flex;align-items:flex-start;gap:10px;background-color:#fffbeb;border:1px solid #fcd34d;border-radius:8px;padding:12px 14px;margin-bottom:20px}.bt-payment .exact-amount-notice .notice-icon{font-size:20px;color:#d97706;flex-shrink:0;margin-top:2px}.bt-payment .exact-amount-notice p{font-size:14px;color:#78350f;margin:0;line-height:1.5}.bt-payment .formRow{margin-top:10px;display:none}.bt-payment .formRow label{font-size:16px;color:#888}.bt-payment .formRow span{background-color:#fff;border:.5px solid #707070;border-radius:2px;padding:2px 10px;display:block;margin-top:4px}.bt-payment .formRow span input[type=text]{background:0 0;border:none;color:#000;font-size:16px;height:23px;width:100%;text-transform:uppercase;vertical-align:top;padding:0;margin:0}.bt-payment .formRow span input[type=text]:focus{outline:0}.bt-payment .alert-text{font-size:16px;color:#009ee3;margin-top:7px;margin-bottom:0}.bt-payment button[type=submit]{background-color:#009ee3;color:#fff;font-size:18px;text-align:center;padding:10px 0;width:100%;border:none;border-radius:20px;margin-top:20px;cursor:pointer}.bt-payment button[type=submit]:disabled{background-color:#525252;cursor:not-allowed}.bt-payment .pay-message{margin-top:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;border-radius:8px}.bt-payment .pay-message p{font-size:1.1rem;text-align:center;line-height:130%;margin-bottom:10px}.bt-payment .pay-message i.material-icons{font-size:2rem;margin-bottom:5px}.bt-payment .success{background-color:#dff2bf;color:#4f8a10}.bt-payment .error{color:#d8000c;background-color:#ffd2d2}.bt-payment .info{color:#00529b;background-color:#bde5f8}:focus{outline:0}"]
4261
+ selector: 'lib-galicia',
4262
+ template: "<div class=\"gc-payment\">\n <div class=\"formRow\">\n <p>\n Escane\u00E1 el c\u00F3digo QR con tu aplicaci\u00F3n bancaria para realizar el pago.\n </p>\n </div>\n\n <div *ngIf=\"isGeneratingQr && !hasError\" class=\"loading-container\">\n <div class=\"spinner\"></div>\n <p>Generando c\u00F3digo QR...</p>\n </div>\n\n <div *ngIf=\"showQr\">\n <div class=\"qr-container\">\n <img [src]=\"qrImage\" alt=\"QR Galicia\" />\n </div>\n\n <div class=\"timer\">\n Tiempo restante: {{ minutes }}:{{ seconds < 10 ? '0' + seconds : seconds }} \n </div>\n </div>\n\n <div *ngIf=\"hasError\" class=\"payment-error\">\n <div class=\"error-icon\">\n \u26A0\n </div>\n\n <div class=\"error-message\">\n <h3>No fue posible generar el c\u00F3digo QR</h3>\n\n <p>{{ errorMessage }}</p>\n </div>\n </div>\n\n <div *ngIf=\"paymentCompleted\" class=\"payment-success\">\n <div class=\"success-icon\">\n \u2713\n </div>\n\n <div class=\"success-message\">\n <h3>Pago realizado correctamente</h3>\n\n <p>\n ID de pago Galicia: <strong>{{ paymentId }}</strong>\n </p>\n </div>\n </div>\n\n <div *ngIf=\"expired\">\n <div class=\"pay-message info\">\n El c\u00F3digo QR expir\u00F3.\n </div>\n\n <button type=\"button\" (click)=\"showQrAgain()\">\n Regenerar c\u00F3digo QR\n </button>\n\n </div>\n</div>",
4263
+ styles: [".gc-payment{display:flex;flex-direction:column;align-items:center;text-align:center}.formRow{width:100%;max-width:400px;margin-bottom:20px}.loading-container{text-align:center;padding:30px}.spinner{width:40px;height:40px;margin:0 auto 15px;border:4px solid #e0e0e0;border-top:4px solid #06c;border-radius:50%;-webkit-animation:1s linear infinite spin;animation:1s linear infinite spin}.qr-container{margin:20px 0}.qr-container img{max-width:300px;width:100%;height:auto}.timer{margin-top:10px;font-size:18px;font-weight:600}.payment-error{text-align:center;padding:30px;max-width:400px}.error-icon{width:80px;height:80px;margin:0 auto 15px;border-radius:50%;background:#fc2626;color:#fff;font-size:48px;font-weight:700;display:flex;align-items:center;justify-content:center}.error-message h3{color:#fc2626;margin-bottom:10px}.payment-success{text-align:center;padding:30px}.success-icon{width:80px;height:80px;margin:0 auto 15px;border-radius:50%;background:#28a745;color:#fff;font-size:48px;font-weight:700;display:flex;align-items:center;justify-content:center}.success-message h3{color:#28a745;margin-bottom:10px}@-webkit-keyframes spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}"]
4137
4264
  }] }
4138
4265
  ];
4139
4266
  /** @nocollapse */
4140
- BankTransferComponent.ctorParameters = function () { return [
4141
- { type: BankTransferApiService }
4267
+ GaliciaComponent.ctorParameters = function () { return [
4268
+ { type: GaliciaApiService }
4142
4269
  ]; };
4143
- BankTransferComponent.propDecorators = {
4270
+ GaliciaComponent.propDecorators = {
4144
4271
  accessToken: [{ type: core.Input }],
4272
+ gaUrlApi: [{ type: core.Input }],
4145
4273
  vkUrlApi: [{ type: core.Input }],
4146
- amount: [{ type: core.Input }],
4274
+ userId: [{ type: core.Input }],
4275
+ logoGa: [{ type: core.Input }],
4147
4276
  storeId: [{ type: core.Input }],
4148
4277
  storeName: [{ type: core.Input }],
4278
+ sessionId: [{ type: core.Input }],
4149
4279
  checkoutId: [{ type: core.Input }],
4150
- checkoutAdditionalData: [{ type: core.Input }],
4151
- discountRate: [{ type: core.Input }],
4152
- discountAmountValue: [{ type: core.Input }],
4280
+ data: [{ type: core.Input }],
4153
4281
  statusPay: [{ type: core.Output }]
4154
4282
  };
4155
- return BankTransferComponent;
4283
+ return GaliciaComponent;
4156
4284
  }());
4157
4285
  if (false) {
4158
4286
  /** @type {?} */
4159
- BankTransferComponent.prototype.accessToken;
4287
+ GaliciaComponent.prototype.accessToken;
4288
+ /** @type {?} */
4289
+ GaliciaComponent.prototype.gaUrlApi;
4290
+ /** @type {?} */
4291
+ GaliciaComponent.prototype.vkUrlApi;
4292
+ /** @type {?} */
4293
+ GaliciaComponent.prototype.userId;
4294
+ /** @type {?} */
4295
+ GaliciaComponent.prototype.logoGa;
4296
+ /** @type {?} */
4297
+ GaliciaComponent.prototype.storeId;
4298
+ /** @type {?} */
4299
+ GaliciaComponent.prototype.storeName;
4300
+ /** @type {?} */
4301
+ GaliciaComponent.prototype.sessionId;
4302
+ /** @type {?} */
4303
+ GaliciaComponent.prototype.checkoutId;
4304
+ /** @type {?} */
4305
+ GaliciaComponent.prototype.data;
4160
4306
  /** @type {?} */
4161
- BankTransferComponent.prototype.vkUrlApi;
4307
+ GaliciaComponent.prototype.statusPay;
4162
4308
  /** @type {?} */
4163
- BankTransferComponent.prototype.amount;
4309
+ GaliciaComponent.prototype.qrImage;
4164
4310
  /** @type {?} */
4165
- BankTransferComponent.prototype.storeId;
4311
+ GaliciaComponent.prototype.billNumber;
4166
4312
  /** @type {?} */
4167
- BankTransferComponent.prototype.storeName;
4313
+ GaliciaComponent.prototype.errorMessage;
4168
4314
  /** @type {?} */
4169
- BankTransferComponent.prototype.checkoutId;
4315
+ GaliciaComponent.prototype.OinitPayment;
4170
4316
  /** @type {?} */
4171
- BankTransferComponent.prototype.checkoutAdditionalData;
4317
+ GaliciaComponent.prototype.isGeneratingQr;
4172
4318
  /** @type {?} */
4173
- BankTransferComponent.prototype.discountRate;
4319
+ GaliciaComponent.prototype.paymentCompleted;
4174
4320
  /** @type {?} */
4175
- BankTransferComponent.prototype.discountAmountValue;
4321
+ GaliciaComponent.prototype.paymentId;
4176
4322
  /** @type {?} */
4177
- BankTransferComponent.prototype.statusPay;
4323
+ GaliciaComponent.prototype.showQr;
4178
4324
  /** @type {?} */
4179
- BankTransferComponent.prototype.paymentForm;
4325
+ GaliciaComponent.prototype.expired;
4180
4326
  /** @type {?} */
4181
- BankTransferComponent.prototype.isLoading;
4327
+ GaliciaComponent.prototype.isLoading;
4182
4328
  /** @type {?} */
4183
- BankTransferComponent.prototype.errorMessage;
4329
+ GaliciaComponent.prototype.hasError;
4184
4330
  /** @type {?} */
4185
- BankTransferComponent.prototype.submittedSuccessfully;
4331
+ GaliciaComponent.prototype.minutes;
4186
4332
  /** @type {?} */
4187
- BankTransferComponent.prototype.amountCopied;
4333
+ GaliciaComponent.prototype.seconds;
4188
4334
  /**
4189
4335
  * @type {?}
4190
4336
  * @private
4191
4337
  */
4192
- BankTransferComponent.prototype.bankTransferApi;
4338
+ GaliciaComponent.prototype.interval;
4339
+ /** @type {?} */
4340
+ GaliciaComponent.prototype.validationInterval;
4341
+ /** @type {?} */
4342
+ GaliciaComponent.prototype.paymentResult;
4343
+ /**
4344
+ * @type {?}
4345
+ * @private
4346
+ */
4347
+ GaliciaComponent.prototype.galiciaApiService;
4193
4348
  }
4194
4349
 
4195
4350
  /**
4196
4351
  * @fileoverview added by tsickle
4197
- * Generated from: lib/bank-transfer/bank-transfer.module.ts
4352
+ * Generated from: lib/galicia/galicia.module.ts
4198
4353
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4199
4354
  */
4200
- var BankTransferModule = /** @class */ (function () {
4201
- function BankTransferModule() {
4355
+ /** @type {?} */
4356
+ var COMPONENTS$2 = [
4357
+ GaliciaComponent
4358
+ ];
4359
+ var GaliciaModule = /** @class */ (function () {
4360
+ function GaliciaModule() {
4202
4361
  }
4203
- BankTransferModule.decorators = [
4362
+ GaliciaModule.decorators = [
4204
4363
  { type: core.NgModule, args: [{
4205
4364
  declarations: [
4206
- BankTransferComponent
4365
+ COMPONENTS$2
4366
+ ],
4367
+ exports: [
4368
+ COMPONENTS$2
4207
4369
  ],
4208
4370
  imports: [
4209
4371
  common.CommonModule,
4210
4372
  forms.FormsModule,
4211
4373
  forms.ReactiveFormsModule,
4212
- http.HttpClientModule
4213
- ],
4214
- exports: [
4215
- BankTransferComponent
4374
+ router.RouterModule,
4216
4375
  ],
4217
4376
  providers: [
4218
- BankTransferApiService
4377
+ GaliciaApiService
4219
4378
  ]
4220
4379
  },] }
4221
4380
  ];
4222
- return BankTransferModule;
4381
+ return GaliciaModule;
4223
4382
  }());
4224
4383
 
4225
4384
  /**
@@ -4234,7 +4393,7 @@
4234
4393
  PaypalModule,
4235
4394
  GoCuotasModule,
4236
4395
  ModoModule,
4237
- BankTransferModule
4396
+ GaliciaModule
4238
4397
  ];
4239
4398
  var VkPaymentsModule = /** @class */ (function () {
4240
4399
  function VkPaymentsModule() {
@@ -4242,7 +4401,8 @@
4242
4401
  VkPaymentsModule.decorators = [
4243
4402
  { type: core.NgModule, args: [{
4244
4403
  imports: LIB_MODULES,
4245
- exports: LIB_MODULES
4404
+ exports: LIB_MODULES,
4405
+ declarations: []
4246
4406
  },] }
4247
4407
  ];
4248
4408
  return VkPaymentsModule;
@@ -4265,9 +4425,9 @@
4265
4425
  exports.ɵn = ModoModule;
4266
4426
  exports.ɵo = ModoComponent;
4267
4427
  exports.ɵp = ModoApiService;
4268
- exports.ɵq = BankTransferModule;
4269
- exports.ɵr = BankTransferComponent;
4270
- exports.ɵs = BankTransferApiService;
4428
+ exports.ɵq = GaliciaModule;
4429
+ exports.ɵr = GaliciaComponent;
4430
+ exports.ɵs = GaliciaApiService;
4271
4431
 
4272
4432
  Object.defineProperty(exports, '__esModule', { value: true });
4273
4433