vk-payments 0.2.30 → 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 +355 -186
  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 +291 -149
  18. package/fesm2015/vk-payments.js.map +1 -1
  19. package/fesm5/vk-payments.js +351 -181
  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 -197
  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 -225
  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 -29
  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,305 +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
- // Tasa de descuento (10% por defecto)
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
- return this.amount ? Math.round(this.amount / (1 - this.discountRate)) : 0;
3994
- },
3995
- enumerable: true,
3996
- configurable: true
3997
- });
3998
- Object.defineProperty(BankTransferComponent.prototype, "discountAmount", {
3999
- get: /**
4000
- * @return {?}
4001
- */
4002
- function () {
4003
- return this.subtotalAmount - (this.amount || 0);
4004
- },
4005
- enumerable: true,
4006
- configurable: true
4007
- });
4008
4018
  /**
4009
4019
  * @return {?}
4010
4020
  */
4011
- BankTransferComponent.prototype.ngOnInit = /**
4021
+ GaliciaComponent.prototype.ngOnInit = /**
4012
4022
  * @return {?}
4013
4023
  */
4014
- function () { };
4024
+ function () {
4025
+ this.createInitPayment();
4026
+ };
4015
4027
  /**
4016
- * @param {?} text
4028
+ * @param {?} datos
4017
4029
  * @return {?}
4018
4030
  */
4019
- BankTransferComponent.prototype.copyToClipboard = /**
4020
- * @param {?} text
4031
+ GaliciaComponent.prototype.generateQr = /**
4032
+ * @param {?} datos
4021
4033
  * @return {?}
4022
4034
  */
4023
- function (text) {
4024
- 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
4025
4045
  * @return {?}
4026
4046
  */
4027
- function () {
4028
- /** @type {?} */
4029
- var el = document.createElement('textarea');
4030
- el.value = text;
4031
- document.body.appendChild(el);
4032
- el.select();
4033
- document.execCommand('copy');
4034
- 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();
4035
4054
  }));
4036
4055
  };
4037
4056
  /**
4038
4057
  * @return {?}
4039
4058
  */
4040
- BankTransferComponent.prototype.copyAmount = /**
4059
+ GaliciaComponent.prototype.createInitPayment = /**
4041
4060
  * @return {?}
4042
4061
  */
4043
4062
  function () {
4044
- var _this = this;
4045
- /** @type {?} */
4046
- var amountStr = this.amount ? this.amount.toFixed(2) : '0';
4047
- this.copyToClipboard(amountStr);
4048
- this.amountCopied = true;
4049
- setTimeout((/**
4050
- * @return {?}
4051
- */
4052
- 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();
4053
4071
  };
4054
4072
  /**
4055
4073
  * @return {?}
4056
4074
  */
4057
- BankTransferComponent.prototype.onSubmit = /**
4075
+ GaliciaComponent.prototype.initPayment = /**
4058
4076
  * @return {?}
4059
4077
  */
4060
4078
  function () {
4061
4079
  var _this = this;
4062
- 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.';
4063
4111
  return;
4064
- this.isLoading = true;
4065
- this.errorMessage = '';
4112
+ }
4066
4113
  /** @type {?} */
4067
- var request = {
4068
- cuit: '00000000000',
4069
- // Valor genérico mientras no se pide al usuario
4070
- checkoutId: this.checkoutId,
4071
- checkoutAdditionalData: this.checkoutAdditionalData,
4072
- storeName: this.storeName || 'Tienda VK',
4073
- storeId: this.storeId
4074
- };
4075
- this.bankTransferApi.createPayment(this.accessToken, request, this.vkUrlApi).subscribe((/**
4076
- * @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((/**
4077
4147
  * @return {?}
4078
4148
  */
4079
- function (response) {
4080
- _this.isLoading = false;
4081
- if (response && response.success) {
4082
- _this.submittedSuccessfully = true;
4083
- _this.statusPay.emit({
4084
- success: true,
4085
- paymentId: (response.data && response.data.bankTransferEcommId) ? response.data.bankTransferEcommId : '',
4086
- integrator: 'BANK_TRANSFER'
4087
- });
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;
4088
4159
  }
4089
4160
  else {
4090
- _this.errorMessage = (response.errorsMessages && response.errorsMessages.length > 0)
4091
- ? response.errorsMessages[0]
4092
- : 'Ocurrió un error al registrar la transferencia.';
4093
- _this.statusPay.emit({
4094
- success: false,
4095
- paymentId: '',
4096
- integrator: 'BANK_TRANSFER'
4097
- });
4161
+ _this.seconds--;
4098
4162
  }
4099
- }), (/**
4100
- * @param {?} error
4101
- * @return {?}
4102
- */
4103
- function (error) {
4104
- _this.isLoading = false;
4105
- _this.errorMessage = (error && error.error && error.error.errorsMessages && error.error.errorsMessages.length > 0)
4106
- ? error.error.errorsMessages[0]
4107
- : 'Ocurrió un error de conexión al registrar la transferencia.';
4108
- _this.statusPay.emit({
4109
- success: false,
4110
- paymentId: '',
4111
- integrator: 'BANK_TRANSFER'
4112
- });
4113
- console.error('Error BankTransferApiService:', error);
4114
- }));
4163
+ }), 1000);
4115
4164
  };
