vk-payments 0.1.0 → 0.1.1

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 (33) hide show
  1. package/bundles/vk-payments.umd.js +1096 -5
  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/go-cuotas/components/go-cuotas.component.js +525 -0
  6. package/esm2015/lib/go-cuotas/components/modal/modal.component.js +81 -0
  7. package/esm2015/lib/go-cuotas/go-cuotas.module.js +45 -0
  8. package/esm2015/lib/go-cuotas/models/go-cuotas.models.js +204 -0
  9. package/esm2015/lib/go-cuotas/services/go-cuotas.api.service.js +164 -0
  10. package/esm2015/lib/go-cuotas/services/notification.service.js +86 -0
  11. package/esm2015/lib/vk-payments.module.js +4 -2
  12. package/esm2015/vk-payments.js +6 -1
  13. package/esm5/lib/go-cuotas/components/go-cuotas.component.js +617 -0
  14. package/esm5/lib/go-cuotas/components/modal/modal.component.js +99 -0
  15. package/esm5/lib/go-cuotas/go-cuotas.module.js +49 -0
  16. package/esm5/lib/go-cuotas/models/go-cuotas.models.js +204 -0
  17. package/esm5/lib/go-cuotas/services/go-cuotas.api.service.js +234 -0
  18. package/esm5/lib/go-cuotas/services/notification.service.js +113 -0
  19. package/esm5/lib/vk-payments.module.js +4 -2
  20. package/esm5/vk-payments.js +6 -1
  21. package/fesm2015/vk-payments.js +885 -2
  22. package/fesm2015/vk-payments.js.map +1 -1
  23. package/fesm5/vk-payments.js +1091 -2
  24. package/fesm5/vk-payments.js.map +1 -1
  25. package/lib/go-cuotas/components/go-cuotas.component.d.ts +71 -0
  26. package/lib/go-cuotas/components/modal/modal.component.d.ts +12 -0
  27. package/lib/go-cuotas/go-cuotas.module.d.ts +2 -0
  28. package/lib/go-cuotas/models/go-cuotas.models.d.ts +95 -0
  29. package/lib/go-cuotas/services/go-cuotas.api.service.d.ts +15 -0
  30. package/lib/go-cuotas/services/notification.service.d.ts +11 -0
  31. package/package.json +1 -1
  32. package/vk-payments.d.ts +5 -0
  33. package/vk-payments.metadata.json +1 -1
@@ -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('@angular/material/snack-bar'), require('@angular/material'), require('@angular/platform-browser/animations')) :
3
+ typeof define === 'function' && define.amd ? define('vk-payments', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/router', '@angular/common/http', 'sha256', '@angular/material/snack-bar', '@angular/material', '@angular/platform-browser/animations'], 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.ng.material['snack-bar'], global.ng.material, global.ng.platformBrowser.animations));
5
+ }(this, function (exports, core, common, forms, router, http, sha256, snackBar, material, animations) { 'use strict';
6
6
 
7
7
  sha256 = sha256 && sha256.hasOwnProperty('default') ? sha256['default'] : sha256;
8
8
 
@@ -2605,6 +2605,1091 @@
2605
2605
  return SpsDecidirModule;
2606
2606
  }());
2607
2607
 