4116
- Object.defineProperty(BankTransferComponent.prototype, "cuitControl", {
4117
- get: /**
4165
+ /**
4166
+ * @return {?}
4167
+ */
4168
+ GaliciaComponent.prototype.startPaymentValidation = /**
4169
+ * @return {?}
4170
+ */
4171
+ function () {
4172
+ var _this = this;
4173
+ this.validationInterval = setInterval((/**
4118
4174
  * @return {?}
4119
4175
  */
4120
4176
  function () {
4121
- return this.paymentForm.get('cuit');
4122
- },
4123
- enumerable: true,
4124
- configurable: true
4125
- });
4126
- 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 = [
4127
4260
  { type: core.Component, args: [{
4128
- selector: 'vk-bank-transfer',
4129
- 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",
4130
- 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)}}"]
4131
4264
  }] }
4132
4265
  ];
4133
4266
  /** @nocollapse */
4134
- BankTransferComponent.ctorParameters = function () { return [
4135
- { type: BankTransferApiService }
4267
+ GaliciaComponent.ctorParameters = function () { return [
4268
+ { type: GaliciaApiService }
4136
4269
  ]; };
4137
- BankTransferComponent.propDecorators = {
4270
+ GaliciaComponent.propDecorators = {
4138
4271
  accessToken: [{ type: core.Input }],
4272
+ gaUrlApi: [{ type: core.Input }],
4139
4273
  vkUrlApi: [{ type: core.Input }],
4140
- amount: [{ type: core.Input }],
4274
+ userId: [{ type: core.Input }],
4275
+ logoGa: [{ type: core.Input }],
4141
4276
  storeId: [{ type: core.Input }],
4142
4277
  storeName: [{ type: core.Input }],
4278
+ sessionId: [{ type: core.Input }],
4143
4279
  checkoutId: [{ type: core.Input }],
4144
- checkoutAdditionalData: [{ type: core.Input }],
4145
- discountRate: [{ type: core.Input }],
4280
+ data: [{ type: core.Input }],
4146
4281
  statusPay: [{ type: core.Output }]
4147
4282
  };
4148
- return BankTransferComponent;
4283
+ return GaliciaComponent;
4149
4284
  }());
4150
4285
  if (false) {
4151
4286
  /** @type {?} */
4152
- 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;
4306
+ /** @type {?} */
4307
+ GaliciaComponent.prototype.statusPay;
4153
4308
  /** @type {?} */
4154
- BankTransferComponent.prototype.vkUrlApi;
4309
+ GaliciaComponent.prototype.qrImage;
4155
4310
  /** @type {?} */
4156
- BankTransferComponent.prototype.amount;
4311
+ GaliciaComponent.prototype.billNumber;
4157
4312
  /** @type {?} */
4158
- BankTransferComponent.prototype.storeId;
4313
+ GaliciaComponent.prototype.errorMessage;
4159
4314
  /** @type {?} */
4160
- BankTransferComponent.prototype.storeName;
4315
+ GaliciaComponent.prototype.OinitPayment;
4161
4316
  /** @type {?} */
4162
- BankTransferComponent.prototype.checkoutId;
4317
+ GaliciaComponent.prototype.isGeneratingQr;
4163
4318
  /** @type {?} */
4164
- BankTransferComponent.prototype.checkoutAdditionalData;
4319
+ GaliciaComponent.prototype.paymentCompleted;
4165
4320
  /** @type {?} */
4166
- BankTransferComponent.prototype.discountRate;
4321
+ GaliciaComponent.prototype.paymentId;
4167
4322
  /** @type {?} */
4168
- BankTransferComponent.prototype.statusPay;
4323
+ GaliciaComponent.prototype.showQr;
4169
4324
  /** @type {?} */
4170
- BankTransferComponent.prototype.paymentForm;
4325
+ GaliciaComponent.prototype.expired;
4171
4326
  /** @type {?} */
4172
- BankTransferComponent.prototype.isLoading;
4327
+ GaliciaComponent.prototype.isLoading;
4173
4328
  /** @type {?} */
4174
- BankTransferComponent.prototype.errorMessage;
4329
+ GaliciaComponent.prototype.hasError;
4175
4330
  /** @type {?} */
4176
- BankTransferComponent.prototype.submittedSuccessfully;
4331
+ GaliciaComponent.prototype.minutes;
4177
4332
  /** @type {?} */
4178
- BankTransferComponent.prototype.amountCopied;
4333
+ GaliciaComponent.prototype.seconds;
4179
4334
  /**
4180
4335
  * @type {?}
4181
4336
  * @private
4182
4337
  */
4183
- 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;
4184
4348
  }
4185
4349
 
4186
4350
  /**
4187
4351
  * @fileoverview added by tsickle
4188
- * Generated from: lib/bank-transfer/bank-transfer.module.ts
4352
+ * Generated from: lib/galicia/galicia.module.ts
4189
4353
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4190
4354
  */
4191
- var BankTransferModule = /** @class */ (function () {
4192
- function BankTransferModule() {
4355
+ /** @type {?} */
4356
+ var COMPONENTS$2 = [
4357
+ GaliciaComponent
4358
+ ];
4359
+ var GaliciaModule = /** @class */ (function () {
4360
+ function GaliciaModule() {
4193
4361
  }
4194
- BankTransferModule.decorators = [
4362
+ GaliciaModule.decorators = [
4195
4363
  { type: core.NgModule, args: [{
4196
4364
  declarations: [
4197
- BankTransferComponent
4365
+ COMPONENTS$2
4366
+ ],
4367
+ exports: [
4368
+ COMPONENTS$2
4198
4369
  ],
4199
4370
  imports: [
4200
4371
  common.CommonModule,
4201
4372
  forms.FormsModule,
4202
4373
  forms.ReactiveFormsModule,
4203
- http.HttpClientModule
4204
- ],
4205
- exports: [
4206
- BankTransferComponent
4374
+ router.RouterModule,
4207
4375
  ],
4208
4376
  providers: [
4209
- BankTransferApiService
4377
+ GaliciaApiService
4210
4378
  ]
4211
4379
  },] }
4212
4380
  ];
4213
- return BankTransferModule;
4381
+ return GaliciaModule;
4214
4382
  }());
4215
4383
 
4216
4384
  /**
@@ -4225,7 +4393,7 @@
4225
4393
  PaypalModule,
4226
4394
  GoCuotasModule,
4227
4395
  ModoModule,
4228
- BankTransferModule
4396
+ GaliciaModule
4229
4397
  ];
4230
4398
  var VkPaymentsModule = /** @class */ (function () {
4231
4399
  function VkPaymentsModule() {
@@ -4233,7 +4401,8 @@
4233
4401
  VkPaymentsModule.decorators = [
4234
4402
  { type: core.NgModule, args: [{
4235
4403
  imports: LIB_MODULES,
4236
- exports: LIB_MODULES
4404
+ exports: LIB_MODULES,
4405
+ declarations: []
4237
4406
  },] }
4238
4407
  ];
4239
4408
  return VkPaymentsModule;
@@ -4256,9 +4425,9 @@
4256
4425
  exports.ɵn = ModoModule;
4257
4426
  exports.ɵo = ModoComponent;
4258
4427
  exports.ɵp = ModoApiService;
4259
- exports.ɵq = BankTransferModule;
4260
- exports.ɵr = BankTransferComponent;
4261
- exports.ɵs = BankTransferApiService;
4428
+ exports.ɵq = GaliciaModule;
4429
+ exports.ɵr = GaliciaComponent;
4430
+ exports.ɵs = GaliciaApiService;
4262
4431
 
4263
4432
  Object.defineProperty(exports, '__esModule', { value: true });
4264
4433