2608
+ /**
2609
+ * @fileoverview added by tsickle
2610
+ * Generated from: lib/go-cuotas/services/go-cuotas.api.service.ts
2611
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2612
+ */
2613
+ var GoCuotasApiService = /** @class */ (function () {
2614
+ function GoCuotasApiService(httpClient) {
2615
+ this.httpClient = httpClient;
2616
+ }
2617
+ /**
2618
+ * @param {?} url
2619
+ * @return {?}
2620
+ */
2621
+ GoCuotasApiService.prototype.normalizeUrl = /**
2622
+ * @param {?} url
2623
+ * @return {?}
2624
+ */
2625
+ function (url) {
2626
+ if (url.length > 0 && url.charAt(url.length - 1) == '/') {
2627
+ url = url.substr(0, url.length - 1);
2628
+ }
2629
+ return url;
2630
+ };
2631
+ // public sendCode(access_token: string, url: string, initPayment: InitPayment): Observable<InitPaymentResponse> {
2632
+ // this._setAuthHeaders(access_token);
2633
+ // const body = {
2634
+ // cardholder: initPayment.cardholder,
2635
+ // creditCardHash: initPayment.creditCardHash,
2636
+ // amount: initPayment.amount,
2637
+ // installments: initPayment.installments,
2638
+ // documentNumber: initPayment.documentNumber,
2639
+ // areaCode: initPayment.areaCode,
2640
+ // phoneNumber: initPayment.phoneNumber,
2641
+ // idVen: initPayment.idVen,
2642
+ // storeId: initPayment.storeId,
2643
+ // data: initPayment.data
2644
+ // };
2645
+ // return this.httpClient.post<InitPaymentResponse>(this.normalizeUrl(url) + '/send_code', body, { headers: this.authHeaders });
2646
+ // }
2647
+ // public sendCode(access_token: string, url: string, initPayment: InitPayment): Observable<InitPaymentResponse> {
2648
+ // this._setAuthHeaders(access_token);
2649
+ // const body = {
2650
+ // cardholder: initPayment.cardholder,
2651
+ // creditCardHash: initPayment.creditCardHash,
2652
+ // amount: initPayment.amount,
2653
+ // installments: initPayment.installments,
2654
+ // documentNumber: initPayment.documentNumber,
2655
+ // areaCode: initPayment.areaCode,
2656
+ // phoneNumber: initPayment.phoneNumber,
2657
+ // idVen: initPayment.idVen,
2658
+ // storeId: initPayment.storeId,
2659
+ // data: initPayment.data
2660
+ // };
2661
+ // return this.httpClient.post<InitPaymentResponse>(this.normalizeUrl(url) + '/send_code', body, { headers: this.authHeaders });
2662
+ // }
2663
+ /**
2664
+ * @param {?} access_token
2665
+ * @param {?} url
2666
+ * @param {?} initPayment
2667
+ * @return {?}
2668
+ */
2669
+ GoCuotasApiService.prototype.initPayment =
2670
+ // public sendCode(access_token: string, url: string, initPayment: InitPayment): Observable<InitPaymentResponse> {
2671
+ // this._setAuthHeaders(access_token);
2672
+ // const body = {
2673
+ // cardholder: initPayment.cardholder,
2674
+ // creditCardHash: initPayment.creditCardHash,
2675
+ // amount: initPayment.amount,
2676
+ // installments: initPayment.installments,
2677
+ // documentNumber: initPayment.documentNumber,
2678
+ // areaCode: initPayment.areaCode,
2679
+ // phoneNumber: initPayment.phoneNumber,
2680
+ // idVen: initPayment.idVen,
2681
+ // storeId: initPayment.storeId,
2682
+ // data: initPayment.data
2683
+ // };
2684
+ // return this.httpClient.post<InitPaymentResponse>(this.normalizeUrl(url) + '/send_code', body, { headers: this.authHeaders });
2685
+ // }
2686
+ /**
2687
+ * @param {?} access_token
2688
+ * @param {?} url
2689
+ * @param {?} initPayment
2690
+ * @return {?}
2691
+ */
2692
+ function (access_token, url, initPayment) {
2693
+ this._setAuthHeaders(access_token);
2694
+ /** @type {?} */
2695
+ var body = {
2696
+ cardholder: initPayment.cardholder,
2697
+ creditCardHash: initPayment.creditCardHash,
2698
+ amount: initPayment.amount,
2699
+ installments: initPayment.installments,
2700
+ documentNumber: initPayment.documentNumber,
2701
+ areaCode: initPayment.areaCode,
2702
+ phoneNumber: initPayment.phoneNumber,
2703
+ idVen: initPayment.idVen,
2704
+ storeId: initPayment.storeId,
2705
+ data: initPayment.data
2706
+ };
2707
+ return this.httpClient.post(this.normalizeUrl(url) + '/init-payment', body, { headers: this.authHeaders });
2708
+ };
2709
+ /**
2710
+ * @param {?} access_token
2711
+ * @param {?} url
2712
+ * @param {?} verificationCodeRequest
2713
+ * @return {?}
2714
+ */
2715
+ GoCuotasApiService.prototype.verificationCode = /**
2716
+ * @param {?} access_token
2717
+ * @param {?} url
2718
+ * @param {?} verificationCodeRequest
2719
+ * @return {?}
2720
+ */
2721
+ function (access_token, url, verificationCodeRequest) {
2722
+ this._setAuthHeaders(access_token);
2723
+ /** @type {?} */
2724
+ var body = {
2725
+ code: verificationCodeRequest.code,
2726
+ sale_token: verificationCodeRequest.sale_token
2727
+ };
2728
+ return this.httpClient.post(this.normalizeUrl(url) + '/code_verification', body, { headers: this.authHeaders });
2729
+ };
2730
+ /**
2731
+ * @param {?} access_token
2732
+ * @param {?} url
2733
+ * @return {?}
2734
+ */
2735
+ GoCuotasApiService.prototype.getOrders = /**
2736
+ * @param {?} access_token
2737
+ * @param {?} url
2738
+ * @return {?}
2739
+ */
2740
+ function (access_token, url) {
2741
+ this._setAuthHeaders(access_token);
2742
+ return this.httpClient.get(this.normalizeUrl(url) + '/orders', { headers: this.authHeaders });
2743
+ };
2744
+ /**
2745
+ * @param {?} access_token
2746
+ * @param {?} url
2747
+ * @param {?} cardRequest
2748
+ * @return {?}
2749
+ */
2750
+ GoCuotasApiService.prototype.addOrUpdateCard = /**
2751
+ * @param {?} access_token
2752
+ * @param {?} url
2753
+ * @param {?} cardRequest
2754
+ * @return {?}
2755
+ */
2756
+ function (access_token, url, cardRequest) {
2757
+ this._setAuthHeaders(access_token);
2758
+ /** @type {?} */
2759
+ var body = {
2760
+ sale_token: cardRequest.sale_token,
2761
+ number: cardRequest.number,
2762
+ expiration_month: cardRequest.expiration_month,
2763
+ expiration_year: cardRequest.expiration_year,
2764
+ security_code: cardRequest.security_code
2765
+ };
2766
+ return this.httpClient.post(this.normalizeUrl(url) + '/cards', body, { headers: this.authHeaders });
2767
+ };
2768
+ /**
2769
+ * @param {?} access_token
2770
+ * @param {?} url
2771
+ * @param {?} payment
2772
+ * @return {?}
2773
+ */
2774
+ GoCuotasApiService.prototype.payment = /**
2775
+ * @param {?} access_token
2776
+ * @param {?} url
2777
+ * @param {?} payment
2778
+ * @return {?}
2779
+ */
2780
+ function (access_token, url, payment) {
2781
+ this._setAuthHeaders(access_token);
2782
+ /** @type {?} */
2783
+ var body = {
2784
+ id: payment.id,
2785
+ cardholder: payment.cardholder,
2786
+ sale_token: payment.sale_token,
2787
+ code: payment.code,
2788
+ creditCardHash: payment.creditCardHash,
2789
+ cardMonthExpiration: payment.cardMonthExpiration,
2790
+ cardYearExpiration: payment.cardYearExpiration,
2791
+ cardSecurityCode: payment.cardSecurityCode,
2792
+ idVen: payment.idVen,
2793
+ storeId: payment.storeId
2794
+ };
2795
+ return this.httpClient.post(this.normalizeUrl(url) + '/payment', body, { headers: this.authHeaders });
2796
+ };
2797
+ /**
2798
+ * @private
2799
+ * @param {?} access_token
2800
+ * @return {?}
2801
+ */
2802
+ GoCuotasApiService.prototype._setAuthHeaders = /**
2803
+ * @private
2804
+ * @param {?} access_token
2805
+ * @return {?}
2806
+ */
2807
+ function (access_token) {
2808
+ /** @type {?} */
2809
+ var userToken = 'Bearer ' + access_token;
2810
+ this.authHeaders = new http.HttpHeaders({ 'Content-Type': 'application/json', 'Authorization': userToken });
2811
+ };
2812
+ GoCuotasApiService.decorators = [
2813
+ { type: core.Injectable, args: [{
2814
+ providedIn: 'root'
2815
+ },] }
2816
+ ];
2817
+ /** @nocollapse */
2818
+ GoCuotasApiService.ctorParameters = function () { return [
2819
+ { type: http.HttpClient }
2820
+ ]; };
2821
+ /** @nocollapse */ GoCuotasApiService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function GoCuotasApiService_Factory() { return new GoCuotasApiService(core.ɵɵinject(http.HttpClient)); }, token: GoCuotasApiService, providedIn: "root" });
2822
+ return GoCuotasApiService;
2823
+ }());
2824
+ if (false) {
2825
+ /**
2826
+ * @type {?}
2827
+ * @private
2828
+ */
2829
+ GoCuotasApiService.prototype.authHeaders;
2830
+ /**
2831
+ * @type {?}
2832
+ * @private
2833
+ */
2834
+ GoCuotasApiService.prototype.httpClient;
2835
+ }
2836
+
2837
+ /**
2838
+ * @fileoverview added by tsickle
2839
+ * Generated from: lib/go-cuotas/components/modal/modal.component.ts
2840
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2841
+ */
2842
+ var ModalComponent = /** @class */ (function () {
2843
+ function ModalComponent() {
2844
+ this.modalVisible = false;
2845
+ this.verificationCode = '';
2846
+ this.codeVerified = new core.EventEmitter();
2847
+ }
2848
+ /**
2849
+ * @return {?}
2850
+ */
2851
+ ModalComponent.prototype.ngOnInit = /**
2852
+ * @return {?}
2853
+ */
2854
+ function () {
2855
+ this.verificationCode = '';
2856
+ };
2857
+ /**
2858
+ * @return {?}
2859
+ */
2860
+ ModalComponent.prototype.openModal = /**
2861
+ * @return {?}
2862
+ */
2863
+ function () {
2864
+ this.verificationCode = '';
2865
+ this.modalVisible = true;
2866
+ document.body.style.overflow = '';
2867
+ };
2868
+ /**
2869
+ * @return {?}
2870
+ */
2871
+ ModalComponent.prototype.closeModal = /**
2872
+ * @return {?}
2873
+ */
2874
+ function () {
2875
+ this.modalVisible = false;
2876
+ document.body.style.overflow = 'hidden';
2877
+ };
2878
+ /**
2879
+ * @return {?}
2880
+ */
2881
+ ModalComponent.prototype.onSubmitCode = /**
2882
+ * @return {?}
2883
+ */
2884
+ function () {
2885
+ if (this.verificationCode) {
2886
+ console.log('Código ingresado:', this.verificationCode);
2887
+ this.codeVerified.emit(this.verificationCode); // Emitir el código ingresado
2888
+ this.modalVisible = false;
2889
+ }
2890
+ else {
2891
+ alert('Por favor ingrese el código.');
2892
+ }
2893
+ };
2894
+ /**
2895
+ * @return {?}
2896
+ */
2897
+ ModalComponent.prototype.onVerificationCodeChange = /**
2898
+ * @return {?}
2899
+ */
2900
+ function () {
2901
+ var _this = this;
2902
+ if (isNaN(+this.verificationCode)) {
2903
+ setTimeout((/**
2904
+ * @return {?}
2905
+ */
2906
+ function () {
2907
+ _this.verificationCode = '';
2908
+ }));
2909
+ }
2910
+ };
2911
+ ModalComponent.decorators = [
2912
+ { type: core.Component, args: [{
2913
+ selector: 'lib-modal',
2914
+ template: "<div class=\"custom-modal-overlay\" [ngClass]=\"{ show: modalVisible }\" *ngIf=\"modalVisible\">\n <div class=\"custom-modal\">\n <div class=\"custom-modal-header\">\n <h5 class=\"custom-modal-title\">Ingrese el c\u00F3digo</h5>\n <button type=\"button\" class=\"custom-modal-close\" (click)=\"closeModal()\">\n &times;\n </button>\n </div>\n <div class=\"custom-modal-body\">\n <form (ngSubmit)=\"onSubmitCode()\">\n <div class=\"form-group\">\n <label for=\"verificationCode\">C\u00F3digo de verificaci\u00F3n:</label>\n <input type=\"text\" class=\"custom-input\" id=\"verificationCode\" [(ngModel)]=\"verificationCode\" name=\"verificationCode\"\n required minlength=\"4\" maxlength=\"4\" (input)=\"onVerificationCodeChange()\" #verificationCodeInput=\"ngModel\"/>\n </div>\n\n <div *ngIf=\"verificationCodeInput.invalid && verificationCodeInput.touched\" class=\"error-message\">\n <p *ngIf=\"verificationCodeInput.errors && verificationCodeInput.errors.minlength\"\n >El c\u00F3digo debe tener 4 caracteres.\n </p>\n <p *ngIf=\"verificationCodeInput.errors && verificationCodeInput.errors.minlength\">\n El c\u00F3digo debe tener 4 caracteres.\n </p>\n </div>\n\n <button type=\"submit\" class=\"custom-button\" [disabled]=\"verificationCodeInput.invalid\">\n Verificar\n </button>\n </form>\n </div>\n </div>\n</div>\n",
2915
+ styles: [".custom-modal-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;opacity:0;visibility:hidden;transition:opacity .3s,visibility .3s;pointer-events:none;z-index:1050}.custom-modal-overlay.show{opacity:1;visibility:visible;pointer-events:auto}.custom-modal{background-color:#fff;border-radius:8px;width:90%;max-width:400px;box-shadow:0 4px 6px rgba(0,0,0,.1);overflow:hidden;-webkit-animation:.3s ease-out fadeIn;animation:.3s ease-out fadeIn;z-index:1060}.custom-modal-header{background-color:#009ee3;color:#fff;padding:15px;display:flex;justify-content:space-between;align-items:center}.custom-modal-title{margin:0;font-size:18px;font-weight:700}.custom-modal-close{background:0 0;border:none;font-size:24px;color:#fff;cursor:pointer}.custom-modal-body{padding:20px}.custom-input{width:100%;padding:10px;border:1px solid #ddd;border-radius:4px;font-size:16px;margin-top:5px;box-sizing:border-box}.custom-button{background-color:#009ee3;color:#fff;border:none;border-radius:4px;padding:10px 20px;font-size:16px;cursor:pointer;margin-top:15px;display:block;width:100%;text-align:center;transition:background-color .3s}.custom-button:hover{background-color:#009ee3}.error-message{color:red;font-size:14px;margin-top:5px}.custom-input.ng-touched.ng-invalid{border-color:red}@-webkit-keyframes fadeIn{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeIn{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}"]
2916
+ }] }
2917
+ ];
2918
+ /** @nocollapse */
2919
+ ModalComponent.ctorParameters = function () { return []; };
2920
+ ModalComponent.propDecorators = {
2921
+ codeVerified: [{ type: core.Output }]
2922
+ };
2923
+ return ModalComponent;
2924
+ }());
2925
+ if (false) {
2926
+ /** @type {?} */
2927
+ ModalComponent.prototype.modalVisible;
2928
+ /** @type {?} */
2929
+ ModalComponent.prototype.verificationCode;
2930
+ /** @type {?} */
2931
+ ModalComponent.prototype.codeVerified;
2932
+ }
2933
+
2934
+ /**
2935
+ * @fileoverview added by tsickle
2936
+ * Generated from: lib/go-cuotas/services/notification.service.ts
2937
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2938
+ */
2939
+ var NotificationService = /** @class */ (function () {
2940
+ function NotificationService(snackbar) {
2941
+ this.snackbar = snackbar;
2942
+ }
2943
+ /**
2944
+ * @return {?}
2945
+ */
2946
+ NotificationService.prototype.hideNotification = /**
2947
+ * @return {?}
2948
+ */
2949
+ function () {
2950
+ this.snackbar.dismiss();
2951
+ };
2952
+ /**
2953
+ * @param {?} message
2954
+ * @param {?=} duration
2955
+ * @return {?}
2956
+ */
2957
+ NotificationService.prototype.showSnackBarMessage = /**
2958
+ * @param {?} message
2959
+ * @param {?=} duration
2960
+ * @return {?}
2961
+ */
2962
+ function (message, duration) {
2963
+ this.snackbar.open(message, undefined, {
2964
+ duration: duration
2965
+ });
2966
+ };
2967
+ /**
2968
+ * @param {?} message
2969
+ * @param {?} title
2970
+ * @return {?}
2971
+ */
2972
+ NotificationService.prototype.showSuccess = /**
2973
+ * @param {?} message
2974
+ * @param {?} title
2975
+ * @return {?}
2976
+ */
2977
+ function (message, title) {
2978
+ this.snackbar.open(title + ' ' + message, undefined, {
2979
+ duration: 6000, panelClass: ['success-snackbar']
2980
+ });
2981
+ };
2982
+ /**
2983
+ * @param {?} message
2984
+ * @param {?} title
2985
+ * @return {?}
2986
+ */
2987
+ NotificationService.prototype.showError = /**
2988
+ * @param {?} message
2989
+ * @param {?} title
2990
+ * @return {?}
2991
+ */
2992
+ function (message, title) {
2993
+ this.snackbar.open(title + ' ' + message, undefined, {
2994
+ duration: 6000, panelClass: ['error-snackbar']
2995
+ });
2996
+ };
2997
+ /**
2998
+ * @param {?} message
2999
+ * @param {?} title
3000
+ * @return {?}
3001
+ */
3002
+ NotificationService.prototype.showWarning = /**
3003
+ * @param {?} message
3004
+ * @param {?} title
3005
+ * @return {?}
3006
+ */
3007
+ function (message, title) {
3008
+ this.snackbar.open(title + ' ' + message, undefined, {
3009
+ duration: 6000, panelClass: ['warning-snackbar']
3010
+ });
3011
+ };
3012
+ /**
3013
+ * @param {?} message
3014
+ * @param {?} title
3015
+ * @return {?}
3016
+ */
3017
+ NotificationService.prototype.showInfo = /**
3018
+ * @param {?} message
3019
+ * @param {?} title
3020
+ * @return {?}
3021
+ */
3022
+ function (message, title) {
3023
+ this.snackbar.open(title + ' ' + message, undefined, {
3024
+ duration: 6000, panelClass: ['info-snackbar']
3025
+ });
3026
+ };
3027
+ NotificationService.decorators = [
3028
+ { type: core.Injectable }
3029
+ ];
3030
+ /** @nocollapse */
3031
+ NotificationService.ctorParameters = function () { return [
3032
+ { type: snackBar.MatSnackBar }
3033
+ ]; };
3034
+ return NotificationService;
3035
+ }());
3036
+ if (false) {
3037
+ /**
3038
+ * @type {?}
3039
+ * @private
3040
+ */
3041
+ NotificationService.prototype.snackbar;
3042
+ }
3043
+
3044
+ /**
3045
+ * @fileoverview added by tsickle
3046
+ * Generated from: lib/go-cuotas/components/go-cuotas.component.ts
3047
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3048
+ */
3049
+ var GoCuotasComponent = /** @class */ (function () {
3050
+ function GoCuotasComponent(goCuotasApiService, notificationService) {
3051
+ this.goCuotasApiService = goCuotasApiService;
3052
+ this.notificationService = notificationService;
3053
+ this.sale_token = '';
3054
+ this.error_message = '';
3055
+ this.paymentCompleted = false;
3056
+ this.loadingMessage = 'Iniciando el pago...';
3057
+ this.paymentStatus = 'ok';
3058
+ this.disabled = false;
3059
+ this.submitted = false;
3060
+ this.isLoading = false;
3061
+ this.hasError = false;
3062
+ // accessToken: string = '2569793-51e1725c-9334-4ea2-ada0-b0c87187443c';
3063
+ // url: string = 'https://sandbox.gocuotas.com/api/full_sale/v1/';
3064
+ this.paymentResult = { success: false, paymentId: '', integrator: 'GOCUOTAS' };
3065
+ }
3066
+ /**
3067
+ * @return {?}
3068
+ */
3069
+ GoCuotasComponent.prototype.ngOnInit = /**
3070
+ * @return {?}
3071
+ */
3072
+ function () {
3073
+ this.defaultDocType = '';
3074
+ this.installments = 0;
3075
+ this.currentInstallments = [
3076
+ { value: 2, label: '2 Cuotas' },
3077
+ { value: 3, label: '3 Cuotas' },
3078
+ { value: 4, label: '4 Cuotas' }
3079
+ ]; // Opciones para "Cantidad de cuotas"
3080
+ this.totalAmount = Number(this.paymentAmount) / 100;
3081
+ };
3082
+ /**
3083
+ * @param {?} event
3084
+ * @return {?}
3085
+ */
3086
+ GoCuotasComponent.prototype.onSubmit = /**
3087
+ * @param {?} event
3088
+ * @return {?}
3089
+ */
3090
+ function (event) {
3091
+ event.preventDefault();
3092
+ this.submitted = true;
3093
+ if (!this.checkOutForm.valid) {
3094
+ return;
3095
+ }
3096
+ this.isLoading = true;
3097
+ this.paymentCompleted = false;
3098
+ this.loadingMessage = 'Iniciando el pago...';
3099
+ this.paymentResult = { success: false, paymentId: '', integrator: 'GOCUOTAS' };
3100
+ this.OinitPayment = {
3101
+ amount: Number(this.paymentAmount),
3102
+ areaCode: this.codAreaText,
3103
+ installments: this.installments,
3104
+ documentNumber: this.dniText,
3105
+ phoneNumber: this.telText,
3106
+ cardholder: this.defaultName,
3107
+ creditCardHash: this.cardText,
3108
+ idVen: this.idVen,
3109
+ storeId: this.storeId
3110
+ };
3111
+ this.initPayment();
3112
+ };
3113
+ /**
3114
+ * @return {?}
3115
+ */
3116
+ GoCuotasComponent.prototype.initPayment = /**
3117
+ * @return {?}
3118
+ */
3119
+ function () {
3120
+ var _this = this;
3121
+ this.isLoading = true;
3122
+ this.loadingMessage = 'Enviando código...';
3123
+ this.goCuotasApiService.initPayment(this.accessToken, this.vkUrlApi, this.OinitPayment)
3124
+ .subscribe({
3125
+ next: (/**
3126
+ * @param {?} v
3127
+ * @return {?}
3128
+ */
3129
+ function (v) { return _this.initPaymentResponseHandler(v); }),
3130
+ error: (/**
3131
+ * @param {?} v
3132
+ * @return {?}
3133
+ */
3134
+ function (v) { return _this.ResponseHandlerError(v); })
3135
+ });
3136
+ };
3137
+ /**
3138
+ * @private
3139
+ * @param {?} response
3140
+ * @return {?}
3141
+ */
3142
+ GoCuotasComponent.prototype.initPaymentResponseHandler = /**
3143
+ * @private
3144
+ * @param {?} response
3145
+ * @return {?}
3146
+ */
3147
+ function (response) {
3148
+ if (!response.success) {
3149
+ console.log(response.errorsMessages);
3150
+ this.error_message = response.errorsMessages[0];
3151
+ return;
3152
+ }
3153
+ this.Opayment = {
3154
+ id: response.data.paymentId,
3155
+ cardholder: this.defaultName,
3156
+ sale_token: response.data.response.sale_token,
3157
+ creditCardHash: this.cardText,
3158
+ cardMonthExpiration: Number(this.monthText),
3159
+ cardYearExpiration: Number(this.yearText),
3160
+ cardSecurityCode: Number(this.cvcText),
3161
+ idVen: this.idVen,
3162
+ storeId: this.storeId
3163
+ };
3164
+ this.isLoading = false;
3165
+ this.modal.openModal();
3166
+ this.paymentStatus = 'sentCode';
3167
+ };
3168
+ /**
3169
+ * @param {?} code
3170
+ * @return {?}
3171
+ */
3172
+ GoCuotasComponent.prototype.onCodeSent = /**
3173
+ * @param {?} code
3174
+ * @return {?}
3175
+ */
3176
+ function (code) {
3177
+ this.isLoading = true;
3178
+ this.loadingMessage = 'Procesando pago...';
3179
+ this.Opayment.code = Number(code);
3180
+ if (code !== null) {
3181
+ this.finishPayment();
3182
+ }
3183
+ };
3184
+ /**
3185
+ * @return {?}
3186
+ */
3187
+ GoCuotasComponent.prototype.finishPayment = /**
3188
+ * @return {?}
3189
+ */
3190
+ function () {
3191
+ var _this = this;
3192
+ this.paymentStatus = 'ok';
3193
+ this.goCuotasApiService.payment(this.accessToken, this.vkUrlApi, this.Opayment)
3194
+ .subscribe({
3195
+ next: (/**
3196
+ * @param {?} v
3197
+ * @return {?}
3198
+ */
3199
+ function (v) { return _this.FinishPaymentResponseHandler(v); }),
3200
+ error: (/**
3201
+ * @param {?} v
3202
+ * @return {?}
3203
+ */
3204
+ function (v) { return _this.ResponseHandlerError(v); })
3205
+ });
3206
+ };
3207
+ /**
3208
+ * @private
3209
+ * @param {?} response
3210
+ * @return {?}
3211
+ */
3212
+ GoCuotasComponent.prototype.ResponseHandlerError = /**
3213
+ * @private
3214
+ * @param {?} response
3215
+ * @return {?}
3216
+ */
3217
+ function (response) {
3218
+ if (!response.ok && response.error === null && response.status === 500) {
3219
+ this.error_message = "Error en el servidor. Vuelva a intentar más tarde.";
3220
+ this.isLoading = false;
3221
+ this.hasError = true;
3222
+ return;
3223
+ }
3224
+ if (!response.error.data.code_successfully_sent && this.paymentStatus === 'error') {
3225
+ this.error_message = response.error.errorsMessages[0];
3226
+ this.isLoading = false;
3227
+ this.hasError = true;
3228
+ return;
3229
+ }
3230
+ if (!response.error.data.code_successfully_verified && this.paymentStatus === 'sentCode') {
3231
+ this.notificationService.showError(response.error.errorsMessages[0], 'ERROR: ');
3232
+ this.isLoading = false;
3233
+ this.modal.openModal();
3234
+ return;
3235
+ }
3236
+ this.error_message = response.error.errorsMessages[0];
3237
+ this.isLoading = false;
3238
+ this.hasError = true;
3239
+ };
3240
+ /**
3241
+ * @return {?}
3242
+ */
3243
+ GoCuotasComponent.prototype.addOrUpdateCard = /**
3244
+ * @return {?}
3245
+ */
3246
+ function () {
3247
+ var _this = this;
3248
+ this.cardRequest = {
3249
+ sale_token: this.sale_token,
3250
+ number: Number(this.cardText),
3251
+ expiration_month: Number(this.monthText),
3252
+ expiration_year: Number(this.yearText),
3253
+ security_code: Number(this.cvcText)
3254
+ };
3255
+ this.goCuotasApiService.addOrUpdateCard(this.accessToken, this.vkUrlApi, this.cardRequest)
3256
+ .subscribe({
3257
+ next: (/**
3258
+ * @param {?} v
3259
+ * @return {?}
3260
+ */
3261
+ function (v) { return _this.AddOrUpdateCardResponseHandler(v); }),
3262
+ error: (/**
3263
+ * @param {?} v
3264
+ * @return {?}
3265
+ */
3266
+ function (v) { return _this.ResponseHandlerError(v); })
3267
+ });
3268
+ };
3269
+ /**
3270
+ * @private
3271
+ * @param {?} response
3272
+ * @return {?}
3273
+ */
3274
+ GoCuotasComponent.prototype.AddOrUpdateCardResponseHandler = /**
3275
+ * @private
3276
+ * @param {?} response
3277
+ * @return {?}
3278
+ */
3279
+ function (response) {
3280
+ this.loadingMessage = 'Registrando tarjeta...';
3281
+ console.log(response);
3282
+ };
3283
+ /**
3284
+ * @private
3285
+ * @param {?} response
3286
+ * @return {?}
3287
+ */
3288
+ GoCuotasComponent.prototype.FinishPaymentResponseHandler = /**
3289
+ * @private
3290
+ * @param {?} response
3291
+ * @return {?}
3292
+ */
3293
+ function (response) {
3294
+ console.log('respuesta finishpayment: ', response);
3295
+ this.paymentStatus = 'ok';
3296
+ if (!response.success) {
3297
+ this.error_message = response.errorsMessages[0];
3298
+ return;
3299
+ }
3300
+ console.log('Pago aprobado');
3301
+ this.loadingMessage = '¡Pago procesado correctamente!';
3302
+ this.paymentCompleted = true;
3303
+ };
3304
+ /**
3305
+ * @return {?}
3306
+ */
3307
+ GoCuotasComponent.prototype.restartForm = /**
3308
+ * @return {?}
3309
+ */
3310
+ function () {
3311
+ this.hasError = false;
3312
+ this.submitted = false;
3313
+ this.paymentStatus = 'ok';
3314
+ this.checkOutForm.reset();
3315
+ this.installments = 0;
3316
+ this.defaultDocType = '';
3317
+ };
3318
+ // Input controls
3319
+ // Input controls
3320
+ /**
3321
+ * @return {?}
3322
+ */
3323
+ GoCuotasComponent.prototype.onYearChange =
3324
+ // Input controls
3325
+ /**
3326
+ * @return {?}
3327
+ */
3328
+ function () {
3329
+ var _this = this;
3330
+ if (isNaN(+this.yearText)) {
3331
+ setTimeout((/**
3332
+ * @return {?}
3333
+ */
3334
+ function () {
3335
+ _this.yearText = '';
3336
+ }));
3337
+ }
3338
+ };
3339
+ /**
3340
+ * @return {?}
3341
+ */
3342
+ GoCuotasComponent.prototype.onMonthLostFocus = /**
3343
+ * @return {?}
3344
+ */
3345
+ function () {
3346
+ if (+this.monthText > 0 && !isNaN(+this.monthText)) {
3347
+ if (this.monthText == '1') {
3348
+ this.monthText = '01';
3349
+ }
3350
+ }
3351
+ };
3352
+ /**
3353
+ * @return {?}
3354
+ */
3355
+ GoCuotasComponent.prototype.onMonthChange = /**
3356
+ * @return {?}
3357
+ */
3358
+ function () {
3359
+ var _this = this;
3360
+ if (+this.monthText >= 0 && +this.monthText < 13 && !isNaN(+this.monthText)) {
3361
+ switch (this.monthText) {
3362
+ case '2': {
3363
+ this.monthText = '02';
3364
+ break;
3365
+ }
3366
+ case '3': {
3367
+ this.monthText = '03';
3368
+ break;
3369
+ }
3370
+ case '4': {
3371
+ this.monthText = '04';
3372
+ break;
3373
+ }
3374
+ case '5': {
3375
+ this.monthText = '05';
3376
+ break;
3377
+ }
3378
+ case '6': {
3379
+ this.monthText = '06';
3380
+ break;
3381
+ }
3382
+ case '7': {
3383
+ this.monthText = '07';
3384
+ break;
3385
+ }
3386
+ case '8': {
3387
+ this.monthText = '08';
3388
+ break;
3389
+ }
3390
+ case '9': {
3391
+ this.monthText = '09';
3392
+ break;
3393
+ }
3394
+ }
3395
+ }
3396
+ else {
3397
+ setTimeout((/**
3398
+ * @return {?}
3399
+ */
3400
+ function () {
3401
+ _this.monthText = '';
3402
+ }));
3403
+ }
3404
+ };
3405
+ /**
3406
+ * @return {?}
3407
+ */
3408
+ GoCuotasComponent.prototype.onCodeChange = /**
3409
+ * @return {?}
3410
+ */
3411
+ function () {
3412
+ var _this = this;
3413
+ if (isNaN(+this.cvcText)) {
3414
+ setTimeout((/**
3415
+ * @return {?}
3416
+ */
3417
+ function () {
3418
+ _this.cvcText = '';
3419
+ }));
3420
+ }
3421
+ };
3422
+ /**
3423
+ * @return {?}
3424
+ */
3425
+ GoCuotasComponent.prototype.onDniChange = /**
3426
+ * @return {?}
3427
+ */
3428
+ function () {
3429
+ var _this = this;
3430
+ if (isNaN(+this.dniText)) {
3431
+ setTimeout((/**
3432
+ * @return {?}
3433
+ */
3434
+ function () {
3435
+ _this.dniText = '';
3436
+ }));
3437
+ }
3438
+ };
3439
+ /**
3440
+ * @return {?}
3441
+ */
3442
+ GoCuotasComponent.prototype.onMailChange = /**
3443
+ * @return {?}
3444
+ */
3445
+ function () {
3446
+ var _this = this;
3447
+ if (!isNaN(+this.mailText)) {
3448
+ setTimeout((/**
3449
+ * @return {?}
3450
+ */
3451
+ function () {
3452
+ _this.mailText = '';
3453
+ }));
3454
+ }
3455
+ };
3456
+ /**
3457
+ * @return {?}
3458
+ */
3459
+ GoCuotasComponent.prototype.onCodAreaChange = /**
3460
+ * @return {?}
3461
+ */
3462
+ function () {
3463
+ var _this = this;
3464
+ if (isNaN(+this.codAreaText)) {
3465
+ setTimeout((/**
3466
+ * @return {?}
3467
+ */
3468
+ function () {
3469
+ _this.codAreaText = '';
3470
+ }));
3471
+ }
3472
+ };
3473
+ /**
3474
+ * @return {?}
3475
+ */
3476
+ GoCuotasComponent.prototype.onTelChange = /**
3477
+ * @return {?}
3478
+ */
3479
+ function () {
3480
+ var _this = this;
3481
+ if (isNaN(+this.telText)) {
3482
+ setTimeout((/**
3483
+ * @return {?}
3484
+ */
3485
+ function () {
3486
+ _this.telText = '';
3487
+ }));
3488
+ }
3489
+ };
3490
+ /**
3491
+ * @return {?}
3492
+ */
3493
+ GoCuotasComponent.prototype.onPayerNameChange = /**
3494
+ * @return {?}
3495
+ */
3496
+ function () {
3497
+ var _this = this;
3498
+ if (!isNaN(+this.defaultName)) {
3499
+ setTimeout((/**
3500
+ * @return {?}
3501
+ */
3502
+ function () {
3503
+ _this.defaultName = '';
3504
+ }));
3505
+ }
3506
+ };
3507
+ /**
3508
+ * @return {?}
3509
+ */
3510
+ GoCuotasComponent.prototype.onCardChange = /**
3511
+ * @return {?}
3512
+ */
3513
+ function () {
3514
+ var _this = this;
3515
+ if (isNaN(+this.cardText)) {
3516
+ setTimeout((/**
3517
+ * @return {?}
3518
+ */
3519
+ function () {
3520
+ _this.cardText = '';
3521
+ }));
3522
+ }
3523
+ };
3524
+ /**
3525
+ * @return {?}
3526
+ */
3527
+ GoCuotasComponent.prototype.onInstallmentsChange = /**
3528
+ * @return {?}
3529
+ */
3530
+ function () {
3531
+ //console.log('cuotas seleccionadas' ,this.installments)
3532
+ };
3533
+ /**
3534
+ * @return {?}
3535
+ */
3536
+ GoCuotasComponent.prototype.onPaste = /**
3537
+ * @return {?}
3538
+ */
3539
+ function () {
3540
+ return false;
3541
+ };
3542
+ GoCuotasComponent.decorators = [
3543
+ { type: core.Component, args: [{
3544
+ selector: 'lib-go-cuotas',
3545
+ template: "<div *ngIf=\"isLoading\" class=\"loading-overlay\">\n <div class=\"loading-message\">\n <p>{{ loadingMessage }}</p>\n <div *ngIf=\"!paymentCompleted\" class=\"spinner\"></div>\n <div *ngIf=\"paymentCompleted\" class=\"success-icon\">\u2714\uFE0F</div>\n </div>\n</div>\n\n<div *ngIf=\"hasError\" class=\"error-overlay\">\n <div class=\"error-message\">\n <p>{{ error_message }}</p>\n <button (click)=\"restartForm()\">Reintentar</button>\n </div>\n</div>\n\n<form\n (ngSubmit)=\"onSubmit($event)\"\n class=\"gc-payment\"\n id=\"formulario\"\n #f=\"ngForm\"\n autocomplete=\"off\"\n>\n <div class=\"formRow\">\n <label for=\"cardholderName\">NOMBRE Y APELLIDO IMPRESO EN LA TARJETA</label>\n <span>\n <input\n id=\"cardholderName\"\n type=\"text\"\n name=\"cardholderName\"\n required\n maxlength=\"22\"\n data-checkout=\"cardholderName\"\n [disabled]=\"disabled\"\n (paste)=\"onPaste()\"\n (input)=\"onPayerNameChange()\"\n [(ngModel)]=\"defaultName\"\n pattern=\"^[a-zA-Z\\s]+$\"\n #cardholderName=\"ngModel\"\n />\n </span>\n <p [hidden]=\"disabled\" class=\"alert-text\" *ngIf=\"!cardholderName.valid && submitted\">\n Ingres\u00E1 el nombre completo que figura en la tarjeta.\n </p>\n </div>\n\n <div class=\"formRow\">\n <div class=\"form-row-2col\">\n\n <!-- Tipo de documento-->\n <div class=\"formRow\">\n <label for=\"docType\">TIPO DOC.</label>\n <div class=\"select-icon\">\n <select id=\"docType\" name=\"docType\" data-checkout=\"docType\" required ngModel [disabled]=\"disabled\"\n [(ngModel)]=\"defaultDocType\" #docType=\"ngModel\">\n <option value=\"\" disabled selected>Sin Seleccionar...</option>\n <option value=\"dni\">DNI</option>\n <option value=\"cuil\">CUIL</option>\n </select> \n </div>\n </div>\n\n <!-- DNI -->\n <div class=\"formRow\">\n <label for=\"docNumber\">N\u00BA DE DOC.</label>\n <span>\n <input id=\"docNumber\" type=\"text\" name=\"docNumber\" data-checkout=\"docNumber\" minlength=\"7\" maxlength=\"8\"\n required [disabled]=\"disabled\" (paste)=\"onPaste()\" (input)=\"onDniChange()\" [(ngModel)]=\"dniText\"\n #docNumber=\"ngModel\" />\n </span>\n </div>\n\n </div>\n <p [hidden]=\"disabled\" class=\"alert-text\" *ngIf=\"!docNumber.valid && submitted\">\n Complet\u00E1 el n\u00FAmero de documento.\n </p>\n <p [hidden]=\"disabled\" class=\"alert-text\" *ngIf=\"!docType.valid && submitted\">\n Seleccion\u00E1 el tipo de documento.\n </p>\n </div>\n\n <!-- Numero de tarjeta -->\n <div class=\"formRow\">\n <label for=\"cardNumber\">N\u00DAMERO DE TARJETA</label>\n <span>\n <input\n id=\"cardNumber\"\n type=\"text\"\n name=\"cardNumber\"\n data-checkout=\"cardNumber\"\n maxlength=\"19\"\n required\n thumbnail\n (input)=\"onCardChange()\"\n (paste)=\"onPaste()\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"cardText\"\n #cardNumber=\"ngModel\"\n />\n </span>\n <p [hidden]=\"disabled\" class=\"alert-text\" *ngIf=\"!cardNumber.valid && submitted\">\n Ingres\u00E1 el n\u00FAmero de tarjeta.\n </p>\n </div>\n\n <div class=\"form-row-3col\">\n <!-- Expiry-month-->\n <div class=\"formRow\">\n <label for=\"cardExpirationMonth\">MES DE EXPIRACI\u00D3N</label>\n <span>\n <input\n id=\"cardExpirationMonth\"\n type=\"text\"\n name=\"cardExpirationMonth\"\n placeholder=\"MM\"\n minlength=\"2\"\n maxlength=\"2\"\n data-checkout=\"cardExpirationMonth\"\n required\n [disabled]=\"disabled\"\n (paste)=\"onPaste()\"\n (input)=\"onMonthChange()\"\n (focusout)=\"onMonthLostFocus()\"\n [(ngModel)]=\"monthText\"\n #cardExpirationMonth=\"ngModel\"\n />\n </span>\n </div>\n\n <!-- Expiry-year-->\n <div class=\"formRow\">\n <label for=\"cardExpirationYear\">A\u00D1O DE EXPIRACI\u00D3N</label>\n <span>\n <input\n id=\"cardExpirationYear\"\n type=\"text\"\n name=\"cardExpirationYear\"\n placeholder=\"AA\"\n minlength=\"2\"\n maxlength=\"2\"\n data-checkout=\"cardExpirationYear\"\n required\n [disabled]=\"disabled\"\n (paste)=\"onPaste()\"\n (input)=\"onYearChange()\"\n [(ngModel)]=\"yearText\"\n #cardExpirationYear=\"ngModel\"\n />\n </span>\n </div>\n\n <!-- CVC -->\n <div class=\"formRow\">\n <label for=\"securityCode\">C\u00D3DIGO DE SEGURIDAD</label>\n <span>\n <input\n id=\"securityCode\"\n type=\"text\"\n name=\"securityCode\"\n placeholder=\"CSC\"\n minlength=\"3\"\n maxlength=\"4\"\n data-checkout=\"securityCode\"\n required\n [disabled]=\"disabled\"\n (paste)=\"onPaste()\"\n (input)=\"onCodeChange()\"\n [(ngModel)]=\"cvcText\"\n #securityCode=\"ngModel\"\n />\n </span>\n </div>\n </div>\n\n <div>\n <p [hidden]=\"disabled\" class=\"alert-text\" *ngIf=\"!cardExpirationMonth.valid && submitted\">\n Complet\u00E1 el mes de vencimiento.\n </p>\n <p [hidden]=\"disabled\" class=\"alert-text\" *ngIf=\"!cardExpirationYear.valid && submitted\">\n Complet\u00E1 el a\u00F1o de vencimiento.\n </p>\n <p [hidden]=\"disabled\" class=\"alert-text\" *ngIf=\"!securityCode.valid && submitted\">\n Ingres\u00E1 el c\u00F3digo de seguridad.\n </p>\n </div>\n\n <!--Cantidad de cuotas-->\n <div class=\"formRow\">\n <label for=\"installments\">CUOTAS</label>\n <div class=\"select-icon\">\n <select id=\"installments\" name=\"installments\" aria-required=\"true\" required ngModel\n [(ngModel)]=\"installments\" (change)=\"onInstallmentsChange()\" [disabled]=\"disabled\" #inst=\"ngModel\">\n <option value=\"0\" disabled selected>Sin Seleccionar...</option>\n <option *ngFor=\"let current of currentInstallments\" [value]=\"current.value\">\n {{ current.label }}\n </option>\n </select>\n </div>\n <p [hidden]=\"disabled\" class=\"alert-text\" *ngIf=\"!inst.valid && submitted\">\n Eleg\u00ED la cantidad de cuotas.\n </p>\n </div>\n\n <div class=\"formRow\">\n <div class=\"form-row-3col\">\n\n <!-- Correo electr\u00F3nico -->\n <div class=\"formRow\">\n <label for=\"mail\">CORREO ELECTR\u00D3NICO</label>\n <span>\n <input id=\"mail\" type=\"text\" name=\"mail\" data-checkout=\"mail\" pattern=\"^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$\"\n required [disabled]=\"disabled\" (paste)=\"onPaste()\" (input)=\"onMailChange()\" [(ngModel)]=\"mailText\"\n #mail=\"ngModel\"/>\n </span>\n </div>\n\n <!-- C\u00F3digo de \u00E1rea -->\n <div class=\"formRow\">\n <label for=\"codArea\">COD. \u00C1REA</label>\n <span>\n <input id=\"codArea\" type=\"text\" name=\"codArea\" data-checkout=\"codArea\" minlength=\"2\" maxlength=\"4\"\n required [disabled]=\"disabled\" (paste)=\"onPaste()\" (input)=\"onCodAreaChange()\" [(ngModel)]=\"codAreaText\"\n #codArea=\"ngModel\" />\n </span>\n </div>\n\n <!-- Tel\u00E9fono -->\n <div class=\"formRow\">\n <label for=\"tel\">TEL\u00C9FONO</label>\n <span>\n <input id=\"tel\" type=\"text\" name=\"tel\" data-checkout=\"tel\" minlength=\"6\" maxlength=\"8\"\n required [disabled]=\"disabled\" (paste)=\"onPaste()\" (input)=\"onTelChange()\" [(ngModel)]=\"telText\"\n #tel=\"ngModel\" />\n </span>\n </div>\n\n </div>\n </div>\n\n <div>\n <p [hidden]=\"disabled\" class=\"alert-text\" *ngIf=\"!mail.valid && submitted\">\n Complet\u00E1 el correo electr\u00F3nico.\n </p>\n <p [hidden]=\"disabled\" class=\"alert-text\" *ngIf=\"!codArea.valid && submitted\">\n Complet\u00E1 el c\u00F3digo de \u00E1rea.\n </p>\n <p [hidden]=\"disabled\" class=\"alert-text\" *ngIf=\"!tel.valid && submitted\">\n Ingres\u00E1 el tel\u00E9fono.\n </p>\n </div>\n\n <button type=\"submit\">Pagar ${{ totalAmount }}</button>\n</form>\n\n<lib-modal (codeVerified)=\"onCodeSent($event)\"></lib-modal>",
3546
+ styles: ["@charset \"UTF-8\";.gc-payment{background-color:transparent;font-family:inherit,sans-serif}.gc-payment label{font-size:14px;color:#888}.formRow{margin-top:10px}:focus{outline:0}.form-row-2col{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-top:10px}.form-row-2col .formRow{width:49%;margin-top:0}.form-row-3col{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-top:10px}.form-row-3col .formRow{width:32%;margin-top:0}span{background-color:#fff;border:.5px solid #707070;border-radius:2px;padding:2px 10px;display:block;margin-top:4px}input[type=password],input[type=text]{background:0 0;border:none;color:#000;font-size:15px;height:23px;width:100%;text-transform:uppercase;vertical-align:top}select{width:100%;font-size:15px;height:30px;padding:2px 10px;border:.5px solid #707070;border-radius:2px;display:block;margin-top:4px;-webkit-appearance:none;-moz-appearance:none;position:relative;z-index:1;background:0 0}select:focus{background-color:#e0e0e0;border-color:#009ee3;outline:0}option[disabled]{color:#bbb;font-weight:400}.select-icon{position:relative}.select-icon::after{content:\"\uE5CF\";font-family:\"Material Icons\";position:absolute;right:0;top:3px;font-size:24px}.icon-select{width:24px;position:absolute;right:13px}.alert-text{font-size:13px;color:#009ee3;margin-top:7px;margin-bottom:0}button{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}button:disabled{background-color:#525252}.loading-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.8);z-index:2000;display:flex;justify-content:center;align-items:center;color:#fff}.loading-message{display:flex;flex-direction:column;align-items:center;gap:1rem;text-align:center}.spinner{border:4px solid rgba(255,255,255,.2);border-left-color:#fff;border-radius:50%;width:40px;height:40px;-webkit-animation:1s linear infinite spin;animation:1s linear infinite spin}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}.error-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.8);z-index:2000;display:flex;justify-content:center;align-items:center;color:#fff}.error-message{display:flex;flex-direction:column;align-items:center;text-align:center;gap:1rem;max-width:600px}.error-message p{font-size:1.2rem}.error-message button{background-color:#ff4d4d;color:#fff;border:none;padding:.5rem 1rem;font-size:1rem;border-radius:5px;cursor:pointer;min-width:250px;max-width:250px}.error-message button:hover{background-color:#f33}.success-icon{font-size:3rem;color:#4caf50;margin-bottom:1rem}"]
3547
+ }] }
3548
+ ];
3549
+ /** @nocollapse */
3550
+ GoCuotasComponent.ctorParameters = function () { return [
3551
+ { type: GoCuotasApiService },
3552
+ { type: NotificationService }
3553
+ ]; };
3554
+ GoCuotasComponent.propDecorators = {
3555
+ accessToken: [{ type: core.Input }],
3556
+ gcUrlApi: [{ type: core.Input }],
3557
+ vkUrlApi: [{ type: core.Input }],
3558
+ paymentAmount: [{ type: core.Input }],
3559
+ logoGC: [{ type: core.Input }],
3560
+ idVen: [{ type: core.Input }],
3561
+ storeId: [{ type: core.Input }],
3562
+ data: [{ type: core.Input }],
3563
+ checkOutForm: [{ type: core.ViewChild, args: ['f', { static: false },] }],
3564
+ modal: [{ type: core.ViewChild, args: [ModalComponent, { static: false },] }]
3565
+ };
3566
+ return GoCuotasComponent;
3567
+ }());
3568
+ if (false) {
3569
+ /** @type {?} */
3570
+ GoCuotasComponent.prototype.accessToken;
3571
+ /** @type {?} */
3572
+ GoCuotasComponent.prototype.gcUrlApi;
3573
+ /** @type {?} */
3574
+ GoCuotasComponent.prototype.vkUrlApi;
3575
+ /** @type {?} */
3576
+ GoCuotasComponent.prototype.paymentAmount;
3577
+ /** @type {?} */
3578
+ GoCuotasComponent.prototype.logoGC;
3579
+ /** @type {?} */
3580
+ GoCuotasComponent.prototype.idVen;
3581
+ /** @type {?} */
3582
+ GoCuotasComponent.prototype.storeId;
3583
+ /** @type {?} */
3584
+ GoCuotasComponent.prototype.data;
3585
+ /** @type {?} */
3586
+ GoCuotasComponent.prototype.defaultName;
3587
+ /** @type {?} */
3588
+ GoCuotasComponent.prototype.mailText;
3589
+ /** @type {?} */
3590
+ GoCuotasComponent.prototype.codAreaText;
3591
+ /** @type {?} */
3592
+ GoCuotasComponent.prototype.telText;
3593
+ /** @type {?} */
3594
+ GoCuotasComponent.prototype.cardText;
3595
+ /** @type {?} */
3596
+ GoCuotasComponent.prototype.yearText;
3597
+ /** @type {?} */
3598
+ GoCuotasComponent.prototype.monthText;
3599
+ /** @type {?} */
3600
+ GoCuotasComponent.prototype.dniText;
3601
+ /** @type {?} */
3602
+ GoCuotasComponent.prototype.cvcText;
3603
+ /** @type {?} */
3604
+ GoCuotasComponent.prototype.installments;
3605
+ /** @type {?} */
3606
+ GoCuotasComponent.prototype.defaultDocType;
3607
+ /** @type {?} */
3608
+ GoCuotasComponent.prototype.currentInstallments;
3609
+ /** @type {?} */
3610
+ GoCuotasComponent.prototype.totalAmount;
3611
+ /** @type {?} */
3612
+ GoCuotasComponent.prototype.OinitPayment;
3613
+ /** @type {?} */
3614
+ GoCuotasComponent.prototype.Opayment;
3615
+ /** @type {?} */
3616
+ GoCuotasComponent.prototype.verificationCodeRequest;
3617
+ /** @type {?} */
3618
+ GoCuotasComponent.prototype.cardRequest;
3619
+ /** @type {?} */
3620
+ GoCuotasComponent.prototype.sale_token;
3621
+ /** @type {?} */
3622
+ GoCuotasComponent.prototype.error_message;
3623
+ /** @type {?} */
3624
+ GoCuotasComponent.prototype.paymentCompleted;
3625
+ /** @type {?} */
3626
+ GoCuotasComponent.prototype.loadingMessage;
3627
+ /** @type {?} */
3628
+ GoCuotasComponent.prototype.paymentStatus;
3629
+ /** @type {?} */
3630
+ GoCuotasComponent.prototype.disabled;
3631
+ /** @type {?} */
3632
+ GoCuotasComponent.prototype.submitted;
3633
+ /** @type {?} */
3634
+ GoCuotasComponent.prototype.isLoading;
3635
+ /** @type {?} */
3636
+ GoCuotasComponent.prototype.hasError;
3637
+ /** @type {?} */
3638
+ GoCuotasComponent.prototype.paymentResult;
3639
+ /** @type {?} */
3640
+ GoCuotasComponent.prototype.checkOutForm;
3641
+ /** @type {?} */
3642
+ GoCuotasComponent.prototype.modal;
3643
+ /**
3644
+ * @type {?}
3645
+ * @private
3646
+ */
3647
+ GoCuotasComponent.prototype.goCuotasApiService;
3648
+ /**
3649
+ * @type {?}
3650
+ * @private
3651
+ */
3652
+ GoCuotasComponent.prototype.notificationService;
3653
+ }
3654
+
3655
+ /**
3656
+ * @fileoverview added by tsickle
3657
+ * Generated from: lib/go-cuotas/go-cuotas.module.ts
3658
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3659
+ */
3660
+ /** @type {?} */
3661
+ var COMPONENTS$1 = [
3662
+ GoCuotasComponent,
3663
+ ModalComponent
3664
+ ];
3665
+ var GoCuotasModule = /** @class */ (function () {
3666
+ function GoCuotasModule() {
3667
+ }
3668
+ GoCuotasModule.decorators = [
3669
+ { type: core.NgModule, args: [{
3670
+ declarations: [
3671
+ COMPONENTS$1
3672
+ ],
3673
+ exports: [
3674
+ COMPONENTS$1
3675
+ ],
3676
+ imports: [
3677
+ common.CommonModule,
3678
+ forms.FormsModule,
3679
+ forms.ReactiveFormsModule,
3680
+ router.RouterModule,
3681
+ material.MatSnackBarModule,
3682
+ animations.BrowserAnimationsModule
3683
+ ],
3684
+ providers: [
3685
+ GoCuotasApiService,
3686
+ NotificationService
3687
+ ]
3688
+ },] }
3689
+ ];
3690
+ return GoCuotasModule;
3691
+ }());
3692
+
2608
3693
  /**
2609
3694
  * @fileoverview added by tsickle
2610
3695
  * Generated from: lib/vk-payments.module.ts
@@ -2614,7 +3699,8 @@
2614
3699
  var LIB_MODULES = [
2615
3700
  MercadopagoModule,
2616
3701
  SpsDecidirModule,
2617
- PaypalModule
3702
+ PaypalModule,
3703
+ GoCuotasModule
2618
3704
  ];
2619
3705
  var VkPaymentsModule = /** @class */ (function () {
2620
3706
  function VkPaymentsModule() {
@@ -2638,6 +3724,11 @@
2638
3724
  exports.ɵg = SpsDecidirApiService;
2639
3725
  exports.ɵh = PaypalModule;
2640
3726
  exports.ɵi = PayPalNewComponent;
3727
+ exports.ɵj = GoCuotasModule;
3728
+ exports.ɵk = GoCuotasComponent;
3729
+ exports.ɵl = ModalComponent;
3730
+ exports.ɵm = GoCuotasApiService;
3731
+ exports.ɵn = NotificationService;
2641
3732
 
2642
3733
  Object.defineProperty(exports, '__esModule', { value: true });
2643
3734